AutoSurrogate: An LLM-Driven Multi-Agent Framework for Autonomous Construction of Deep Learning Surrogate Models in Subsurface Flow
Organizations: School of Physics and Astronomy, The University of Edinburgh, Edinburgh, EH9 3FD, United Kingdom · Institute of GeoEnergy Engineering, School of Energy, Geoscience, Infrastructure and Society, Heriot-Watt University, Edinburgh, EH14 4AS, United Kingdom · Subsurface Energy Transition and Innovation Centre, Heriot-Watt University, Edinburgh, EH14 4AS, United Kingdom
Abstract
High-fidelity numerical simulation of subsurface flow is computationally intensive, especially for many-query tasks such as uncertainty quantification and data assimilation. Deep learning (DL) surrogates can significantly accelerate forward simulations, yet constructing them requires substantial machine learning (ML) expertise - from architecture design to hyperparameter tuning - that most domain scientists do not possess. Furthermore, the process is predominantly manual and relies heavily on heuristic choices. This expertise gap remains a key barrier to the broader adoption of DL surrogate techniques. For this reason, we present AutoSurrogate, a large-language-model-driven multi-agent framework that enables practitioners without ML expertise to build high-quality surrogates for subsurface flow problems through natural-language instructions. Given simulation data and optional preferences, four specialized agents collaboratively execute data profiling, architecture selection from a model zoo, Bayesian hyperparameter optimization, model training, and quality assessment against user-specified thresholds. The system also handles common failure modes autonomously, including restarting training with adjusted configurations when numerical instabilities occur and switching to alternative architectures when predictive accuracy falls short of targets. In our setting, a single natural-language sentence can be sufficient to produce a deployment-ready surrogate model, with minimum human intervention required at any intermediate stage. We demonstrate the utility of AutoSurrogate on a 3D geological carbon storage modeling task, mapping permeability fields to pressure and CO saturation fields over 31 timesteps. Without any manual tuning, AutoSurrogate is able to outperform expert-designed baselines and domain-agnostic AutoML methods, demonstrating strong potential for practical deployment.
Figures & tables
| Category | Hyperparameter | Applies to |
| Optimization | Learning rate | All |
| Weight decay | All | |
| Batch size | All | |
| Capacity | Base channel width | All |
| Architecture-specific | Transformer layers | CNN-Transformer |
| Transformer heads | CNN-Transformer |
| Rservoir parameters | Values |
| Caprock thickness | 1905 m |
| Caprock porosity | 0.08 |
| Caprock permeability (horizontal and vertical) | 0.001 mD |
| Basement thickness | 500 m |
| Basement porosity | 0.09 |
| Basement permeability (horizontal and vertical) | 2.3 mD |
| Method | Pressure | Saturation | ||||
| RMSE | Rel | RMSE | Rel | |||
| UDeepONet3D | 0.8534 | 2.3697 | 0.0114 | 0.8249 | 0.0139 | 0.4144 |
| CNNTransformer3D | 0.9861 | 0.7300 | 0.0035 | 0.9098 | 0.0100 | 0.2974 |
| EDConvLSTM3D | 0.9887 | 0.6577 | 0.0032 | 0.9309 | 0.0088 | 0.2604 |
| UFNO3D | 0.9911 | 0.5853 | 0.0028 | 0.9102 | 0.0100 | 0.2967 |
| RecurrentRUNet3D | 0.9972 | 0.3290 | 0.0016 | 0.9359 | 0.0084 | 0.2508 |
| Method | Search Overhead (min) | Best | ||
| Pressure | Saturation | Pressure | Saturation | |
| All baselines (brute-force) | 68.7 GPU-hours (16 models to convergence) | 0.9972 | 0.9359 | |
| Random Search (120 trials) | 47.4 | 93.6 | 0.9820 | 0.7593 |
| Optuna TPE (120 trials) | 45.6 | 50.7 | 0.9804 | 0.8915 |
| Hyperopt TPE (120 trials) | 85.7 | 66.1 | 0.9922 | 0.8848 |
| AutoSurrogate | 55.5 | 42.3 | 0.9972 | 0.9532 |
| Stage | Agent Action | Observation / Reasoning | Outcome |
| Data Profiling | Extract dataset statistics via profiling tools | “1000 samples, spatial grid , 31 timesteps. Saturation range , mean (very sparse: of voxels near zero). Pressure normalized ( , ); saturation kept in native range.” | Profile stored in shared context |
| Model Selection | Estimate GPU memory for 8 candidate architectures; select based on task physics | “Residual skip connections suit 3D spatiotemporal mapping. ResUNet3D at base_channels=16 : 4.6M params, 609 MB GPU memory at batch 1—appropriate for 700 training samples. Supports BCE auxiliary loss for sparse front reconstruction.” | Selected: ResUNet3D |
| HPO Round 1 | Bayesian HPO (TPE + median pruner, 15 trials, 5 epochs/trial) | Search space: base_channels , lr , batch_size , . Best trial: bc=16 , lr , , bs=4 . 6 trials completed, 9 pruned. | Best val loss: |
| Training Round 1 | Train ResUNet3D with best HPO config (30 epochs, early stopping patience 15) | Training converges; test evaluation on 200-sample hold-out set. | (below 0.95 target) |
| Self-Correction: Continuation | Resume training for 10 additional epochs from last checkpoint | “ unchanged at 0.9479 after additional epochs—learning has plateaued. The model’s capacity or hyperparameter regime cannot close the remaining gap.” | Plateau confirmed; no improvement |
| Self-Correction: Architecture Switch | Switch to UNet3D; launch fresh HPO | “ResUNet3D has saturated. Switching to UNet3D: simpler encoder–decoder without residual blocks may benefit from a different loss landscape under aggressive HPO.” | New HPO initiated |
| Hyperparameter | Baseline | AutoSurrogate | |
| Default | Pressure | Saturation | |
| Architecture | (fixed) | ResUNet3D | UNet3D |
| Base channels | 16 | 32 | 32 |
| Normalization | Group | Instance | Instance |
| Learning rate | |||
| Weight decay | |||
| Task | Round | Strategy | Architecture | Status | |
| Saturation (target: make higher than 0.95) | |||||
| Sat. | 1 | Initial HPO + Train | ResUNet3D | 0.9479 | Below target |
| Sat. | 1b | (i) Continuation | ResUNet3D | 0.9479 | Plateau |
| Sat. | 2 | (iii) Arch. switch + HPO | UNet3D | – | Training |
| Sat. | 2b | (i) Continuation | UNet3D | – | Improving |
| Sat. | Final | – | UNet3D | 0.9532 | Target met |
Neural Surrogate Modeling
Neural surrogate modeling uses learned models to approximate costly simulations, enabling faster prediction, design, control, and inference.
See all 410 papers