# Changes in flow detection neural network?

Do you have any advice, what architecture of neural network is the best for following task?

Let input be some (complex function), the neural network gains a flow of its values, so I guess there will be some kind of RNN or CNN?

The output is classifier like is the function same or not

• If the neural network thinks, that the input is still the same function, the output is 0.
• If the input function changes, the output will be 1.

The input function is of course not one value or simple math function (what will be trivial) but may be really sophisticated. So the neural network learns abstraction about same and different over any complex flow ?

How would you approach to that task ?

• sounds like you have a time series with binary classification. You can just use any network that accepts temporal info and outputs a single value (anything from rnn's, cnn's attention nets, etc...) – mshlis Jun 17 '19 at 19:25

A network is able to fit to a certain function over several iteration while training. Now you want the model to be able to detect a change in a list of inputs from the function. This is not possible without first training the model on some data.

Say you want to use a simple function

# Sample function
f(x) = x


Say you create inputs for function using sets of 3 integers for x.

# Data
f1 = [[1, 2, 3],
[4, 5, 6],
...      ]

# Some random values
f2 = [[1, 4, 19],
[16, 35, 36],
...      ]


Now if you use data f1 labelled as 0 and data f2 labelled as 1, in the best case the ANN will only learn to differentiate between data from function f1 and some other data.

To detect change, first the model has to fit to a certain function, this requires it to be trained over a number of epochs. Then it will be able to detect if the values don't match the function, but such a model will only be able to differentiate a single function.

• but such a model will only be able to differentiate a single function. yes, thats my question. Adapting to single funciton is like common RNN, but i d like to make some king of generalisation for any function, like i dont know, trying to apply a style transfer to the next chunk and if it fails, the function had changed... – user8426627 Jun 17 '19 at 20:08
• I’m saying that it isn’t possible as the example suggests. This is because the model will need to be trained on the function in some way or another to recognise the function when it changes. Or if you get a new function, you’ll have to go through another training phase before the model can detect a change. – skillsmuggler Jun 17 '19 at 20:14