Manuscript Offprint

arXiv:2609.03355

ALRA: Adaptive Local Relational Alignment for Logit-Based Pre-training Distillation of Autoregressive Language Models

Quang Hoang Trung, Quang Huu Hieu, Nguyen Van Hoang Phuc, Vo Nguyen Le Duy

ARTICLE INFO

Keywords:

Knowledge distillation

Autoregressive language models

Pre-training distillation

Adaptive token selection

Pairwise relational distillation

ABSTRACT

Logit-based knowledge distillation for autoregressive language models usually aligns teacher and student next-token distributions over the entire vocabulary. However, this global objective overlooks relative preferences among likely token alternatives. Existing local approaches often select candidate tokens from either the teacher or the student alone. Teacher-only selection can miss tokens that the student considers likely, while student-only selection can rely on an inaccurate ranking early in training. We propose Adaptive Local Relational Alignment (ALRA), a position-specific framework combining student proposals with teacher guidance. At each valid prediction position, the student proposes likely tokens, while the teacher's most probable token is included as an anchor. ALRA adjusts the number of selected tokens according to how broadly the teacher distributes probability within this candidate set relative to the current batch. Adaptive Local Divergence retains the mass-matching term and separately matches the relative token distributions within the selected and remaining vocabulary regions. Unlike the exact full-vocabulary decomposition, it replaces the teacher-mass coefficients of the two conditional terms with unit coefficients, preventing either term from being downweighted solely because its region has low teacher probability. Student-Weighted Pairwise Relational Alignment emphasizes high-probability token pairs with small student probability gaps and gives less weight to unlikely or clearly separated pairs. Experiments on The Pile with randomly initialized 200M- and 500M-parameter students across nine zero-shot benchmarks yield average accuracies of 36.62% and 37.40%. ALRA exceeds the strongest competing distillation baseline by 0.94 and 0.83 percentage points and improves over pre-training without distillation by 2.31 and 2.91 points, respectively.

References (67)

  • On-policy distillation of language models: Learning from self-generated mistakes, in: The Twelfth International Conference on Learning Representations
  • Datasheet for the pile (opens arXiv in a new tab)
  • Piba: Reasoning about physical commonsense in natural language, in: Proceedings of the AAAI conference on artificial intelligence, pp. 7432–7439
  • Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge
  • Don't ignore the tail: Decoupled distillation produces top maths students on an academic budget, in: Forty-third International Conference on Machine Learning
  • Knowledge distillation and dataset distillation of large language models: Emerging trends, challenges, and future directions
  • The Pile: An 800GB Dataset of Diverse Text for Language Modeling
  • A framework for few-shot language model evaluation
  • Olmo: Accelerating the science of language models, in: Proceedings of the 62nd annual meeting of the association for computational linguistics (volume 1: long papers), pp. 15789–15809
  • Minillm: Knowledge distillation of large language models, in: International Conference on Learning Representations, pp. 32694–32717
  • MiniPLM: Knowledge distillation for pre-training language models, in: The Thirteenth International Conference on Learning Representations
  • DA-KD: Difficulty-aware knowledge distillation for efficient large language models, in: Proceedings of the 42nd International Conference on Machine Learning, PMLR. pp. 22379–22391
  • Distilling the Knowledge in a Neural Network
  • Tinybert: Distilling bert for natural language understanding, in: Findings of the association for computational linguistics: EMNLP 2020, pp. 4163–4174
  • Preprint submitted to Elsevier
  • Sequence-level knowledge distillation, in: Proceedings of the 2016 conference on empirical methods in natural language processing, pp. 1317–1327
  • Bild: Bi-directional logits difference loss for large language model distillation, in: Proceedings of the 31st International Conference on Computational Linguistics, pp. 1168–1182
  • Decoupled weight decay regularization, in: International Conference on Learning Representations
  • A statistical perspective on distillation, in: Proceedings of the 38th International Conference on Machine Learning, PMLR. pp. 7632–7642
  • Can a suit of armor conduct electricity? a new dataset for open book question answering, in: Proceedings of the 2018 conference on empirical methods in natural language processing, pp. 2381–2391
  • Improved knowledge distillation via teacher assistant, in: Proceedings of the AAAI conference on artificial intelligence, pp. 5191–5198
  • A corpus and cloze evaluation for deeper understanding of commonsense stories, in: Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 839–849
  • Compact language models via pruning and knowledge distillation
  • The lambda dataset: Word prediction requiring a broad discourse context, in: Proceedings of the 54th annual meeting of the association for computational linguistics (volume 1: Long papers), pp. 1525–1534
  • Relational knowledge distillation, in: 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), IEEE, pp. 3962–3971
  • Pre-training distillation for large language models: A design space exploration, in: Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 3603–3618
  • Winogrande: An adversarial winograd schema challenge at scale
  • DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter
  • Social iqa: Commonsense reasoning about social interactions, in: Proceedings of the 2019 conference on empirical methods in natural language processing and the 9th international joint conference on natural language processing (EMNLP-IJCNLP), pp. 4463–4473
  • Does knowledge distillation really work? Advances in neural information processing systems 34, 6906–6919
  • Knowledge distillation with refined logits, in: 2025 IEEE/CVF International Conference on Computer Vision (ICCV), IEEE. pp. 1110–1119
  • Mobilebert: a compact task-agnostic bert for resource-limited devices, in: Proceedings of the 58th annual meeting of the association for computational linguistics, pp. 2158–2170
  • Distilling task-specific knowledge from bert into simple neural networks (opens arXiv in a new tab)
  • Rethinking selective knowledge distillation (opens arXiv in a new tab)
  • LLaMA: Open and Efficient Foundation Language Models
  • Minilm: Deep self-attention distillation for task-agnostic compression of pre-trained transformers
  • F-divergence minimization for sequence-level knowledge distillation, in: Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 10817–10834
  • Llm-oriented token-adaptive knowledge distillation, in: Proceedings of the AAAI Conference on Artificial Intelligence, pp. 34070–34078
  • Local dense logit relations for enhanced knowledge distillation, in: 2025 IEEE/CVF International Conference on Computer Vision (ICCV), IEEE. pp. 4539–4549
  • Survey on knowledge distillation for large language models: methods, evaluation, and application
  • Hellaswag: Can a machine really finish your sentence?, in: Proceedings of the 57th annual meeting of the association for computational linguistics, pp. 4791–4800
  • Towards the law of capacity gap in distilling language models, in: Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 22504–22528
  • Reaugkd: Retrieval-augmented knowledge distillation for pre-trained language models, in: Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pp. 1128–1136
  • Decoupled knowledge distillation, in: 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), IEEE. pp. 11943–11952
  • Revisiting knowledge distillation for autoregressive language models, in: Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 10900–10913
  • Let $P^T$ and $P^S$ be the teacher and student full-vocabulary distributions, with components $p_i^T$ and $p_i^S$
  • For each token $i \in \mathcal{R}$, define the corresponding conditional probabilities as
  • Starting from the full-vocabulary forward KL
  • The pretrained teacher remains fixed throughout every distillation run
  • The student architectures follow the public Qwen-based configurations, but their released weights are not used; both students are initialized randomly before pre-training
  • We stream the dataset with the Hugging Face datasets library without upstream shuffling and retain the first 2,000,000 records in the resulting stream order
  • Token IDs are accumulated in a buffer, and each stored example contains at most 513 token IDs
  • Tokens following the selected boundary are returned to the buffer and become the prefix of the next example
  • The full-budget processed training stream is constructed once, and the shorter controlled runs use the corresponding prefix of the same stream rather than a separately generated corpus
  • Similarly, 126.4K updates correspond to $126,400 \times 16 \times 512 = 1,035,468,800$ nominal model-input tokens, which we report as the approximately 1B-token setting
  • Held-out sets use the official test split where usable (LAMBADA-OpenAI, OpenBookQA, ARC-Easy, ARC-Challenge, StoryCloze-2016) and the public validation split otherwise (HellaSwag, WinoGrande, PIQA, SocialIQA)
  • The held-out column denotes the examples used to produce Table 1, and the validation column denotes the examples reserved for the controlled 550M-token analyses
  • we first take the official test split, and only when that split is unavailable or its public labels are unusable do we fall back to the public validation split as the held-out set
  • The source of the separate validation set depends on which labeled split remains available after assigning the held-out set
  • Blue bars appear only for HellaSwag, ARC-Easy, and PIQA, matching the validation sets reserved for the two 550M-token controlled studies; orange bars denote the held-out sets used in the nine-task comparison
  • Blue bars denote the validation sets reserved for the controlled 550M-token studies; orange bars denote the held-out sets used in the nine-benchmark comparison
  • The fixed-budget sweep, the candidate-set anchoring variants, and the full ALRA row are therefore compared at the same checkpoint and on the same validation examples
  • ALRA uses $d_{\min} = 3$, $d_{\max} = 25$, and the fixed-budget sweep $d \in \{3, 7, 9, 15, 19, 25\}$
  • Likewise, $\gamma$ controls only the probability-gap factor in SWPRA and should not be read as the coefficient of the complete pairwise loss, which is $\lambda_{pair}$
  • Table E.3 records the configurations used in the reported runs, and the paragraphs following it state where an implementation changes the original method's training regime or output space
  • Shared data and optimizer settings are given in Table E.1; adaptations are described below
  • Vanilla KD uses the full teacher and student vocabulary distributions and a forward-KL distillation term (Hinton et al., 2015), with the KL and causal language modeling components weighted equally (0.5/0.5) at temperature 0.5