MINT

Mesh of Idealized Neural Trajectories adapted to the LaDyS API.

Source

  • Registry name: mint
  • Model class: ladys.models.mint.MINT
  • Config class: ladys.models.mint.MINTConfig
  • Source file: src/ladys/models/mint.py

Method

MINT builds a library of idealized neural trajectories (Omega_plus) and paired task-state trajectories (Phi_plus). Prediction does not optimize model parameters. Instead, it bins incoming spikes, updates a Poisson likelihood recursion over the library, and estimates rates by interpolating between likely library states. Training is a statistical template fit; optional LFADS rate estimation has its own gradient training stage.

NLB datasets

The native LaDyS MINT port supports the three MINT/NLB datasets used in the original repository: area2_bump, mc_maze, and mc_rtt, plus a LaDyS-native dmfc_rsg adapter built from the NLB 5 ms H5 tensors. Area2 and Maze smooth and average repeated condition-aligned trials; the RTT config trains LFADS from raw training spikes and fits single-trial rate trajectories. DMFC averages prepared condition-indexed trials. This H5 adapter does not reproduce the original event-warped DMFC NWB procedure. Prepared NLB and Allen data use the standard Experiment and ladys run fit/save/load workflow. Legacy NWB/MAT adapters remain explicit options.

Synthetic datasets

The synthetic Lorenz and chaotic-RNN adapters are LaDyS-specific trajectory builders. With the default lorenz_library_source="smoothed_spikes", the library is estimated from training spikes by Gaussian smoothing and condition averaging. This keeps the comparison non-oracular while still matching MINT's assumption that useful trajectory templates are learned before inference.

The true_rates library source is intentionally exposed for debugging. It reproduces an oracle/template-retrieval sanity check, not a fair method comparison. Use it only when validating the likelihood/interpolation code.

Outputs

forward accepts raw (batch, time, neurons) spike counts and returns expected spike counts per input bin. The training epoch learns the trajectory library and reports Poisson negative log likelihood; checkpoints contain the complete fitted library and neuron layout.

Configuration

Config for the MINT trajectory-library decoder.

The default train_source="h5" estimates trajectories from training spikes by smoothing and averaging, using one library-fitting epoch. With train_source="lfads", each trainer.epochs iteration trains the rate estimator for one pass and updates the trajectory library. Both paths use optimization.name="library_fit" and report training and validation Poisson negative log likelihood.

Prepared NLB H5 tensors are the default input. Neuron dimensions and sample intervals come from the dataset; condition metadata, when available, groups training trials. train_source="lfads" trains LFADS from those same spikes before fitting templates. Explicit NWB/MAT sources retain the original task-specific reproduction adapters.

Experiment uses trainer.epochs as its training budget. The model field lfads_epochs controls the direct fit_training_data helper and legacy reproduction runners only.

For synthetic Lorenz and chaotic-RNN tasks, LaDyS builds the MINT trajectory library from repeated training trials. With train_source="h5", the default lorenz_library_source="smoothed_spikes" estimates library rates by Gaussian-smoothing training spikes and averaging by condition. lorenz_library_source="true_rates" is an oracle sanity-check mode only and should not be used for fair method comparisons. The default Lorenz split repeats the same initial-condition trajectories across train and validation trials, so this benchmark measures denoising of seen trajectories rather than interpolation to unseen trajectories.

Field Type Default
name Literal['mint'] 'mint'
objective str 'mint_likelihood_recursion'
dataset Literal['auto', 'area2_bump', 'chaotic_rnn', 'dmfc_rsg', 'mc_maze', 'mc_rtt', 'lorenz', 'allen_vcn'] 'auto'
train_source Literal['h5', 'lfads', 'mat', 'nwb'] 'h5'
train_split Literal['auto', 'train', 'trainval'] 'trainval'
nlb_neural_state_defaults bool True
nwb_root Optional[str] None
mat_data_root Optional[str] None
target_h5 Optional[str] None
eval_bin_size_ms int 5
lorenz_library_source Literal['smoothed_spikes', 'true_rates'] 'smoothed_spikes'
n_candidates Optional[int] None
window_length Optional[int] None
delta Optional[int] None
interp Optional[Literal[0, 1, 2]] None
interp_within_trajectories Optional[bool] None
allen_condition_mode Literal['condition_id', 'trial_index'] 'condition_id'
allen_library_source Literal['spikes', 'lfads_checkpoint'] 'spikes'
allen_lfads_run_dir Optional[str] None
sigma Optional[int] None
min_rate Optional[float] None
causal Optional[bool] None
n_neural_dims Optional[int] None
n_cond_dims Optional[int] None
n_trial_dims Optional[int] None
lfads_epochs int 25
lfads_batch_size int 16
lfads_train_bin_size int 1
lfads_lr float 0.001
lfads_generator_dim int 64
lfads_factor_dim int 20
lfads_inferred_input_dim int 2
lfads_encoder_dim int 64
lfads_controller_dim int 64
lfads_keep_prob float 0.95
lfads_seed int 0
optimization OptimizationConfig OptimizationConfig(name='library_fit')

Contracts