How do you validate a neural network model? Neural networks are increasingly being fitted to slow derivative pricing, market risk and XVA models to create surrogate models with lightning fast execution times, among many other applications. So how would model validation work for a neural network model?
Two key components of model validation are 1) methodology review and 2) model testing on a discrete but hopefully fairly comprehensive set of test cases.
The methodology review of a surrogate neural network would have to be a review of the methodology of the original model it is intended to replicate. For NNs which are not surrogates, it should involve a review of the fitting data, the fitting algorithm and how the NN interpolates and extrapolates the data.
Regarding model testing, many point out that a neural network is an opaque “black box”, has potentially millions of parameters, and you could never test it on every possible set of input parameters. Even if it tests successfully on a set of test cases, it may still fail in between those cases. However, it’s worth noting that even conventional code is often proprietary and opaque to the model validator, and could also fail due to numerical convergence issues or code faults that surface only in rare cases. Admittedly, the large number of internal parameters and numerical fitting procedures of neural networks may make them particularly susceptible to this problem.
Even when validating a model expressed as an analytic formula, you are implicitly assuming that your are validating a smooth function which doesn’t “turn” too sharply, so that if the model is correct on a grid of test cases, it should also be within some tolerance for the “in between” cases.
A promising strategy for validating a neural network is to test it on a grid of input parameters, and then attempt to show that the in-between prices must be “near” the prices you have checked in some sense in order to obtain an upper bound on their errors as well. Something like a Lipschitz condition |p(x) – p(y)| < L |x-y| with global constant L would suffice. You might also impose structural constraints on the NN such as monotonicity, convexity, or bounded second derivatives etc during fitting process. These techniques give you control over how the NN behaves in between test cases, giving you confidence that the model will behave reasonably on all inputs. The extrapolation beyond the dataset also needs to handled carefully during both the fitting and the testing procedures. For example, an NN which replicates an option pricing model needs to behave satisfactorily on a far in the money or out of the money option.
For independent model validation consulting services, Contact Us anytime.






