TL;DR
When classifying long documents against tens of thousands of possible labels, models rely on specialized "spotlight" attention modules to find the exact words relevant to each label—yet they usually learn where to shine those spotlights from random noise. PLANT fixes this by pretraining the external attention layer as a search engine first, teaching it to rank informative words before full model training even begins. The result? Small, open-weight LLMs dramatically improve on rare, needle-in-a-haystack labels, outperforming models over a hundred times their size.
What Problem Does This Paper Address?
Imagine reading a 1,500-word hospital discharge summary and selecting the exact diagnoses and procedures that apply out of 154,000 standardized medical codes. Welcome to Extreme Multi-Label Text Classification (XMTC), a problem that pops up everywhere from healthcare coding to legal categorization and Wikipedia tagging.
Two things make XMTC notoriously brutal: massive label spaces and extreme data skew. A handful of "head" labels appear constantly, while thousands of "tail" labels show up fewer than ten times in your entire dataset. You can't just paste 100,000 labels into an LLM prompt—the model's focus gets spread too thin ("attention dilution").
Instead, state-of-the-art architectures slap an external label-attention layer on top of a text encoder. Think of this as giving every single label its own personal spotlight to scan the document for relevant clues. The catch? Models initialize these spotlights randomly. Learning where to point 100,000 spotlights from scratch takes massive amounts of data. Common labels figure it out; rare labels starve, overfit, and collapse to near-zero accuracy.
Methods
Instead of forcing the label-attention layer to learn from scratch during classification, the authors introduce PLANT (Pretrained and Leveraged AtteNTion), a plug-and-play two-stage training recipe. Crucially, this operates on the external cross-attention module sitting on top of an LLM's output hidden states—the LLM's internal self-attention remains untouched.
Here is how the two stages work:
- Stage 1: Planting Attention via Learning-to-Rank (What's New). Before doing any classification, the authors calculate the Mutual Information Gain (MIG) between tokens and labels across the training corpus—essentially a statistical cheat sheet of how informative word $X$ is for label $Y$. They then train the external attention module (alongside LoRA adapters on a 4-bit quantized LLM and text-initialized label embeddings) using a pairwise Learning-to-Rank (L2R) objective. Given the top-$k$ most informative words for a label, the attention layer is penalized if it ranks a less informative word above a more informative one, weighted by how much that swap hurts ranking quality ($|\Delta\text{nDCG@}k|$).
- Stage 2: End-to-End Fine-Tuning (Standard + Polish). With the spotlights now pointing in sensible directions, the whole network is fine-tuned on the actual classification task. To keep dominant negative labels from drowning out rare positives, they use focal loss combined with label smoothing and hard negative mining (computing loss only on positive labels plus the 1,000 most confusing negative labels per document).
Datasets
The authors evaluate PLANT across clinical, legal, and web domains:
- MIMIC-III & MIMIC-IV: Clinical discharge summaries mapped to ICD-9 and ICD-10 medical codes (including standard
full,top50,rare50, andfewsplits). - EURLEX-4K: Long legal documents paired with thousands of legal topic labels.
- WIKI10-31K: Wikipedia-style articles paired with ~31,000 social tags for content recommendation.
- New Benchmarks/Splits: The authors construct MIMIC-IV-few (an 800-note low-resource split retaining all 3,343 occurring labels, centered on rare codes) and controlled 600-document subsets of EURLEX-4K and WIKI10-31K to test fine-tuned LLMs under compute constraints.
Key Insights and Ideas
- David beats Goliath when attention is guided: A 3.8B-parameter model (
Phi-3-mini) equipped with PLANT outperforms a standard fine-tunedDeepSeek-V3(671B total parameters, 37B active) by +7.1 Macro-AUC and +2.0 Micro-F1 on MIMIC-III. Smart initialization matters more than sheer parameter count. - True zero-shot transfer to unseen rare labels: When models are trained exclusively on common labels (>1% frequency) and tested on unseen rare labels, standard random-attention models completely collapse (0.5–1.1% F1). Because PLANT initializes label queries from text descriptions and teaches the attention mechanism how to align queries with informative tokens, it retains 6.9–8.1% F1 without ever seeing a single training example for those rare codes.
- Data efficiency: Starting from planted attention dramatically cuts sample complexity. On MIMIC-IV, PLANT hits a Precision@5 of 0.50 using just 1,090 training examples—a bar the standard end-to-end LLM only clears after seeing between 7,203 and 18,513 examples.
Key Results
- Consistent LLM Boosts: Across
Mistral-7B,Llama-3.1-8B,DeepSeek-V3, andPhi-3-minion full MIMIC-IV, PLANT yields average gains of +7.2 Macro-AUC, +3.0 Macro-F1, and +3.1 P@15. - New SOTA in Medical & General XMTC: On MIMIC-IV-full,
Mistral-7B+ PLANT sets a new state-of-the-art at 23.0 Macro-F1 and 72.1 P@8 (+1.4 over prior specialized SOTA). Paired with a lightweightDistilBERTbackbone, PLANT also beats specialized XMTC baselines on full EURLEX-4K (90.61 P@1) and WIKI10-31K (90.91 P@1). - Crushing the Long Tail: On MIMIC-III-few (codes seen 1–5 times), per-code Macro-F1 jumps from 0.054 (prior SOTA CoRelation) to 0.663 with PLANT. Qualitatively, for rare diagnoses like mantle cell lymphoma, PLANT's spotlights lock onto clinical tokens corresponding to mantle, Ki-67, and specific chemotherapy drugs (bendamustine, rituximab).
- Ablations: Stripping out Stage 1 pretraining causes the single largest drop in performance (-4.9 to -6.4 Macro-AUC), proving the gains aren't just from focal loss or hard negative mining.
Limitations and Future Work
- Needs Labeled Data Upfront: Because Mutual Information Gain is calculated from token–label co-occurrences, Stage 1 cannot be run on unlabeled text, and very noisy or ultra-sparse annotations can skew MIG estimates.
- Scale & Compute Constraints: The authors did not test massive million-label benchmarks (e.g., Wiki-500K or Amazon-3M), and LLM comparisons outside the medical domain were restricted to 600-document, 150-label subsets. Scaling full LLM backbones to full non-medical XMTC label spaces remains future work.
- Training-Free Rivals on Few-Shot: On MIMIC-IV-few, a clever training-free baseline (prompting an LLM to extract medical entities, then linking them via SapBERT) actually beat PLANT on the 1–7 occurrence bucket (P@5), though PLANT still won on zero-shot, head labels, and overall ranking.
- Untested Negation & Cross-Dataset Transfer: Generic negation words ("no") have low MIG scores; while the authors hypothesize that LLM contextualized states handle negation anyway, they note a controlled negation study is still needed. Furthermore, planted attention is currently dataset-specific, and Stage 1 adds 12–28% to training time (~10% to inference).
Summary updated