ML4ITS / TimeVQVAE

[official] PyTorch implementation of TimeVQVAE from the paper ["Vector Quantized Time Series Generation with a Bidirectional Prior Model", AISTATS 2023]
MIT License
96 stars 14 forks source link

Regarding the issue with the new version #14

Open manxswl opened 1 month ago

manxswl commented 1 month ago

In the first stage of the new version, the reconstructed signal appears smoother compared to the old version. The GT and reconstructed signals are almost overlapping, but is this form correct? signal

danelee2601 commented 1 month ago

yes, the improvement is brought by using the Snake activation function instead of ReLU.

danelee2601 commented 1 month ago

I guess it's often the case that we get hindsight about little simple things to tweak for further improvement. But I'm not planning to release v2, as it's not a major update. Just put the implementation modification notes in the repo readme.

manxswl commented 1 month ago

Your work's idea is very interesting, so I tried to reproduce your paper. In this process, I found that the reconstruction effects of the previous version and the later version differ greatly. I'm not sure which form is correct. The effect generated by the old version is shown in the image below. Is the activation function the only reason for this phenomenon? old_version

manxswl commented 1 month ago

And, I noticed that you have implemented some functionalities in both the encoder and decoder, and you've removed the loss updates related to zero padding. I don't quite understand why this was done.

manxswl commented 1 month ago

Your work's idea is very interesting, so I tried to reproduce your paper. In this process, I found that the reconstruction effects of the previous version and the later version differ greatly. I'm not sure which form is correct. The effect generated by the old version is shown in the image below. Is the activation function the only reason for this phenomenon? old_version

I apologize, it was an issue with my dataset. This work is very interesting. Thank you for your explanations.

manxswl commented 1 month ago

In the first stage of the new version, the reconstructed signal appears smoother compared to the old version. The GT and reconstructed signals are almost overlapping, but is this form correct? signal

The image after correctly introducing the dataset is shown below ![Uploading new_signal.jpg…]()

manxswl commented 1 month ago

After reproducing the results, I found that the reconstruction error for low-frequency signals is larger than before the update, and it's unstable. new_signal

danelee2601 commented 1 month ago

hmm.. I've noticed that the training on the FordA dataset generally resulted in unsatisfactory validation loss (which is shown in your figure -- reconstruction on a test sample). Have you tried it on other datasets? Additionally, the same model with the ReLU activation results in poorer optimization (i.e., slower training and poorer convergence). I think you can try it out yourself.

I've personally experimented quite extensively to confirm the positive effect of the current VQVAE. I found it more stable with faster and better convergence.

danelee2601 commented 1 month ago

And, I noticed that you have implemented some functionalities in both the encoder and decoder, and you've removed the loss updates related to zero padding. I don't quite understand why this was done.

I've simplified the code by leaving the essentials only so that end users can read and use it more easily. The performance wasn't affected much.

manxswl commented 1 month ago

I didn't use any other dataset. I just put all the instructions from the readme into a slurm script at once without paying attention, and I got the dataset wrong. I noticed that the log generated in the second stage is in this form (see image). Is this form correct? It seems a bit strange. I just saw in the readme that the dataset has been changed to Wafer. I think I can try the effect again. media_images_visual comp (X_test vs Xhat)_8043_3c12001a4b29f3b360ad (1)