Contrasting Cost-Agnostic and Cost-Sensitive Losses under Limited Model Capacity via $\mathcal H$-consistency

Jessica Finocchiaro, Sanket Shah, Milind Tambe

TL;DR

When machine learning models have limited capacity (such as linear classifiers), training with a standard, cost-agnostic loss (like cross-entropy) and post-processing via thresholding can completely fail to find the optimal decision boundary. This paper proves that optimizing task-specific "cost-sensitive" losses directly aligns a restricted model class with the downstream task, establishing a strict theoretical and empirical performance advantage.

What Problem Does This Paper Address?

Machine learning practitioners often face a fundamental design choice when dealing with asymmetric real-world costs (e.g., when a false positive is much more damaging than a false negative): Should they train a general model using a standard loss like cross-entropy and tweak the decision threshold later, or should they bake the downstream costs directly into the training objective?

Classic statistical theory states that with infinite data and an infinitely powerful model, both approaches are equivalent. However, in practice, we always operate under limited model capacity ($\mathcal{H}$). This paper addresses the theoretical mystery of why cost-sensitive training empirically outperforms post-processing in capacity-constrained settings, providing the first rigorous characterization of this performance gap through the lens of $\mathcal{H}$-consistency.

Methods

The authors leverage the framework of $\mathcal{H}$-consistency to analyze whether minimizing a surrogate loss over a restricted hypothesis class $\mathcal{H}$ guarantees optimal downstream decisions under a target cost matrix $\ell$.

They analyze and contrast three paradigms:

  1. Cost-Agnostic Surrogates + Threshold Search: Training with standard losses (e.g., cross-entropy) and searching for an optimal decision threshold $\tau$.
  2. Cost-Sensitive Embeddings: Piecewise linear, convex surrogates (like the weighted hinge loss) that directly translate the discrete cost matrix into the loss geometry.
  3. Weighted Analogs: Scaling standard proper scoring rules by class-specific weights (e.g., weighted cross-entropy).

The authors theoretically prove that cost-agnostic surrogates paired with threshold tuning are not $\mathcal{H}$-consistent for linear models. Conversely, they demonstrate that polyhedral embeddings inherently achieve $\mathcal{H}$-consistency under mild closure assumptions without requiring any post-processing threshold search.

Datasets

The paper evaluates these loss functions on both synthetic and real-world benchmarks:

  • Synthetic Binary Classification: A custom-designed dataset where the true decision boundary is linear, but its slope depends entirely on the cost parameter $\alpha$.
  • UCI Repository Datasets: Three simple, low-capacity tasks chosen intentionally to isolate the effects of model capacity:
  • German Credit: A binary classification task mapping credit risks, including a variant with a "deferral" option.
  • Student Performance: A 3-class problem predicting student academic outcomes.
  • Diabetes Health Indicators: A 3-class dataset classifying diabetic risk categories.

Key Insights and Ideas

  • The Geometry of Thresholding: Post-processing a linear model via thresholding can only shift the decision boundary parallel to its learned contours; it cannot rotate the boundary. If a cost-agnostic loss forces a linear model to learn the wrong slope (as visualized in the vertical contours of Figure 3), no amount of threshold tuning can recover the optimal decision boundary. Cost-sensitive surrogates, however, successfully recover the correct slope (Figure 4).
Cost-Agnostic Cross Entropy contours Weighted Hinge contours
Figure 1: Cost-Agnostic Cross Entropy over linear models.
Figure 4: Weighted Hinge (An Embedding) over linear models.
  • Granularity vs. Utility: Cost-agnostic losses like cross-entropy try to perfectly model the entire conditional probability distribution $p(x)$. For simple models, this global requirement is overly burdensome. Cost-sensitive embeddings sacrifice this granularity, focusing the model's limited capacity entirely on the specific decision boundary required by the cost matrix.
  • Embeddings vs. Weighted Cross-Entropy: Even among cost-sensitive options, polyhedral embeddings provide stronger theoretical guarantees. Weighted cross-entropy requires much stricter, often unrealistic assumptions (like parameter-space convexity) to guarantee optimality under limited capacity.

Key Results

  • Theoretical Guarantee: The authors prove Theorem 6, establishing a strict performance gap showing that cost-agnostic losses with threshold searches cannot achieve $\mathcal{H}_{lin}$-consistency.
  • Empirical Superiority: Across the UCI datasets using linear models, cost-sensitive losses consistently achieved lower Cost-Sensitive Loss (CSL) than cost-agnostic cross-entropy, even when cross-entropy was boosted with post-processing threshold searches.
  • Multiclass Failure of Post-Processing: In the 3-class problems (Student Performance and Diabetes), attempting a post-processing threshold search actually worsened the cost-sensitive loss compared to standard cross-entropy. This highlights the severe practical difficulty of scaling threshold searches to multi-dimensional decision spaces.

Limitations and Future Work

  • Hard-to-Verify Assumptions: The positive consistency results for weighted scoring rules rely on strong conditions (such as joint parameter-space convexity) that are difficult to verify on real-world distributions.
  • Multiclass Scaling for Weighted Analogs: Extending weighted analogs to multiclass settings ($|\mathcal{Y}| > 2$) remains an open challenge, as aggregating an entire matrix of costs into scalar weights per outcome can be lossy.
  • Optimization Non-smoothness: Polyhedral embeddings are inherently non-smooth, which can introduce optimization challenges and slower convergence rates compared to smooth losses like cross-entropy.

Summary updated

Abstract

There is a prevalent debate in machine learning about whether practitioners should train models to optimize a task-agnostic objective (e.g., cross entropy) or incorporate the downstream decision task into the optimization objective (e.g., weighted cross entropy). In ideal settings, like those with infinite data and infinite model capacity, the two approaches are statistically equivalent for the downstream decision task. In practice, however, incorporating the decision task into model training has been shown to empirically improve task-specific performance in certain real-world scenarios. The cause of these benefits has not been theoretically studied to date. Focusing on the setting with limited model capacity through the model class $\mathcal H$, we establish a strict performance gap between post-processing a model learned with a cost-agnostic objective (e.g., thresholding a risk score prediction) and models learned by optimizing a cost-sensitive model without a threshold search. In particular, we establish this gap when there is a hypothesis recovering the optimal decision boundary for the discrete task, but it does not align with the optimal cost-agnostic hypothesis, and give a simple example demonstrating the plausibility of this setting. With assumptions that are hard to verify in practice, we demonstrate that this gap generally exists on classification datasets from the UCI repository, particularly with very simple models.
BibTeX
@misc{finocchiaro2025contrasting,
  author = {Jessica Finocchiaro and Sanket Shah and Milind Tambe},
  title = {{Contrasting Cost-Agnostic and Cost-Sensitive Losses under Limited Model Capacity via $\textbackslash\{\}mathcal H$-consistency}},
  year = {2025},
  eprint = {2502.19522},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.19522},
}
Figure