mlsanityData to 14 Oct 2026

In-Context Learning State Vector with Inner and Momentum Optimization

arXiv 2404.11225 ↗First posted 17 Apr 2024cs.CL cs.AIcited by 15

Not on the map. Why?

Abstract (arXiv)

Large Language Models (LLMs) have exhibited an impressive ability to perform In-Context Learning (ICL) from only a few examples. Recent works have indicated that the functions learned by ICL can be represented through compressed vectors derived from the transformer. However, the working mechanisms and optimization of these vectors are yet to be thoroughly explored. In this paper, we address this gap by presenting a comprehensive analysis of these compressed vectors, drawing parallels to the parameters trained with gradient descent, and introduce the concept of state vector. Inspired by the works on model soup and momentum-based gradient descent, we propose inner and momentum optimization methods that are applied to refine the state vector progressively as test-time adaptation. Moreover, we simulate state vector aggregation in the multiple example setting, where demonstrations comprising numerous examples are usually too lengthy for regular ICL, and further propose a divide-and-conquer aggregation method to address this challenge. We conduct extensive experiments using Llama-2 and GPT-J in both zero-shot setting and few-shot setting. The experimental results show that our optimization method effectively enhances the state vector and achieves the state-of-the-art performance on diverse tasks. Code is available at https://github.com/HITsz-TMG/ICL-State-Vector

Key facts. Cited by 15 papers in the map (data through 14 Oct 2026). Builds on 32 of its 44 references that are in the map. First posted on arXiv 17 Apr 2024.

Builds on

32 of 44 references.

References · 32

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  3. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
  4. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
  5. 2022Emergent Abilities of Large Language Modelscited by 2,512
  6. 2015Character-level Convolutional Networks for Text Classificationcited by 2,330
  7. 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,234
  8. 2022Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference timecited by 1,396
  9. 2022Editing Models with Task Arithmeticcited by 1,120
  10. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
  11. 2022Transformers learn in-context by gradient descentcited by 732
  12. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
20 more
  1. 2023Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free Lunchcited by 694
  2. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 684
  3. 2013Generating Sequences With Recurrent Neural Networkscited by 554
  4. 2017Word Translation Without Parallel Datacited by 487
  5. 2023Learning to Compress Prompts with Gist Tokenscited by 390
  6. 2023A Comprehensive Survey on Test-Time Adaptation under Distribution Shiftscited by 359
  7. 2023In-Context Learning Creates Task Vectorscited by 312
  8. 2022Data Distributional Properties Drive Emergent In-Context Learning in Transformerscited by 309
  9. 2023Function Vectors in Large Language Modelscited by 308
  10. 2023In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space Steeringcited by 245
  11. 2023Label Words are Anchors: An Information Flow Perspective for Understanding In-Context Learningcited by 236
  12. 2023Linearity of Relation Decoding in Transformer Language Modelscited by 200
  13. 2019The Bottom-up Evolution of Representations in the Transformer: A Study with Machine Translation and Language Modeling Objectivescited by 139
  14. 2023Task-Specific Skill Localization in Fine-tuned Language Modelscited by 105
  15. 2023Language Models Implement Simple Word2Vec-style Vector Arithmeticcited by 98
  16. 2023AdapterSoup: Weight Averaging to Improve Generalization of Pretrained Language Modelscited by 84
  17. 2023Separate the Wheat from the Chaff: Model Deficiency Unlearning via Parameter-Efficient Module Operationcited by 33
  18. 2023In-context Learning and Gradient Descent Revisitedcited by 20
  19. 2017Distinguishing Antonyms and Synonyms in a Pattern-based Neural Networkcited by 19
  20. 2023Iterative Forward Tuning Boosts In-Context Learning in Language Modelscited by 15

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 2; 2025: 10; 2026: 3.

15 papers.

Sort:

By area: