English

Aligning Multiclass Neural Network Classifier Criterion with Task Performance Metrics

Machine Learning 2025-05-27 v2 Machine Learning

Abstract

Multiclass neural network classifiers are typically trained using cross-entropy loss but evaluated using metrics derived from the confusion matrix, such as Accuracy, FβF_\beta-Score, and Matthews Correlation Coefficient. This mismatch between the training objective and evaluation metric can lead to suboptimal performance, particularly when the user's priorities differ from what cross-entropy implicitly optimizes. For example, in the presence of class imbalance, F1F_1-Score may be preferred over Accuracy. Similarly, given a preference towards precision, the Fβ=0.25F_{\beta=0.25}-Score will better reflect this preference than F1F_1-Score. However, standard cross-entropy loss does not accommodate such a preference. Building on prior work leveraging soft-set confusion matrices and a continuous piecewise-linear Heaviside approximation, we propose Evaluation Aligned Surrogate Training (EAST), a novel approach to train multiclass classifiers using close surrogates of confusion-matrix based metrics, thereby aligning a neural network classifier's predictions more closely to a target evaluation metric than typical cross-entropy loss. EAST introduces three key innovations: First, we propose a novel dynamic thresholding approach during training. Second, we propose using a multiclass soft-set confusion matrix. Third, we introduce an annealing process that gradually aligns the surrogate loss with the target evaluation metric. Our theoretical analysis shows that EAST results in consistent estimators of the target evaluation metric. Furthermore, we show that the learned network parameters converge asymptotically to values that optimize for the target evaluation metric. Extensive experiments validate the effectiveness of our approach, demonstrating improved alignment between training objectives and evaluation metrics, while outperforming existing methods across many datasets.

Keywords

Cite

@article{arxiv.2405.20954,
  title  = {Aligning Multiclass Neural Network Classifier Criterion with Task Performance Metrics},
  author = {Deyuan Li and Taesoo Daniel Lee and Marynel Vázquez and Nathan Tsoi},
  journal= {arXiv preprint arXiv:2405.20954},
  year   = {2025}
}
R2 v1 2026-06-28T16:48:38.184Z