Linear Function Representation of Neural Network I have trained a neural network using MATLAB and am ready to deploy it into my software. Right now, I include it in my software by programming the structure of the neural network and the connection weights and doing some matrix multiplication.

But there has to be a better way to do this: neural networks are basically linear separators. This means that it should be possible to model the outputs as some linear function of the inputs.

So here's the question: given the structure of a neural network and the connection weights after training, how would I come up with the correct linear function of the inputs that models the functionality of the network?
It would seem to depend on the complexity of your neural network. A single perceptron is a linear separator. On the other hand, it is known that multilayer feed-forward neural networks are universal approximators (see here: http://dl.acm.org/citation.cfm?id=70408 ): i.e. they can approximate any function to arbitrary accuracy. Obviously for such a network, you should not expect to be able to express its outputs as a linear function of its inputs.