OAK: Enriching Document Representations using Auxiliary Knowledge for Extreme Classification

Shikhar Mohan, Deepak Saini, Anshul Mittal, Sayak Ray Chowdhury, Bhawna Paliwal, Jian Jiao, Manish Gupta, Manik Varma

Introduction

OAK (Online Auxiliary Knowledge) is a novel framework that boosts eXtreme Classification (XC) performance by enriching document representations with auxiliary information. By dynamically linking documents to a "knowledge bank" of trainable embeddings and fusing them via cross-attention, OAK achieves up to a 5% accuracy gain over state-of-the-art methods while maintaining the low latency required for real-time search engines.

The Challenge of Short-Text Classification

eXtreme Classification (XC) involves tagging a document with the most relevant labels from a massive set—often numbering in the millions. This is a core challenge in product recommendation, document tagging, and sponsored search.

The primary hurdle in these domains is the "short-text" problem. Many documents, such as search queries or product titles, consist of only 3 to 5 words. This sparse representation lacks the semantic depth needed for precise classification. While many applications have access to "auxiliary data" (e.g., a search query's history of clicked webpages or a Wikipedia page's categories), most existing XC models ignore this side information. Previous attempts to incorporate it, such as simple text concatenation or Graph Neural Networks (GNNs), often suffer from high computational costs, increased latency, or "intent dilution," where the auxiliary data washes out the original meaning of the query.

The OAK Architecture

OAK introduces a modular architecture designed to harness auxiliary data efficiently through three main stages:

OAK Architecture
  1. The Linker Module: When a document (like a search query) arrives, a "linker"—which is itself a performant XC model—identifies the top-$k$ relevant Auxiliary Knowledge Pieces (AKPs) from a large pool.
  2. The Augmentation Block: This is the heart of OAK. It consists of:
  3. AK Bank: A repository of trainable embeddings for every possible AKP. Unlike Retrieval-Augmented Generation (RAG), which uses raw text, OAK learns these embeddings jointly with the main task.
  4. Combiner: A cross-attention module that fuses the base document embedding with the retrieved AKP embeddings. This allows the model to weigh relevant context heavily while ignoring "noisy" or irrelevant auxiliary data.
  5. Calibration Loss ($L_{Calib}$): To ensure the enriched representation is actually better than the original, the authors introduce a novel calibration loss. It penalizes the model if the "enriched" score for a correct label isn't significantly higher than the "base" score, forcing the AK Bank to provide genuinely useful information.

Datasets and Evaluation

The authors evaluated OAK on several large-scale benchmarks:

  • Wikipedia Datasets: LF-WikiSeeAlsoTitles-320K and LF-WikiTitles-500K, where categories and hyperlinks serve as auxiliary data.
  • ORCAS Dataset: LF-ORCAS-800K. Since this lacked ground-truth auxiliary data, the authors used GPT-4 to generate "related user queries" to serve as the auxiliary source.
  • Proprietary Dataset: SponsoredSearch-150M, a massive real-world dataset from a major search engine (Bing) containing 500M queries and 150M advertiser keywords.

Performance and Key Insights

OAK demonstrates significant improvements over existing methods, particularly in how it handles sparse data and maintains efficiency.

Performance on Tail Data
  • The "Tail" Specialist: As shown in the performance charts, OAK shows its greatest strengths on "tail" data—rare documents and labels. Because rare documents have few tokens for the model to learn from, the auxiliary context provides the "missing link" needed for accurate classification.
  • Accuracy Gains: OAK outperformed the previous state-of-the-art (NGAME) by ~2% to 5% in Precision@1 across academic datasets. Furthermore, it outperformed GNN-based methods like GraphFormers by a staggering 15-20% in Precision@1, proving that its cross-attention fusion method is far more effective for XC than standard graph convolutions.
  • Solving Intent Dilution: GNN-based methods often blur the original document's meaning by averaging it with neighbors. OAK’s cross-attention mechanism acts as a filter, ensuring the auxiliary data complements rather than replaces the original intent.
  • Real-World Impact and Efficiency: In live A/B testing on Bing, OAK led to a 0.84% increase in Click-Through Rate (CTR) and a 2.7% improvement in Keyword Density. Despite the extra complexity of the Augmentation Block, using an "AK Bank" of embeddings instead of concatenating raw text avoids the massive increase in sequence length that slows down Transformer models. OAK adds less than 2ms to serving latency, keeping inference fast (<10ms) and making it viable for high-traffic production environments.

Limitations and Future Work

  • Linker Dependency: The quality of the enriched representation is capped by the Linker's ability to find relevant AKPs. If the Linker fails to find good context, the Augmentation Block has nothing to work with.
  • Static AK Bank: While the embeddings are trainable, the set of AKPs in the bank is fixed after training. Future work could explore more dynamic ways to update the knowledge bank as new auxiliary information becomes available in real-time.
  • Cross-Domain AK: The current study focuses on auxiliary knowledge from the same or closely related domains. Exploring how to leverage completely disparate auxiliary sources (e.g., using image metadata to help classify text) remains an open area for future research.

Summary updated

BibTeX
@inproceedings{mohan2024oak,
  author = {Shikhar Mohan and Deepak Saini and Anshul Mittal and Sayak Ray Chowdhury and Bhawna Paliwal and Jian Jiao and Manish Gupta and Manik Varma},
  title = {{OAK: Enriching Document Representations using Auxiliary Knowledge for Extreme Classification}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=Cbacx90Wkt},
}
Figure