Computation-Aware Kalman Filtering with Model Selection for Neural Dynamics - solving scale-imbalanced neural data analysis
Scanned 9/11/2026
Install to Claude Code
npx -y skills add hiyenwong/ai_collection --skill computation-aware-kalman-neural-dynamics --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Computation Aware Kalman Neural Dynamics?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/hiyenwong-computation-aware-kalman-neural-dynamics-f3ae533e)More formats (shields.io, HTML) on the badges page.
---
name: computation-aware-kalman-neural-dynamics
description: Computation-Aware Kalman Filtering with Model Selection for Neural Dynamics - solving scale-imbalanced neural data analysis
version: 1.0
category: neuroscience
activation_keywords:
- neural dynamics
- Kalman filtering
- Bayesian inference
- model selection
- uncertainty quantification
- computational uncertainty
- latent variable model
- neural recording
- state-space model
created: 2026-06-06
paper_id: arXiv:2606.01468
authors: JR Huml, Jonathan Wenger, John P. Cunningham
venue: 2nd International Conference on Probabilistic Numerics (2026)
---
# Computation-Aware Kalman Filtering with Model Selection for Neural Dynamics
## Paper Summary
**Problem:** Modern neural datasets (single-cell recordings) are scale-imbalanced - fewer trials than recorded neurons. Bayesian methods model uncertainty well but scale poorly; deep networks scale well but lack uncertainty quantification.
**Solution:** Computation-Aware State-Space Model (CASSM) - extends computational uncertainty to model selection with novel training loss and optimization scheme.
**Key Innovation:** Tractable inference in large state-spaces while maintaining uncertainty calibration - competitive with data-hungry deep networks but with principled Bayesian framework.
## Core Methodology
### 1. Scale-Imbalanced Regime
- **Definition:** Number of trials << number of recorded neurons
- **Challenge:** Standard Bayesian methods (Kalman) have O(n²) complexity
- **Example:** 50 trials, 1000 neurons → severe overfitting risk
### 2. Computation-Aware Framework
```python
# Conceptual framework
class CASSM:
"""
Computation-Aware State-Space Model for Neural Dynamics
Key Components:
1. Latent state dynamics: z_t = f(z_{t-1}) + noise
2. Observation model: y_t = g(z_t) + noise
3. Computational uncertainty: accounts for approximation error
4. Model selection: adaptive hyperparameter optimization
"""
def __init__(self, n_neurons, n_trials, state_dim):
self.scale_imbalanced = n_trials < n_neurons
self.state_dim = state_dim
self.computational_budget = estimate_complexity(n_neurons, state_dim)
def inference(self, observations):
# Computation-aware filtering
state_posterior, uncertainty = kalman_with_computational_error(
observations,
computational_budget=self.computational_budget
)
return state_posterior, uncertainty
```
### 3. Model Selection via Novel Training Loss
- **Objective:** Balance predictive accuracy vs computational cost
- **Loss Function:** L(θ) = -log p(y|θ) + λ·computational_error(θ)
- **Optimization:** Gradient-based hyperparameter tuning
### 4. Uncertainty Calibration
- **Computational Uncertainty:** Quantifies approximation error from finite computation
- **Total Uncertainty:** Data uncertainty + computational uncertainty
- **Benefit:** Better calibrated posteriors than standard methods
## Key Findings
### Performance Comparison
| Method | Accuracy | Uncertainty Calibration | Scalability |
|--------|----------|------------------------|-------------|
| Standard Kalman | Medium | High | Poor (O(n²)) |
| Deep Networks | High | None | Good |
| CASSM | High | High | Medium-Good |
### Synthetic Data Results
- CASSM matches deep network accuracy
- Significantly better uncertainty quantification
- Robust to scale imbalance
### Real Neural Data Results
- Competitive with state-of-the-art
- Well-calibrated confidence intervals
- Model selection adapts to data properties
## Practical Implementation
### When to Use CASSM
✓ **Scale-imbalanced regime** (n_trials < n_neurons)
✓ **Need uncertainty quantification** (confidence intervals, hypothesis testing)
✓ **Limited computational budget** (need efficiency)
✓ **Model selection uncertainty** (hyperparameter tuning)
### When NOT to Use
✗ Data-rich regime (n_trials >> n_neurons) - use standard methods
✗ No uncertainty needed - use simpler deep networks
✗ Small state dimension - computational error negligible
### Implementation Steps
1. **Data Assessment:** Check if scale-imbalanced
2. **State Dimension Selection:** Cross-validation or model selection
3. **Computational Budget Estimation:** Based on available resources
4. **Training:** Novel loss optimization
5. **Validation:** Check uncertainty calibration
## Technical Details
### State-Space Formulation
- **Latent Dynamics:** z_t = A·z_{t-1} + w_t (Gaussian noise)
- **Observations:** y_t = C·z_t + v_t
- **Unknowns:** A, C, noise covariances, initial state
### Computational Error Quantification
- **Source:** Finite precision numerical integration
- **Form:** Added variance term to posterior
- **Effect:** Widens confidence intervals appropriately
### Model Selection Mechanism
- **Hyperparameters:** State dimension, noise levels, dynamics parameters
- **Training Loss:** Prediction error + computational penalty
- **Optimization:** Adam with adaptive learning rate
## Comparison with Related Work
### vs Standard Kalman Filtering
- **Advantage:** Scales to large state spaces
- **Advantage:** Model selection integrated
- **Disadvantage:** Additional computational overhead
### vs Deep Networks (RNN/LSTM)
- **Advantage:** Principled uncertainty
- **Advantage:** Interpretable latent dynamics
- **Disadvantage:** Possibly lower predictive power in data-rich regime
### vs Previous Bayesian Scaling Attempts
- **Advantage:** Linear complexity (vs quadratic)
- **Advantage:** Model selection included
- **Advantage:** Better uncertainty calibration
## Neuroscience Applications
### Single-Cell Recording Analysis
- **Problem:** 1000+ neurons, few behavioral trials
- **Solution:** CASSM latent dynamics model
- **Output:** Neural trajectories with confidence bounds
### Behavioral State Inference
- **Use Case:** Infer latent cognitive states from neural activity
- **Benefit:** Well-calibrated state uncertainty
- **Application:** Decision-making, learning paradigms
### Cross-Session Analysis
- **Challenge:** Different neuron counts per session
- **Solution:** Adaptive model selection
- **Result:** Consistent latent space across sessions
## Code Implementation Tips
### Python Framework
```python
import numpy as np
from scipy.linalg import block_diag
class ComputationAwareKalman:
def __init__(self, n_neurons, state_dim, trials):
self.n_neurons = n_neurons
self.state_dim = state_dim
self.trials = trials
self.scale_imbalanced = trials < n_neurons
def estimate_computational_budget(self):
"""
Estimate computational cost for given state dimension
Returns: flops, memory requirements
"""
flops = self.state_dim**2 * self.trials
memory = self.state_dim * self.n_neurons
return flops, memory
def model_selection_loss(self, theta, data, lambda_comp=0.1):
"""
Novel training loss balancing prediction and computation
theta: model parameters
lambda_comp: computational penalty weight
"""
# Prediction error
log_likelihood = self.compute_log_likelihood(theta, data)
# Computational error
comp_error = self.estimate_computational_error(theta)
# Combined loss
loss = -log_likelihood + lambda_comp * comp_error
return loss
```
### Validation Protocol
1. **Accuracy Test:** Predictive performance on held-out trials
2. **Uncertainty Calibration:** Coverage probability of confidence intervals
3. **Scalability Test:** Runtime vs state dimension
4. **Robustness Test:** Performance under scale imbalance
## Key Insights for Researchers
### Model Selection Guidance
- **Rule of Thumb:** Start with state_dim = sqrt(n_trials)
- **Cross-Validation:** Use k-fold for hyperparameter tuning
- **Computational Budget:** Adjust λ_comp based on available resources
### Uncertainty Interpretation
- **Data Uncertainty:** From stochastic neural responses
- **Computational Uncertainty:** From numerical approximations
- **Total Uncertainty:** Sum (or convolution) of both
### Debugging Tips
- **Check:** Scale imbalance condition (n_trials < n_neurons)
- **Check:** Computational budget vs state dimension
- **Check:** Uncertainty calibration on synthetic data
- **Warning:** Over-regularization if λ_comp too large
## Limitations and Caveats
### Current Limitations
- Assumes Gaussian noise (may not hold for spike data)
- Linear dynamics (may miss nonlinear effects)
- Computational overhead vs pure deep learning
### Future Extensions
- Nonlinear dynamics (via neural network transition model)
- Spike-count observations (via Poisson observation model)
- Real-time implementation (via streaming algorithms)
## Research Roadmap
### Immediate Applications
1. Apply to existing single-cell datasets
2. Compare with state-of-art deep networks
3. Validate uncertainty calibration
### Methodological Extensions
1. Nonlinear state-space models
2. Non-Gaussian observations
3. Hierarchical models (multiple subjects)
### Tool Development
1. Python package release
2. JAX implementation for GPU acceleration
3. Integration with existing neuroscience pipelines
## References
**Primary Paper:**
- Huml, Wenger, Cunningham (2026). "Computation-Aware Kalman Filtering with Model Selection for Neural Dynamics." arXiv:2606.01468
**Related Work:**
- Cunningham & Byron (2014). "Dimensionality reduction for large-scale neural recordings"
- Pandarinath et al (2018). "LFADS - Latent Factor Analysis via Dynamical Systems"
- Linderman et al (2019). "Recurrent switching linear dynamical systems"
## Summary for Quick Reference
**Core Idea:** Bayesian neural dynamics modeling with computational uncertainty + model selection
**Best Use Case:** Scale-imbalanced neural data (few trials, many neurons)
**Key Advantage:** Principled uncertainty with modern scalability
**Main Method:** Computation-aware Kalman filtering + novel training loss
**Validation:** Competitive accuracy, superior uncertainty calibration
---
**Activation Keywords:** neural dynamics, Kalman filtering, Bayesian inference, model selection, uncertainty quantification, computational uncertainty, latent variable model, neural recording, state-space model
**Related Skills:** neural-population-dynamics, latent-dynamics-modeling, kalman-filtering-neural-data, bayesian-neural-modelingIs this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!