Vocabulary-Defined Semantics: Latent Space Clustering for Improving In-Context Learning
Not on the map. Why?
Abstract (arXiv)
In-context learning enables language models (LM) to adapt to downstream data or tasks by incorporating few samples as demonstrations within the prompts. It offers strong performance without the expense of fine-tuning. However, the performance of in-context learning can be unstable depending on the quality, format, or order of demonstrations, which in turn exacerbates the difficulty of optimization. Prior work, such as Knn Prompting, index samples based on the similarities of logits at the output-side, in addition to the regular retrieval operation at the input-side. They improve in-context learning by leveraging the core ability of next-token prediction, rather than relying solely on the emergent capacity to make analogies. Despite this, the hard-to-optimize issue of in-context learning still exists. In our view, it stems from the process of selecting demonstrations. To address this, we propose complementing in-context learning with an additional clustering operation. We propose a novel approach "vocabulary-defined semantics". Grounded in LM vocabulary, which is the label space of model outputs, the proposed approach computes semantically equivalent latent representations for output labels. Then, taking the representations as centroids, a clustering operation is performed to align the semantic properties between the language model and the downstream data/tasks. Based on extensive experiments across diverse textual understanding datasets and multiple models, our approach outperforms the state-of-the-art in terms of effectiveness and efficiency. On average, it achieves 3%-49% improvements while requiring only half of the computation time.
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Builds on 33 of its 49 references that are in the map. First posted on arXiv 29 Jan 2024.
Builds on
33 of 49 references.
References · 33
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2017Squeeze-and-Excitation Networkscited by 4,763
- 2019Parameter-Efficient Transfer Learning for NLPcited by 4,195
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,355
- 2022Emergent Abilities of Large Language Modelscited by 2,483
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
- 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
- 2022Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learningcited by 886
- 2021Towards a Unified View of Parameter-Efficient Transfer Learningcited by 863
21 more
- 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 788
- 2013An Empirical Investigation of Catastrophic Forgetting in Gradient-Based Neural Networkscited by 711
- 2021Learning To Retrieve Prompts for In-Context Learningcited by 641
- 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 522
- 2021Compacter: Efficient Low-Rank Hypercomplex Adapter Layerscited by 458
- 2023AdaLoRA: Adaptive Budget Allocation for Parameter-Efficient Fine-Tuningcited by 337
- 2018Towards a Definition of Disentangled Representationscited by 294
- 2022Black-Box Tuning for Language-Model-as-a-Servicecited by 254
- 2023Controlling Text-to-Image Diffusion by Orthogonal Finetuningcited by 207
- 2017Latent Space Oddity: on the Curvature of Deep Generative Modelscited by 169
- 2021UniPELT: A Unified Framework for Parameter-Efficient Language Model Tuningcited by 162
- 2023Unified Demonstration Retriever for In-Context Learningcited by 141
- 2023Parameter-Efficient Orthogonal Finetuning via Butterfly Factorizationcited by 112
- 2016Improving Neural Language Models with a Continuous Cachecited by 81
- 2021Beyond Fully-Connected Layers with Quaternions: Parameterization of Hypercomplex Multiplications with 1/n Parameterscited by 66
- 2022Neuro-Symbolic Language Modeling with Automaton-augmented Retrievalcited by 60
- 2023kNN Prompting: Beyond-Context Learning with Calibration-Free Nearest Neighbor Inferencecited by 47
- 2023Understanding INT4 Quantization for Transformer Models: Latency Speedup, Composability, and Failure Casescited by 23
- 2022How Much Does Attention Actually Attend? Questioning the Importance of Attention in Pretrained Transformerscited by 20
- 2023Auto-ICL: In-Context Learning without Human Supervisioncited by 18
- 2023Not All Demonstration Examples are Equally Beneficial: Reweighting Demonstration Examples for In-Context Learningcited by 9
Built on by
Citing papers per year: 2024: 1; 2025: 4; 2026: 2.
7 papers.
- 2025A Survey of Context Engineering for Large Language Modelscited by 120
- 2024A Semantic-Aware Layer-Freezing Approach to Computation-Efficient Fine-Tuning of Language Modelscited by 5
- 2025SeMe: Training-Free Language Model Merging via Semantic Alignmentcited by 2
- 2026Rethinking Weight Tying: Pseudo-Inverse Tying for LM Stable Training and Updatescited by 2
- 2025A Semantic-based Optimization Approach for Repairing LLMs: Case Study on Code Generationcited by 1
- 2026SemRF: A Semantic Reference Frame for Residual-Stream Dynamics in Language Modelscited by 1
- 2025Beyond Neural Incompatibility: Cross-Scale Knowledge Transfer in Language Models through Latent Semantic Alignmentcited by 0
- 2026SemRF: A Semantic Reference Frame for Residual-Stream Dynamics in Language Models30 Jun 2026
- 2026Rethinking Weight Tying: Pseudo-Inverse Tying for LM Stable Training and Updates4 Feb 2026
- 2025Beyond Neural Incompatibility: Cross-Scale Knowledge Transfer in Language Models through Latent Semantic Alignment28 Oct 2025
- 2025A Survey of Context Engineering for Large Language Models17 Jul 2025
- 2025SeMe: Training-Free Language Model Merging via Semantic Alignment26 May 2025
- 2025A Semantic-based Optimization Approach for Repairing LLMs: Case Study on Code Generation17 Mar 2025
- 2024A Semantic-Aware Layer-Freezing Approach to Computation-Efficient Fine-Tuning of Language Models17 Jun 2024