arXiv:2610.19539cs.LGOct 2026

Manuscript Offprint

arXiv:2610.19539

Two-stage Residual Learning for Modelling Strength-Informed Optimisation of Thermal Systems

Talha Ansar, Waqar Muhammad Ashraf, Abdulelah S. Alshehri, Omar Bayomie

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Aggregate performance metrics do not identify local modelling inaccuracies in machine learning (ML) surrogates used for thermal-system optimisation. This study assesses local modelling strength through validation-based reliability screening and post-optimisation residual assessment. A two-stage residual learning (TSRL) framework, built on artificial neural networks (ANNs), is developed for modelling-strength-informed and domain-constrained optimisation of thermal systems. Within the TSRL framework, a base ANN predicts the process output, and a residual ANN learns the signed residuals left by the base ANN. The TSRL framework is implemented on two case studies of thermal systems, including 817 simulation observations of a crude distillation unit and operating records from a 395 MW industrial gas turbine. The TSRL framework reduces the test root mean square error (RMSE) from 10.3 g/s to 4.7 g/s for Fuel Oil in the refinery dataset and from 151 kJ/kWh to 105 kJ/kWh for turbine heat rate (THR). The base ANNs trained within TSRL are embedded in domain-constrained optimisation problems, and the modelling strength at each computed solution is assessed using the locked residual-score threshold. Each computed solution receives a good modelled region (GMR) or weak modelled region (WMR) label to inform ML model-based decision-making for safety-critical operation of thermal systems.

Keywords surrogate modelling · residual correction · reliability screening · process optimisation · thermal systems

Nomenclature

Symbol or acronymMeaning
AGOAtmospheric gas oil
AHAmbient humidity
ANNArtificial neural network
APAmbient pressure
ATAmbient temperature
AUCArea under the ROC curve
CDPCompressor discharge pressure
CDTCompressor discharge temperature
DMD_{M}Mahalanobis distance
bbHalf-range used to truncate indicator-band perturbations
δ\deltaMahalanobis-distance limit
eie_iAbsolute base-model error for observation ii
ϵk\epsilon_kkkth sampled indicator-band perturbation
FGTFuel gas temperature at the combustion-chamber inlet
GFFRGas fuel flow rate
GMRGood modelled region
LB,LR\mathcal{L}_{B},\mathcal{L}_{R}Base- and residual-ANN training losses
MAEMean absolute error
MLPMultilayer perceptron
MSEMean squared error
NNNumber of observations in the relevant data split
NrefN_{\mathrm{ref}}Number of refinery modelling observations (817)
PHGOTPerformance-heater gas outlet temperature
rir_iSigned base-model residual for observation ii
RMSERoot mean square error
ROCReceiver operating characteristic
sis_iResidual score (predicted residual magnitude) for observation ii
σR\sigma_RNormal scale used for indicator-band sampling
SiLUSigmoid linear unit
TEThermal efficiency
THRTurbine heat rate
TSRLTwo-stage residual learning
TeT_eObserved-error threshold
TsT_sResidual-score threshold
WMRWeak modelled region
x,x~x,\tilde{x}Scaled and physical-scale process-input vectors
wj,wijw_{j}, w_{ij}Crude blend fractions
zijz_{ij}Raw Latin hypercube design coordinate
y,y^,yˉy,\hat{y},\bar{y}Observed output, model prediction, and split mean
yCO2capy_{\mathrm{CO}_2}^{\mathrm{cap}}CO2\mathrm{CO}_2 ceiling in refinery optimisation
xtargetcx_{\mathrm{target}}^{\mathrm{c}}Prescribed scaled input target
y^B\hat{y}^BBase-model prediction
y^R\hat{y}^RResidual-model prediction
y^C\hat{y}^CResidual-corrected prediction
θB,θR\theta_{B},\theta_{R}Trainable parameter vectors of the base and residual ANN

1 Introduction

Optimising the operation of thermal systems determines operating decisions that improve a defined objective while satisfying equipment, material, energy, and safety constraints [1]. Surrogate-based optimisation [2, 3] reduces the computational cost of model-based decision-making by replacing repeated calls to a detailed model with an approximation that can be evaluated quickly. In refinery-wide energy optimisation, artificial neural networks (ANNs) replace high-fidelity first-principles process models [4]. ANN-based models are also used for the data-driven design of cooling systems [5].

An ANN is a nonlinear continuous function approximator supported by universal approximation theory [6]. Its differentiable form suits surrogate-based optimisation, including thermal-power studies that use machine-intelligence models in constrained operation [7]. The explicit algebraic form of a trained ANN can be embedded in a mathematical programme. Deterministic global optimisation [8], the OMLT toolkit [9], and a recent gas-turbine simulation platform [10] evaluate trained networks inside constrained optimisation. Misener and Biegler [11] identify robustness to uncertainty and accurate extrapolation as essential conditions for surrogates used in process optimisation. Parameter estimation, model selection, and final evaluation require separate data to avoid optimistic error estimates from reusing selection data [12,13]. Root mean square error (RMSE), mean absolute error (MAE), and the coefficient of determination ( R2R^{2}) summarise split-level performance, but do not locate modelling errors within the learned input–output mapping.

Limited information about local modelling accuracy at given input conditions restricts the use of surrogate-based optimisation in the operational control of thermal systems. The optimiser searches for favourable predictions and may return a point with high local modelling error. Kahrs and Marquardt [14] bounded the optimisation of hybrid models by a validity domain built from the training inputs. Schweidtmann et al. [15] combined topological data analysis with one-class support vector machines and convex hulls, and encoded the data domain as optimisation constraints. Meyer and Pebesma [16] introduced an area of applicability for spatial prediction models with a cross-validation-derived threshold to identify regions where predictive errors are expected to be comparable to cross-validation errors. Recent gas-turbine studies [10, 17] use a Mahalanobis constraint to retain the multivariate input combinations represented in plant data. These methods restrict surrogate evaluation to observed input combinations, but satisfying a domain constraint does not establish local prediction accuracy.

Domain restrictions can be complemented by predictive uncertainty estimates from Monte Carlo dropout [18] and deep ensembles [19]. Gawlikowski et al. [20] reviewed their assumptions, computational cost, and performance. Cajahuinga et al. [21] applied Monte Carlo dropout to a nonlinear autoregressive model of a 215 MW gas turbine and reported the uncertainty of the predicted rotational speed. The study addressed predictive uncertainty but did not carry the uncertainty into surrogate-based operational optimisation of the gas turbine system. Yang et al. [22] trained an ensemble of ReLU networks on resampled training sets, approximated the ensemble with a mixture density network, and solved a chance-constrained mixed-integer programme. These approaches require repeated training or stochastic forward passes. When used in optimisation, the uncertainty model enters the problem and changes its size and form. The resulting spread measures disagreement among networks or samples, rather than a decision threshold calibrated against observed errors of the deployed surrogate.

Residual learning offers a direct connection to observed errors. In stagewise function fitting [23], each new learner is fitted to the errors left by the preceding model. Computer-model calibration [24] treats model discrepancy as a term separate from the simulator response. Hybrid semi-parametric models [25, 26] use a data-driven component to correct a mechanistic model. In these studies, the residual learner improves prediction accuracy. The size of the learned correction is not used as a reliability signal. Lahlou et al. [27] trained a secondary predictor of the pointwise error of a main model as a measure of epistemic uncertainty. Their method was developed for active learning, sequential model optimisation, and exploration in reinforcement learning. It returns a continuous uncertainty estimate. It does not lock a decision threshold on held-out data, and it does not label the solutions of a constrained nonlinear programme.

This work calibrates a residual score against observed base-model errors on a validation split, then assesses solutions of domain-constrained optimisation without adding an uncertainty model to its formulation. Refinery and gas-turbine surrogates are embedded in optimisation studies [4, 10, 17], yet the reported operating points do not carry a point-specific measure of modelling strength before they reach the operator.

This work develops a two-stage residual learning (TSRL) framework for assessing local modelling strength in surrogate-based optimisation. In the first stage, a base ANN is fitted for each process output. In the second stage, the base parameters are fixed and a residual ANN learns the signed base-model error. The signed residual gives a point correction. Its magnitude gives a residual score, which remains available at an operating point where the true output is unknown. Validation data link the score to the observed base error and determine two percentile thresholds by maximising F1F_{1}. The thresholds are locked before test evaluation and before any optimisation solution is scored. Only the base ANN is embedded in the optimisation problem. The residual score then labels each returned solution as lying in a good modelled region (GMR) or a weak modelled region (WMR).

The TSRL framework is examined on two thermal systems with different sources of modelling error. The first case uses 817 simulated observations of a crude distillation unit, with seven inputs that cover varied crude blends and utility conditions. The second case uses operating records of a 395 MW industrial gas turbine [7], where the measurements carry variability from operating dynamics and sensor noise. Gas-turbine studies [10, 17, 28] report ML-based prediction and optimisation of plant performance without a point-specific check of modelling strength at new input conditions. TSRL adds local reliability assessment to surrogate-based optimisation through three main contributions.

• The TSRL framework uses a residual ANN to correct the base surrogate and its predicted residual magnitude to score reliability at unseen operating points.

• Residual scores are calibrated by cross-matching percentile labels of observed base error and residual score for each validation observation. The threshold pair is selected by F1F_{1}, and both thresholds are locked before testing.

• Computed solutions are assessed after optimisation while retaining the original optimisation problem. Base ANNs are embedded in Mahalanobis-constrained nonlinear programmes, and each solution receives a GMR or WMR label from TSRL after convergence. Many solutions of the refinery case study satisfy the domain constraints and yet fall in the WMR.

The rest of the paper is organised as follows. Section 2 defines the models, calibration procedure, and optimisation formulation. Section 3 presents the refinery and gas turbine studies. Section 4 summarises the findings, limitations, and directions for further work.

References (39)