Decoder-based Sense Knowledge Distillation

Qitong Wang, Mohammed J. Zaki, Georgios Kollias, Vasileios KalantzisarXiv 2026 · arXiv

TL;DR

The paper introduces Decoder-based Sense Knowledge Distillation (DSKD), a novel framework that injects structured lexical knowledge—like word senses, synonyms, and antonyms—into decoder-only Large Language Models (LLMs) during the distillation process. By using a pre-constructed sense dictionary purely as a training scaffold, DSKD allows compressed student models to inherit rich semantic structures without incurring any additional computational or latency overhead at inference time.

What Problem Does This Paper Address?

Knowledge distillation (KD) is a popular strategy for compressing massive LLMs into smaller, more efficient student models by training them to mimic a larger teacher's behavior. However, standard KD approaches typically focus on matching raw token output distributions or hidden states, often overlooking structured lexical knowledge such as distinct word senses (polysemy) and explicit word relationships.

While prior work introduced Sense Knowledge Distillation (SKD) to address this for encoder models (like BERT), adapting it to generative, decoder-only architectures (like LLaMA or Mistral) introduces a massive bottleneck. Encoder SKD requires replacing token embeddings with specific sense embeddings via dictionary lookups during inference. Because decoders generate text autoregressively from an entire vocabulary at every step, performing dictionary lookups for every possible token during generation is computationally impractical.

Methods

DSKD bypasses the inference bottleneck by utilizing structured lexical knowledge exclusively during the training phase. The pipeline consists of four main steps:

  1. Token-level Sense Dictionary Construction: The authors run a single forward pass of a pretrained teacher model over a large corpus (Wikipedia). For every token in the vocabulary, they collect its top hidden layer representations and group them using $k$-means clustering. The resulting centroids serve as discrete "sense prototypes" capturing the token's different contextual meanings.
  2. Lexical Relationship Construction: To complement these statistical senses, they extract explicit synonym and antonym pairs from Wiktionary and Roget’s Thesaurus. They also elegantly expand their antonym pool by using morphological negation rules (e.g., transforming "accurate/faultless" into "accurate/fault" via prefixes/suffixes).
  3. Word-level Sense Composition: Since tokenizers often split words into subwords, DSKD iteratively aligns and averages subword token senses using an $L_2$-distance nearest-neighbor matching scheme to create unified word-level sense representations.
  4. Semantic Consistency Loss: During distillation, the student model isn't just trained on standard next-token cross-entropy and KL-divergence losses. DSKD introduces a semantic consistency loss using a hinge MSE objective. Guided by the teacher's hidden state, it pulls the student's representations closer to the $\kappa$-nearest positive senses (synonyms) and pushes them away from negative senses (antonyms).
Figure 2: Overview of DSKD training: Given an input corpus, the teacher’s last hidden layer m𝑡is used to retrieve sense embeddings of the token 𝑡+ 1 and its synonyms (positive candidates) and antonyms (negative candidates) from the sense dictionary. The 𝜅nearest positive and negative embeddings to m𝑡are selected, and the student’s last hidden layer n𝑡is optimized with a hinge MSE loss. This process aligns the student’s semantic space with the teacher’s sense dictionary.

Datasets

The sense dictionary was constructed using the English Wikipedia dump. For training and evaluation, the authors utilized a diverse suite of standard NLP benchmarks:

  • ARC (AI2 Reasoning Challenge): Science exam questions requiring multi-step reasoning.
  • CommonsenseQA (CSQA): Commonsense reasoning tasks with plausible distractors.
  • MMLU & MMLU-Pro: Massive multitask language understanding across STEM, humanities, and social sciences.
  • PIQA: Physical commonsense reasoning.
  • SQuADv2: A generative reading comprehension dataset containing both answerable and unanswerable questions.

Key Insights and Ideas

  • The Embedding Space is Naturally Structured: Visualization via t-SNE confirms that decoder LLMs naturally cluster semantically related concepts and synonyms (e.g., "ruby", "crimson", and "scarlet" cluster tightly near "red"), providing a strong foundation for extracting discrete sense prototypes.
Figure 1: Distribution of selected word embeddings from Llama-3-8B-Instruct [8] on Wikipedia dump [37], with t-SNE [33] for visualization. Semantically related tokens form coherent clusters in the embedding space: synonyms of red (e.g., ruby, crimson, vermilion, scarlet) appear in a compact region, while vehicle-related tokens such as bus and car occupy a separate neighborhood. For words that are decomposed into multiple subword tokens by the tokenizer (e.g., vermilion, scarlet), a composed representation is used for visualization; details are provided in Section 3.1. This structured organization suggests that contextual embeddings encode discrete semantic regularities.
  • Scaffolding vs. Replacement: The core conceptual shift in DSKD is treating the sense dictionary as an external training scaffold rather than an inference-time dependency. The student model learns to organize its internal semantic space better during training, but remains fully self-contained when deployed.
  • Vocabulary Size Impacts Semantic Compression: A fascinating finding was that Mistral-7B (smaller vocabulary) suffered much worse degradation under standard KD than LLaMA-3-8B (larger vocabulary). Because smaller vocabularies force individual tokens to compress a wider range of meanings, explicitly supervising sense distinctions (via DSKD) yields a much more pronounced performance recovery for smaller-vocab models.

Key Results

The authors evaluated DSKD by distilling 32-layer teacher models (LLaMA-3-8B-Instruct and Mistral-7B-Instruct) into 16-layer student models.

  • Consistent Performance Gains: DSKD consistently outperformed standard KD across all benchmarks. For instance, on the knowledge-heavy MMLU benchmark, LLaMA-3 DSKD improved accuracy from $61.26\%$ (standard KD) to $64.38\%$. On ARC, Mistral DSKD boosted performance from $61.11\%$ to $64.78\%$.
  • Resource Efficiency: The 16-layer student models effectively cut parameter sizes nearly in half (e.g., 8.0B to 4.5B for LLaMA) and reduced the memory footprint from 15.0GB to 8.5GB.
  • Negligible Overhead: DSKD introduces only a minor training-time overhead of roughly $5\%$ compared to standard KD, while maintaining identical evaluation and inference latency since the dictionary is discarded after training.

Limitations and Future Work

Currently, DSKD applies a fixed number of clusters ($k$) to define the senses for all tokens in the vocabulary. This uniform treatment doesn't accurately reflect natural language: highly polysemous words (words with many meanings, like "run" or "bank") would benefit from a larger sense inventory, whereas unambiguous technical terms require very few. The authors note that developing a dynamic mechanism to assign variable cluster counts per token is a vital direction for future work.

Summary updated

Abstract

Large language models (LLMs) learn contextual embeddings that capture rich semantic information, yet they often overlook structured lexical knowledge such as word senses and relationships. Prior work has shown that incorporating sense dictionaries can improve knowledge distillation for encoder models, but their application to decoder as generative models remains challenging. In this paper, we introduce Decoder-based Sense Knowledge Distillation (DSKD), a framework that integrates lexical resources into the training of decoder-style LLMs without requiring dictionary lookup at inference time. Extensive experiments on diverse benchmarks demonstrate that DSKD significantly enhances knowledge distillation performance for decoders, enabling generative models to inherit structured semantics while maintaining efficient training.
BibTeX
@misc{wang2026decoder,
  author = {Qitong Wang and Mohammed J. Zaki and Georgios Kollias and Vasileios Kalantzis},
  title = {{Decoder-based Sense Knowledge Distillation}},
  year = {2026},
  eprint = {2602.22351},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.22351},
}

Loading related content...

Figure