Building on Models: Experiences from a Decade with the Microcircuit Model
KHK • Aachen • 3 April 2024
Alexandre René
Computational Network Science group (RWTH)
rene@cs.rwth-aachen.de
Anecdotal
observations
Conceive theory
Conceive experiment
Accumulate data
Compare
Make prediction
New experiment?
Conceive task
experiment
Select architecture
Learn theory
Train model
Make prediction
Compare
New task?
Assumptions
Symmetry
Conservation
Exchangeability
Assumptions
Symmetry
Color invariance
Exchangeability
Anecdotal
observations
Anecdotal
observations
Validate/falsify
Validate/falsify
Accumulate data
(training data)
Accumulate more data
(test data)
Optimize model
Falsification analysis
Mesocircuit model
(René et al, Neural Comp, 2020)
Train output
Mesoscopic model
Fit dynamics
(Schwalger, Deger & Gerstner, 2017)
(René et al, Neural Comp, 2020)
What we gain compared to a standard RNN:
So why don’t more people do this ?
RNN
(BPTT)
\(\color{#3cb100} Θ\)
\(\color{#3cb100} Θ\)
…
https://sinn-full.readthedocs.io/
Must implement entire model symbolically
Caveat:
Toolbox for making differentiable models
Fit dynamics
Mesoscopic model
Many distinct Θ produce output consistent with data
Even worse case: dozens of plausible, distinct candidate models
Small 2 neuron circuit
Optimize model
Falsification analysis
Domain constraints
Still many plausible candidate models
Four candidate models for LP
(René & Longtin, in preparation)
expected risk (\(R\))
Model: Prinz et al, Similar network activity from disparate circuit parameters, 2004
What we were doing before
Is this difference meaningful ?
“Observed” data
Model
(René & Longtin, in preparation)
expected risk (\(R\))
Is this difference meaningful ?
This is a model selection problem
| 512 | 2×10⁻⁵ | -5×10⁻⁴ | 5×10⁻³ |
| 4096 | 2×10⁻⁵ | -5×10⁻⁴ | 5×10⁻³ |
| 32768 | 2×10⁻⁵ | -5×10⁻⁴ | 5×10⁻³ |
| 512 | -0.72 | -0.74 | 5.64 |
| 4096 | 0.64 | -0.41 | 14.49 |
| 32768 | -3.02 | 10.33 | 40.41 |
| 512 | 4×10⁻¹¹ | 5×10⁻¹¹ | 4×10⁻¹¹ |
| 4096 | 4×10⁻¹⁰ | 4×10⁻¹⁰ | 4×10⁻¹⁰ |
| 32768 | 1×10⁻⁹ | 1×10⁻⁹ | 1×10⁻⁹ |
| 512 | 0 | 0 | 0 |
| 4096 | 0 | 0 | 0 |
| 32768 | 0 | 0 | 0 |
Expected risk
Probability ratios
\( \log_{10} \left(\displaystyle \frac{\mathbb{P}(\text{model } A)}{\mathbb{P}(\text{model } B)}\right)\)
Likelihood ratio
Bayes factor
Bayesian expected risk
Noise strength →
Dataset size ↴
\(\bf 2^{-12}\)
\(\bf 2^{-16}\)
\(\bf 2^{-20}\)
↓ Inconsistent values
→↓ Unreliable scale
↓ Inconsistent values
→ Unreliable scale
Prior-dependent
Data hungry
↓ Inconsistent values
→ Unreliable scale
Prior-dependent
Data hungry
↓ Convergences with size
Arbitrary scale
expected risk (\(R\))
Is this difference meaningful ?
This is a model selection problem
…but the usual methods either
(expected risk)
(likelihood, Bayes)
(likelihood)
We need
expected risk (\(R\))
Is this difference meaningful ?
This is a model selection problem
We need
Ternary criterion
(three options)
Reported
strong evidence
\(\Rightarrow\)
Reported
weak evidence
\(\Rightarrow\)
Model selection outcome is robust
Inconsequential
(no model selected)
We need
Observation:
Expected risk measures only aleatoric uncertainty.
(In-class errors)
Realization:
Neglecting epistemic uncertainty is what causes the likelihood to be overconfident.
(out-of-class / modelling errors)
Idea:
Epistemic uncertainty can quantify the strength of evidence
| 512 | 2×10⁻⁵ | -5×10⁻⁴ | 5×10⁻³ |
| 4096 | 2×10⁻⁵ | -5×10⁻⁴ | 5×10⁻³ |
| 32768 | 2×10⁻⁵ | -5×10⁻⁴ | 5×10⁻³ |
| 512 | -0.72 | -0.74 | 5.64 |
| 4096 | 0.64 | -0.41 | 14.49 |
| 32768 | -3.02 | 10.33 | 40.41 |
Expected risk
Likelihood ratio
Dataset size ↴
\(\bf 2^{-12}\)
\(\bf 2^{-16}\)
\(\bf 2^{-20}\)
(Hüllermeier & Wagerman, 2021)
(Kiureghian & Ditlevsen, 2009)
↓ Inconsistent values
→↓ Unreliable scale
↓ Convergences with size
Arbitrary scale
(René & Longtin, in preparation)
Evaluate two percent-point functions \(q\) (PPF, aka quantile function, aka inverse CDF).
The difference between the two PPFs we call the empirical model discrepancy: \(δ^{\mathrm{EMD}}\).
The “real” PPF should be somewhere between these curves.
We sample PPFs such that their variance is proportional to \(δ^{\mathrm{EMD}}\).
Each PPF
Distribution of PPFs ⇒ Distribution of expected risks \(R\)
⇒ Different expected risk \(R\)
(René & Longtin, in preparation)
PPF samples
expected risk (\(R\))
quantile
\(Φ\)
Reported
strong evidence
\(\Rightarrow\)
Reported
weak evidence
\(\Rightarrow\)
Model selection outcome is robust
Inconsequential
(no model selected)
(René & Longtin, in preparation)
We interpret \(R\)-distributions as follows:
PPF samples
expected risk distribution (\(R\))
Reported
strong evidence
\(\Rightarrow\)
Reported
weak evidence
\(\Rightarrow\)
Model selection outcome is robust
Inconsequential
(no model selected)
quantile
\(Φ\)
Probability ratios – \(\displaystyle \frac{\mathbb{P}(\text{model } A)}{\mathbb{P}(\text{model } B)}\)
(René & Longtin, in preparation)
| 512 | -0.09 | 0.06 | 0.44 |
| 4096 | -0.04 | 0.10 | 0.62 |
| 32768 | 0.02 | -0.05 | 0.32 |
| 512 | 2×10⁻⁵ | -5×10⁻⁴ | 5×10⁻³ |
| 4096 | 2×10⁻⁵ | -5×10⁻⁴ | 5×10⁻³ |
| 32768 | 2×10⁻⁵ | -5×10⁻⁴ | 5×10⁻³ |
| 512 | -0.72 | -0.74 | 5.64 |
| 4096 | 0.64 | -0.41 | 14.49 |
| 32768 | -3.02 | 10.33 | 40.41 |
| 512 | 4×10⁻¹¹ | 4×10⁻¹¹ | 4×10⁻¹¹ |
| 4096 | 4×10⁻¹⁰ |
4×10⁻¹⁰ |
4×10⁻¹⁰ |
| 32768 | 1×10⁻⁹ |
1×10⁻⁹ |
1×10⁻⁹ |
| 0 |
0 |
0 |
|
| 0 |
0 |
0 |
|
| 0 |
0 |
0 |
Expected risk
Likelihood ratio
Bayes factor
Bayesian expected risk
Noise strength →
Dataset size ↴
↓ Inconsistent values
→↓ Unreliable scale
↓ Inconsistent values
→ Unreliable scale
Prior-dependent
Data hungry
↓ Inconsistent values
→ Unreliable scale
Prior-dependent
Data hungry
\(\bf 2^{-12}\)
\(\bf 2^{-16}\)
\(\bf 2^{-20}\)
EMD criterion
↓ Convergences with size
Arbitrary scale
↓ Convergences with size
Scale adjusted by epistemic uncertainty
(René & Longtin, in preparation)
from emd_falsify import Bemd, make_empirical_risk
synth_ppfA = make_empirical_risk(lossA(modelA.generate(Lsynth)))
synth_ppfB = make_empirical_risk(lossB(modelB.generate(Lsynth)))
mixed_ppfA = make_empirical_risk(lossA(data))
mixed_ppfB = make_empirical_risk(lossB(data))
Bemd(mixed_ppfA, mixed_ppfB, synth_ppfA, synth_ppfB, c=c)Optimize model
Falsification analysis
Domain constraints
Aleatoric uncertainty
≠
Epistemic uncertainty
Neurophysics group (Ottawa)
Machine learning in science group (Tübingen)
Institute for Advanced Simulation (IAS-6), Computational and Systems Neuroscience (Jülich)
Computational Network Science group (Aachen)
Model falsification paper
(pre-pre-print)
Model falsification toolbox
(emd-falsify on PyPI)
Mesoscopic inference
(René et al., 2020,
Neural Comp.)
Pyloric circuit simulator
(Python+JAX, GitHub)
Model inference toolbox
(Python+Theano, GitHub)
(René et al, Neural Comp, 2020)
Distribution of the per-sample loss
Bootstrap estimate for the uncertainty of the expected risk
Radiance
Wavelength (μm)
Wavelength (μm)
Rayleigh-Jeans model
Planck model
No measurement is perfect, so we also simulate noise:
(René & Longtin, in preparation)
(René & Longtin, in preparation)
Each PPF
Distribution of PPF ⇒ Distribution of expected risks \(R\)
⇒ Different expected risk \(R\)
Reduce noise
(René & Longtin, in preparation)
Baye's theorem
+ Markov property
\({\color{#ff4e37} u(t_{k-1})} + Δt \cdot\! \left.\frac{d {\color{#ff4e37} u}}{dt}\right\rvert_{{\color{#d39f4d} Θ}, {\color{#56ff00} I}}\)
\({\color{#56ff00} Θ}\)
\(\mathcal{M}\)
\({\color{#ff4e37} u(t)}\)
\({\color{#d39f4d} I(t)}\)
Model; \(\left.\frac{d {\color{#ff4e37} u}}{dt}\right\rvert_{{\color{#56ff00} Θ}, {\color{#d39f4d} I}}\)
Model parameters
Observations
Inputs
BPTT looks for:
René et al. (2020)
| Parameter | No. components | Description |
|---|---|---|
| connection probability | ||
| connection weight | ||
| transmission delay | ||
| no. of neurons in pop | ||
| membrane resistance | ||
| membrane resting potential | ||
| membrane time constant | ||
| absolute refractory period | ||
| non-adapting threshold | ||
| reset potential | ||
| escape rate at threshold | ||
| noise level | ||
| synaptic time constant | ||
| adaptation strength | ||
| adaptation time constant |
models the average population activity
models spiking of each individual neurons
mesoGIF:
GIF:
(Schwalger et al., 2017)
(Gerstner et al., 2014)
GIF:
mesoGIF:
Homogeneous
| Parameter | No. components | Description |
|---|---|---|
| connection probability | ||
| connection weight | ||
| transmission delay | ||
| no. of neurons in pop | ||
| membrane resistance | ||
| membrane resting potential | ||
| membrane time constant | ||
| absolute refractory period | ||
| non-adapting threshold | ||
| reset potential | ||
| escape rate at threshold | ||
| noise level | ||
| synaptic time constant | ||
| adaptation strength | ||
| adaptation time constant |
models the average population activity
models spiking of each individual neurons
mesoGIF:
GIF:
(Schwalger et al., 2017)
(Gerstner et al., 2014)
mesoGIF:
Homogeneous
\(\color{#3cb100} Θ\)
2 populations,
14 parameters to infer
Input
Output – true
Optimizer
iterations
Input
Output – pop E – model vs true
Not shown:
Also demonstrated with 4 populations,
36 parameters
( )
Pop. E
Pop. I
René et al. (Neural Computation, 2020)
Inference finds effective parameters which compensate for incorrect model assumptions
René et al. (Neural Computation, 2020)
Heterogeneous parameters
GIF (true model)
mesoGIF (homogeneous model) –
Theoretical params
mesoGIF (homogeneous model) –
Inferred params
A differentiable likelihood can also be used for MCMC sampling
→credible intervals (Bayesian error bars) on the parameters
(Marginals from the 14-D distribution)
René et al. (Neural Computation, 2020)