PsPM course session 2: LTI & GLM -...

23
[email protected] PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre for Human Neuroimaging & Max Planck UCL Centre for Computational Psychiatry and Ageing, University College London Clinical Research Priority Program "Synapse & Trauma" & Department of Psychiatry, Psychotherapy, and Psychosomatics, University of Zurich 09.04.2020 www.bachlab.org [email protected] @bachlab_cog WELLCOME CENTRE FOR HUMAN NEUROIMAGING MAX PLANCK UCL CENTRE FOR COMPUTATIONAL PSYCHIATRY AND AGEING RESEARCH SNA SCR = RF

Transcript of PsPM course session 2: LTI & GLM -...

Page 1: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

PsPM course session 2: LTI & GLM

Dominik R BachWellcome Centre for Human Neuroimaging & Max Planck UCL Centre for Computational Psychiatry and Ageing, University College London

Clinical Research Priority Program "Synapse & Trauma" & Department of Psychiatry, Psychotherapy, and Psychosomatics, University of Zurich

09.04.2020

[email protected]

@bachlab_cog

WELLCOME CENTRE FOR HUMAN NEUROIMAGINGMAX PLANCK UCL CENTRE FOR COMPUTATIONAL PSYCHIATRY AND AGEING RESEARCH

SNA SCR � = RF

Page 2: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

Psychological variable Neural activity Physiological

signal

Neural model

Peripheral LTI model

CS+/CS- US Memory Memory difference between CS+/CS-?

The "best possible" approximation to the true psychological variable.

Course overview

Lecture 2: 09.04.2020

Lecture 3: 16.04.2020 Lecture 4: 23.04.2020Lecture 5: 30.04.2020 Lecture 6: 07.05.2020Lecture 6: 07.05.2020

Lecture 7: 14.05.2020

Page 3: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

PsPM file:Data time-series

(Marker time stamps)Recorded file

Analogue data recording Digitisation

Preprocessing:Trim unnecessary data

Detect missing fixation and exclude/(correct) pupil sizeHeart beat detection & interpolation

Respiration cycle detection & interpolationStartle eyeblink EMG filtering and rectification

Import

Model inversion:GLM, non-linear models

1st (participant) level model files

Group-level model (t-test,

ANOVA, LME, ...)

If possible, only anti-aliasing filter

High sampling rate if no anti-aliasing

filter

Each step usually generates a new file with a prefix

(SPM-style)

2nd-level t-test

Export parameters to SPSS, R, ...

2nd (group) level model file

All necessary filters applied on-the-fly

during model inversion

PsPM pipeline overview

Page 4: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

Psychological variable

Neural activity

Physiological signal

Neural model

Peripheral LTI model

Examples: Instantaneous impulse with constant latency Short Gaussian impulse

Basic formalism

Bach & Friston (2013), Bach et al. (2018)

Page 5: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

Psychological variable Neural activity Physiological

signal

Peripheral LTI model

All published model-based methods make LTI assumptionsSome don't say so which has been interpreted as an "advantage" over PsPM (see e.g. Boucsein 2012, page 171)

LTI assumptions in hybrid approaches

Alexander et al. (2005), Benedek & Kaernbach (2010ab), Greco et al. (2016)

Page 6: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

Psychological variable

Neural activity

Physiological signal

Neural model

Peripheral LTI model

Examples: Instantaneous impulse with constant latency Short Gaussian impulse

Example SCR

Gerster et al. (2017) Psychophysiology

Page 7: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

1.Time invariance: output depends only on input but not on time. The same input always produces the same output. Variability in the output is due to variability in the input.

2. Linearity: the output after two inputs is the sum of the output that would follow the individual inputs.

What is LTI?

Page 8: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

SNA SCR � = RF

LTI system is unambiguously characterised by its response function.

This is the equation for convolution. It is the same as a linear filter.

Convolution with response function (RF)

Page 10: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

LTI systems are idealised versions of reality, even in standard engineering

applications.

How good is this approximation?Under what circumstances does it break?

Fidelity of the LTI formalism

Page 11: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

Dynamic range• Under what conditions is the LTI system plausible? • Hard biophysical constraints (e.g. pupil size)

Noise within dynamic range• Random noise (measurement noise, spontaneous activity, etc.)

Data preprocessing• Non-linearities more prevalent in some frequency bands -> filtering (e.g. SCR)

Non-linearities• Can occur across the entire dynamic range, but more likely towards the limits• Can potentially be modelled (e.g. Volterra kernels in fMRI)

Quantification• How much signal variance can be explained under an LTI model?

Fidelity of the LTI formalism

Page 12: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

Time invariance• Compare responses at different points in time

Direct tests• Neural recording or stimulation

Linearity• Does response depend on baseline?

Indirect test• Assume that external stimuli

elicit very brief neural activity with constant latency

Neural signal

External stimulus

Testing the LTI formalism

Page 13: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

LTI model assumes 1 RF per condition/subject

Canonical RF• Estimated from large data base (e.g. SCR: 1278 SCRs from 64 individuals

with ~ 30 s ITI)

Constrained RF• Add components to canonical RF to capture subject-specific variation• SCR: best retrodictive validity for canonical RF + time derivative

Often difficult to estimate RF for each subject• Not enough data• Responses overlapping• Experiment events not suitable

Canonical vs individual RF

Page 14: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

Instantaneous neural impulse with constant latency: Dirac/Kronecker delta function (all GLMs)

Gaussian neural impulse with constrained latency and dispersion, and free amplitude (non-linear SCR model)

Gaussian neural impulse with constant dispersion, and free latency/amplitude (SF models)

Gamma neural impulse with free amplitude, latency, shape and scale (Pupil models Korn & Bach 2016, not yet in PsPM)

Possible neural models

Page 15: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

=SCR X1 X2 X3β1β0 + + β3+ β2 + ε

General Linear Model

Intercept(per segment of continous data,

termed "session" in PsPM)

Events in condition 1

Events in condition 2

Events in condition 3

General linear model

Page 16: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

Constrained RF• One regressor per function in the basis set (all orthogonalised)• Response amplitude estimate: reconstruct response, amplitude of highest

peak (unlike SPM)

Basis set

Page 17: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

Events in condition 1 Events in condition 2 "Start break|" Intercept

Design matrix

Page 18: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

Events in condition 1 Events in condition 2 "Start break|" Intercept

Design orthogonality

Page 19: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

Events in condition 1 Events in condition 2 "Start break|"

Model fit

Page 20: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

Events in condition 1 Events in condition 2 "Start break|"

implausible RF

plausible RF

Estimated RF

Page 21: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

Name for 1st level model file ...

... and directorySeconds, samples, markers?Data file (1 per session)Timings (specify in GUI or 1 file per session)

SPM style timing files:

names = {'Neutral', 'Aversive'};onsets = {[1, 5], [2, 3, 4]};

pmod(1).name{1} = 'Arousal_rating';pmod(1).param{1} = [0.1 1.3];

pmod(2).name{1} = 'Arousal_rating';pmod(2).param{1} = [4.7, 8.3, 7.0];

GUI implementation

Page 22: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

Events in condition 1

Equivalent for 1 BF if only mean per condition is required

Estimability issues if many missing data point• Can be problematic for pupil size (loss of fixation), unconstrained parameter

values, currently working on solution within PsPM

A priori hypotheses better tested with pmods• ... but single trial estimates can be useful e.g. for trial-by-trial LMEs, for

comparing computational learning models without re-estimating PsPMs, or as input for computational fMRI

Estimability issues if RF longer than ITI• SCR, respiration• Successfully used for pupil

Modelling events or conditions?

Page 23: PsPM course session 2: LTI & GLM - Bachlabbachlab.org/wp-content/uploads/2020/04/02_LTI_GLM_Bach.pdf · 2020. 4. 18. · PsPM course session 2: LTI & GLM Dominik R Bach Wellcome Centre

[email protected]

Thank you!Project teamGiuseppe CastegnettiSamuel GersterSaurabh KhemkaChristoph KornFilip Melinčšak Karita OjalaPhilipp PaulusMatthias StaibAthina Tzovara Yanfang Xia

ProgrammersLaure CiernikGabriel GräniTobias MoserEshref ÖzdemirIvan RojkovLinus Rüttimann

Project collaboratorsJean DaunizeauRay DolanMikael ElamGuillaume FlandinSteve FlemingKarl FristonBarbara NamerManuel Voelkle

Funders