-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hi!
The preprint describes the mapping loss as MSE on normalized embeddings, which would be equivalent to a cosine loss (2 - 2·cos(y_true, y_pred)). However, in the released code, the normalizations appear to be commented out:
SpecBridge/specbridge/models/mapper.py
Lines 151 to 157 in 6c6fadf
| # z_s_n = F.normalize(z_s, dim=-1) | |
| # z_m_n = F.normalize(z_m, dim=-1) | |
| # mu_n = F.normalize(mu_s, dim=-1) | |
| z_s_n = z_s | |
| z_m_n = z_m | |
| mu_n = mu_s |
Similarly, the molecule embedding projection + normalization is commented out at line 135
SpecBridge/specbridge/models/mapper.py
Line 135 in 6c6fadf
| # z_m = F.normalize(self.chem_proj(z_m), dim=-1) |
This means the MSE loss operates on unnormalized embeddings, which is not equivalent to cosine loss.
SpecBridge/specbridge/models/mapper.py
Line 171 in 6c6fadf
| L_map = F.mse_loss(mu_n, z_m_n, reduction='mean') # * mu_n.size(1) |
Could you clarify:
- If I'm overlooking something?
- If the released checkpoints correspond to training with normalized or unnormalized MSE?
- If the paper description reflects the intended final configuration, or were the normalizations intentionally disabled?
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels