wxdang / MSCRED

tensorflow implement the paper A Deep Neural Network for Unsupervised Anomaly Detection and Diagnosis in Multivariate Time Series Data
60 stars 28 forks source link

Reconstructing the data thats already in the input? #7

Open y-he2 opened 3 years ago

y-he2 commented 3 years ago

Hi,

Firstly very nice paper and I quite like the idea, really like to apply it to other areas. Thus Im hoping that you guys are still monitoring this repo and open for discussion.

Although I have a pretty straight forward question about the way the model was used and trained: In Figure-2 in the paper and in the code, more specifically: loss = tf.reduce_mean(tf.square(data_input[-1] - deconv_out))

It seems that you guys are using the tensor in the last time step of the input as the model's output tensor? Maybe I have missed something obvious, but doesn't that simply imply that the inputs contains complete information of the output, i.e. the model can directly "see" the output in the input? Which means that by "selecting the last tensor in input" (like by setting weights for those input images to 1 and rest 0), we get a perfect estimator?

So my point is when reconstruct something shouldnt the input contain a very lossy or at least an "incomplete info version of the output", instead of containing complete information of what its suppose to reconstruct?

Im doing experiments with random walks on my own implementation of the network, and by using the last step of input as the model's output, I was still able to get very small losses ("reconstructed perfectly"). So Im suspecting that its exactly what the model is doing, i.e. by selecting one step of input as output.

In that case, my guess about why it still worked is, by "half training the model" the trainer were able to adjust the weights for the most common sample patterns, but the learning rate is not fast enough to make the model an simple "input selecting model" yet. However if you would have let the model training to converge, then this ability would be lost since the model will end up "selecting" input from inputs.

y-he2 commented 3 years ago

Just realized this is not the authors repo, im replicating it to there. can close here if needed.