Yasser Sheikh · MSc BEng AMIChemE RITTech

Writing · Feb 2026

When the neural network meets the mass balance.

Ask a neural network trained on a year of plant data what happens at operating conditions the plant has never visited, and it will give you a confident answer with nothing behind it. Neural networks are interpolation machines. Ask them to extrapolate and they do it badly, without warning you. The problem is that extrapolation is the whole point of optimisation. You are trying to move the plant somewhere better than its own history, which means somewhere the training data is thin.

Physics does not need training data

A mass balance holds at every operating point there has ever been. Reaction kinetics, thermodynamic equilibria and conservation laws stay valid far outside any training distribution, because they are derived rather than trained. What they lack is fidelity. Real equipment fouls, drifts and misbehaves in ways the textbook equations do not capture, and two nominally identical plants never behave identically. So you have two imperfect models. A learned one that knows this particular plant, but only within its own history, and a first-principles one that knows all plants, approximately.

Physics backbone, ML residual

Hybrid modelling done properly is an explicit decision about which model to trust for what. The structure I keep returning to puts a first-principles backbone in charge of the physics, the conservation laws, the equilibria and the known kinetics, and gives machine learning the residual. The fouling, the drift, the unmeasured disturbances, the gap between the ideal reactor in the derivation and the real one on the plant. The physics stops the ML from predicting impossible states, and the ML corrects the physics where reality disagrees with the textbook. Each half covers the weakness of the other.

Models need to report uncertainty

For a model to steer a live process, the people running that process need to know when to stop trusting it. This is why I reach for probabilistic models, and Gaussian processes in particular, on industrial problems. They report their own uncertainty. A recommendation with a tight confidence band can be acted on. The same recommendation with a wide band is a prompt to collect more data or ask an engineer, and the system should treat the two differently. There is aninteractive Gaussian process on this site if you want to see the difference for yourself.

Validation is where hybrids win

I carried a habit over from numerical methods. Before a model earns any authority, show consistency, meaning it agrees with known physics in known regimes; stability, meaning its errors stay bounded as conditions drift; and convergence, meaning more data makes it better rather than stranger. With a pure black box those three are hard to even test. With a hybrid they come naturally, because you can test the physics and the residual separately, and when the model is wrong you know which half to look at. That, more than any accuracy metric, is why the models I trust in production are hybrids.