TL;DR
When you expand an LLM’s vocabulary to speak a specialized language—like Lean theorem proofs or structured tool-calling—the new tokens often learn to pass the specific test while failing to connect with the model's broader reasoning skills. The authors propose SAVE, a mathematical data-selection filter that automatically fishes out the exact right "healing" examples from generic datasets to properly wire these new tokens into the model's brain. The result? Better target performance, improved token efficiency, and restored transfer to related tasks.
What Problem Does This Paper Address?
General-purpose tokenizers love to chop specialized terms into awkward confetti (turning "Mathlib" into "Math" + "lib"). A standard fix is vocabulary expansion: adding frequent domain-specific concepts as atomic tokens and fine-tuning on the target dataset.
Here’s the catch: an embedding row for a new token only receives gradient updates when that exact token appears in a training example. Fine-tuning purely on a narrow target dataset makes these new tokens locally useful, but leaves them isolated from the model's pre-existing knowledge.
The authors call this transfer-incomplete vocabulary expansion. For example, expanding an LLM's vocabulary for Lean autoformalization boosts its Lean compile rate and compresses sequence lengths by $1.20\times$, yet causes its accuracy on AIME mathematical reasoning—a closely related skill—to drop compared to standard fine-tuning.
Mixing in auxiliary training data can "heal" these under-trained embeddings, but only if the data is semantically compatible. Adding math data fixes the AIME drop and boosts Lean performance, while generic chat or translation data actively hurts it. Hand-picking related datasets for every niche domain doesn't scale, raising the question: how do we automatically select the best healing examples from a massive, generic data pool?
Methods
Standard influence functions estimate whether training on a candidate example will reduce validation loss on a target task. For LLMs, methods like DataInf approximate this efficiently using LoRA gradients and a curvature preconditioner (an approximation of the Hessian).
However, standard influence estimators average curvature across the entire candidate pool. Because newly added tokens appear rarely in generic corpora, their updates are row-sparse—mostly zeros. Averaging over the whole corpus dilutes their curvature signal until it gets swallowed by mathematical damping terms.
SAVE (Sparsity-Aware Vocabulary Estimator) introduces a clean, two-part fix:
- Token-Conditional Curvature (Novel): Instead of normalizing over the full corpus, SAVE computes curvature exclusively over the subset of candidate examples that actually contain each new token. This prevents rare expanded tokens from having their gradient signals washed out.
- Mixed Influence Score (Hybrid): SAVE combines this sparse, token-level vocabulary score with a standard, dense LoRA-level DataInf score (weighted by a hyperparameter $\alpha_E$). The LoRA signal captures broad reasoning and structural compatibility, while the vocabulary signal ensures the new token embeddings get aligned.
- Healing SFT: SAVE filters a generic pool for positive-utility examples, takes the top-ranked candidates, and runs standard supervised fine-tuning using balanced mini-batches (splitting batches equally between target data and healing data).
Datasets
No new benchmarks are introduced; instead, the authors curate target/auxiliary splits from existing corpora:
- Target Training:
Goedel-Pset-v1(Lean autoformalization),ToolWeaver(tool calling), andUltraMedical(medical QA). - Auxiliary Candidate Pools: Sampled from
Nemotron-Post-Training-Dataset-v1(chat, code, math, STEM),ToolWeaver(when non-target), plusNemotron-SFT-Instruction-Following-Chat-v2andACADATAin preliminary tests. - Evaluation:
miniF2F(Lean target),AIME 2025(related math transfer),ToolWeaver(tool retrieval),MedQA(medical target), andMMLU-Pro,LiveCodeBench, andIF-Eval(broad capability retention).
Key Insights and Ideas
- More data isn't healing; compatible data is: Random auxiliary mixing (
Target + Random) actually degrades Lean autoformalization accuracy from 58.61% down to 52.05%. Vocabulary healing requires targeted alignment, not generic replay. - Domain labels and similarity search aren't enough: Picking examples via embedding similarity (
EmbSim), lexical overlap (TF-IDF), or even cheating by randomly sampling from SAVE's exact domain ratios (SAVE-Mix Random) all trail far behind SAVE. Instance-level gradient ranking and token-conditional curvature do the heavy lifting. - Plug-and-play modularity: Because SAVE's vocabulary term is additive, you can bolt it onto other gradient-based selectors. Adding it to LESS, OGS, and DataInf boosted
miniF2Fcompile rates by +4.1, +5.3, and +7.4 percentage points, respectively. - Goldilocks weighting ($\alpha_E$): Balancing LoRA content vs. token overlap follows an inverted-U curve. Too little weight ignores the new tokens; too much weight chases superficial symbol overlap without coherent reasoning.
Key Results
- Lean Autoformalization (
Qwen3-8B): SAVE hits a 79.09% compile rate and 72.13% accuracy onminiF2F, beating vocabulary-expanded target-only training (68.03% / 58.61%) and vanilla DataInf (71.72% / 63.11%). It also achieves the highest related-transfer score onAIME 2025(73.28%) while staying competitive on broad retention. - Tool Calling (
Llama3-8BonToolWeaver): SAVE improves tool retrieval across all query complexities (e.g., complex I3 NDCG@1 jumps from 88.00 to 92.00), even under a strict fixed-budget control where healing examples replace target examples rather than expanding the dataset size. - Generalization: On a smaller backbone (
Qwen3-4B), SAVE beats DataInf onminiF2Faccuracy (58.20% vs. 52.87%). On a less syntactically rigid domain (MedQAwithLlama-3.1-8B-Instruct), SAVE reaches 79.26% accuracy over DataInf's 75.02% and target-only's 72.03%.
Limitations and Future Work
While the authors defer their formal Limitations section to Appendix E (not included in the main text), two practical constraints emerge clearly in the main paper:
- Vocabulary overlap in the auxiliary pool: SAVE's vocabulary score vanishes if none of the expanded tokens appear in the generic pool. In
ToolWeaver, predefined tool-code tokens were too rare in generic corpora, forcing the authors to mine frequent structured-output tokens (likefinal_answer) so the estimator had active tokens to latch onto. - Scale calibration: The balancing hyperparameter $\alpha_E$ depends on the relative magnitude of LoRA vs. vocabulary influence scores (requiring $\alpha_E \approx 10$ for Lean, $\approx 1$ for ToolWeaver), meaning practitioners must calibrate this ratio per setting.
Summary updated