Rebalancing Token Importance in Language Models with TF-IDF Weighted Cross-Entropy Loss
Abstract
Large language models are typically trained under uniform token weighting, which allows frequent and low-information tokens to dominate learning and can increase the tendency to memorize surface-level text spans. To address this, we present an information-weighted cross-entropy loss that rescales token-level contributions using TF-IDF statistics, emphasizing semantically informative tokens while down-weighting ubiquitous ones. Experiments on five decoder-only LLMs ranging from 1.1B to 13B parameters show consistent reductions in memorized substring length while preserving perplexity and downstream task performance. Under LoRA fine-tuning, TF-IDF reduces average substring memorization length by 14% across all five models. Under full-weight fine-tuning on TinyLLaMA 1.1B, the reduction reaches 58%. Our approach is architecture-agnostic and can be incorporated into existing training pipelines with less than 3% computational overhead, offering a lightweight and principled way to mitigate memorization without disrupting standard training dynamics.
Create a lesson
Metadata
- Categories
- cs.CL, cs.LG
Related papers
What If Chinese Were Latinized? A Counterfactual Study of Input Representation, Tokenization, and Language Modeling
Shared title terminologycs.CLZijie Zheng, Ej Zhou
On the Importance of Hidden-State Refinement in Masked Diffusion Language Models
Shared title terminologycs.CLLinhao Zhong, Bozhen Fang, Xuehao Wang et al.
DUET: Dual-MDL Unsupervised Entropy-Trie Segmentation for Low-Resource Languages
Shared title terminologycs.CLXiaotian Wang, Youyuan Lin, Zhan Shen et al.
Online Language Adaptive Sampling for Better Distributed Cross-lingual Gains
Shared title terminologycs.CLQuang Phuoc Nguyen, Félix Gaschi, David Anugraha et al.
When Edit Localization Amplifies Relative Selection Bias: Gradient Geometry, Target Mismatch, and Importance Weighting
Shared title terminologycs.CLShengwei Zhang, Haoda Dai, Yifei Li et al.
From Token Probabilities to Semantic Constraints: Towards Declarative Probabilistic Evaluation of Language Models
Shared title terminologycs.CLKyle Richardson, Cullen Anderson, Pranav Balakrishnan et al.