Abstract
Adapting Small Language Models (SLMs) to highly specialized domains often involves a trade-off between the high accuracy of end-to-end (E2E) finetuning and the stability of parameter-efficient methods. This paper introduces AdaPT (Adaptive Tokenization and Sparse Parameter-Tuning), a novel framework that customizes both a model's vocabulary and its trainable parameters for specific tasks. By adding domain-specific phrases to the vocabulary and updating only the most sensitive model parameters, AdaPT achieves higher accuracy and stability than standard adapter methods like LoRA, while reducing training costs by approximately 50%.
Introduction
In industrial applications such as medical text analysis or customer intent detection, deploying massive Large Language Models (LLMs) is often impractical due to latency and cost. While finetuning SLMs (e.g., BERT, Phi, or Gemma) is the standard alternative, it presents a dilemma. E2E finetuning is accurate but prone to overfitting and instability on small datasets. Conversely, Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA or Prefix Tuning are stable but struggle when the target domain's vocabulary differs significantly from the model's pretraining data. AdaPT bridges this gap by co-optimizing tokenization and parameter selection.
Methodology
Task-Specific Tokenization
Standard subword tokenizers frequently fragment domain-specific terms into semantically meaningless units (e.g., splitting "BRCA1" into multiple sub-tokens). AdaPT addresses this by using the BIDE sequence mining algorithm to identify frequent contiguous and non-contiguous word sequences (e.g., "p < 0.001" or "gene ... mutation") within the finetuning data. These are added as new, single tokens to the model's vocabulary, capped at a 10% increase.
Task-Adaptive Sparse Finetuning
Instead of tuning all parameters or adding external modules, AdaPT dynamically identifies the most "sensitive" existing parameters in the model. Sensitivity is measured using an index of dispersion (output variance across inputs) and the gradient norm. The model is then finetuned by updating only the new token embeddings and the top 10% to 20% most sensitive parameters. Unlike LoRA, this approach introduces zero new architectural parameters, relying entirely on existing weights.
Experimental Evaluation
The authors evaluated AdaPT on five diverse semantic classification tasks: Hyperpartisan (political bias), PubMed RCT (biomedical), ACL-ARC (citation intent), SciERC (scientific relations), and Rotten Tomatoes (sentiment).
Key Results
- Accuracy and Stability: AdaPT consistently outperformed E2E finetuning and PEFT baselines across various architectures. On specialized tasks, it showed ~50% lower variance in F1 scores compared to E2E finetuning across multiple runs.
- Efficiency: Training costs were roughly 50% lower than E2E finetuning (e.g., 1104 vs 2486 TFlops/epoch for BERT-large).
- Inference Speed: Because AdaPT adds no new architectural parameters, inference is 5-8% faster than LoRA or Prefix Tuning, with negligible overhead from the expanded vocabulary.
Discussion and Conclusion
AdaPT demonstrates that for specialized tasks, "less is more." Tuning just 10-20% of the model parameters yielded optimal performance, while exceeding this threshold often degraded results by eroding pretraining knowledge. By unifying adaptive tokenization with sparse tuning, AdaPT provides a robust and efficient pipeline for domain adaptation. Future work will explore mixed-precision computation to further accelerate training by reserving high-precision compute specifically for the identified sensitive parameters.
Summary updated