mlsanityData to 14 Oct 2026

From Text to Trajectories: GPT-2 as an ODE Solver via In-Context

arXiv 2508.03031 ↗First posted 5 Aug 2025cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

In-Context Learning (ICL) has emerged as a new paradigm in large language models (LLMs), enabling them to perform novel tasks by conditioning on a few examples embedded in the prompt. Yet, the highly nonlinear behavior of ICL for NLP tasks remains poorly understood. To shed light on its underlying mechanisms, this paper investigates whether LLMs can solve ordinary differential equations (ODEs) under the ICL setting. We formulate standard ODE problems and their solutions as sequential prompts and evaluate GPT-2 models on these tasks. Experiments on two types of ODEs show that GPT-2 can effectively learn a meta-ODE algorithm, with convergence behavior comparable to, or better than, the Euler method, and achieve exponential accuracy gains with increasing numbers of demonstrations. Moreover, the model generalizes to out-of-distribution (OOD) problems, demonstrating robust extrapolation capabilities. These empirical findings provide new insights into the mechanisms of ICL in NLP and its potential for solving nonlinear numerical problems.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 20 of its 28 references that are in the map. First posted on arXiv 5 Aug 2025.

Builds on

20 of 28 references.

References · 20

  1. 2017Attention Is All You Needcited by 60,361
  2. 2014Adam: A Method for Stochastic Optimizationcited by 37,240
  3. 2020Language Models are Few-Shot Learnerscited by 32,419
  4. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
  5. 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,135
  6. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
  7. 2022Transformers learn in-context by gradient descentcited by 732
  8. 2022A Survey on In-context Learningcited by 721
  9. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
  10. 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 298
  11. 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 118
  12. 2023Are Emergent Abilities in Large Language Models just In-Context Learning?cited by 109
8 more
  1. 2020When Do Curricula Work?cited by 106
  2. 2024Unveiling Induction Heads: Provable Training Dynamics and Feature Learning in Transformerscited by 50
  3. 2022Transformers generalize differently from information stored in context vs in weightscited by 49
  4. 2024Identifying Semantic Induction Heads to Understand In-Context Learningcited by 47
  5. 2024Is Mamba Capable of In-Context Learning?cited by 45
  6. 2024Linear Transformers are Versatile In-Context Learnerscited by 28
  7. 2025From Markov to Laplace: How Mamba In-Context Learns Markov Chainscited by 11
  8. 2024On the Learn-to-Optimize Capabilities of Transformers in In-Context Sparse Recoverycited by 6

Built on by

Not cited yet.