mlsanityData to 14 Oct 2026

ICL CIPHERS: Quantifying "Learning" in In-Context Learning via Substitution Ciphers

arXiv 2504.19395 ↗First posted 28 Apr 2025cs.CLcited by 4

Not on the map. Why?

Abstract (arXiv)

Recent works have suggested that In-Context Learning (ICL) operates in dual modes, i.e. task retrieval (remember learned patterns from pre-training) and task learning (inference-time ''learning'' from demonstrations). However, disentangling these the two modes remains a challenging goal. We introduce ICL CIPHERS, a class of task reformulations based on substitution ciphers borrowed from classic cryptography. In this approach, a subset of tokens in the in-context inputs are substituted with other (irrelevant) tokens, rendering English sentences less comprehensible to human eye. However, by design, there is a latent, fixed pattern to this substitution, making it reversible. This bijective (reversible) cipher ensures that the task remains a well-defined task in some abstract sense, despite the transformations. It is a curious question if LLMs can solve tasks reformulated by ICL CIPHERS with a BIJECTIVE mapping, which requires ''deciphering'' the latent cipher. We show that LLMs are better at solving tasks reformulated by ICL CIPHERS with BIJECTIVE mappings than the NON-BIJECTIVE (irreversible) baseline, providing a novel approach to quantify ''learning'' in ICL. While this gap is small, it is consistent across the board on four datasets and six models. Finally, we examine LLMs' internal representations and identify evidence in their ability to decode the ciphered inputs.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 34 of its 62 references that are in the map. First posted on arXiv 28 Apr 2025.

Builds on

34 of 62 references.

References · 34

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2024The Llama 3 Herd of Modelscited by 14,715
  3. 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
  4. 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,724
  5. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
  6. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
  7. 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,135
  8. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
  9. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
  10. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 684
  11. 2024OLMo: Accelerating the Science of Language Modelscited by 613
  12. 2023GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Ciphercited by 423
22 more
  1. 2021True Few-Shot Learning with Language Modelscited by 344
  2. 2023Trained Transformers Learn Linear Models In-Contextcited by 337
  3. 2024Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Modelscited by 235
  4. 2024Bridging Language and Items for Retrieval and Recommendation: Benchmarking LLMs as Semantic Encoderscited by 224
  5. 2021Reframing Instructional Prompts to GPTk's Languagecited by 176
  6. 2023What In-Context Learning "Learns" In-Context: Disentangling Task Recognition and Task Learningcited by 152
  7. 2022Impact of Pretraining Term Frequencies on Few-Shot Reasoningcited by 142
  8. 2023The mechanistic basis of data dependence and abrupt learning in an in-context classification taskcited by 118
  9. 2023A Theory of Emergent In-Context Learning as Implicit Structure Inductioncited by 86
  10. 2022On the Effect of Pretraining Corpora on In-context Learning by a Large-scale Language Modelcited by 81
  11. 2024From Words to Numbers: Your Large Language Model Is Secretly A Capable Regressor When Given In-Context Examplescited by 57
  12. 2024Transformers Learn Nonlinear Features In Context: Nonconvex Mean-field Dynamics on the Attention Landscapecited by 46
  13. 2024Dual Operating Modes of In-Context Learningcited by 43
  14. 2023The Closeness of In-Context Learning and Weight Shifting for Softmax Regressioncited by 41
  15. 2024Out-of-distribution generalization via composition: a lens through induction heads in Transformerscited by 28
  16. 2023In-context Learning Generalizes, But Not Always Robustly: The Case of Syntaxcited by 22
  17. 2023Do pretrained Transformers Learn In-Context by Gradient Descent?cited by 18
  18. 2024Dual Process Learning: Controlling Use of In-Context vs. In-Weights Strategies with Weight Forgettingcited by 15
  19. 2023In-Context Exemplars as Clues to Retrieving from Large Associative Memorycited by 13
  20. 2020Can Sequence-to-Sequence Models Crack Substitution Ciphers?cited by 9
  21. 2024Generalisation First, Memorisation Second? Memorisation Localisation for Natural Language Classification Taskscited by 9
  22. 2024Investigating the Pre-Training Dynamics of In-Context Learning: Task Recognition vs. Task Learningcited by 6

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 2; 2026: 2.

4 papers.