Filter based Taxonomy Modification for Improving Hierarchical Classification

Azad Naik, Huzefa RangwalaarXiv 2016

TL;DR

This paper introduces rewHier, a scalable, data-driven method to automatically "rewire" expert-defined taxonomies for better hierarchical classification. By identifying and fixing inconsistencies in how classes are grouped, the authors significantly boost classification performance—especially for rare categories—while remaining computationally efficient enough to handle massive real-world datasets.

What Problem Does This Paper Address?

Hierarchical Classification (HC) is essential for organizing large-scale data, like web directories or biological databases, into a tree-like "taxonomy." Usually, these taxonomies are designed by human experts. However, what makes sense to a human expert (semantic similarity) isn't always what's best for a machine learning model (discriminative similarity).

An expert-defined hierarchy for the 20-Newsgroups dataset. While semantically logical, such structures may not be optimal for discriminative classification.

When a hierarchy is "inconsistent" with the data, hierarchical models can actually perform worse than "flat" classifiers that ignore the hierarchy entirely. Existing ways to fix this—like "wrapper" methods that repeatedly retrain models to find the best structure—are too slow for modern datasets with thousands of classes and millions of features. The authors aim to bridge this gap with a fast, "filter-based" approach that modifies the hierarchy once before training begins.

Methods

The authors propose a two-step algorithm called rewHier:

  1. Grouping Similar Class Pairs: The algorithm calculates the pairwise cosine similarity between all classes. It identifies pairs that are highly similar (above a threshold $\tau$) but currently sit in different branches of the expert hierarchy.
  2. Inconsistency Identification and Correction: For these "misplaced" pairs, the algorithm applies three elementary operations to restructure the tree: Node Creation (NC), Parent-child Rewiring (PCRewire), and Node Deletion (ND).

Unlike previous "wrapper" methods, rewHier is a "filter" method: it uses data statistics (similarity) to make changes before the expensive training phase, making it highly scalable.

Datasets

The researchers evaluated their method on a diverse set of benchmarks:

  • Image Datasets: CLEF (medical images) and DIATOMS.
  • Text Datasets: IPC (patent documents) and three versions of the DMOZ web directory (DMOZ-SMALL, DMOZ-2010, and DMOZ-2012).

The DMOZ datasets are particularly challenging, featuring up to ~12,000 leaf classes and hundreds of thousands of features.

Key Insights and Ideas

  • Expert Knowledge vs. Data Reality: Expert hierarchies provide a great starting point, but they shouldn't be set in stone. rewHier preserves the useful parts of the expert tree while fixing specific "bottlenecks" where the hierarchy confuses the classifier.
  • The Power of Rewiring over Flattening: Simply "flattening" (removing) problematic nodes loses structural information. Rewiring allows the model to keep a deep structure that better reflects the actual data distribution.
Comparison of different hierarchy modification strategies: (a) Expert-defined, (b) Clustered, (c) Flattened, and (d) Rewired. The rewired hierarchy (d) provides the most flexible and effective restructuring.
  • Helping the "Underdogs": Rare categories (those with very few training examples) benefit the most from a well-structured hierarchy. The hierarchy allows these classes to "borrow" strength from their more data-rich parents or siblings.

Key Results

  • Performance Boost: The rewired hierarchies consistently outperformed the original expert-defined ones, as well as hierarchies created via clustering or flattening.
  • Rare Class Success: On DMOZ datasets, the rewired hierarchy improved classification for approximately 65% of rare categories (classes with <10 examples) compared to a flat classifier.
  • Scalability: On the IPC dataset, rewHier was roughly 20 times faster than the state-of-the-art "wrapper" method (T-Easy), completing in ~1,284 minutes compared to ~26,432 minutes.

Limitations and Future Work

While rewHier is a significant step forward, the authors note a few areas for growth:

  • Linearity: The current work uses logistic regression (a linear model). Future versions could explore how rewired hierarchies interact with non-linear classifiers.
  • Similarity Measures: The method currently relies on cosine similarity. Exploring other distance metrics or learned embeddings might further improve results.
  • Feature Selection: Combining hierarchy modification with automated feature selection could lead to even more efficient and accurate models.

Summary updated

BibTeX
@misc{naik2016filter,
  author = {Azad Naik and Huzefa Rangwala},
  title = {{Filter based Taxonomy Modification for Improving Hierarchical Classification}},
  year = {2016},
  eprint = {1603.00772},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1603.00772},
}
Figure