Probing the Decision Boundaries of In-context Learning in Large Language Models
Siyan Zhao, Tung Nguyen, Aditya Grover
Abstract
In-context learning is a key paradigm in large language models (LLMs) that enables them to generalize to new tasks and domains by simply prompting these models with a few exemplars without explicit parameter updates. Many attempts have been made to understand in-context learning in LLMs as a function of model scale, pretraining data, and other factors. In this work, we propose a new mechanism to probe and understand in-context learning from the lens of decision boundaries for in-context binary classification. Decision boundaries are straightforward to visualize and provide important information about the qualitative behavior of the inductive biases of standard classifiers. To our surprise, we find that the decision boundaries learned by current LLMs in simple binary classification tasks are often irregular and non-smooth, regardless of linear separability in the underlying task. This paper investigates the factors influencing these decision boundaries and explores methods to enhance their generalizability. We assess various approaches, including training-free and fine-tuning methods for LLMs, the impact of model architecture, and the effectiveness of active prompting techniques for smoothing decision boundaries in a data-efficient manner. Our findings provide a deeper understanding of in-context learning dynamics and offer practical improvements for enhancing robustness and generalizability of in-context learning.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers8
- Variational Uncertainty Decomposition for In-Context LearningI. Shavindra Jayasekera, Jacob Si, Filippo Valdettaro, Wenlong Chen et al.NeurIPS 2025 · 7 citations
- Bounds of Chain-of-Thought Robustness: Reasoning Steps, Embed Norms, and BeyondDingzirui Wang, Xuanliang Zhang, Keyan Xu, Qingfu Zhu et al.ICLR 2026 · 3 citations
- Probing Neural Combinatorial Optimization ModelsZhiqin Zhang, Yining Ma, Zhiguang Cao, Hoong Chuin LauNeurIPS 2025 · 3 citations
- LILO: Bayesian Optimization with Natural Language FeedbackKatarzyna Kobalczyk, Zhiyuan Lin, Benjamin Letham, Zhuokai Zhao et al.ICML 2026 · 2 citations
- Optimal Dynamic Regret by Transformers for Non-Stationary Reinforcement LearningBaiyuan Chen, Shinji Ito, Masaaki ImaizumiNeurIPS 2025 · 1 citation
Builds on20
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
- Large Language Models Can Be Easily Distracted by Irrelevant ContextFreda Shi, Xinyun Chen, Kanishka Misra, Nathan Scales et al.ICML 2023 · 970 citations
- What Can Transformers Learn In-Context? A Case Study of Simple Function ClassesShivam Garg, Dimitris Tsipras, Percy Liang, Gregory ValiantNeurIPS 2022 · 883 citations
- Transformers Learn In-Context by Gradient DescentJohannes von Oswald, Eyvind Niklasson, Ettore Randazzo, João Sacramento et al.ICML 2023 · 729 citations
Related papers
- Context is EnvironmentSharut Gupta, Stefanie Jegelka, David Lopez-Paz, Kartik AhujaICLR 2024
- A Survey on In-context LearningQingxiu Dong, Lei Li, Damai Dai, Ce Zheng et al.EMNLP 2024 · 479 citations
- Measuring Inductive Biases of In-Context Learning with Underspecified DemonstrationsChenglei Si, Dan Friedman, Nitish Joshi, Shi Feng et al.ACL 2023 · 8 citations
- What Do Language Models Learn in Context? The Structured Task HypothesisJiaoda Li, Yifan Hou, Mrinmaya Sachan, Ryan CotterellACL 2024 · 5 citations
- Task Descriptors Help Transformers Learn Linear Models In-ContextRuomin Huang, Rong GeICLR 2025
