Hierarchical Image Classification using Entailment Cone Embeddings

Ankit Dhall, Anastasia Makarova, Octavian Ganea, Dario Pavllo, Michael Greeff, Andreas Krause · DOI

Introduction

Standard image classification models typically treat labels as a flat, independent list of categories. This approach ignores the inherent semantic relationships between objects, such as the taxonomic hierarchy of animals or plants. In this paper, the authors propose a novel method to map images and labels into a shared "entailment cone" embedding space. By leveraging both Euclidean and Hyperbolic geometries, the model can better represent hierarchical structures, leading to significant performance gains, particularly for fine-grained and data-scarce categories.

The Limitations of Flat Classification

Traditional deep learning models often struggle with three key issues when labels are treated as a flat set:

  1. Data Scarcity: Rare "leaf" nodes (e.g., endangered species) often lack sufficient training data.
  2. Visual vs. Semantic Disconnect: Visually similar species may belong to different taxonomic groups, while members of the same species can exhibit high visual variance.
  3. Interpretability: Flat models provide little insight into "near misses." If a model misidentifies a species, it is useful to know if it at least correctly identified the genus or family.

Methodology: Embedding-based Classifiers

The core innovation lies in moving from simple classification layers to Embedding-based Classifiers. The researchers utilize:

  • Order-Preserving Embeddings: Labels are modeled as "cones." If category B is a sub-type of category A, the embedding for B must reside within the cone defined by A.
  • Hyperbolic Geometry: The authors emphasize Hyperbolic Cones (using the Poincaré ball model). Hyperbolic space is naturally suited for tree-like structures because its volume grows exponentially with radius, preventing "crowding" as the hierarchy branches out.
  • Joint Embedding: Both image features and labels are projected into the same space. Images are treated as the ultimate leaves of the tree, and classification is performed by determining which label's cone "entails" the image with minimal violation.

The ETHEC Dataset and the Long-Tail Challenge

The proposed methods were evaluated on the ETHEC dataset (ETH Entomological Collection), which contains 47,978 images of butterfly specimens organized into a four-level hierarchy: Family, Sub-family, Genus, and Species.

Visualization of the ETHEC dataset hierarchy, showing the branching structure from families down to individual species.

The dataset presents a significant "long-tail" challenge. While higher-level families are well-represented, many individual species have very few training examples, making them difficult to learn using standard methods.

Histograms showing the distribution of samples across families, subfamilies, genera, and species, highlighting the long-tail nature of the dataset.

Key Insights and Results

The study yielded several important findings:

  • Hierarchy as a Regularizer: By enforcing the relationship between specific species and their broader families, the model can leverage abundant data from higher levels to improve the classification of rare species.
  • Hyperbolic Advantage: Hyperbolic geometry provided a superior fit for complex hierarchies compared to Euclidean space, especially in low dimensions.
  • Performance Gains: Every hierarchical model tested outperformed the flat baseline. Notably, the Hyperbolic Cone (HC) model achieved an F1 score of 0.5977 at the species level—a 14% improvement over the flat baseline (0.4578).
  • Marginalization Success: A CNN-based Marginalization Classifier (MC), which enforces consistency by summing child probabilities to match parent scores, achieved the highest overall Mean F1 of 0.9223.

Conclusion

While embedding-based models offer high interpretability and flexibility (such as zero-shot retrieval), they currently trail slightly behind the best CNN-based hierarchical baselines in raw accuracy. However, this research demonstrates that incorporating geometric priors about label relationships is a powerful tool for improving fine-grained image classification and addressing the challenges of long-tailed data distributions.

Summary updated

BibTeX
@inproceedings{dhall2020hierarchical,
  author = {Ankit Dhall and Anastasia Makarova and Octavian Ganea and Dario Pavllo and Michael Greeff and Andreas Krause},
  title = {{Hierarchical Image Classification using Entailment Cone Embeddings}},
  booktitle = {Workshops @ CVPR},
  year = {2020},
  doi = {10.1109/cvprw50498.2020.00426},
}
Figure