ssToken: Self-modulated and Semantic-aware Token Selection for LLM Fine-tuning

Xiaohan Qin, Xiaoxing Wang, Ning Liao, Cancheng Zhang, Zhaoxiang Zhang, Mingquan Feng, Jingzhi Wang, Junchi Yan · DOI

Introduction

Supervised Fine-Tuning (SFT) is a critical phase in transforming pre-trained Large Language Models (LLMs) into specialized assistants. While traditional approaches emphasize large-scale datasets, recent findings suggest that data quality is more impactful than sheer volume. However, even high-quality datasets contain token-level noise—redundant fillers or task-irrelevant patterns—that can degrade performance.

Existing token-level selection methods, such as RHO-1, typically rely on external reference models to identify informative tokens. This introduces a "Reference Model Tax," significantly increasing computational overhead. Furthermore, these methods often suffer from "Loss-Only Tunnel Vision," relying exclusively on loss values which may conflate informative tokens with mere noise. To address these challenges, we introduce ssToken, a novel framework that enables efficient, high-quality token selection without external dependencies.

Methodology: Self-Modulation and Semantic Awareness

The ssToken framework identifies informative tokens by integrating two distinct signals: a self-modulated learning metric and a semantic-aware attention metric.

Overview of the ssToken framework, illustrating the combination of Retrospective Excess Loss (REL) and Attention Score (AttnScore) for token selection.

1. Self-modulated Selection (REL)

Instead of utilizing an external teacher model, ssToken employs Retrospective Excess Loss (REL). This metric compares the current model's per-token loss against its own historical state (such as the base model before SFT). A token is considered highly "learnable" if the model shows significant improvement in predicting it compared to its past self. This approach eliminates the need for auxiliary models while capturing the model's specific optimization trajectory.

2. Semantic-aware Selection (AttnScore)

To move beyond pure loss-based metrics, ssToken incorporates AttnScore. The authors observed that task-relevant response tokens tend to attend more heavily to the prompt (the instruction). By extracting attention matrices from deeper transformer layers, ssToken calculates a "look-back" score for each token. This ensures that the model prioritizes tokens that maintain the semantic connection between the instruction and the response.

3. Hybrid Scoring and Implementation

These two signals are normalized and combined using a balance coefficient ((\gamma)). During training, gradients are only computed for the top (\rho) fraction of tokens (e.g., 60%). The system is implemented via a lightweight hook and recomputation strategy, ensuring compatibility with FlashAttention and maintaining training efficiency comparable to standard SFT.

Experimental Evaluation

The effectiveness of ssToken was evaluated using a 50k-sample training pool derived from sources like Flan v2, OpenAssistant, and WizardLM. Testing spanned 10 diverse benchmarks, including MMLU, ARC, and TruthfulQA, across multiple model families (LLaMA-3, Qwen-2.5).

Performance comparison of ssToken against full-data fine-tuning and state-of-the-art selection methods across various LLM architectures.

Key Insights and Results

  • Superior Performance: ssToken consistently outperformed full-data fine-tuning. For instance, it achieved a 4.3% average improvement on LLaMA-3.2-3B.
  • Efficiency and Scalability: Unlike reference-based methods that can double training time, ssToken adds negligible overhead. It also surpassed prior state-of-the-art methods like RHO-1 by up to 2.8%, despite using fewer resources.
  • Synergistic Effects: Ablation studies confirmed that the combination of REL and AttnScore yields better results than either metric in isolation. Furthermore, the use of deeper layers for attention scoring was found to be crucial, as these layers capture high-level semantic abstractions rather than low-level syntax.

Conclusion

ssToken demonstrates that LLMs can serve as their own teachers for data selection. By combining retrospective loss analysis with semantic attention patterns, the method achieves superior fine-tuning results with minimal computational cost. Future work will explore adaptive selection ratios to further optimize the training process dynamically.

Summary updated

BibTeX
@inproceedings{qin2026sstoken,
  author = {Xiaohan Qin and Xiaoxing Wang and Ning Liao and Cancheng Zhang and Zhaoxiang Zhang and Mingquan Feng and Jingzhi Wang and Junchi Yan},
  title = {{ssToken: Self-modulated and Semantic-aware Token Selection for LLM Fine-tuning}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=wZ4UoRKDNa},
}
Figure