gaozhihan / gaozhihan/PreDiff

Question about the inference of PreDiff when using KnowledgeAlignment

Open
#39 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
159
Forks
10
PR merge metrics
No merged PRs in 30d

Description

After thoroughly reviewing your code, I observed that the Knowledge Alignment (KA) network in your framework guides the diffusion process through the alignment of predicted and target precipitation values. The KA network operates by first predicting the mean of future precipitation, then calculating the L2 loss between the predicted mean and the target mean. During backpropagation, it updates the predicted mean using the following formula:
new_mean=orig_mean−(0.5×orig_log_var).exp()×align_gradient
This process allows the alignment gradient to direct the diffusion dynamics effectively, theoretically bringing the predicted values closer to the target precipitation.

However, in lines 920-921 of `scripts/prediff/sevirlr/train_sevirlr_prediff.py`, the code provides the actual future mean precipitation (contained within `target_seq`) as an input to the alignment function `get_alignment_kwargs_avg_x`.
From a precipitation forecasting perspective, this approach might introduce **a logical problem**. In a real forecasting task, the future target data is unknown, which means this Knowledge Alignment (KA) network would not be suitable when forecasting.

Thank you very much in advance.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.