4
$\begingroup$

I have a data set with four inputs and one output. I need to infer the 4 inputs given an output. What is the best way to do this?

$\endgroup$
2
$\begingroup$

I'm assuming that you mean your inputs are 4-dimensional vectors and your outputs are 1 dimensional vectors. If you think that the output vectors give you enough information to completely determine the inputs (at least approximately), then just treat your 1D "outputs" as inputs and your 4D "inputs" as outputs.

Another case is that very different inputs are mapped to similar outputs in your dataset, and you really just want to compute a prototype input for a given output. For example, you might want to produce an image of the letter "a" from only its one-hot label. There are many ways to do this. Here's one that I think is cool:

First, train a neural net the way you normally would with 4D inputs mapping to 1D outputs. Now let's say you're given a 1D output y. Generate some 4D noise x' and pass it through the net to obtain y'. Now pretend that the values in this input are parameters in your network, and hold your actual parameters constant. Use y and y' to compute a loss, and perform gradient descent on your synthetic input. If you repeat this enough times, you should get something that your network thinks deserves the output y.

$\endgroup$
1
$\begingroup$

The best neural network today is a hierarchical temporal memory (HTM) which is AGI-ready (Artificial general intelligence). A HTM is a combination of a LSTM and a bidirectional neural network. That means, that the 4 input values are stored as a stream and a self-modifying network is continuously predicting the values. But to explain how this architecture works in detail is complicated. A more realistic and easy to understand neural network is the good old multilayer perceptron which was invented in the 1970s and can be trained with backpropagation algorithm. A sample implementation is available in pybrain.

If your 4 input values came from a game like “OpenAI gym” and the output neuron should control the system, than a different kind of neural network is needed. The difference is, that the learning is done with a reward instead of an input-output-pattern.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.