Manuscript Offprint

arXiv:2610.26959

Dynamic System Inspired Continuous Large Language Model for AI4Science Tasks

Zhaoxin Fan, Zheng Zhu, Yuqing Ma, Faguo Wu, Jian Yang, Wenjun Wu

Abstract

Scientific foundation models increasingly operate on continuous phenomena, yet still use discrete residual computation. We ask whether pretrained residual transformations can support additional latent computation without expanding the backbone. To test this possibility, we introduce Continuum-LM, which reuses these transformations as dynamical operators in a continuous-depth language model. Its hidden states evolve through an ordinary differential equation evaluated by higher-order numerical integration, with solver order and step size controlling computation. Across eight scientific tasks, Continuum-LM trains stably and improves mean exact-match accuracy by 7.77 and 10.96 percentage points over discrete counterparts at the 0.6B and 1.7B scales, respectively. At 0.6B, it also outperforms an Ouro-style recurrent control under matched parameter and residual-function evaluation budgets. Together, these results support extensible computational depth through parameter reuse, identifying continuous hidden-state evolution as a practical design dimension for scientific language models beyond parameter scaling.

Keywords: Large Language Model, AI4Science, Continuous Dynamics, parameter-efficient fine-tuning

1 Introduction

Artificial intelligence is increasingly used to model, predict and design scientific systems, with foundation models contributing to molecular and protein modelling, materials science, biomedical reasoning and scientific problem-solving [1−5][1-5]. Large language models (LLMs) provide a common backbone for these tasks through domain-specific pretraining or supervised fine-tuning [6−9][6-9]. Although these approaches have broadened the scope of scientific foundation models, they have largely expanded training data, domain knowledge and parameter count while retaining the fixed-depth architecture of general-purpose LLMs.

Across these scientific tasks, predictions must satisfy numerical, symbolic or structural constraints despite scarce labels and differences between training and deployment systems [9–11][9–11]. Meeting these demands depends not only on the scientific information encoded in a model, but also on how its internal representations are transformed during computation. This motivates an architectural question that has received comparatively limited attention in scientific foundation models: must hidden-state evolution follow a fixed sequence of residual updates, or can computation be controlled through integration depth and numerical resolution?

This question can be formulated through the residual update

hj+1=hj+Fj(hj),(1)h_{j+1}=h_{j}+F_{j}(h_{j}), \tag{1}

where hjh_{j} is the hidden state entering residual sublayer j and FjF_{j} is its residual transformation [12, 13]. Under an appropriate parameterization, this update can be interpreted as a numerical discretization of continuous-depth dynamics [14–17]. Rather than implying that discrete networks are intrinsically inaccurate or must mirror physical continuity, this interpretation makes solver order and integration resolution explicit choices for regulating numerical approximation and computational cost within each branch.

Applying this interpretation to pretrained LLMs introduces two requirements. First, conversion must reuse existing parameters and support stable optimization rather than require training from scratch. Second, its organization of additional function evaluations must be compared with another form of repeated computation at the same parameter scale. The challenge is therefore to adapt an already capable discrete model's computation while retaining its pretrained initialization.

To investigate this possibility, we introduce CONTINUUM-LM, which parameterizes hidden-state evolution as an autonomous ordinary differential equation (ODE),

dh(t)dt=fθ(h(t)),(2)\frac{\mathrm{d}h(t)}{\mathrm{d}t}=f_{\theta}(h(t)), \tag{2}

whose update function inherits parameters from a discrete checkpoint and is evaluated by numerical integration (Fig. 1). Continuous-depth base training first adapts these parameters to the modified computation. Low-rank adaptation (LoRA) then specializes the converted model to scientific tasks while keeping the backbone frozen [18].

The two stages thus separate adaptation of pretrained computation from downstream scientific specialization.

We evaluate this framework through parameter-scale suitability, optimization and scientific task adaptation. Layer-wise sweeps identify minimum-loss coefficients near the original pretrained scale, while solver comparisons reveal integration-dependent training dynamics (Fig. 4a–c). After downstream adaptation, CONTINUUM-LM improves mean exact-match accuracy by 77.2% and 82.0% over corresponding discrete baselines at 0.6B and 1.7B, respectively; the 1.7B model approaches Qwen3-8B (Fig. 2). To compare alternative organizations of repeated computation, we also evaluate a matched recurrent control at 0.6B (Fig. 3e).

Together, these results identify continuous depth as a practical architectural variable rather than an analogy for a uniquely defined reasoning trajectory. By linking parameter reuse to numerical integration and downstream adaptation, they suggest that scientific language models can benefit from changes to how pretrained representations are computed, alongside changes in data, parameters and fine-tuning.

References (43)