Abstract
Extreme Classification (XC) involves matching data points to the most relevant labels from a pool of millions. A primary challenge in XC is the "long-tail" problem, where most queries and labels have sparse training data. While auxiliary graph metadata can provide helpful context, current state-of-the-art Graph Convolutional Networks (GCNs) are computationally expensive at inference and sensitive to graph noise. We present RAMEN (gRaph regulArized encoder training for extreME classificatioN), a novel framework that leverages graph metadata as a regularizer during training rather than a structural model component. RAMEN achieves state-of-the-art accuracy on long-tail items while being 2x faster and 70% smaller than leading GCN alternatives.
Introduction
In applications like sponsored search or document tagging, models must navigate millions of potential labels. The "long-tail" nature of this data means that traditional supervised learning often fails for rare items. Researchers have turned to graph metadata—such as user session histories or hyperlinks—to bridge this gap. However, incorporating this metadata via GCNs introduces significant overhead due to graph traversal during inference and vulnerability to "noisy" edges (e.g., accidental clicks).
The RAMEN Framework
RAMEN addresses these issues by confining graph logic to the training phase. The architecture consists of a lightweight dual-encoder (based on DistilBERT) where one encoder processes the query and the other processes the label (e.g., an ad).
Graph-Based Regularization
Instead of performing graph convolutions, RAMEN uses a triplet loss function to "regularize" the encoders. During training, the model is forced to ensure that a query’s embedding is semantically close to its related "anchor nodes" in the metadata graph. This allows the encoder to "absorb" the structural knowledge of the graph without requiring the graph itself during deployment.
In-Batch Pruning
To mitigate the impact of noisy graph data, RAMEN implements dynamic in-batch pruning. If the model's current embeddings indicate that a graph link has low cosine similarity, that link is ignored during the loss calculation. This ensures that only semantically meaningful relationships guide the training process.
Efficiency and Inference
The defining advantage of RAMEN is its "zero-overhead" inference. Because the graph is used only as a regularizer, the final deployed model is a standard encoder. It does not need to perform neighborhood lookups or graph traversals to make a prediction.
As illustrated above, while GCN-based methods like OAK require an "Induced Graph" step during inference, RAMEN bypasses this entirely, leading to a 2x speedup and a 70% reduction in parameter count compared to leading methods.
Experimental Results
RAMEN was evaluated on public benchmarks (LF-WikiSeeAlsoTitles-320K) and massive production data from Bing Ads (540 million documents).
- Production Impact: In live A/B tests on Bing, RAMEN delivered a 1.25–1.5% increase in revenue and a 0.5–0.6% increase in click-through rates (CTR).
- Quality: The model reduced "bad matches" (e.g., location or brand mismatches) by up to 7.2%.
- Tail Performance: RAMEN significantly outperformed baselines on rare "tail" queries by effectively "triangulating" their meaning through the metadata graph.
Conclusion
RAMEN demonstrates that graph metadata is often more effective as a training regularizer than as a structural component. By decoupling the graph from the inference pipeline, RAMEN provides a scalable, efficient, and noise-robust solution for extreme classification in real-world production environments. Future work will explore applying this regularization technique to even more efficient transformer architectures.
Summary updated