In-context modeling as a retrain-free paradigm for foundation models in computational science
Published in arxiv, 2026
Recommended citation: Li, L., Li, Z., Li, S., Zhan, K., Gao, H., Chen, C., & Yang, L. (2026). In-context modeling as a retrain-free paradigm for foundation models in computational science. arXiv preprint arXiv:2604.23098. https://arxiv.org/pdf/2604.23098
Building models that generalize across physical systems without retraining remains a central challenge in computational science. Here we introduce In-Context Modeling (ICM), a retrain-free paradigm that infers physical relationships directly from observational fields. Rather than encoding system-specific behavior in fixed parameters, ICM assimilates measurements as physical context and performs inference through a single forward pass. Trained in a physics-informed, label-free manner using governing equations, a single model generalizes across unseen materials, geometries, and loading conditions. Demonstrated on hyperelasticity, ICM integrates with finite-element simulations and is validated using experimental full-field measurements. Moreover, performance improves with increasing data diversity and computational budget, exhibiting favorable scaling behavior analogous to foundation models. By recasting physical modeling as in-context inference, this work establishes a transferable paradigm for retrain-free scientific learning and a foundation for scalable modeling across computational science.
