A tale of perfect fit and phantom optima: how data-driven models can fail in real-time optimization

Prithvi Dake1,*, Rahul Bindlish2, James B. Rawlings1
1Department of Chemical Engineering, University of California, Santa Barbara, CA 93106, USA  ·  2Dow Chemical Company, TX, USA
*Corresponding author: prithvidake@ucsb.edu
View on GitHubData on ZenodoRead on arXiv
Figure 1
Figure 1. (A) Historical plant datasets are used to train (B) a structured model and a black-box ML/AI closure model, each deployed in real-time optimization (RTO). (C) Near-identical fits map to very different optima, the worst-case of the simultaneously identified structured model loses just over 30% profit and the black-box model over 50%. A reliable data-driven model must recover the optimum, not be judged solely on the validation dataset.
Figure 2
Figure 2. Simplified process flowsheet for the vinyl acetate (VAc) monomer plant consisting of 7 units and 13 streams. (Ee: Ethylene, Ea: Ethane, A: Acetic acid, O: Oxygen, W: Water, V: Vinyl acetate, C: Carbon dioxide). Outlet concentrations from the reactor are measured subject to step inputs in the decision variables (fresh feed rates, recycle fractions and reactor temperature), that are shown by the control valves and the controller icon.
Figure 3
Figure 3. A snapshot of training data from the plant model with no measurement noise. The measurements are shown in red and the decision variables in black. The dotted grey lines represent \(x_s^\star\) and \(u_s^\star\). [source: VAc_plot_train_val_param_nn.py]
Figure 4
Figure 4. Parity plots of the extracted knot values \([\tilde{r}^\star_1, \tilde{r}^\star_2]^\Rm{T}\) on the training set for \(\tilde{r}^\star_1\) in (a) rextract and (c) rextract_noise. Similarly for \(\tilde{r}^\star_2\) in (b) rextract and (d) rextract_noise. The dashed line is ideal parity while \(r_1^\star, r_2^\star\) are the plant rates at the plant optimum. [source: VAc_plot_train_val_param_extract_rates.py]
Figure 5
Figure 5. Concentration predictions on the validation set for (a) rmeas, (b) cmeas_rinit, (c) cmeas and (d) cmeas_noise. Measurements are shown in red. The shaded bands are the ensemble spread, taken as the 5--95% quantiles of the 20 random initializations. [source: VAc_plot_train_val_param_nn.py]
Figure 6
Figure 6. Concentration predictions on the validation set for (a) rextract, (b) rextract_noise, and (c) rextract_noise_sim. Measurements are shown in red. The shaded bands are the ensemble spread, taken as the 5--95% quantiles of the 20 random initializations. [source: VAc_plot_train_val_param_fit_nn_extract_rates.py]
Figure 7
Figure 7. Parity plots of the reaction rates \([r_1, r_2]^\Rm{T}\) on the validation set for (a) rmeas, (b) cmeas_rinit, (c) cmeas and (d) cmeas_noise. Top row shows \(r_1\) and bottom row \(r_2\). The dashed line is ideal parity while \(r_1^\star, r_2^\star\) are the plant rates at the plant optimum. Colored bands are the 5--95% quantiles over the 20 random initializations; gray bands are the same for \(\hat{r}^\star_1, \hat{r}^\star_2\), the model rates at the model calculated optimum for the five degrees of freedom. [source: VAc_plot_train_val_param_nn.py]
Figure 8
Figure 8. Parity plots of the reaction rates \([r_1, r_2]^\Rm{T}\) on the validation set for (a) rextract, (b) rextract_noise and (c) rextract_noise_sim. Top row shows \(r_1\) and bottom row \(r_2\). The dashed line is ideal parity while \(r_1^\star, r_2^\star\) are the plant rates at the plant optimum. Colored bands are the 5--95% quantiles over the 20 random initializations; gray bands are the same for \(\hat{r}^\star_1, \hat{r}^\star_2\), the model rates at the model calculated optimum for the five degrees of freedom. [source: VAc_plot_train_val_param_fit_nn_extract_rates.py]
Figure 9
Figure 9. Concentration predictions on the validation set for the black-box model, (a) bbox and (b) bbox_noise. Measurements are shown in red. The bands are the ensemble spread, taken as the 5--95% quantiles of the 20 random initializations. [source: VAc_plot_train_val_param_bbox_nn.py]
Figure 10
Figure 10. Plant profit landscape \(\ell(T, \alpha)\) with the remaining degrees of freedom fixed at the plant optimum. The star marks the plant optimum \((T^\star, \alpha^\star)\). The surface is unimodal and well-conditioned. [source: VAc_plot_hist.py]
Figure 11
Figure 11. Model-predicted profit landscape \(\hat{\ell}(T, \alpha)\) that each trained model presents to the RTO optimizer. Panels are (a) rmeas, (b) cmeas_rinit, (c) bbox, (d) cmeas, (e) cmeas_noise, (f) bbox_noise, (g) rextract, (h) rextract_noise, and (i) rextract_noise_sim. The star marks the plant optimum as a fixed reference and the circles each model's own optimum. Each panel shows one of the worst-performing members of the 20 initializations. [source: VAc_plot_hist.py]
Figure 12
Figure 12. Profit loss \(\Delta \ell\) for (a) rmeas, (b) cmeas_rinit, (c) cmeas and (d) cmeas_noise. Columns are cases and rows are the 3 multi-start RTO seeds; each panel is the distribution over the 20 ensemble members, plotted as relative frequency. The dotted line marks the best achievable profit loss, \(0\%\). [source: VAc_plot_perturb_plant.py]
Figure 13
Figure 13. Profit loss \(\Delta \ell\) for (a) rextract, (b) rextract_noise, and (c) rextract_noise_sim. Columns are cases and rows are the 3 multi-start RTO seeds; each panel is the distribution over the 20 ensemble members, plotted as relative frequency. The dotted line marks the best achievable profit loss, \(0\%\). Panel (a) shares the \(x\)-axis of Figure 12 for direct comparison; panels (b) and (c) share a wider \(x\)-axis. [source: VAc_plot_perturb_plant_extract_polish.py]
Figure 14
Figure 14. Relative error in the rate gradients \(\partial r_i / \partial z\), at the plant optimal value of \(z \in \{c_\Rm{Ee}, c_\Rm{A}, c_\Rm{O}, T\}\). Rows are cases and each dot is one of the 20 random initializations; the black line at \(0\%\) is the plant. [source: VAc_plot_gradients.py]
Figure 15
Figure 15. Profit loss \(\Delta \ell\) for (a) bbox and (b) bbox_noise. Columns are cases and rows are the 3 multi-start RTO seeds; each panel is the distribution over the 20 ensemble members, plotted as relative frequency. The dotted line marks the best achievable profit loss, \(0\%\). [source: VAc_plot_perturb_bbox_plant.py]

Supplementary material

Figure S1
Figure S1. cmeas_rinit: drift away from the initialization. The model is initialized at the weights at which it recovers the plant optimum, marked by the dash-dotted line (learning rate \(0\), no training step taken). Under ADAM (left) the loss moves away from that line as training proceeds, so the optimizer leaves the basin it was handed. After the switch to L-BFGS at epoch 250 (right) the loss returns toward the initialization, so L-BFGS recovers part of what ADAM gave up. As the learning rate decreases, ADAM takes smaller steps and the curves stay at the initialization; this preserves the optimum only because it was supplied, not because training located it. [source: VAc_plot_lr.py]
Figure S2
Figure S2. Learning-rate sweep for cmeas. The chosen learning rate is \(0.05\). [source: VAc_plot_lr.py]
Figure S3
Figure S3. Learning-rate sweep for cmeas_noise. The chosen learning rate is \(0.05\). [source: VAc_plot_lr.py]
Figure S4
Figure S4. Learning-rate sweep for bbox. The chosen learning rate is \(0.01\). [source: VAc_plot_lr.py]
Figure S5
Figure S5. Learning-rate sweep for bbox_noise. The chosen learning rate is \(0.01\). [source: VAc_plot_lr.py]
Figure S6
Figure S6. Width scan for rmeas: training and validation losses against the number of neurons in the hidden layer. [source: VAc_plot_param_fit_nn_size_scan.py]
Figure S7
Figure S7. Width scan for rmeas: profit loss \(\Delta \ell\) of the RTO solution against the number of neurons in the hidden layer. [source: VAc_plot_param_fit_nn_size_scan.py]
Figure S8
Figure S8. Concentration predictions on the validation set with 16 neurons for (a) rmeas, (b) cmeas_rinit, (c) cmeas and (d) cmeas_noise. Compare with the 64-neuron results in the main paper. [source: VAc_plot_train_val_param_nn_h16.py]
Figure S9
Figure S9. Parity plots of the reaction rates \([r_1, r_2]^\Rm{T}\) on the validation set with 16 neurons for (a) rmeas, (b) cmeas_rinit, (c) cmeas and (d) cmeas_noise. Top row shows \(r_1\) and bottom row \(r_2\). The dashed line is ideal parity while \(r_1^\star, r_2^\star\) are the plant rates at the plant optimum. Colored bands are the 5--95% quantiles over the 20 random initializations; gray bands are the same for \(\hat{r}^\star_1, \hat{r}^\star_2\), the model rates at the model calculated optimum for the five degrees of freedom. [source: VAc_plot_train_val_param_nn_h16.py]
Figure S10
Figure S10. Profit loss \(\Delta \ell\) over the 20 random initializations with 16 neurons for (a) rmeas, (b) cmeas_rinit, (c) cmeas and (d) cmeas_noise. Columns are cases and rows are the 3 multi-start RTO seeds; each panel is the distribution over the 20 ensemble members, plotted as relative frequency. The dotted line marks the best achievable profit loss, 0%. [source: VAc_plot_perturb_plant_h16.py]
Figure S11
Figure S11. Pareto curve for rextract_noise: \texttt{fitting_loss_conc} against \texttt{fitting_loss_reg} in Eq., each point labelled by its regularization weight \(\kappa\). [source: VAc_plot_train_val_param_extract_rates.py]