← Notes · 21 November 2026 · 5 min read

A model you can trust, from a handful of noisy samples

Fitting a curve to data gives you a good guess. For safety you need more than a guess: bounds that hold for the real system. Here is how one assumption about the shape of the system, monotonicity, turns scattered samples into such bounds, and what that makes possible.

Suppose you want to prove that a machine will never leave its safe operating range. You can measure it, but you don’t have its equations. The usual next step is to fit a model to the data: a polynomial, a Gaussian process, a neural network. That gives a good guess of the behaviour. It does not give a proof, because the real system can sit just outside the fitted curve, and near a limit “just outside” is exactly where things go wrong.

What a safety argument needs is different: not one curve, but bounds that are guaranteed to contain the real system. This is what my PhD was about, and what my toolbox ddma computes.

One assumption about the shape

Without any assumption, data tell you nothing about the points you didn’t measure. The trick is to use something you know about the shape of the system, even if you don’t know its formula.

For many systems that something is monotonicity: a larger input gives a larger output. Heat a room more and it ends up warmer. Leave a larger gap to the car ahead and the gap at the next step is larger too. Press the accelerator harder and the car goes faster. You don’t need a formula to know these things; they follow from the physics.

The second thing you need is an honest bound on the measurement noise, say ±0.4.

Two samples are enough to start

Take an increasing function you don’t know, and one measurement: at input 1.0 you read 2.5. With noise of at most ±0.4, the true value at 1.0 lies between 2.1 and 2.9.

Now use monotonicity. Every input to the right of 1.0 has a true value of at least 2.1, because the function only goes up. Every input to the left has a value of at most 2.9. One sample has already bounded the function on both sides, in one direction each.

A second sample, at input 2.0, does the same from its own position. Between the two samples the function is now squeezed: from below by the first, from above by the second. Every new sample adds a step to a lower staircase and a step to an upper staircase. The real function always lies between them, whatever it is, as long as it is increasing and the noise stays within its bound.

The guaranteed band tightening as samples arrive

The animation shows this for an unknown function, from 3 to 400 samples. The band starts wide, with no bound at all in some places, and tightens as data arrive. It never excludes the true outputs.

Two facts make this more than a picture. First, the band is the tightest possible: any narrower band would exclude some increasing function that could have produced exactly the same data. Second, it is cheap: it needs no fitting, only sorting and comparing, so ddma builds it from ten million samples in about 0.2 s.

From a band to a controller

A band for every state and input is a model of the system that is guaranteed to contain the real one. From there, standard tools apply. ddma divides the states into cells, works out for each cell and each command where the system can go next, and computes the set of states from which the limits can be kept forever, with the commands that do it.

That set becomes a safety filter. In one example from the toolbox, a cruise controller that ignores the car in front collides after 11.5 s. Behind a filter learned only from logged transitions, without the vehicle model, the gap never drops below 11 m (the limit is 10 m) over a 200 s run. A reinforcement-learning agent (PPO) learning the same cruise control alone crashes or loses the leader 266–319 times during training; inside the filter, not once. Keeping learning agents safe is the subject of another note.

What it assumes, and what if that’s wrong

The guarantee is only as good as the assumptions: monotonicity and the noise bound. So ddma also checks them while the system runs. If a new sample is inconsistent with every monotone function and every noise value within the bound, that is not a warning sign but a proof that an assumption is broken, and the controller can react before relying on a wrong model.

The lesson

A guaranteed model doesn’t need a guessed model class. It needs one honest statement about the shape of the system and one about the noise. Data do the rest.

The method is from my papers in IEEE TAC (2024) and L4DC (2021); the code, tutorials and docs are on GitHub.