Source-linked AI summary
Learning to Explain Solutions of Optimal Control Problems
Jiyong Lee, Ilias Mitrai
TL;DR
Optimal-control solvers can return solutions without explaining why they are optimal, while vector-based ML predictors generally do not expose constraint roles. This paper combines GNN prediction on a variable–constraint graph with graph explanation methods to identify influential problem elements. In an isothermal CSTR case study, predictions were accurate and explanations highlighted ramping constraints, some active at the optimum.
Problem
Optimal-control solutions and ML predictions can be black boxes, and vectorial inputs generally lack constraint information needed to explain constraints’ roles.
Source: §I · p. 1Method
The framework trains a GNN on a graph representation of the control problem and uses explanation algorithms to find influential variables, constraints, connections, and features.
Source: §I · p. 1, §III · p. 3Results
The CSTR GNN predicted manipulated-variable optima accurately (testing normalized mean squared error 9.96 × 10^-6), while explanations highlighted ramping constraints, some active at the optimum.
Source: §I · p. 1, B. GNN training and prediction… · p. 4Takeaways & Limitations
For the CSTR case study, the explanations capture local optimization structure, and some identified important inequalities correspond to active constraints.
Source: C. Explaining optimal solutions · p. 5, §V · p. 6The framework explains GNN predictions rather than necessarily a numerical solver’s behavior, and the explanation task is solved only to local optimality.
Source: §V · p. 6
Abstract
from arXiv · showhide
In this paper, we propose an explainable artificial intelligence framework to explain the solution of optimal control problems predicted with graph neural networks (GNNs). The proposed approach first trains a GNN that predicts the solution of the optimal control problem for a given instance represented as a graph. Given the trained GNN, we use explainable AI algorithms to identify variables, constraints, variable-constraint connections, and parameters, i.e., nodes, edges, and features in the graph representation of the optimal control problem, that affect the prediction of the optimal solution the most. We apply the proposed approach to a case study regarding the optimal control of a continuous stirred tank reactor. First, the results show that the GNN model can accurately predict the optimal values of the manipulated variables. Application of explainable AI algorithms reveals equality and inequality constraints that are the most important for predicting the optimal solution. The inequality constraints correspond to ramping constraints, some of which are active at the optimal solution.
I. INTRODUCTION
The paper addresses why black-box optimal-control solutions are optimal, proposing a graph-based GNN framework that predicts solutions and identifies influential problem elements. In an isothermal CSTR case study, ramping constraints were among the most important for predicting manipulated variables, and some were active at the optimum.
I. INTRODUCTION
- A solver can provide a solution and an optimality guarantee subject to numerical tolerances, but does not explain why that solution is optimal.A counterintuitive solution can limit trust and implementation.Source: §I · p. 1
- Existing explanation approaches include sensitivity analysis, active-constraint inspection, counterfactuals, feature selection, and comparisons with prior solutions.Some approaches apply only to certain problem classes or require repeated optimization under different parameter values, adding computational cost.Source: §I · p. 1
- Machine-learning predictors can be accurate but black-box; vectorial representations generally omit constraint information needed to explain constraints’ role.The paper also notes that applying explanation methods to optimal-control problems, especially online, is challenging.Source: §I · p. 1
- The framework trains a GNN on a graph representation of an optimal-control problem, then uses explanation algorithms to identify influential nodes, edges, and features.The graph represents structural coupling between variables and constraints, as well as functional information such as bounds and constraint types.Source: §I · p. 1
- In the CSTR case study, ramping constraints were the most important constraints for predicting optimal manipulated-variable values, and some were active at the optimum.The GNN predicts the inlet flow rate over the time horizon for a given initial condition, set-point profile, and ramping rates.Source: §I · p. 1
A. Dynamic optimization problem
The control problem describes a dynamical system with state and manipulated variables, and seeks manipulated-variable profiles that minimize deviation from a desired set-point over a finite horizon. The paper discretizes time to formulate the problem as a nonlinear program with dynamic, bound, and ramping constraints.
A. Dynamic optimization problem
- The system has state and manipulated variables, and its dynamics are described by ordinary differential equations.The dynamics use a smooth vector function of the state and manipulated variables.Source: A. Dynamic optimization problem · p. 2
- The objective is to choose manipulated-variable profiles that minimize the difference between the states and the desired set-point over the horizon.The problem is discretized at equidistant time points, defining state and manipulated-variable values at each point.Source: A. Dynamic optimization problem · p. 2
- The discretized problem includes dynamic equality constraints, variable bounds, and ramping-rate bounds for states and manipulated variables.The initial state and manipulated-variable value are specified, and the constraints span the set of time points.Source: A. Dynamic optimization problem · p. 2
B. Graph representation of the optimization problem
The optimal-control problem is represented as a variable–constraint bipartite graph whose connections encode which variables appear in which constraints. Node features add problem information, including bounds, set-points, ramping rates, initial values, and time index.
B. Graph representation of the optimization problem
- The graph has variable and constraint node sets, with an edge indicating that a variable appears in a constraint.The adjacency matrix records these variable–constraint connections.Source: B. Graph representation of the… · p. 2
- Node features capture variable bounds, ramping rates, set-point, initial value, and normalized time index.The graph representation combines these features with adjacency information to encode both problem data and structural coupling.Source: B. Graph representation of the… · pp. 2–3
- A one-hot feature distinguishes node types, including state variables, manipulated variables, mass-balance constraints, and ramping-up and ramping-down constraints.The passage also notes that these features are normalized to improve learning.Source: B. Graph representation of the… · p. 2
C. Predicting the optimal solution using GNNs
A GNN takes the variable–constraint graph and its features as input and predicts optimal values at manipulated-variable nodes. It updates node representations through neighbor-based message passing, then combines each manipulated-variable representation with a graph-level representation to produce a scalar prediction.
C. Predicting the optimal solution using GNNs
- The GNN predicts an optimal value for each manipulated-variable node from the variable–constraint graph and its associated features.The task is formulated as node regression.Source: C. Predicting the optimal solution… · p. 3
- GCN message passing updates node features using information from neighboring nodes.After the message-passing layers, each node has a learned representation.Source: C. Predicting the optimal solution… · p. 3
- For prediction, the model combines a manipulated-variable node embedding with a graph-level feature that summarizes the optimization problem.An MLP uses the concatenated representations to generate a scalar output.Source: C. Predicting the optimal solution… · p. 3
D. Training the GNN model
The training instances vary set-points, initial states, manipulated variables, and ramping rates; each instance is represented as a graph and solved to obtain optimal manipulated-variable values.
D. Training the GNN model
- Each optimization instance is represented by a graph and solved using a nonlinear optimization solver.Source: D. Training the GNN model · p. 3
- The optimal manipulated-variable values for each instance are denoted u* and form the training labels.Source: D. Training the GNN model · p. 3
III. LEARNING TO EXPLAIN THE PREDICTED SOLUTION
The explanation method finds a subgraph of the optimization problem’s graph that preserves the GNN’s prediction. It optimizes edge and feature masks, relaxing binary variables and adding entropy penalties for tractability.
III. LEARNING TO EXPLAIN THE PREDICTED SOLUTION
- The explanation graph selects variables, constraints, their connections, and parameters while seeking to preserve the GNN prediction.Source: §III · p. 3
- Binary masks indicate whether each edge and node feature belongs to the explanation graph.Source: §III · p. 3
- The explanation objective balances prediction similarity against explanation size and binary-mask regularization.Binary variables are relaxed and entropy penalties are added to improve tractability.Source: §III · pp. 3–4
- Fig. 2 presents training and test loss, while Fig. 3 shows a test graph’s set-point profile and GNN prediction.Source: Figure 2 · p. 4, Figure 3 · p. 4
A. System description and data generation
The case study considers optimal control of an isothermal CSTR, with reactant concentration as the state and inlet flow rate as the manipulated variable. The authors generate instances by varying initial conditions, set-point profiles, and ramping rates.
A. System description and data generation
- The system is an isothermal CSTR in which the irreversible reaction A → 3B occurs.Source: A. System description and data… · p. 4
- The state is reactant concentration x(t), and the manipulated variable u(t) is inlet flow rate.Source: A. System description and data… · p. 4
- The optimal profile is computed for a set-point profile, ramping rates, and initial conditions.Source: A. System description and data… · p. 4
- 10^4 instances are generated by sampling initial state, initial flow, ramping rates, and set-point profiles; 85% are used for training.Source: A. System description and data… · p. 4
B. GNN training and prediction performance
The GNN uses GCN layers with 64 hidden neurons and is trained with Adam. Its test normalized mean squared error is 9.96 × 10^-6; on one test case, the predicted profile has a 2.4% mean relative error.
B. GNN training and prediction performance
- 9.96 × 10^-6 is the trained GNN’s testing normalized mean squared error.Source: B. GNN training and prediction… · p. 4
- The GNN uses GCN layers with 64 hidden neurons and is trained with Adam at learning rate 10^-2 for 2 × 10^3 iterations, with batch size 50.Source: B. GNN training and prediction… · p. 4
- 2.4% is the mean relative error for the predicted manipulated-variable profile on one test case.The case’s mean absolute error is 0.75.Source: B. GNN training and prediction… · p. 4
C. Explaining optimal solutions
The section applies an explainer to a trained GNN’s control-action prediction, assessing fidelity, node and edge importance, feature importance, and agreement with active constraints. It identifies ramping constraints as important, with only partial agreement between the explanation and the solver’s active set.
C. Explaining optimal solutions
- GNNExplainer uses Adam for 10^3 iterations at learning rate 0.03; one control-action explanation takes approximately 2 seconds.Source: C. Explaining optimal solutions · pp. 4–5
- Mean absolute fidelity error is 0.3392 and maximum absolute fidelity error is 0.8566 at t=4, indicating similar predictions from explanation and original graphs.Source: C. Explaining optimal solutions · p. 5
- The continuous relaxation of the explanation task is solved locally, so global optimality of the resulting explanation is not established.Source: C. Explaining optimal solutions · p. 5
- Ramp-down inequalities are active from t=1 to 5 and the lower bound of u0 is active; the explanation agrees partially with this active set.The approach explains the GNN prediction, not the solver output.Source: Figure 5 · p. 5, C. Explaining optimal solutions · p. 5
- Time index is the most important feature, followed by upper bound and ramping rate, for predicting u0.Source: C. Explaining optimal solutions · p. 5, Figure 6 · p. 6
V. CONCLUSIONS
The graph-based framework predicts manipulated-variable values and explains those predictions by identifying influential parts of the optimization problem. In the CSTR case study, predictions are accurate, and some important inequalities are active at the optimum; the explanations also have stated scope and evaluation limitations.
V. CONCLUSIONS
- In the isothermal CSTR case study, GNNs accurately predict manipulated-variable values, and some important inequalities correspond to active constraints at the optimum.The explanations also capture local problem structure.Source: §V · p. 6
- A variable-constraint bipartite graph represents the control problem for a GNN that predicts optimal manipulated-variable values; explanations identify important variables, constraints, and parameters.Importance is assessed for each manipulated variable.Source: §V · p. 6
- Explanations describe GNN predictions, not necessarily solver behavior, and local optimality can affect explanation quality.Mixed-integer solvers may address the local-optimality issue, but their scalability can be limited for large graphs; evaluation also depends on human intuition because no correct explanation is available.Source: §V · p. 6