What Makes In-context Learning Effective for Mathematical Reasoning: A Theoretical Analysis
Jiayu Liu, Zhenya Huang, Chaokun Wang, Xunpeng Huang, Chengxiang Zhai,, Enhong Chen

TL;DR
This paper provides a theoretical analysis of in-context learning for mathematical reasoning in large language models, proposing a new demonstration selection method that improves performance across benchmarks.
Contribution
It introduces a theoretical framework linking reasoning performance to semantic similarity and inference stability, and proposes LMS3, a novel demonstration selection method.
Findings
LMS3 outperforms existing methods on multiple benchmarks.
Demonstration relevance and stability are key to reasoning performance.
LMS3 effectively filters unsuitable samples for few-shot learning.
Abstract
Owing to the capability of in-context learning, large language models (LLMs) have shown impressive performance across diverse mathematical reasoning benchmarks. However, we find that few-shot demonstrations can sometimes bring negative performance and their effectiveness on LLMs' reasoning abilities remains unreliable. To this end, in this paper, we aim to theoretically analyze the impact of in-context demonstrations on LLMs' reasoning performance. We prove that the reasoning efficacy (measured by empirical prediction loss) can be bounded by a LLM-oriented semantic similarity and an inference stability of demonstrations, which is general for both one-shot and few-shot scenarios. Based on this finding, we propose a straightforward, generalizable, and low-complexity demonstration selection method named LMS3. It can adaptively facilitate to select the most pertinent samples for different…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMathematics Education and Pedagogy · Mathematics Education and Teaching Techniques · Cognitive and developmental aspects of mathematical skills
