Smoothing

Gaussian-smoothed spike-count baseline.

Source

  • Registry name: smoothing
  • Model class: ladys.models.baselines.Smoothing
  • Config class: ladys.models.baselines.SmoothingConfig
  • Source file: src/ladys/models/baselines.py

When to use

Use Smoothing as a lightweight statistical baseline for binned spike counts. It convolves each neuron's spike train with a Gaussian kernel and returns nonnegative smoothed count rates. For NLB co-smoothing, the model mirrors the public NLB smoothing baseline: log-smoothed held-in counts are used as features for a Poisson decoder fitted to training held-out neurons.

Assumptions

Inputs are nonnegative binned spike counts. kern_sd_ms and bin_size_ms define the Gaussian kernel in the same units as the NLB baseline scripts. The default kern_sd_ms=50 and bin_size_ms=5 match the public MCMaze smoothing defaults.

Outputs

forward returns smoothed counts as rates and log-smoothed counts as latents. On synthetic datasets the rates are scored directly. On NLB datasets, the NLB adapter fits a Poisson readout from latents to held-out spike counts and scores the decoded held-out rates.

Configuration

Config for Gaussian spike smoothing plus an NLB held-out decoder.

Field Type Default
name Literal['smoothing'] 'smoothing'
objective str 'smoothed_poisson_nll'
kern_sd_ms float 50.0
bin_size_ms float 5.0
log_offset float 0.0001
nlb_decoder_alpha float 0.01
nlb_poisson_max_iter int 500
prediction_floor float 1e-09
optimization OptimizationConfig OptimizationConfig(name='inference_only')

Contracts