1. Hidden context tree modeling of EEG data
Antonio Galves
joint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas
Universidade de S.Paulo and NeuroMat
MathStatNeuro 2015
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
2. Looking for experimental evidence that the brain is a
statistician
Is the brain a statistician?
Stanislas Dehaene claims that the idea that the brain is a Bayesian
statistician is already sketched in von Helmholtz work!
See for instance the two lessons by Dehaene available on the web:
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
3. Looking for experimental evidence that the brain is a
statistician
Is the brain a statistician?
Stanislas Dehaene claims that the idea that the brain is a Bayesian
statistician is already sketched in von Helmholtz work!
See for instance the two lessons by Dehaene available on the web:
Le cerveau statisticien
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
4. Looking for experimental evidence that the brain is a
statistician
Is the brain a statistician?
Stanislas Dehaene claims that the idea that the brain is a Bayesian
statistician is already sketched in von Helmholtz work!
See for instance the two lessons by Dehaene available on the web:
Le cerveau statisticien
Le b´eb´e statisticien
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
5. Is the brain a statistician?
How to obtain experimental evidence supporting this conjecture?
Dehaene presents experimental evidence that unexpected
occurrences in regular sequences produce characteristic markers in
EEG data.
But we need more than evidences of mismatch negativity to support
this conjecture.
To discuss this issue we need to do statistical model selection in a
new class of stochastic processes:
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
6. Is the brain a statistician?
How to obtain experimental evidence supporting this conjecture?
Dehaene presents experimental evidence that unexpected
occurrences in regular sequences produce characteristic markers in
EEG data.
But we need more than evidences of mismatch negativity to support
this conjecture.
To discuss this issue we need to do statistical model selection in a
new class of stochastic processes:
Hidden context tree models.
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
7. Neurobiological problem
Random
Source
A random source produces sequences of auditory stimuli.
How to retrieve the structure of the source from EEG data?
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
8. Example of a random source: samba
Auditory segments:
2 - strong beat
1 - weak beat
0 - silent event
Chain generation:
start with a deterministic sequence
· · · 2 1 0 1 2 1 0 1 2 1 0 1 2 · · ·
replace in a iid way each symbol 1 by 0 with probability .
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
9. A typical sample would be
· · · 2 1 0 1 2 1 0 1 2 1 0 1 2 · · ·
· · · 2 1 0 0 2 1 0 1 2 0 0 0 2 · · ·
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
10. A typical sample would be
· · · 2 1 0 1 2 1 0 1 2 1 0 1 2 · · ·
· · · 2 1 0 0 2 1 0 1 2 0 0 0 2 · · ·
How to define the structure of this source?
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
11. A typical sample would be
· · · 2 1 0 1 2 1 0 1 2 1 0 1 2 · · ·
· · · 2 1 0 0 2 1 0 1 2 0 0 0 2 · · ·
How to define the structure of this source?
- By describing the algorithm producing each next symbol,
given the shortest relevant sequence of past symbols.
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
12. The structure of the random source
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
13. The structure of the random source
000 100 200
10 20 01 21
2
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
14. The structure of the random source
000 100 200
10 20 01 21
2
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
15. The stochastic chain generated by the source samba
1
X0
2
X−1
0
X−2
0
X−3
1
X−4
2
X−5
0
X1
1
X2
. . .. . .
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
16. Xn ∈ A = {0, 1, 2}
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
17. Xn ∈ A = {0, 1, 2}
(Xn)n∈Z is stochastic chain
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
18. Xn ∈ A = {0, 1, 2}
(Xn)n∈Z is stochastic chain
with memory of variable length
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
19. Xn ∈ A = {0, 1, 2}
(Xn)n∈Z is stochastic chain
with memory of variable length
generated by the probabilistic context tree
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
20. Xn ∈ A = {0, 1, 2}
(Xn)n∈Z is stochastic chain
with memory of variable length
generated by the probabilistic context tree
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
21. Context tree models
Introduced by Rissanen
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
22. Context tree models
Introduced by Rissanen
A universal data compression system, IEEE, 1983.
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
23. Context tree models
Introduced by Rissanen
A universal data compression system, IEEE, 1983.
stochastic chains with memory of variable length
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
24. Context tree models
Introduced by Rissanen
A universal data compression system, IEEE, 1983.
stochastic chains with memory of variable length
generated by a probabilistic context tree
000 100 200
10 20 01 21
2
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
25. The neurobiological question
Is it possible
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
26. The neurobiological question
Is it possible
to retrieve the samba context tree
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
27. The neurobiological question
Is it possible
to retrieve the samba context tree
from the EEG data recorded during the exposure to
the sequence of auditory stimuli generated by the
samba source?
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
29. How to address the identification problem?
We have
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
30. How to address the identification problem?
We have
EEG data recorded with 18 electrodes
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
31. How to address the identification problem?
We have
EEG data recorded with 18 electrodes
for each electrode e and each step n
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
32. How to address the identification problem?
We have
EEG data recorded with 18 electrodes
for each electrode e and each step n
call Y e
n = (Y e
n (t), t ∈ [0, T])
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
33. How to address the identification problem?
We have
EEG data recorded with 18 electrodes
for each electrode e and each step n
call Y e
n = (Y e
n (t), t ∈ [0, T]) the EEG signal recorded at electrode e
during the exposure to the auditory stimulus Xn
Y e
n ∈ L2
([0, T]), where T = 450ms is the time distance between the
onsets of two consecutive auditory stimuli
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
34. Hidden context tree model (HCTM)
Ingredients:
finite alphabet A
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
35. Hidden context tree model (HCTM)
Ingredients:
finite alphabet A
In our example A = {0, 1, 2}
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
36. Hidden context tree model (HCTM)
Ingredients:
finite alphabet A
In our example A = {0, 1, 2}
measurable space (F, F)
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
37. Hidden context tree model (HCTM)
Ingredients:
finite alphabet A
In our example A = {0, 1, 2}
measurable space (F, F)
In our example F = L2
([0, T]) and F is the Borel σ-algebra on F.
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
38. Hidden context tree model (HCTM)
Ingredients:
finite alphabet A
In our example A = {0, 1, 2}
measurable space (F, F)
In our example F = L2
([0, T]) and F is the Borel σ-algebra on F.
probabilistic context tree (τ, p)
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
39. Hidden context tree model (HCTM)
Ingredients:
finite alphabet A
In our example A = {0, 1, 2}
measurable space (F, F)
In our example F = L2
([0, T]) and F is the Borel σ-algebra on F.
probabilistic context tree (τ, p)
family {Qw : w ∈ τ} of probabilities on (F, F)
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
40. Hidden context tree model (HCTM)
Ingredients:
finite alphabet A
In our example A = {0, 1, 2}
measurable space (F, F)
In our example F = L2
([0, T]) and F is the Borel σ-algebra on F.
probabilistic context tree (τ, p)
family {Qw : w ∈ τ} of probabilities on (F, F)
stochastic chain (Xn, Yn) ∈ A × F.
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
41. Hidden context tree model
(Xn, Yn)n∈Z HCTM compatible with (τ, p) and (Qw : w ∈ τ) if
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
42. Hidden context tree model
(Xn, Yn)n∈Z HCTM compatible with (τ, p) and (Qw : w ∈ τ) if
(Xn)n∈Z is generated by (τ, p)
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
43. Hidden context tree model
(Xn, Yn)n∈Z HCTM compatible with (τ, p) and (Qw : w ∈ τ) if
(Xn)n∈Z is generated by (τ, p)
for any m, n ∈ Z with m ≤ n
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
44. Hidden context tree model
(Xn, Yn)n∈Z HCTM compatible with (τ, p) and (Qw : w ∈ τ) if
(Xn)n∈Z is generated by (τ, p)
for any m, n ∈ Z with m ≤ n
any string xn
m− (τ)+1 ∈ An−m+ (τ)
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
45. Hidden context tree model
(Xn, Yn)n∈Z HCTM compatible with (τ, p) and (Qw : w ∈ τ) if
(Xn)n∈Z is generated by (τ, p)
for any m, n ∈ Z with m ≤ n
any string xn
m− (τ)+1 ∈ An−m+ (τ)
and any sequence In
m = (Im, . . . , In) of F-measurable sets,
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
46. Hidden context tree model
(Xn, Yn)n∈Z HCTM compatible with (τ, p) and (Qw : w ∈ τ) if
(Xn)n∈Z is generated by (τ, p)
for any m, n ∈ Z with m ≤ n
any string xn
m− (τ)+1 ∈ An−m+ (τ)
and any sequence In
m = (Im, . . . , In) of F-measurable sets,
P Y n
m ∈ In
m|Xn
m− (τ)+1 = xn
m− (τ)+1 =
n
k=m
Qcτ (xk
k− (τ)+1
)(Ik)
(τ) = height of τ
cτ (xk
k− (τ)+1) = context assigned to xk
k− (τ)+1 by τ
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
47. Rephrasing our problem
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
49. Rephrasing our problem
Taking
(Xn)n∈Z sequence of auditory stimuli produced by the samba source
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
50. Rephrasing our problem
Taking
(Xn)n∈Z sequence of auditory stimuli produced by the samba source
(Y e
n )n∈Z successive chunks of EEG signals
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
51. Rephrasing our problem
Taking
(Xn)n∈Z sequence of auditory stimuli produced by the samba source
(Y e
n )n∈Z successive chunks of EEG signals
Question: Is (Xn, Y e
n )n∈Z a HCTM compatible with τ?
000 100 200
10 20 01 21
2
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
52. is (Xn, Y e
n )n∈Z a HCTM compatible with τ?
In other terms, for any w ∈ τ, is it true that
L(Y e
n |Xn
n− (w)+1 = w, X
− (τ)
−∞ = u) = L(Y e
n |Xn
n− (w)+1 = w, X
− (τ)
−∞ = v)
for any pair of strings u and v?
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
53. Pruning the tree
A version of Rissanen’s algorithm Context will be applied
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
54. Pruning the tree
A version of Rissanen’s algorithm Context will be applied
Start with a maximal admissible candidate tree
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
55. Pruning the tree
A version of Rissanen’s algorithm Context will be applied
Start with a maximal admissible candidate tree
For any string w and pair of symbols a, b ∈ A with aw and bw
belonging to the candidate tree
test the equality
L(Y e
n |Xn
n− (w) = aw) = L(Yn|Xn
n− (w) = bw)
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
56. Pruning the tree
If for all pairs of symbols (a, b) the equality is rejected then prune all
the leaves aw
Repeat the pruning procedure until no more pruning is required
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
57. How to test the equality
L(Yn|Xn
n− (w) = aw) = L(Yn|Xn
n− (w) = bw) ?
Apply the projective method introduced by Cuestas-Albertos, Fraiman
and Ransford (2006).
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
58. Experimental results
Context tree selection procedure for the EEG data recorded during
the exposure to the sequence of auditory stimuli generated by the
samba source
Sample composed by 20 subjects
For each subject EEG data from 18 electrodes was recorded
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data
61. Summary
18
5
19 15
White nodes indicate the number of subjects which correctly identify the
node as not being a context. Black nodes indicate the number of
subjects which correctly identify the node as a context. For instance, 18
subjects correctly identify that the symbol 0 alone is not enough to
predict the next symbol. And 15 subjects correctly identify the symbol 2
as a context.
Antonio Galvesjoint work with A. Duarte, R. Fraiman, G. Ost and C. Vargas Hidden context tree modeling of EEG data