MachineLearningLM: Scaling Many-shot In-context Learning via Continued Pretraining
On the map: LLM reasoning → Reasoning benchmarks and evaluation
Abstract (arXiv)
Large language models (LLMs) possess broad world knowledge and strong general-purpose reasoning ability, yet they struggle to learn from many in-context examples on standard machine learning (ML) tasks, that is, to leverage many-shot demonstrations purely via in-context learning (ICL) without gradient descent. We introduce MachineLearningLM, a portable continued-pretraining framework that equips a general-purpose LLM with robust in-context ML capability while preserving its general knowledge and reasoning for broader chat workflows. Our pretraining procedure synthesizes ML tasks from millions of structural causal models (SCMs), spanning shot counts up to 1,024. We begin with a random-forest teacher, distilling tree-based decision strategies into the LLM to strengthen robustness in numerical modeling. All tasks are serialized with a token-efficient prompt, enabling 3x to 6x more examples per context window and delivering up to 50x amortized throughput via batch inference. Despite a modest setup (Qwen-2.5-7B-Instruct with LoRA rank 8), MachineLearningLM outperforms strong LLM baselines (e.g., GPT-5-mini) by an average of about 15% on out-of-distribution tabular classification across finance, physics, biology, and healthcare domains. It exhibits a striking many-shot scaling law: accuracy increases monotonically as in-context demonstrations grow from 8 to 1,024. Without any task-specific training, it attains random-forest-level accuracy across hundreds of shots. General chat capabilities, including knowledge and reasoning, are preserved: it achieves 75.4% on MMLU.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Placed in Reasoning benchmarks and evaluation, one of 17 directions in LLM reasoning. Builds on 55 of its 72 references that are in the map. First posted on arXiv 8 Sep 2025.
Builds on
55 of 72 references.
Closest ancestors · 2
Same direction, newest first
- 2023How Many Demonstrations Do You Need for In-context Learning?14 Mar
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?25 Feb
Other references · 53
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2015Distilling the Knowledge in a Neural Networkcited by 10,324
- 2017A Unified Approach to Interpreting Model Predictionscited by 6,555
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
- 2016XGBoost: A Scalable Tree Boosting Systemcited by 5,166
- 2016"Why Should I Trust You?": Explaining the Predictions of Any Classifiercited by 5,070
- 2022Flamingo: a Visual Language Model for Few-Shot Learningcited by 4,386
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2023Qwen Technical Reportcited by 3,344
- 2022Scaling Instruction-Finetuned Language Modelscited by 3,024
38 more
- 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,191
- 2024LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Modelscited by 1,464
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
- 2022Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Taskscited by 868
- 2022TabPFN: A Transformer That Solves Small Tabular Classification Problems in a Secondcited by 674
- 2024Agent Workflow Memorycited by 383
- 2023MLAgentBench: Evaluating Language Agents on Machine Learning Experimentationcited by 366
- 2023Effective Long-Context Scaling of Foundation Modelscited by 303
- 2025TabICL: A Tabular Foundation Model for In-Context Learning on Large Datacited by 289
- 2022TabLLM: Few-shot Classification of Tabular Data with Large Language Modelscited by 277
- 2024Many-Shot In-Context Learningcited by 206
- 2019Do NLP Models Know Numbers? Probing Numeracy in Embeddingscited by 159
- 2023What In-Context Learning "Learns" In-Context: Disentangling Task Recognition and Task Learningcited by 152
- 2023Table Meets LLM: Can Large Language Models Understand Structured Table Data? A Benchmark and Empirical Studycited by 116
- 2024Tokenization counts: the impact of tokenization on arithmetic in frontier LLMscited by 115
- 2020TUTA: Tree-based Transformers for Generally Structured Table Pre-trainingcited by 100
- 2023Mitigating Label Biases for In-context Learningcited by 89
- 2023Batch Prompting: Efficient Inference with Large Language Model APIscited by 85
- 2024Large Scale Transfer Learning for Tabular Data via Language Modelingcited by 76
- 2024TableGPT2: A Large Multimodal Model with Tabular Data Integrationcited by 72
- 2025SE-Agent: Self-Evolution Trajectory Optimization in Multi-Step Reasoning with LLM-Based Agentscited by 69
- 2024Many-Shot In-Context Learning in Multimodal Foundation Modelscited by 67
- 2024Why Does the Effective Context Length of LLMs Fall Short?cited by 63
- 2025ML-Master: Towards AI-for-AI via Integration of Exploration and Reasoningcited by 61
- 2024TALENT: A Tabular Analytics and Learning Toolboxcited by 52
- 2018Numeracy for Language Models: Evaluating and Improving their Ability to Predict Numberscited by 42
- 2024A Closer Look at Deep Learning Methods on Tabular Datasetscited by 41
- 2014Interpreting Tree Ensembles with inTreescited by 37
- 2024Elephants Never Forget: Memorization and Learning of Tabular Data in Large Language Modelscited by 36
- 2023xVal: A Continuous Numerical Tokenization for Scientific Language Modelscited by 27
- 2021Benchmarking Multimodal AutoML for Tabular Data with Text Fieldscited by 26
- 2023Link-Context Learning for Multimodal LLMscited by 24
- 2021Few-Shot Learning with Class Imbalancecited by 18
- 2024SpreadsheetLLM: Encoding Spreadsheets for Large Language Modelscited by 17
- 2023BatchPrompt: Accomplish more with lesscited by 16
- 2025More is not always better? Enhancing Many-Shot In-Context Learning with Differentiated and Reweighting Objectivescited by 12
- 2024On Many-Shot In-Context Learning for Long-Context Evaluationcited by 10
50 most cited of 53 All 53 (JSON)
Built on by
Citing papers per year: 2025: 3.
3 papers.
- 2025Finch: Benchmarking Finance & Accounting across Spreadsheet-Centric Enterprise Workflowscited by 10
- 2025Talking Trees: Reasoning-Assisted Induction of Decision Trees for Tabular Datacited by 1
- 2025Beyond Token-level Supervision: Unlocking the Potential of Decoding-based Regression via Reinforcement Learningcited by 1
- 2025Finch: Benchmarking Finance & Accounting across Spreadsheet-Centric Enterprise Workflows15 Dec 2025
- 2025Beyond Token-level Supervision: Unlocking the Potential of Decoding-based Regression via Reinforcement Learning6 Dec 2025
- 2025Talking Trees: Reasoning-Assisted Induction of Decision Trees for Tabular Data25 Sep 2025
Similar, not cited
Close in wording, no citation either way
- 2025From Few to Many: Self-Improving Many-Shot Reasoners Through Iterative Optimization and Generation
- 2023In-Context Unlearning: Language Models as Few Shot Unlearners
- 2025From 128K to 4M: Efficient Training of Ultra-Long Context Large Language Models
- 2024Efficient LLM Context Distillation
- 2023In-Context Explainers: Harnessing LLMs for Explaining Black Box Models
- 2024Sparse Autoencoders Reveal Temporal Difference Learning in Large Language Models
- 2025LightReasoner: Can Small Language Models Teach Large Language Models Reasoning?
- 2025MIR-Bench: Can Your LLM Recognize Complicated Patterns via Many-Shot In-Context Reasoning?