The ability of machine learning (ML) to represent complex relationships enables solutions and performance improvements for problems that would otherwise be intractable. Notable advancements have been made for chemical process modeling using neural networks (NNs), data-driven model predictive control (MPC), reinforcement learning control, etc. [1-2] Research has demonstrated that all NNs using rectified linear unit (ReLU) activation function can be mixed-integer linear representable [3]. This can significantly improve the interpretability of NNs to be applied in practice. For example, the nonlinear process model of a chemical system can be approximated using ReLU-based NNs. The resulting mixed-integer linear model can then be used for MPC [4]. Several recent works have also aimed at using ReLU or HardTanh-based NNs to directly approximate MPC laws [5-6]. However, these efforts fall short by either relying on numerical fitting or are restricted to one-dimensional inputs [7].
In this work, we introduce Y-wise Affine Neural Networks (YANNs), a fully explainable custom network architecture capable of exactly representing piecewise affine functions. These functions are commonly used during the modeling of linear process systems with discrete operating regions, the decision making from parametric optimization problems (e.g. explicit/multi-parametric MPC), etc. The development of YANNs requires no numerical fitting and thus any guarantees present in the piecewise affine function are inherited. In the context of explicit MPC, YANNs guarantee recursive feasibility and stability for the system in the control problem. We first introduce the theoretical foundations of YANNs by presenting mathematical proofs for the exact representation of piecewise affine functions via the curated network architecture and showing how to reformulate piecewise affine functions directly into the network by intelligently assigning weights and biases. The benefits of YANNs are highlighted through a series of numerical case studies, including the surrogate modeling of a nonlinear dynamic system, and the efficient representation of two explicit MPC problems. These results show significant computational benefits demonstrating that YANNs can evaluate a piecewise affine function faster than existing approaches on the same machine regardless of if the number of subdomains is in the tens, hundreds, or thousands which is incredibly useful in the context of real-time control. For an affine control function governed by nine critical regions the YANN provides solutions seven times faster while for a function defined on over two-thousand subdomains the YANN observes an inference time decrease by over thirty percent. YANNs offer key advantages by: (i) being able to completely understand and explain the mathematical formulation of the resulting network, (ii) including prior knowledge in an exact manner with zero errors, (iii) offering efficiency boosts by requiring no training to develop, and (iv) providing real-time inference speed-ups over traditional function evaluation. Furthermore, the results show that YANNs can serve as a suitable transfer learning candidate for system modeling by requiring fewer training episodes to reach a similar level of accuracy. This work represents a first-of-its-kind approach where prior knowledge can be exactly represented in an NN model without relying on any numerical fitting.
References:
[1] Daoutidis, P., Megan, L., & Tang, W. (2023). The future of control of process systems. Computers & Chemical Engineering, 178, 108365.
[2] Braniff, A., Akundi, S. S., Liu, Y., Dantas, B., Niknezhad, S. S., Khan, F., Pistikopoulos, E. N., & Tian, Y. (2025). Real-time process safety and systems decision-making toward safe and smart chemical manufacturing. Digital Chemical Engineering, 15, 100227.
[3] Fischetti, M., & Jo, J. (2018). Deep neural networks and mixed integer linear optimization. Constraints, 23(3), 296–309.
[4] Katz, J., Pappas, I., Avraamidou, S., & Pistikopoulos, E. N. (2020). The Integration of Explicit MPC and ReLU based Neural Networks. IFAC-PapersOnLine, 53(2), 11350–11355.
[5] Karg, B., & Lucia, S. (2020). Efficient Representation and Approximation of Model Predictive Control Laws via Deep Learning. IEEE Transactions on Cybernetics, 50(9), 3866–3878. IEEE Transactions on Cybernetics.
[6] Lupu, D., & Necoara, I. (2024). Exact representation and efficient approximations of linear model predictive control laws via HardTanh type deep neural networks. Systems & Control Letters, 186, 105742.
[7] Darup, M. S. (2020). Exact representation of piecewise affine functions via neural networks. 2020 European Control Conference (ECC), 1073–1078.