Corner cases in machine learning processes

Florian Heidecker, Maarten Bieshaar, Bernhard SickAI 2024

Abstract

Applications using machine learning (ML), such as highly autonomous driving, depend highly on the performance of the ML model. The data amount and quality used for model training and validation are crucial. If the model cannot detect and interpret a new, rare, or perhaps dangerous situation, often referred to as a corner case, we will likely blame the data for not being good enough or too small in number. However, the implemented ML model and its associated architecture also influence the behavior. Therefore, the occurrence of prediction errors resulting from the ML model itself is not surprising. This work addresses a corner case definition from an ML model’s perspective to determine which aspects must be considered. To achieve this goal, we present an overview of properties for corner cases that are beneficial for the description, explanation, reproduction, or synthetic generation of corner cases. To define ML corner cases, we review different considerations in the literature and summarize them in a general description and mathematical formulation, whereby the expected relevance-weighted loss is the key to distinguishing corner cases from common data. Moreover, we show how to operationalize the corner case characteristics to determine the value of a corner case. To conclude, we present the extended taxonomy for ML corner cases by adding the input, model, and deployment levels, considering the influence of the corner case properties.

Introduction: The Challenge of Defining Corner Cases

In safety-critical fields like autonomous driving, "corner cases"—situations where a model fails unexpectedly—pose a significant risk. Traditionally, these failures are attributed to "bad" or "insufficient" data. However, this perspective is limited. A corner case is not merely a rare data point; it represents a complex interaction between the input data, the specific model architecture, and the ultimate goals of the application.

Without a precise, industry-standard definition, developing tools for the systematic detection, reproduction, or synthetic generation of these failure modes remains difficult. This paper bridges the gap between traditional software testing and modern ML by providing a unified conceptual and mathematical framework.

Methodology: A Multi-Layered Approach

The authors approach the problem through three lenses:

  1. Property Mapping: They identify a suite of properties—such as novelty, ambiguity, complexity, and traceability—and categorize them into three levels: Data-level, Model-level, and Application-level.
  2. Mathematical Formalization: The core contribution is the Expected Relevance-Weighted Loss. A corner case is defined as a sample where the model's expected loss, scaled by a task-specific "relevance weight," exceeds a defined threshold. This ensures that models are not penalized for failing on irrelevant noise but are flagged for failures on high-stakes inputs.
  3. Taxonomy Extension: The paper extends existing hierarchies by adding a "Method Layer," categorizing failures into Input Level (e.g., label errors), Model Level (e.g., high epistemic uncertainty), and Deployment Level (e.g., concept drift).

Key Insights: Relevance and the Model's Perspective

A central theme is that relevance acts as a filter. A rare event only becomes a corner case if it impacts the task at hand. For instance, a model failing to identify a rare bird species in the background of a highway scene is irrelevant for a self-driving car; however, a model misidentifying a person on a billboard as a real pedestrian is a critical corner case.

A person on a billboard advertisement on a car, illustrating a semantic corner case where relevance is key.

Furthermore, the paper highlights the "Moving Goalpost" nature of corner cases: a situation is only a corner case until the model learns to handle it effectively, at which point it transitions into a "common sample." This transition requires well-calibrated models; if a model is overconfident in its errors, the expected loss calculation will fail to flag the risk.

Visualization of different sample types (distribution shift, hard samples, wrongly labeled) in a feature space, showing how model uncertainty and relevance define corner cases.

Results and Discussion

The paper successfully formalizes the nature of corner cases, providing a rigorous vocabulary for researchers to diagnose why a model fails—whether due to traceability issues or misspecification. By using the expected relevance-weighted loss, the authors demonstrate that corner cases can be identified at runtime without ground-truth labels, simply by monitoring predictive uncertainty and task context. The proposed taxonomy provides a practical checklist for engineers to audit ML pipelines from data collection through deployment.

Conclusion and Future Work

While the mathematical framework is robust, operationalizing the relevance weight function ($w$) remains task-dependent and non-trivial. Future research will focus on applying this framework to large-scale tasks like semantic instance segmentation and investigating how quantitative "corner case scores" align with human expert intuition. There is a clear need for metrics that value the "informativeness" of a sample over raw accuracy alone.

Summary updated

BibTeX
@inproceedings{heidecker2024corner,
  author = {Florian Heidecker and Maarten Bieshaar and Bernhard Sick},
  title = {{Corner cases in machine learning processes}},
  booktitle = {AI},
  year = {2024},
  doi = {10.1186/s42467-023-00015-y},
}

Loading related content...

Figure