TL;DR
This paper introduces "LCA-on-the-Line," a novel framework for predicting model performance on out-of-distribution (OOD) datasets using only in-distribution data. By leveraging the Lowest Common Ancestor (LCA) distance within class hierarchies, the method establishes a strong linear correlation with OOD accuracy, offering a more unified and robust evaluation metric than traditional accuracy-based approaches, especially when comparing diverse model types like Vision Models (VMs) and Vision-Language Models (VLMs).
What Problem Does This Paper Address?
The core challenge addressed is accurately predicting how well machine learning models will perform on data that differs from their training distribution (out-of-distribution or OOD generalization). Traditional methods often rely on in-distribution (ID) accuracy as a proxy for OOD performance, but this breaks down when comparing models with different architectures, modalities (e.g., image-only vs. image-text), or training data. Specifically, Vision-Language Models (VLMs) often show surprisingly good OOD generalization despite having lower ID accuracy than Vision Models (VMs), a phenomenon that existing "X-on-the-line" benchmarks (like Accuracy-on-the-line) fail to explain. This gap highlights the need for a more nuanced metric that captures semantic understanding beyond simple top-1 accuracy.
Methods
The paper's central contribution is the LCA-on-the-Line framework. This approach revives and adapts the concept of Lowest Common Ancestor (LCA) distance. LCA distance measures the hierarchical distance between a model's predicted class and the ground-truth class within a predefined class taxonomy (like WordNet). A lower LCA distance signifies "better mistakes" – predictions that are semantically closer to the true class.
Key methodological aspects include:
- LCA Distance Calculation: Formally defined as the difference in a node's score (e.g., tree depth or information content) between the ground-truth class and their LCA.
- Taxonomy Construction: For datasets without a predefined hierarchy, they propose using K-means clustering on image features to construct a latent class taxonomy.
- Benchmarking: Evaluating 75 models (36 VMs, 39 VLMs) on ImageNet (ID) and five shifted OOD datasets.
- Enhancing Generalization: Demonstrating that aligning model predictions with class hierarchies, through soft labels (using LCA distance in the loss function) or prompt engineering in VLMs, can improve OOD performance.
Datasets
- In-Distribution (ID) Dataset: ImageNet
- Out-of-Distribution (OOD) Datasets: ImageNet-v2, ImageNet-Sketch, ImageNet-Rendition, ImageNet-Adversarial, and ObjectNet. These datasets are chosen to represent severe natural distribution shifts.
Key Insights and Ideas
- LCA Distance Unifies VM and VLM Performance: Unlike ID accuracy, LCA distance shows a strong, consistent linear correlation with OOD performance across both Vision Models (VMs) and Vision-Language Models (VLMs), providing a unified benchmark.
- "Better Mistakes" Matter for OOD Generalization: Models that make semantically closer "mistakes" (lower LCA distance) on ID data tend to generalize better to OOD data. This suggests that capturing hierarchical semantic relationships is crucial for robustness.
- VLMs' OOD Advantage Explained: The paper posits that VLMs' better OOD generalization, even with lower ID accuracy, can be attributed to their ability to align with class hierarchies more effectively, leading to lower LCA distances.
- Latent Taxonomies are Robust: Constructing class hierarchies using K-means clustering on image features yields results comparable to using established taxonomies like WordNet, making the LCA approach applicable to a wider range of datasets.
- Taxonomy Alignment Improves Performance: Explicitly guiding models to align with class hierarchies, either through soft labels in training or prompt engineering in VLMs, demonstrably enhances OOD generalization.
Key Results
- Strong Correlation: LCA-on-the-Line demonstrates a strong linear correlation (R² and PEA often > 0.7) between in-distribution LCA distance and OOD Top-1 accuracy across various OOD datasets (ImageNet-S/R/A/ObjectNet).
- Unified Trend: This correlation holds for both VMs and VLMs, unlike ID accuracy which shows divergent trends for the two groups.
- Improved Prediction: LCA distance is shown to be a more robust predictor of OOD error than ID Top-1 accuracy and other baselines (e.g., Agreement-on-the-line) on challenging OOD datasets like ImageNet-A.
- Performance Boost: Incorporating LCA-based soft labels in training improved OOD performance across various architectures without significantly compromising ID accuracy (e.g., up to +6.0% on ObjectNet for ResNet50).
Limitations and Future Work
- ImageNet-v2 Similarity: LCA is less effective as an OOD indicator for datasets visually similar to ImageNet (like ImageNet-v2), where ID Top-1 accuracy remains a strong predictor.
- Small Class Numbers: LCA might show weaker discrimination between models on datasets with a small number of classes.
- Adversarial Models: It's theoretically possible to construct a model that achieves low LCA while maintaining zero Top-1 accuracy by deliberately predicting the nearest semantic class, suggesting causality cannot be strictly inferred.
- Future Work: The authors suggest exploring causal discovery methods to construct causal graphs between classes for a more accurate reflection of causal relationships, and further theoretical justification for the LCA-on-the-Line framework. They also propose investigating why VLMs' feature spaces are better aligned with class hierarchies.
Summary updated