Repository navigation
Conversation
There was a problem hiding this comment.
Really nice!!!
Left some comments, different levels of importance, see details.
I think the docs pages are currently lengthy; I would vote that in case they are LLM written to cut them down to minimum and replace by human-curated text when there is time, vs. putting LLM generated content there (which a user can easily generate themselves). Wdyt?
| from cebra.data.base import Loader | ||
|
|
||
|
|
||
| def _positive_int(value, name): |
| negative_controls: Optional[torch.Tensor] | ||
| index: AlignedWindowIndex | ||
|
|
||
| def to(self, device): |
|
|
||
|
|
||
| @dataclass | ||
| class AlignedTrialBatch: |
There was a problem hiding this comment.
i think there is a HasDevice to integrate the to functionality smoothly within cebra that should be used here as superclass
| self.controls = torch.cat(control_arrays) | ||
|
|
||
| @property | ||
| def input_dimension(self): |
There was a problem hiding this comment.
| def input_dimension(self): | |
| def input_dimension(self) -> int: |
| variable_names=None, | ||
| control_names=None): |
| A core window has ``rollout_steps + 1`` nodes. Raw observations include the | ||
| encoder's receptive context; controls and times cover the core nodes only. | ||
| Views are distinct trials from the same group at the same indices. Set | ||
| ``num_views=1`` for singleton groups. Impossible view counts and windows are |
| assert batch.negative.shape == (32, 13, 5) | ||
| A core window has ``rollout_steps + 1`` nodes. Raw observations include the | ||
| encoder's receptive context; controls and times cover the core nodes only. |
There was a problem hiding this comment.
receptive field?
what are core nodes?
| candidate collisions, for the contrastive objective's exclusion policy. This | ||
| loader does not define the DYSCO loss or claim submitted-objective parity. |
There was a problem hiding this comment.
what does this mean? i think can be deleted?
| next_state = flow(z) | ||
| trajectory = flow.rollout(z, num_steps=20) # (8, 21, 3) | ||
| ``dt`` is the time interval represented by one map application. In DCL it must |
| trajectory = [z.copy()] | ||
| for k in range(len(times) - 1): | ||
| start, end = u[k, 0], u[k + 1, 0] | ||
| middle = (start + end) / 2 | ||
| k1 = field(z, start) | ||
| k2 = field(z + dt * k1 / 2, middle) | ||
| k3 = field(z + dt * k2 / 2, middle) | ||
| k4 = field(z + dt * k3, end) | ||
| z = z + dt * (k1 + 2 * k2 + 2 * k3 + k4) / 6 |
There was a problem hiding this comment.
helper function for RK4? saw this code snippet a couple of times now
This draft adds a scikit-learn entry point for DYSCO, the multi-view dynamics method of Muratore and Mathis. It targets regularly sampled repetitions in a shared observation space, with optional observed inputs. Feedback on the trial contract and the solver interface would help before we finalize this for release. Paper · Standalone implementation and examples
The loader samples synchronized windows across distinct repetitions. A shared encoder and a continuous-time polynomial field generate forward and backward RK4 trajectories. The criterion implements the submitted three-block loss with CEBRA’s full-denominator InfoNCE reduction. The estimator exposes embedding, field evaluation, equation inspection, rollout and checkpoint continuation. The offline oscillator and Lorenz examples generate their own observations.
Dependency. This branch includes the exact checkpoint commits from #312. They preserve the auxiliary reference model, which owns DCL dynamics. Once that PR lands we can update this branch against main. The DYSCO-specific changes start at
5526c10.Review and validation
Upstream CI. In the completed Python 3.14 / Torch 2.9.1 job, both DYSCO test modules passed. Two unchanged data-loading doctests failed when GitHub returned HTTP 503 for the DeepLabCut example HDF5 file. Both passed on a local retry. The matrix canceled its remaining jobs, and restarting it requires upstream admin rights. Failing job
I have signed the Contributor License Agreement.