per cell lejepa implementation#2111
Closed
shmh40 wants to merge 7 commits intoshmh40/dev/jepa-latent-forecastfrom
Closed
per cell lejepa implementation#2111shmh40 wants to merge 7 commits intoshmh40/dev/jepa-latent-forecastfrom
shmh40 wants to merge 7 commits intoshmh40/dev/jepa-latent-forecastfrom
Conversation
…has its own class which is not good
Contributor
Author
clessig
reviewed
Mar 29, 2026
| self.latent_heads = nn.ModuleDict() | ||
| self.latent_pre_norm = nn.LayerNorm(cf.ae_global_dim_embed) | ||
|
|
||
| ssl_loss_types = ("LossLatentSSLStudentTeacher", "LossLeJEPA") |
Collaborator
There was a problem hiding this comment.
I would prefer if we come up with a consistent naming, e.g. SSL_ for the ssl losses, so that we do not need to maintain an explicit list here.
| student_masks = student_masks.squeeze(dim=1) | ||
| teacher_masks = teacher_masks.squeeze(dim=1) | ||
|
|
||
| if temporal: |
Collaborator
There was a problem hiding this comment.
Why do we need this here? This should be apparent from the masking--forecasting has no mask on the target.
clessig
reviewed
Mar 29, 2026
| z = z.float() # float32 for cos/sin precision | ||
| n, d = z.shape | ||
|
|
||
| # Trapezoidal quadrature weights with Gaussian window on [0, 3] |
Collaborator
There was a problem hiding this comment.
The quadrature should go to a separate function.
… into shmh40/dev/lejepa-per-cell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Draft implementation of per-cell LeJEPA with SIGReg loss. LeJEPALoss should probably just go under the LatentLoss class, to do. Also needs checking.
We have a "SelfTeacher" since we don't do any stop grad/EMA etc. with LeJEPA.
Issue Number
Closes ???
Is this PR a draft? Mark it as draft.
Checklist before asking for review
./scripts/actions.sh lint./scripts/actions.sh unit-test./scripts/actions.sh integration-testlaunch-slurm.py --time 60