Discovering Latent Groups for Robust Classification

Ankur Garg, Ulrich Aïvodji, Samira Ebrahimi Kahou, Vincent MichalskiarXiv 2026

TL;DR

Neural Classification Trees (NCT) achieve robustness against spurious correlations by embedding latent subgroup structures directly into a network's physical architecture. By routing samples to "easy" or "hard" tree branches based on early training correctness, NCT isolates minority subgroups without requiring expensive group annotations. This provides competitive worst-group accuracy alongside inherent, inference-time interpretability.

What Problem Does This Paper Address?

Deep neural networks are notorious for taking shortcuts. They frequently exploit spurious correlations—features that happen to track labels in the training set but have no causal relationship to them. A classic example is the "Waterbirds" dataset: if most waterbirds are photographed against water and landbirds against land, a standard empirical risk minimization (ERM) model will classify the birds based on the background rather than the bird itself. When these correlations shift at test time (e.g., a waterbird on land), performance plummets for these minority subgroups.

While existing methods mitigate this by upweighting hard samples or inferring pseudo-groups during training, they treat the resulting group structure as a transient signal. At inference time, the final classifier remains an opaque black box that outputs only a class prediction, offering no structural insight into which latent subgroup a sample belongs to.

Methods

The authors introduce Neural Classification Trees (NCT), a framework that makes the data partition architectural rather than purely parametric.

Figure 1: NCT inference. Backbone features propagate through parent-to-child head connections across iterations. The argmax over all leaf node outputs determines the group label, encoding both class and difficulty path.

NCT works by iteratively building a tree-shaped hierarchy of classification heads on top of a shared feature backbone:

  1. Difficulty-Based Routing: Capitalizing on the "simplicity bias" of neural networks (the tendency to learn simple spurious features before complex core features), NCT routes correctly classified samples to an "easy" child node and misclassified samples to a "hard" child node.
  2. Asymmetric Head Capacity: Easy nodes handle samples the model already understands and use simple linear layers. Hard nodes absorb the trickier, bias-conflicting minority samples and are given more capacity (Linear-ReLU-Dropout blocks) to learn richer representations.
  3. Stabilized Training: To prevent the network from forgetting parent tasks as the tree deepens, the authors implement a two-phase training protocol per iteration along with an auxiliary loss that preserves parent node representations.
  4. Unsupervised Depth Selection: To prevent the tree from growing indefinitely without relying on ground-truth group labels, NCT uses a pseudo worst-group accuracy (pWGA) metric calculated at an early iteration's granularity to determine when to stop deepening the tree.
Routing Mechanism

Datasets

NCT was evaluated across five distinct benchmarks exhibiting spurious correlations:

  • Waterbirds: Binary bird classification (waterbird vs. landbird) with land/water backgrounds.
  • CelebA: Binary hair color classification (blond vs. non-blond) where gender acts as the spurious attribute.
  • ISIC: Skin lesion diagnosis (benign vs. malignant) containing colored patch acquisition artifacts.
  • UMNIST (Undersampled MNIST): Binary digit range classification where the digit '8' is heavily undersampled to create a spurious association.
  • CMNIST (Colored MNIST): A 5-class digit pair variant where classes are heavily dyed with specific colors during training but uncorrelated at test time.

Key Insights and Ideas

  • Architecture as Partition: Instead of discarding the difficulty signals used to reweight data during training, NCT preserves the resulting partition as the inference-time architecture itself. Each leaf node explicitly encodes both the predicted class and the difficulty path.
  • Minority Enrichment via Errors: The paper mathematically demonstrates that under simplicity bias, first-iteration errors are highly enriched with minority samples. For instance, in the Waterbirds dataset, minority samples make up only 5% of the population but constitute ~72% of the first-iteration error set.
  • Bypassing the Feature Conflict: When a single classifier is forced to choose between a simple spurious feature and a complex core feature, it suffers from an "approximation gap." By structurally separating the data into different heads, NCT allows specialized heads to focus on core features without interference from the dominant spurious features.

Key Results

NCT achieves state-of-the-art or competitive worst-group accuracy (WGA) against eight strong baselines, all while operating completely unsupervised regarding subgroup labels:

  • Subgroup Isolation: NCT successfully concentrates minority subgroups into hard branches, capturing 82% of landbirds-on-water, 73% of blond males, and 84% of color-conflicting digits during iteration-2 routing.
  • Robust Performance: On the ISIC benchmark, NCT leads the entire table—including group-supervised methods—with an overall AUROC of 0.959. On Waterbirds (88.0% WGA) and CelebA (86.1% WGA), it matches or exceeds popular validation-supervised methods like JTT and EIIL.
  • Visual Interpretability: Post-hoc LayerGradCAM attributions confirm that easy leaves focus heavily on spurious cues (like the background or skin-marker rings), whereas hard leaves successfully shift their attention to the actual semantic features (the bird's body or the lesion boundary).

Limitations and Future Work

The structural guarantees of NCT rely on two core assumptions:

  1. Dependence on Simplicity Bias: If the minority features are inherently easier for a network to learn than the spurious features, the difficulty-based routing mechanism will fail to isolate them.
  2. Proxy Quality Sensitivity: The unsupervised depth-selection rule depends on the validation pWGA accurately tracking true WGA. Severe class imbalances can cause this proxy to collapse early.

For future work, the authors suggest extending NCT to language models to test its performance under different feature geometries, as well as exploring richer routing signals beyond binary correctness, such as gradient- or attribution-based criteria.

Summary updated

BibTeX
@misc{garg2026discovering,
  author = {Ankur Garg and Ulrich Aïvodji and Samira Ebrahimi Kahou and Vincent Michalski},
  title = {{Discovering Latent Groups for Robust Classification}},
  year = {2026},
  eprint = {2606.23609},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.23609},
}
Figure