mlsanityData to 14 Oct 2026

MachineLearningLM: Scaling Many-shot In-context Learning via Continued Pretraining

arXiv 2509.06806 ↗First posted 8 Sep 2025cs.CL cs.AIcited by 3

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

  1. 2023How Many Demonstrations Do You Need for In-context Learning?14 Mar
  2. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?25 Feb

Other references · 53

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2015Distilling the Knowledge in a Neural Networkcited by 10,324
  3. 2017A Unified Approach to Interpreting Model Predictionscited by 6,555
  4. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
  5. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
  6. 2016XGBoost: A Scalable Tree Boosting Systemcited by 5,166
  7. 2016"Why Should I Trust You?": Explaining the Predictions of Any Classifiercited by 5,070
  8. 2022Flamingo: a Visual Language Model for Few-Shot Learningcited by 4,386
  9. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
  10. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
  11. 2023Qwen Technical Reportcited by 3,344
  12. 2022Scaling Instruction-Finetuned Language Modelscited by 3,024
38 more
  1. 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,191
  2. 2024LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Modelscited by 1,464
  3. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
  4. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
  5. 2022Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Taskscited by 868
  6. 2022TabPFN: A Transformer That Solves Small Tabular Classification Problems in a Secondcited by 674
  7. 2024Agent Workflow Memorycited by 383
  8. 2023MLAgentBench: Evaluating Language Agents on Machine Learning Experimentationcited by 366
  9. 2023Effective Long-Context Scaling of Foundation Modelscited by 303
  10. 2025TabICL: A Tabular Foundation Model for In-Context Learning on Large Datacited by 289
  11. 2022TabLLM: Few-shot Classification of Tabular Data with Large Language Modelscited by 277
  12. 2024Many-Shot In-Context Learningcited by 206
  13. 2019Do NLP Models Know Numbers? Probing Numeracy in Embeddingscited by 159
  14. 2023What In-Context Learning "Learns" In-Context: Disentangling Task Recognition and Task Learningcited by 152
  15. 2023Table Meets LLM: Can Large Language Models Understand Structured Table Data? A Benchmark and Empirical Studycited by 116
  16. 2024Tokenization counts: the impact of tokenization on arithmetic in frontier LLMscited by 115
  17. 2020TUTA: Tree-based Transformers for Generally Structured Table Pre-trainingcited by 100
  18. 2023Mitigating Label Biases for In-context Learningcited by 89
  19. 2023Batch Prompting: Efficient Inference with Large Language Model APIscited by 85
  20. 2024Large Scale Transfer Learning for Tabular Data via Language Modelingcited by 76
  21. 2024TableGPT2: A Large Multimodal Model with Tabular Data Integrationcited by 72
  22. 2025SE-Agent: Self-Evolution Trajectory Optimization in Multi-Step Reasoning with LLM-Based Agentscited by 69
  23. 2024Many-Shot In-Context Learning in Multimodal Foundation Modelscited by 67
  24. 2024Why Does the Effective Context Length of LLMs Fall Short?cited by 63
  25. 2025ML-Master: Towards AI-for-AI via Integration of Exploration and Reasoningcited by 61
  26. 2024TALENT: A Tabular Analytics and Learning Toolboxcited by 52
  27. 2018Numeracy for Language Models: Evaluating and Improving their Ability to Predict Numberscited by 42
  28. 2024A Closer Look at Deep Learning Methods on Tabular Datasetscited by 41
  29. 2014Interpreting Tree Ensembles with inTreescited by 37
  30. 2024Elephants Never Forget: Memorization and Learning of Tabular Data in Large Language Modelscited by 36
  31. 2023xVal: A Continuous Numerical Tokenization for Scientific Language Modelscited by 27
  32. 2021Benchmarking Multimodal AutoML for Tabular Data with Text Fieldscited by 26
  33. 2023Link-Context Learning for Multimodal LLMscited by 24
  34. 2021Few-Shot Learning with Class Imbalancecited by 18
  35. 2024SpreadsheetLLM: Encoding Spreadsheets for Large Language Modelscited by 17
  36. 2023BatchPrompt: Accomplish more with lesscited by 16
  37. 2025More is not always better? Enhancing Many-Shot In-Context Learning with Differentiated and Reweighting Objectivescited by 12
  38. 2024On Many-Shot In-Context Learning for Long-Context Evaluationcited by 10

50 most cited of 53 All 53 (JSON)

Built on by

Cited by year

Citing papers per year: 2025: 3.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025From Few to Many: Self-Improving Many-Shot Reasoners Through Iterative Optimization and Generation
  2. 2023In-Context Unlearning: Language Models as Few Shot Unlearners
  3. 2025From 128K to 4M: Efficient Training of Ultra-Long Context Large Language Models
  4. 2024Efficient LLM Context Distillation
  5. 2023In-Context Explainers: Harnessing LLMs for Explaining Black Box Models
  6. 2024Sparse Autoencoders Reveal Temporal Difference Learning in Large Language Models
  7. 2025LightReasoner: Can Small Language Models Teach Large Language Models Reasoning?
  8. 2025MIR-Bench: Can Your LLM Recognize Complicated Patterns via Many-Shot In-Context Reasoning?