Wireless3C-SJTU / CDDM-channel-denoising-diffusion-model-for-semantic-communication

23 stars 2 forks source link

Ask for some details about the experiment^.^ #1

Open DandelionV opened 5 months ago

DandelionV commented 5 months ago

Thanks for sharing such a very meaningful and valuable work! I encountered some problems when reproducing this work on CIFAR10 dataset. The performance of CDDM+JSCC could not surpass that of JSCC (only about 9dB for PSNR). I think there may be some errors in my experimental settings. Therefore, Here are two questions may need help and answers:

  1. During the training of JSCC model, do we need to train serveral models for each level of noise (dB) and test it on the corresponding noise? Is the same requirement for the training of CDDM+JSCC model?
  2. Notice the "large_snr" parameter in the initialization of 'class CHDDIM_config'. Why we need to adjust the snr (SNR = config.SNRs-CHDDIM_config.large_snr) when retraining the decoder and testing CDDM+JSCC model?

Thanks again for sharing this work! Looking forward to your reply~ @Wireless3C-SJTU

futako1477 commented 5 months ago

Hi @DandelionV, would you mind sharing the GPU specifications you used for training the model? Thank you!

DandelionV commented 5 months ago

Hi @DandelionV, would you mind sharing the GPU specifications you used for training the model? Thank you! I just used a 3060ti (8GB) for for training models.

futako1477 commented 5 months ago

Hi @DandelionV, would you mind sharing the GPU specifications you used for training the model? Thank you! I just used a 3060ti (8GB) for for training models.

Did you made any modifications to make the model train successfully? I am currently using a 4070 Ti (12GB), but I encounter CUDA out of memory error during the second stage training (train_CHDDIM). Even reducing the batch size to 1 doesn't solve the problem. I have also tried other common solutions for this issue. I would greatly appreciate it if you could share any relevant experiences. Thank you!

Wireless3C-SJTU commented 5 months ago

Hi @DandelionV, would you mind sharing the GPU specifications you used for training the model? Thank you!

we use A40 GPU with 48G memory. The experiments require about 40G memory for training and testing.

Wireless3C-SJTU commented 5 months ago

Thanks for sharing such a very meaningful and valuable work! I encountered some problems when reproducing this work on CIFAR10 dataset. The performance of CDDM+JSCC could not surpass that of JSCC (only about 9dB for PSNR). I think there may be some errors in my experimental settings. Therefore, Here are two questions may need help and answers:

  1. During the training of JSCC model, do we need to train serveral models for each level of noise (dB) and test it on the corresponding noise? Is the same requirement for the training of CDDM+JSCC model?
  2. Notice the "large_snr" parameter in the initialization of 'class CHDDIM_config'. Why we need to adjust the snr (SNR = config.SNRs-CHDDIM_config.large_snr) when retraining the decoder and testing CDDM+JSCC model?

Thanks again for sharing this work! Looking forward to your reply~ @Wireless3C-SJTU

For the first question, it is true that several model are required for several SNR and test them on corresponding SNR. The requirement is the same for the training of CDDM+JSCC model. The configuration is presented in the line 6 on page 9. For the second question, 'large_snr' represents that when training the CDDM+JSCC system, the JSCC in this system is trained with 3dB larger SNR in the first training stage. For example, when the CDDM+JSCC system are deployed on 10 dB, the JSCC is trained at 13 dB in the first stage and 10 dB in the third stage.

Wireless3C-SJTU commented 5 months ago

Hi @DandelionV, would you mind sharing the GPU specifications you used for training the model? Thank you! I just used a 3060ti (8GB) for for training models.

Did you made any modifications to make the model train successfully? I am currently using a 4070 Ti (12GB), but I encounter CUDA out of memory error during the second stage training (train_CHDDIM). Even reducing the batch size to 1 doesn't solve the problem. I have also tried other common solutions for this issue. I would greatly appreciate it if you could share any relevant experiences. Thank you!

we use A40 GPU with 48G memory. The experiments require about 40G memory for training and testing. You may need to adopt Model parallelism to solve you problem.

DandelionV commented 5 months ago

Thanks for sharing such a very meaningful and valuable work! I encountered some problems when reproducing this work on CIFAR10 dataset. The performance of CDDM+JSCC could not surpass that of JSCC (only about 9dB for PSNR). I think there may be some errors in my experimental settings. Therefore, Here are two questions may need help and answers:

  1. During the training of JSCC model, do we need to train serveral models for each level of noise (dB) and test it on the corresponding noise? Is the same requirement for the training of CDDM+JSCC model?
  2. Notice the "large_snr" parameter in the initialization of 'class CHDDIM_config'. Why we need to adjust the snr (SNR = config.SNRs-CHDDIM_config.large_snr) when retraining the decoder and testing CDDM+JSCC model?

Thanks again for sharing this work! Looking forward to your reply~ @Wireless3C-SJTU

For the first question, it is true that several model are required for several SNR and test them on corresponding SNR. The requirement is the same for the training of CDDM+JSCC model. The configuration is presented in the line 6 on page 9. For the second question, 'large_snr' represents that when training the CDDM+JSCC system, the JSCC in this system is trained with 3dB larger SNR in the first training stage. For example, when the CDDM+JSCC system are deployed on 10 dB, the JSCC is trained at 13 dB in the first stage and 10 dB in the third stage.

Thank you so much for your reply, it helps me a lot! And I notice that we use the 3dB larger SNR, e.g.,13dB for the channel equalization (MMSE) operation: "sigma_square_fix = 1.0 / (10 * (snr_train / 10)); x_t = x_hat (torch.conj(h)) / (torch.abs(h) ** 2 + sigma_square_fix)", and use the smaller SNR, e.g.,10dB for the denoising by using CDDM: "t = self.match_snr_t(snr) + 1".
In addition, the SNR in Rayleigh channel is also the smaller one (10dB): " y, pwr, h = pass_channel.forward(y, snr)". Does it affect the recovery of the transmitted signal and the image when the SNR (13dB) for channel equalization mismatching the SNR (10dB) for CDDM denoising and Rayleigh channel setting? Here are the code locations: https://github.com/Wireless3C-SJTU/CDDM-channel-denoising-diffusion-model-for-semantic-communication/blob/bb387d289067e1f3a8f3626d8e16a09511efbee5/CDDM/Diffusion/Diffusion.py#L192C8-L192C58 https://github.com/Wireless3C-SJTU/CDDM-channel-denoising-diffusion-model-for-semantic-communication/blob/bb387d289067e1f3a8f3626d8e16a09511efbee5/CDDM/Diffusion/Train.py#L680C16-L680C57

Wireless3C-SJTU commented 5 months ago

Thanks for sharing such a very meaningful and valuable work! I encountered some problems when reproducing this work on CIFAR10 dataset. The performance of CDDM+JSCC could not surpass that of JSCC (only about 9dB for PSNR). I think there may be some errors in my experimental settings. Therefore, Here are two questions may need help and answers:

  1. During the training of JSCC model, do we need to train serveral models for each level of noise (dB) and test it on the corresponding noise? Is the same requirement for the training of CDDM+JSCC model?
  2. Notice the "large_snr" parameter in the initialization of 'class CHDDIM_config'. Why we need to adjust the snr (SNR = config.SNRs-CHDDIM_config.large_snr) when retraining the decoder and testing CDDM+JSCC model?

Thanks again for sharing this work! Looking forward to your reply~ @Wireless3C-SJTU

For the first question, it is true that several model are required for several SNR and test them on corresponding SNR. The requirement is the same for the training of CDDM+JSCC model. The configuration is presented in the line 6 on page 9. For the second question, 'large_snr' represents that when training the CDDM+JSCC system, the JSCC in this system is trained with 3dB larger SNR in the first training stage. For example, when the CDDM+JSCC system are deployed on 10 dB, the JSCC is trained at 13 dB in the first stage and 10 dB in the third stage.

Thank you so much for your reply, it helps me a lot! And I notice that we use the 3dB larger SNR, e.g.,13dB for the channel equalization (MMSE) operation: "sigma_square_fix = 1.0 / (10 * (snr_train / 10)); x_t = x_hat (torch.conj(h)) / (torch.abs(h) ** 2 + sigma_square_fix)", and use the smaller SNR, e.g.,10dB for the denoising by using CDDM: "t = self.match_snr_t(snr) + 1". In addition, the SNR in Rayleigh channel is also the smaller one (10dB): " y, pwr, h = pass_channel.forward(y, snr)". Does it affect the recovery of the transmitted signal and the image when the SNR (13dB) for channel equalization mismatching the SNR (10dB) for CDDM denoising and Rayleigh channel setting? Here are the code locations: https://github.com/Wireless3C-SJTU/CDDM-channel-denoising-diffusion-model-for-semantic-communication/blob/bb387d289067e1f3a8f3626d8e16a09511efbee5/CDDM/Diffusion/Diffusion.py#L192C8-L192C58 https://github.com/Wireless3C-SJTU/CDDM-channel-denoising-diffusion-model-for-semantic-communication/blob/bb387d289067e1f3a8f3626d8e16a09511efbee5/CDDM/Diffusion/Train.py#L680C16-L680C57

Thank you for you attention on our work. Though the SNR (13 dB) for channel equalization mismatching the SNR (10 dB) for CDDM, it matches the training environment of the encoder. We will release our checkpoint soon.