NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

On Learning Vector Representations in Hierarchical Label Spaces

Jinseok Nam, Johannes Fürnkranz

TL;DR

This paper introduces a log-linear model to learn dense vector representations (embeddings) of labels for large-scale multi-label classification tasks. By jointly modeling label co-occurrences and their expert-defined hierarchical relationships, the method captures rich semantic regularities and enables analogical reasoning within the label space.

What Problem Does This Paper Address?

In multi-label classification, instances are simultaneously assigned multiple labels from a large vocabulary (e.g., tagging a medical article with relevant subject headings). As the number of labels grows, the number of possible label combinations explodes exponentially, making learning difficult.

Crucially, labels are rarely independent; they exhibit strong co-occurrence patterns and are often structured into human-curated hierarchies (such as ontologies or taxonomies). While previous work has used these hierarchies to improve classification accuracy, this paper addresses a different foundational question: How can we efficiently embed massive, hierarchical label spaces into low-dimensional vector spaces while preserving both statistical co-occurrences and structural relationships?

Methods

The authors propose a log-linear embedding model heavily inspired by Word2Vec’s skip-gram architecture. Instead of predicting context words from a target word, their model maximizes an objective function with two primary goals given an input label:

  1. Predict its ancestors in the label hierarchy.
  2. Predict co-occurring labels within the same training instance.

To scale this up to tens of thousands of labels, computing a standard softmax function becomes a massive bottleneck. The authors bypass this by implementing a Hierarchical Softmax based on a Huffman tree, where labels with more descendants are assigned shorter binary codes. This reduces the computational complexity per gradient step from $O(L)$ to $O(\log L)$, where $L$ is the number of labels.

Additionally, because real-world label hierarchies often contain noisy cycles, the authors apply a preprocessing step using Depth-First Search (DFS) to remove back-edges, ensuring the hierarchy forms a clean Directed Acyclic Graph (DAG).

Datasets

The model was trained and evaluated on the BioASQ Task 2a dataset. This large-scale biomedical dataset consists of:

  • 12 million training documents.
  • Approximately 27,000 index terms from the Medical Subject Headings (MeSH) vocabulary, which is curated by the National Library of Medicine (NLM).

Key Insights and Ideas

  • Co-occurrence Alone is Insufficient: Learning purely from co-occurrence groups frequently co-assigned labels together, but it completely misses broader structural or semantic relationships.
  • Geometry Mirrors Hierarchy: Injecting hierarchical data forces the embedding space to mirror structural relationships. As shown in the paper's visualizations, labels under "Health" and "Population" form distinct macro-clusters, yet the internal geometric relationships between sub-labels (like Urban, Suburban, and Rural) remain parallel across both groups.
  • Label Space Analogies: Much like word embeddings can solve "king − man + woman ≈ queen", these label embeddings capture relational concepts. They successfully perform analogical reasoning for medical treatments, such as: $$\text{Diet Therapy} - \text{Cardiovascular Diseases} + \text{Respiration Disorders} \approx \text{Respiratory Therapy}$$

Key Results

  • Clear Category Separation: Qualitative visualization using t-SNE shows that the model cleanly separates the 16 major categories of the MeSH vocabulary into distinct, coherent clusters.
Figure 1: Learned representations of 16 major categories in MeSH vocabulary. Projection of label representations into 2D is done by tSNE (Van der Maaten & Hinton, 2008).
  • Superior Analogy Performance: In qualitative testing (Table 1), the hierarchy-aware model correctly surfaces highly relevant treatments (e.g., "Respiratory Therapy", "Enteral Nutrition") when queried with medical analogy questions. In contrast, the model trained without the hierarchy fails completely, returning unrelated terms or simply repeating the query concepts.
Figure 2: (a) A part of the hierarchy related to health care. (b) Learned vector representations for the index terms at leaf without the hierarchy (manually rotated). (c) Learned vector representations for the same index terms with the hierarchy.

Limitations and Future Work

  • Purely Qualitative Evaluation: The paper relies entirely on 2D visualizations (t-SNE/PCA) and selected anecdotal examples to demonstrate success. Quantitative downstream evaluation—such as using these embeddings to pre-train a multi-label classifier and measuring accuracy improvements—is left for future work.
  • One-Way Hierarchical Dependence: The objective function only trains labels to predict their ancestors, not their descendants. Because of this one-way encoding, the model is currently unable to perform parent-child analogical reasoning (e.g., navigating down the taxonomy tree using vector math). The authors note this as an explicit direction for future extension.

Summary updated

BibTeX
@inproceedings{nam2015learning,
  author = {Jinseok Nam and Johannes Fürnkranz},
  title = {{On Learning Vector Representations in Hierarchical Label Spaces}},
  booktitle = {International Conference on Learning Representations},
  year = {2015},
  url = {http://arxiv.org/abs/1412.6881},
}
Figure