One-hot Generalized Linear Model for Switching Brain State Discovery
Authors: Chengrui Li
Soon Ho Kim
Chris Rodgers
Hannah Choi
Anqi Wu
Venue: ICLR 2024 poster (2024)
Keywords: Hidden markov models
generalized linear models
functional connectivity inference
Primary area: applications to neuroscience & cognitive science

Abstract: Exposing meaningful and interpretable neural interactions is critical to understanding neural circuits. Inferred neural interactions from neural signals primarily reflect functional connectivity. In a long experiment, subject animals may experience different stages defined by the experiment, stimuli, or behavioral states, and hence functional connectivity can change over time. To model dynamically changing functional connectivity, prior work employs state-switching generalized linear models with hidden Markov models (i.e., HMM-GLMs). However, we argue they lack biological plausibility, as functional connectivities are shaped and confined by the underlying anatomical connectome. Here, we propose two novel prior-informed state-switching GLMs, called Gaussian HMM-GLM (Gaussian prior) and one-hot HMM-GLM (Gumbel-Softmax one-hot prior). We show that the learned prior should capture the state-invariant interaction, shedding light on the underlying anatomical connectome and revealing more likely physical neuron interactions. The state-dependent interaction modeled by each GLM offers traceability to capture functional variations across multiple brain states. Our methods effectively recover true interaction structures in simulated data, achieve the highest predictive likelihood, and enhance the interpretability of interaction patterns and hidden states when applied to real neural data. The code is available at \url{https://github.com/JerrySoybean/onehot-hmmglm}.

Published as a conference paper at ICLR 2024
ONE-HOT GENERALIZED LINEAR SWITCHING BRAIN STATE DISCOVERY
MODEL
FOR
Chengrui Li', Soon Ho Kim², Chris Rodgers', Hannah Choi² & &Anqi Wu!
School of Computational Science & Engineering Georgia Institute of Technology, Atlanta, GA 30305, USA (cnlichengrui,
edu
2 School of Mathematics
Georgia Institute of Technology, Atlanta, GA 30305, USA (soonhokim, hannahcajagatechh edu
3 Department of Neurosurgery, School of Medicine
Emory University, Atlanta, GA 30322, USA christopher. wwwgerrsddgeeeeeeeeeooeeoeeeeeee edu
ABSTRACT
Exposing meaningful and interpretable neural interactions is critical to under- standing neural eircuits. Inferred neural interactions from neural signals primarily reflect functional connectivity. In long experiment, subject animals may experi- ence different stages defined by the experiment, stimuli, or behavioral states, and hence functional connectivity can change over time. To model dynamically chang- ing functional connectivity, prior work employs state-switching generalized linear models with hidden Markov models (i.e., HMM-GLMs), However, argue they lack biological plausibility, as functional connectivities are shaped and confined by the underlying anatomical connectome. Here, we propose two novel prior- informed switchswi GLMs, called Gaussian HMM-GLM (Gaussian prior) and one-hot HMM-GLM (Gumbel-Softmax one-hot prior). We show that the learned prior should capture the state-invariant interaction, shedding light on the underlying anatomical connectome and revealing more likely physical neuron in- teractions. The state-dependent interaction modeled by each GLM offers trace- ability capture functional variations across multiple brain states. Our meth- ods effectively recover true interaction structures in simulated data, achieve the highest predictive likelihood, and enhance the interpretability of interaction pat- terns and hidden states when applied to real neural data. The code is available at https: /ettps://gitee www.....huuuugggggggggg com haamm/Jeryyyobbeer wwwooooeeottttoo howeootttthggglll
INTRODUCTION
Unveiling meaningful and interpretable neural interaction structures is vital for comprehending neu- ral circuits. Extensive research has investigated these interactions using statistical and information- theoretic methods like corss-correlogram (Jia et al.) 2022), mutual information (Houghton) (201)),
Granger causality (Granger] 1969), transfer entropy (Schreiber 2000), generalized linear methods on top of dynamical systems (Linderman et al. 2016 2017 Glaser et al. 2020). and Hawkes process (Li al. 2022). Typically, the inferred neural interaction reflects dynamic functional connectivity, influenced by variations in neural activity. Direct observation or inference of the anatomical connec- tome, encompassing axons, dendrites. and synapses that establish neural communication, is usually not feasible. Moreover, unlike anatomical connectome, which remains relatively stable over period of time, function connectivity varies with behavioral states and on much faster time scales. Func- tional connectivities of neurons, therefore, reflect dynamic modes of computation shaped by task and sensory inputs. Existing experimental evidence suggests that neural systems can exhibit diverse firing patterns associated with different sensory, perceptual. and behavioral states (Sherman 2001
Haider et al. 2007: Anderson et al. 2000 Sanchez- Vives & McCormick] 2000 Escola et al. 2011
Wang et al. 2024
To capture such varying functional connectivities in multi-state systems, prior studies explored state-switching generalized linear models (GLMs) with hidden Markov models (HMMs), referred

---

Published as a conference paper at ICLR 2024
to as HMM-GLMM (Escola et al. 2011 Nadagouda & Davenport 2021 Zhou et al. 2021 Morariu-
Patrichi & Pakkanen 2022). These models introduce a discrete hidden variable representing the state of each time point, with each state equipped with its own GLM to capture neural interactions. However, we argue that such methods are not biologically plausible enough, since an interaction be- tween pair of neurons inferred from neural signals can reflect not only functional connectivity but also anatomical connectome or synaptic connectivity. There exists experimental evidence manifest- ing degrees of correlations between functional and anatomical networks (Genç et al., 2016; [Siegle] et al. 202T). It is thus plausible to assume that functional connectivity is dynamically modulated by brain states while also being shaped and confined by the underlying anatomical connectome.
Incorporating these more biologically plausible assumptions, we introduce novel approach for capturing time-varying functional connectivity in multi-state neural systems using an HMM-GILM framework. Unlike previous HMM-GLM methods that assume complete independence among GLMs in different states, we introduce a learnable prior for all states, constraining the search space for the interaction weight of each GLM derived from neural activity. We first provide solution using a shared Gaussian prior over the weight matrices of GLMs for all states, denoted as Gaussian HMM-GLM. However, this Gaussian prior is relatively naive and does not explicitly connect func- tional connectivities to the anatomical connectome. Accordingly, we provide a second solution that decomposes each GLM's weight matrix into adjacency matrix and strength matrix, with the ad- jacency matrix modeled by a one-hot encoding mechanism. The prior is then imposed solely on the adjacency, not the entire weight matrix. We argue that the regulated adjacency matrices, guided by their prior, shed light on the underlying anatomical connectome, revealing more likely physical in- teractions between neurons. Mcanwhile, less restricted strength matrices offer flexibility to capture functional variations across multiple brain states. Our experimental results demonstrate that when compared to alternatives, one-hot HIMM-GMM accurately recovers true interaction structures in sim- ulated data and achieves the highest predictive likelihood on test spike trains from two real neural datasets. Moreover, the uncovered interaction structures and hidden states are more interpretable compared with alternatives in real neural datasets.
METHOD
Classic GLM: Denote a spike train data as X E NTXN recorded from N neurons across time bins, Zi,n as the number of spikes generated by the n-th neuron in the (-th time bin, and æ, E RR as the vector of spikes for all neurons at time t. When provided with X. a classic GLM, with pre-defined basis functions, predicts, the firing rates of the n-th neuron at the time bin t as
f=== = bn
Wnte'' n==1
Σ xt In
with spike Fi,n ~ Poisson(Sf.n):
where 0 : R + R+ is non-linear function (e.g., Softplus); b, is the background intensity of the n-th neurom; Wne-n' the influence weight from the n' -th neuron to the n-th neuron whose matrix form is W E NRN,, 6 E RRK is the basis function summarizing history spikes from L- K to (-1--1 1. The GLM finds the optimal W by maximizing the Poisson log-likelihood of the observed spikes.
HMM-GLM (HG): First, extend the GLM with hidden Markov model (HMM). We assume there exist S states underlying the functional connectivities of neural activity. For each time t, we introduce discrete latent variable 2, E {1...., S), whose transition probability is p(2++1/2) = T2,,2441 with a matrix form II E [0, 1] S Given a latent state 21, the weight matrix at time t is selected as W., RRxx from (W.) Then the emission model is p( Ti,.... .i..... 2t-1)
Poisson(ft..)::
N
K >
ft. =
b, +
Σ n
W..nnen''
(2)
Note that the traditional HMM framework assumes that the emission probability distributions, sim- ilar to the transition probability distributions, are hime-homogeneous, i.e., the emission model does not depend on any previous observations. Here relax the assumption by introducing the depen- dence over the spike history, similar to the previous HMM-GLMs (Escola et al.) 2011). Next, we will introduce two variants of HG, in which a single shared global prior is imposed over all W, in different states.
Gaussian HMM-GLM (GHG): To impose the assumption that functional connectivities across dif- ferent states should share some common structure, a straightforward approach is imposing a Gaus- sian prior A (w o2) on the weight Ws with hyperparameter a², Vs E (I,...,S), S). An
2

---

Published as a conference paper at ICLR 2024
A)
HMM hidden state
weight W
inhibitory A. +e amh
excitatory A Lexe
strength W
R2
Poisson observation
GLM latent
shared
prior
Figure I: A) descriptive schematic of the weight matrix decomposition. B) The graphical model of the one-hot HMM-GLM.
HG with such a Gaussian prior is referred to as Gaussian HMM-GLM (GHG), and the shared com- mon information of state-dependent weights W, is stored in Wo-
One-hot HMM-GLM (OHG): One-hot HMM-GLM (OHG) decomposes the weight matrices W. in Eq. into discrete adjacency matrix and positive-valued strength matrix, i.e.,
Ws,ntn' s.,nia)sssn...... jnh (+1)as,.t-neess Wsntn'n Vs E (I...., -}.
Ws,n Wan R4 is the strength of the weight in state s. We define asnte'' [n inh: d' no: as,ne-p'.es E A? to be the adjacency (weight type) from neuron n' to soft one-hot encoding vector over a simplex A == {a [0, [0,1]*1 E ag = 1}. so its scaler repre- sentation as,n'-n (-1)a ,inh + (+1)a,,nend) ,ss should be close to either -1 or 0 or +1. The matrix and tensor forms are denoted as W. E R RNN and A, [o, NxxxX respectively, vs E (L...., S}. Fig. I shows a schematic of the one-hot decomposition.
neuron in state corresponding
(inhibitory,
connection, excitatory). as,ue-n'
To impose the assumption that functional connectivities across different states should share some common structure informing us about the underlying anatomical connectome, we impose Gumbel- Softmax prior over as,ne-n', i... a Grmbell-Sfftmat Softma((aa,n--- T), Vs E {1...., written out as
exp [(In ngn sype + 9s,ne-n' [/pe Enspe no,c,)) exp [Inn do, + Js. (ynnew/yye/// 1/7] ttype E {inh, no, exc]
Og sype
(4)
itd. G0, 1). In practice can sample g by sampling from Uniform(O, 1) and computing ing as,nen' be soft one-hot representation of the weight type. For each as,nt-'', only one of the three types is significantly hotter than the other two, representing the type of the connection. The tensor form of dg,nt-w' is denoted Ag NxNx3 which free-parameter matrix imposing the biological structure similarity over different states. Consequently, if the synaptic (anatomical) connection type excitatory, its functional connection type is likely to be excitatory; and vice versa. The log density of the Gumbel-Softmax distribution Jang et al. (2016) Maddison et al. (2016) is:
where Is,at-n' type
- In( In(u)). т 0 is temperature hyperparameter forc-
In p(a.,nnen (0.nenn)) =In 27 21n
Σ typeE none.)
d0,ne-n .tye
(5)
(In 10.00nne-n.yp (T + In
type nxxc)
By introducing a Gumbel-Softmax prior over the connection matrix A., we turn the parameter A. into a latent variable. We can also assume the strength W. and the background intensity by are random variables from some prior distributions. We put a Gaussian prior over the log of W. to ensure its positivity and Gaussian prior over bn, finally obtaining the generative model of OHG:
Ze41 1z, Categorical( (T2, s)
AL (1...., TT}
as Clumbel-Softnaen (ofttax((xxmx n' T),
V (1,...,S,, Vn,n' E (l,...,,N N}
In ih n' ~ N( ow), E [1,..., S},
Vn, E E
(6)
bn ~ (un,, Vn E * (I....,N}
Vn, A schematic diagram representing this generative model is shown in Fig. IT.
It.n Poisson(fe.... (#),..., Lt-1, Az,, b,)),, Vt E fll...,,T,, T),vn, n' E (I....,N].
Relationships between GHG and OHG: GHG similar to OHG in the sense that they both as-
sume that the state-dependent weights W, share some common information (Ag for OHG and W.
3

---

Published as a conference paper at ICLR 2024
for GHG). The main difference is that GHG does not differentiate the adjacency from the strength (Eq. 3). Therefore, the shared Wo incorporates both. While in OHG, thanks to the decomposition, Ao only imposes similarity over the adjacency, not the strength. The regulated adjacency matrices A, with their prior Ag should inform us about the underlying anatomical connectome. The less restricted strength matrices W, provide us with sufficient flexibility to capture functional variations across multiple brain states. Compared with OHG, GHG serves as an intermediate model with straightforward prior directly on the weights representing shared global connectivity but without the one-hot decomposition. In the experimental evaluation section, we will show that a biologi- cally plausible constraint like Ao in OHG is critical to obtaining meaningful inference and learning results.
INFERENCE
The generative model has four latent variables {=,, A.. In W,,ba): It requires a complex fully Bayesian inference approach to infer all the latent variables, which is usually very time-consuming and highly computationally intensive. We provide Baum-Welch algorithm problem. In our Baum- Welch, we derive the posterior of 2, in the E-step, and do maximum likeli- hood estimation for all other latent variables given the estimated posterior distribution of 2 in the M-step, i.e., we jointly optimize model parameters and latent variables (except 2;) in the M-step- The rationale that the calculation of the posterior for 24 is straightforward via forward- backddd message passing, while the calculation of the posterior for A, is very challenging and has no closed- form expression. We can certainly resort to a variational distribution to approximate the posterior for A.. However, since the prior of A, is Humbel-Softmail distribution, it is unclear what parametric density function we should choose to serve as the approximated posterior distribution. Given these challenges, only do the E-step for 2 with forward-backwant message passing. In the M-step, we optimize the model parameters III, Au) } with (A,, In W s, b, denoted as @ altogether. The hy- perparemeter set is < = {Mui, o Pb, of J. which is pre-defined, detailed later. We also pre-define the basis function @ E R
solve the inference
First, we infer the hidden state given rithm (E-step).
gold with the forward backward algo- omit gold for simplicity.
In this step, we will 7z, (1) = p(z,|x; ( Ex, (1) = p(=-11, x gol)). and define (1) =
We define
p(x1...... ,, Lt, 21, (t) = p(2141...., 2T 1 11.... Bt, 2)). Then, we can obtain the rela- tionship 7xc (1) an (0). (t)
Ba (1)p(az (1)p(a. ja..................... (a))a,, (t- ()-1)(((()))-))) az (1)
x()) E (1)
x())
and (t) can be computed iteratively as (az,(t) = p(x, [1,,....
14- 21) Em az (t)((z(2-11);
oz, (1) = ((2))(())))))) Be, =
(c,(t) Es - Bect (t + 1)p(x1+1/21,.... Li, 20-1 (((2)1122))
resulting in p(X)= E Agr (T). With this inferred posterior for z, we can update 0 in the
M-step by maximizing
Q(8, gold) - -E =p )ol) Inp(X, = xx<x|X ((x((22;0)
Ya (1)In((3;;))
Σ
Σ
Eo n. 1. (0
=1
T s
Joe (1) Inp(x; ( Ft 1,;1,,;;0)
More details about the inference can be found in Appendix A.I.I
There are several key hyperparameters in ( requiring pre-defining before inference. (1) Gumbel- Softmax temperature It common choose the temperature r in Humbel-Softmar from [0.1, 1). I is too large, the relaxation will be too soft; if T is too small, numerical issues could arise. In our model,
used to force the soft one-hot close to one corner of the simplex, so we tried 7 e (0.1, 0.2, 0.5}, and found that the result of the one-hot HMM-GLM is not sensitive to T in this range. Given that the selection of r is insensitive to different datasets, we fix 7 0.2, which is common moderate choice. (2) Generative hyperparameters {Mw, o Mb, of): we chose the = -5, d. = 2 and Pe = O, ob since this set provides noninformative priors for the weight strength and the background intensity in GLMs, and hence the inference is insensitive to different datasets.
4

---

Published as a conference paper at ICLR 2024
4 EXPERIMENTAL EVALUATION
Models for comparison. We will compare our methods and state-of-the-art baseline methods on one simulated data and two real neural datasets:
The most original model for discovering neural interactions, without the multiple-state assumption.
GLM (Pillow al. 2008): :
HMM Corr (Engel al. 2016): An HMM for discovering state switches from spike train data. Since this method cannot find neural connectivities but only the latent states, we use a correlation- based method, i.e., cross-cor (CCG) to find the connectivity in each inferred state.
HMM Bern (Ashwood et al., 2022): Similar to the HMM Corr, but uses the Bernoulli rather than Poisson distribution to model the spike count in each time bin.
HG (Escola et al.) 201T): The naive HMM-GLM (HG), which is the only existing model that both infers latent states and learns neural connectivities.
GHG (our method): We abbreviate Gaussian HMM-GLM GHG.
OHG (our method): We abbreviate one-hot HMM-GLM as OHG.
HG-L1 and GHG-L1: Given that the one-hot mechanism implicitly imposes sparsity on the weight matrix, concerns may arise regarding whether the imposition of sparsity solely accounts for OHG's superiority. To address this, we add two more models: one by adding LI penalty to the weight of HG (HG-L1), and another to the weight of GHG (GHG-LI). The LI penalty coefficients are determined through validation.
Metries. We use the following metrics to report performances from different models:
LL. The log- likelikkkood on the test set. A better model should have a stronger ability to predict future spiking events. Note that this is the only metric that can be used on real-world datasets, since there are usually no true states and neural connectivities available for real-world datasets.
State accuracy. The average accuracy of the inferred states across all time bins. This is only applicable to the simulated dataset where we know the true hidden states.
Weight error. The error of the learned weight matrices in all states. Note that there is no weight error for HMM Corr and HMM Bern. Since their learned weights are from CCG, the weights cannot be compared with the weights in the GLM model. This is only applicable to the simulated dataset. Adjacency aceuracy. The balanced accuracy of the learned adjacency matrices in all states. This is only applicable to the simulated dataset. For models without adjacency matrices explicitly modeled, we use
0, max,, mn Moynee of max, m. Warne a
Wen+n' > 0
as
(8)
", min,,,... ". min o.m.n! "n
Wenntn' < 0
to obtain the adjacency matrix from the learned weight matrix. We choose Eq. g since it is an automatic way with a reasonable rationale. We can also use pre-defined threshold to obtain the adjacency matrix, but the accuracy of the connection matrices is very sensitive to the thresholding technique (see Appendix (..)). In real neural data analysis, when we don't have the ground-truth adjacency matrices, we cannot even use such an accuracy metric to select the optimal threshold value. This demonstrates that the explicit adjacency matrices from the OHG provide succinet expression requiring no pre-defined thresholds but rendering satisfactory estimation.
Adjacency prior accuracy. This is only applicable to the simulated dataset. Except for OHG, the adjacency prior is obtained by first averaging the weight matrices across all states and then applying the averaged weight Eq. g
4.1 APPLICATION TO SIMULATED DATA Dataset. We first compare different models on 3-state-20-neuree synthetic dataset with 10 in- dependent trials. For each trial, we generate 20 spike sequences of length T = 5000. Each spike sequence is generated from the generative model in Eq.
6 with TT.s' 0.005 + 0.975 1[s s'), 1.5, and 14b 0, = 0.0008. We sample ag,n'en from
0, Mhe -5, (0.1, 0.8,0.888. 0.1), Vn, n' E (1....,200 20). Note that when T 0, all A, are hard ooe-hot encodings i..dd sampled from Ao- This is equivalent to sample asmaen' from categorical dis- tribution, i.., Os,nenn' ~ Categorical(on... (00,x= Vs E (I,..., ..). Vn, E {I.....201 This introduces some mismatching generative procedures compared with Eq. different models on the first 10 sequences and test on the remaining 10 sequences.
6 For each trial, we train
The quantitative results in Tab. show that OHG is the best in terms of all five metries. GHGs are the second best since GHGs impose shared global prior on the weights. However, they are still worse than OHG, validating that the one-hot component accounts for the better performance of OHG.
5

---

Published as a conference paper at ICLR 2024
Table 1: The quantitative results in terms of 5 metrics the synthetic dataset.
method
LL f
state acc f
weight error
adj acc f
adj prior acc t
GLM
-.43((10.18)
nan(=nna)
24.71(10.11)
43.12(1:0.46)
44.81(10.61)
HMM Corr
-2.653(+0.64)
42.84(+1147)
nan(=-na)
34.04(10.12)
15,45(+:2.49)
HMM Bern
-5.68(+00.23
87.95(+0.93)
nan(+tnan)
40.70(+ 36.25(+00255)
HG
-5.49(+0.58)
37.73(+2.80)
109.67(+22.63)
34.17(+00.88
40.91(+0.48)
HG-LI
9.14(#0.18)
91.60(#0.96)
23.0088)
37.47(=t0.18)
48.44(#0.57)
GHG
8.58(+0.19)
91.80(+0.92)
21.54(#0.15)
42.53((:0:22)
48 48.93(+0.54)
GHG-LI
9.77(#0.20)
92.08(+0.89)
14.16(#0.07)
01.08(+0..2)
46.98(#0.60)
OHG
(4.64()0.23)
92.75(10.87)
10.99(10.21)
73.90(L0.52)
80.60(
Mucorny prtor
Figure 2: Visualization of weight W2 (top row) and adjacency A₂ (middle row) corresponding to state 2 (S in total), and the adjacency prior Ag (bottom row) for all models learned from one trial of the synthetic dataset.
Next, we analyze the neural connectivities learned by different models (Fig. 2}. Although there are S S= 5 different states, one-state GL.M only captures an "average" estimation across the states. For HMM Corr and HMM Bern, the learning procedure is decoupled into two steps, inferring hidden states and estimating the neural connectivity in each inferred state. Although the inferred hidden states from HMM Bern are acceptable, the estimated adjacency in each state and the adjacency prior still bad. For HG, the poor performance is mainly from an incorrect estimation of the transition matrix, which leads to a bad inference the hidden state sequence (Fig. [7] in Appendix (7) and hence results in wrong weight and adjacency estimation. Comparing HG with GHG and OHG, conclude that constraint (i.e., a prior) on different states is necessary for a stable result, since the shared information between different states can help prevent the inferred states and the weights in different states from falling into extremes or bad local optima. Adding an LI penalty could suppress some of the noisy weights but still not helpful for estimating the adjacency in each state and the shared adjacency prior, as L1 does not enhance discrimination between weak and no connection. The main difference between GHG and OHG their weight and adjacency estimations. GHG still has many noisy non-zero weights. With the one-hot setting in OHG, the sparsity of the network is easily learned, and connections with zero interactions are successfully suppressed, which leads to lower weight error and better adjacency accuracy (the weights, adjacencies, and the adjacency prior learned by OHG match the true the best in Fig. 2
4.2 APPLICATIONS TO ELECTROPHYSIOL.CO
DATA
4.2.1 PREFRONTAL CORTEX DURING A CONTINGENCY TASK
Dataset. We first apply different models to prefrontal cortex (PFC-6) dataset (Peyrache et al. 2018 I Neural spike trains were collected while a rat learned a behavioral contingency task. During recording. the animal performed trial for about 4 secs and then took short break for about 24 secs. The spike train data used for learning and testing is segmented from the long session. Each sequence starts from 5 seconds before behavior start and lasts for 10 seconds after the start. Hence, each sequence corresponds to a behavioral trial. We use of the neural sequences as the training set and the remaining 3 as the test set. The neural spikes are binned into 750 time bins with bin size 20 ms. Since we do not know the true number of hidden states, we try (2, 3, 4, 5).
https://crroosrrr///aaaassssfsf

---

Published as a conference paper at ICLR 2024
Table 2: The log-likelihood on the test set for different models and different numbers of states of the
PFC-6 dataset. The result from the one-state GL.M -3.03((=0.00..
method
2 states
3 states
4 states
5 states
HMM Cor
-37.11(10.000
36.53((10.00) -6.600(0..00)
-6..68(10.00)
HMM Bemn
-36.89(10.00)
-36.38(10000)) -3.557(10.00)
(6.00((0
HG
-37.30(+0.05)
-37.61(+0.17)
-37.22(+0.14)
-36.98(+0.19)
HG-L1
-36.91(+0.01)
-36.90(+0.02)
-36.73(+0.09)
-36.63(+0.13)
GHG
-37.11(20.01) -37.17(#0.00)
-37.12(#:0.00)
-37.11(20.00)
GHG-LI
-36,94(+0.00)
-36.88(+0.00)
-36.83(10.00)
-3..77(
OHG
-5.02((10.002
-3..79(10.002)
-3..77(10.033)
-5..0)
GLM
HMM Cor
HMM Bern
HG
HG-L1
GHG
GHG-L1
ONG
02
61
adjocency prlor
Figure 3: Visualization of weight Wa (top row) and adjacency A, (middle row) corresponding to state 4 (S = 4 in total), and the adjacency prior Ao (bottom row) for all models learned from the PFC-6 dataset.
Tab. shows that the test log- logeliios of OHG with all different numbers of states consis- tently better than others. Fig. [3] shows an example of the weights and adjacencies estimated by different models. For HG, the learned weight matrices are pretty dense and noisy, resulting in bad test log-likelihood. For GHG, the weights are less dense but still noisy. Adding L1 penalties to HG and GHG helps reduce some noisy weight entries, but does not help discriminate between a weak connection and no connection. Using OHG, we can get much clearer strength-adjaceng, decom- position and also obtain an adjacency prior. The global restriction provided by the adjacency prior shapes the functional connectivities as the anatomical connectome does, which improves OHG's test log-likelinne logllikelhoodd Note that GLM actually achieves a reasonably good result, only worse than OHG. This indicates that in such real-world scenarios, functional connectivities in different states indeed share a global static structure (may reflect anatomical connectome), outweighing differences between different states and hence should be taken into account. For S > 5, the perfor- mance does not increase significantly and becomes flat (Fig. 10 in Appendix A..4).
functional
Although there is ground truth of hidden states, can integrate the behavioral data analyze the inferred hidden states from different models. Pick 4 states as an example. In Fig. we plot the hidden state prediction of one incorrect trial (Fig, [A) and one correct trial (Fig. 4B.. We also plot the corresponding rat movement on the right-hand side and color it according to the inferred states from OHG. As previously observed, HG continues yield state prediction characterized by significant noise and limited interpretability. Although the number of hidden states is set as S = 4, GHG only infers two effective hidden states. The transition from state 4 state typically happens when the rat turns back at the wrong target location. However, OHG is able to find four explainable effective hidden states. Before each trial, the rat goes back to the root of the Y-shaped maze (starting point), corresponding to state 4. Then the rat turns around at the starting point and goes forward to the turning point of the Y-shaped maze, corresponding to state 3. After making the decision, the rat enters into state 2 in one arm of the Y-shaped maze, to reach the destination. If the rat goes to the correct target location, gets a reward at the target and will stay state 4 for a long while. But the rat goes to the incorrect target location, there is reward and the rat will go back immediately, corresponding to state 1. This state interpretation is reflected the colored rat trajectory in Fig. 4 Note that these state patterns are not from cherry-picking. We do observe similar state transitions

---

Published as a conference paper at ICLR 2024
incorrect trial
B)
correct trial
HoWe
Gits HG11
OHG
ONS
connect
incoreett
Figure 4: Inferred hidden states of an incorrect trial (A) and correct trial (B) from various models including HG, GHG, and OHG. The rat trajectory on the right- side of each one colored according to the hidden states inferred from OHG.
among other more correct and incorrect trials, which can be checked and validated in Fig. g in Appendix A.4 We also perform an analysis of task information decoding from the inferred hidden states (Fig. 9 Appendix A.4) to further validate the rationality this interpretation.
4.2.2 BARREL CORTEX DURING WHISKING
Dataset. We next apply different models to electrode recordings of the somatosensory (barrel) cortex in mice during a shape discrimination task (Rodgers et al. 2021; Rodgers 2022, Nogueira al. 2023) (Fig. 5A). Mice were trained to discriminate concave from convex shapes using only their whiskers. In particular, the mice are required to actively whisk in order to make contact with the object; high-speed video of whisker motion movement of the whiskers to sense the environment. Here we use 27 sessions from 5 different mice. The number of recorded neurons varies from 10 to 44 across sessions. Six seconds from each trial is included in the analysis, and spike trains are discretized with time bin of ms. The first 30 trials are used in the analysis of each session, of which 10 randomly selected trials form the test set when evaluating the test log-likellng likelihood, and the remaining 20 trials are used for training the model.
collected, allowing analysis of the active
Given that we do not have good knowledge about the behavioral states, we try different numbers of hidden states for the barrel cortex data, i.e., S = {2, 3, 4, 5)... The log-likelihoods of the models fit the barrel cortex dataset show similar trends to the PFC-6 dataset. OHG consistently has the highest log- likelihdo,ood, and GHG generally exhibits greater log-likelihood compared to other baseline models across different numbers of hidden states (See Fig. 5)
Fig. 5C shows the whisker positions, contacts, and inferred hidden states of each model. We select the case of S = 2 hidden states here for visualization. While the lig-likelihood OHG increases as S increases to 5, for S >>> 2, there many sessions with rarely occupied states, and the distinction between different states becomes subtle. Results for 3-5 states are shown in Appendix A.5 When two states assumed, is typically observed that one of the states inferred by GHG and OHG coincides with active whisking events during which contacts occurred, while the states inferred from HG switch very frequently.
While GHG and OHG correlated with whisking events similarly, the durations of the inferred states different (Fig. (F.. OHG infers stable state with duration over that persists over whisking cycles, while the inferred states from GHG switch rapidly with short durations (< 0.1 s). OHG thus better captures sustained whisking cycles (Deschènes al. (2012); Rodgers et al. [202 )). Fig. 5DD
further shows the weight and adjacency matrices, and the adjacency prior estimated by each model for the same session shown in Fig. [SC. As in the PFC-6 dataset, we observe that only OHG learns sparse and clear weight matrices, while the ones learned by HG and GHG are denser and noisier.
We further test the idea that the states inferred from GHG and OHG are related to the active whisking events statistically. We compute the frequency with which whisker contacts are initiated in each state, and perform a x" test against the expected frequencies if no relation between the states and contacts is assumed. Among 11 sessions where all three models result in inferred state frequencies that are not completely skewed (the least frequent state was inferred in at least 5% of the time steps), the null hypothesis is rejected (p < 0.001) in 6 sessions (54%) for HG and in 8 sessions (73%) for both GHG and OHG. Furthermore, across all sessions, we compute the sum of all elements in the weight matrix W of the state associated with whisker contacts and that of the other state. When
8

---

Published as a conference paper at ICLR 2024
A)
D)
State 1
State
weight
adjacency prior
HG
adjacency
(.0.9, 0.51
Time
Shape moving
Shape stops Ifar, med, close)
Choice (5)
B)
log-likellhood
normalized log-likelinood
state
state
weight
adjacency prior
GHG
number of states
adjacency
GHG
whister anglc (Glg)
50
state 1
state 2
inferred states contacts
weight
p.c.
OHG
Jow
adjacency
ONG GMG Hi
adjacency
sratee 2
1230m
Time
Figure 5: A) Experimental setup for the whisking task (adapted from Nogueira et el. (2023)). B) Test (normalized) log-likelihoods from different models. Error bars are not shown for raw log-likelihood (left) due to extremely high session-by-session variation. To account for this, the normalized log- likelihood is also shown (right). C) An example trial of whisker positions (top panel), whisker contacts with the object (middle), and the inferred states (bottom). f = 0 s is the time at which the response window is opened (after which the licking direction of the mouse is considered as its decision), and the stimulus presented at approximately adjacency priors of the three models in the example session shown in C.
-1 s. D) Weights, adjacencies, and
comparing the distribution of total weight between whisking and non-whisking states, OHG results significant increase the weights during whisking states (p = 0.008, two-sided Wilcoxon rank- sum test), while HG and GHG do not (p 0.1). This suggests that OHG is capable of detecting shifts functional interaction tied to switching behavioral states.
CONCLUSION
We develop novel one-hot HMM-GLM (OHG) to estimate time-varying functional connectivity in multi-state neural systems. The newly proposed OHG decomposes the traditional weight matrix in GLMs into a discrete adjacency matrix representing the connection type and a positive-valued strength matrix. When building OHG, we place common Gumbel-Softme cency matrices for all states, enforcing the adjacency matrices to learn shared information. We ar- gue that the regulated adjacency matrices with their shared prior should inform about underlying anatomical connectome and thus uncover the "more likely" physical interactions between neurons. The less restricted strength matrices are allowed change freely without shared prior across differ- ent states, and hence can provide us with sufficient flexibility to capture functional variations across multiple brain states. We argue that OHG is more biologically plausible given the aforementioned benefits. Gaussian HMM-GLM (GHG) serves as an intermediate model with shared prior directly on weight matrices without (one-hot) composition is critical for the success of multi-state inference. The experiments show that when compared with alternatives, OHG gets better connectivities and hidden states. It not only accurately recovers the true connectivities for simulated data but also achieves the best predictive likelihood on test spike trains for a PFC dataset and a barrel cortex dataset. The uncovered connectivities and hidden state sequence from OHG are more interpretable for these real neural datasets.
prior over the adja-
-aengghhadjacnncyy decomposition, confirming that such a de-

---

Published as a conference paper at ICLR 2024
REFERENCES
Guy Ackerson and K Fu. On state estimation in switching environments. IEEE transactions on automatic control, 15(1)100-17, 1970.
Jeffrey Anderson, Ilan Lampl, Iva Reichova, Matteo Carandini, and David Ferster. Stimulus depen- dence two-state fluctuations of membrane potential in cat visual cortex. Nature Neuroscience, 3(6):617-621, 2000.
Zoe C Asswooo, Nicholas A Roy, Iris R Stone, International Brain Laboratory, Anne E. Urai, Anne K Churchland, Alexandre Pouget, and Jonathan W Pillow. Mice alternate between discrete strategies during perceptual decision-making. Nature Neuroscience, 25(2):001221,, 2022.
Christopher M Bishop and Nasser M Nasrabadi. Pattern Recognition and Machine Learning, vol- ume 4. Springer, 2006.
Chaw-Bing Chang and Michael Athans. State estimation for discrete systems with switching pa- rameters, IEEE Transactions Aerospace and Electronic Systems, (3):418-425, 1978.
Martin Deschênes, Jeffrey Moore, and David Kleinfeld. Sniffing and whisking rodents. Current Opinion in Neurobiology, 22(2):243-250 2012.
Tatiana A Engel, Nicholas A Steinmetz, Mare Gieselmann, Alexander Thiele, Tirin Moore, and Kwabena Boahen. Selective modulation of cortical state during spatial attention. Science, 354 (6316):1100-1144, 2016.
Sean Escola, Alfredo Fontamini, Don Katz, and Liam Paninski. Hidden markov models for the reipunus-rspponse relationships of multistate neural systems. Neural computation, 1375 2011.
Emily Fox, Erik Sudderth, Michael Jordan, and Alan Willsky, Nonparametric bayesian learning of switching linear dynamical systems. Advances in neural information processing systems, 21, 2008.
Erhan Genç, Marieke Louise Schölvinck, Johanna Bergmann, Wolf Singer, and Axel Kohler. Func- tional connectivity patterns of visual cortex reflect its anatomical organization. Cerebral Cortex, 3619):371 2016.
Zoubin Ghahramani and Geoffrey E Hinton. Switching state-space models. Technical report, Tech- nical Report CRG-TR-96-3 DRAFT, Dept. of Computer Science, University of..., 1996.
Zoubin Ghahramani and Geoffrey E Hinton. Variational learning for switching state-space models. Neural computation, 12(4):8318844 2000.
Joshua Glaser, Matthew Whiteway, John P Cunningham, Liam Paninski, and Scott Linderman. Re- current switching dynamical systems models for multiple interacting neural populations. Ad- vances in neural information processing systems, 33: 13:17777-4488 2020.
Clive WJ Granger. Investigating causal relations by econometric models and cross-spectral methods. Econometrica: Journal of the Econometric Society, pp. 424-438, 1969.
Bilal Haider, Alvaro Duque. Andrea Hasenstaub, Yuguo Yu, and David McCormick. En- hancement of visual responsiveness by spontaneous local network activity in vivo. Journal of Neurophysiology. 97(6):4186 4202, 2007.
James D Hamilton. Analysis of time series subject to changes in regime. Journal of econometrics, 45(1-2):3 1990.
Conor Houghton. Calculating the mutual information between two spike trains. Neural Computa- tion, 31(2):33--443, 2019.
Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. arXiv preprint /..10/ 144, 2016.
10

---

Published as a conference paper at ICLR 2024
Xiaoxuan Jia, Joshua H Siegle, Séverine Durand, Greggory Heller, Tamina K. Ramirez, Christof Koch, and Shawn R Olsen. Multi-regional module-basee basele signal transmission in mouse visual cortex. Neuron, 110(9)1585-1199 2022.
Weihan Li, Yu Qi, and Gang Pan. Online neural sequence detection with hierarchical dirichlet point process. Advances in Neural Information Processing Systems, 35:6654-6665, 2022.
Scott Linderman, Ryan P Adams, and Jonathan W Pillow. Bayesian latent structure discovery from multi-neuron recordings. Advances Neural Information Processing Systems, 29, 2016.
Scott Linderman, Matthew Johnson, Andrew Miller, Ryan Adams, David Blei, and Liam Paninski. Bayesian learning and inference in recurrent switching linear dynamical systems. In Artificial Intelligence and Statistics, pp. 914 PMLR, 2017.
Chris J Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. arXiv preprint arXiv:1611.00711 2016.
Maxime Morariu-Patrichh and Mikko S Pakkanen. State-dependent hawkes processes and their application to limit order book modelling. Quantitative Finance, 22(3):563-583, 2022.
Kevin P Murphy. Switching kalman filters. 1998.
Namrata Nadagouda and Mark A Davenport. Switched hawkes processes. In ICASSP 2021-2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 5170- 5174. IEEE, 2021.
Ramon Nogueira, Chris Rodgers, Randy M Bruno, and Stefano Fusi. The geometry cortical representations of touch in rodents. Nature Neuroscience, pp. 1-12, 2023.
A Peyrache, M Khamassi, K Benchenane, SI Wiener, and F Battaglia. Replay of rule-learning related neural patterns the prefrontal cortex during sleep. Nature Neuroscience, 12(7):919- 2009.
Peyrache, M Khamassi, K Benchenane, Wiener, and Battaglia. Activity of neurons rat medial prefrontal cortex during learning and sleep. 2018.
Jonathan W Pillow, Jonathon Shlens, Liam Paninski, Alexander Sher, Alan M Litke, EJ Chichilnisky, and Eero P Simoncelli. Spatio-temporal correlations and visual signalling in complete neuronal population. Nature, 454((207):995 2008
CC Rodgers, R Nogueira, B Christina Pil, EA Greeman, JM Park, YK Hong. S Fusi, and RM Bruno. Sensorimotor strategies and neuronal representations for shape discrimination. Neuron, 109: 2308-2325, 2021.
Chris Rodgers. A detailed behavioral, videographic, and neural dataset on object recognition in mice. Scientific Data, 9()):620, 2022.
Maria V Sanchez-Vivee and David A McCormick. Cellular and network mechanisms of rhythmic recurrent activity in neocortex. Nature Neuroscience, 31100110771103, 2000.
Thomas Schreiber. Measuring information transfer. Physical Review Letters. 85(2):461, 2000.
S Murray Sherman. Tonic and burst firing: dual modes of thalamocortical relay. Trends in neuro- 2001.
sciences,
Joshua H Siegle, Xiaoxuan Jia, Séverine Durand, Sam Gale, Corbett Bennett, Nile Graddis, Greg- gory Heller, Tamina K Ramirez, Hannah Choi, Jennifer A Luviano, et al. Survey of spiking in the mouse visual system reveals functional hierarchy. Nature, 592(7852):86-92, 2021.
Yule Wang, Zijing Wu, Chengrui Li, and Angi Wu. Extraction and recovery of structure in latent dynamics alignment with diffusion model. Advances Neural Information Processing Systems, 36, 2024.
Feng Zhou, Quyu Kong, Yixuan Zhang, Cheng Feng, and Jun Zhu. Nonlinear hawkes processes in time-varying system. arXiv preprint urXiv:2106.048.. 2021.

---

Published as a conference paper at ICLR 2024
A APPENDIX
A.1 INFERENCE AND LEARNING ALGORITHMS FOR HMM-GLM
A.1.1 FORWARD-BACKWAR INFERENCE
In this part, we compute the posterior probability given the old parameter gold, which is the E-step of the EM algorithm. Define
(2) (t) == Xx; 00ld) Ec, 1.a, (1) p( p(ze-1; 2x xx ;0ld)
(9)
where 24 indexes one of the S different states.
Define
azz (t) = p 2t,
(10)
12, (1) == p1 (01.,,.... Dt,
and we have
p(X, 22)
Yee (t)
p(X)
Dr, 24 21. IT 1
Fz, 2z)
(11)
p(X)
0z,, 0,,, (t)
p(X)
as, (t) = p(x1
Zt, 21)
pp (11
...... R1-11;
= 1
21 11 2t) Σ p( 21
21-1
=p(x,
11 ze) Σ 21.1,...,,,,,, ((
(12)
=
8t-1 1: 2x)
Σ
.. 24 bot 1)p(
8-11
=p(x./211..... 01-1. 21 Σ
p(a
Zt-1
=p(2:/211.... 21-1. 21) Σ az (t)p(20(((1)
with the initial condition
Oz (1) = p(21, 21) = ((2))(())))))
(13)
(t) =p(=:11............. 21.., 21)
Σ p(E 211 E1 1t, 21)
Σ p
Ft, 241 ",.
)p( 12.... x1,44)
R141
Σ (1 v., ",,
(14)
2+41
2. 2. 244 242)44)pp (p4))((241))))
Σ
Bzun (t ( ()) 11.. 2., 2
2641
12

---

Published as a conference paper at ICLR 2024
with the initial condition Bay (T) 1, since in Eq. 11
Yer (T) p( 2T X) p(X, 2r 32+
p(x, 2r) p(x)
(15)
((x)
If we sum both sides of Eq.
Ez, O2., (1)
= Σ Nec (1)
p(X)= Σ (t)
(16)
p(X)
and we can simply use p(X)= = Eer a.ry (T) when
S (t) =p(2)-1,2) (X)
p X 24-11 Zz )p 2/ (22-1, 2t)
x(X)
p X 14-11 Zt )p( 2 20|22- )p((p)((p (2)-1))
p (XX)
p( ........... FT E1 It-
21 24
(p((2-1)
((X)
p(a
3T 11
Ct.
2-14-11 24 p( I1.... 2.. ,t 1)p(zelz0-1)
((X)
p( FT 11
Tt. 24 (2
11...... Lt- 2e) 20) 1)p(ze/2o-1)
p(X)
(e,(t)p(2,) 11-1. 21 a - (t 1)p(21 2-1)
p(X)
(17)
A.1.2 BAUM-WELCH ALGORITHM
Now, we already have the posterior, and we proceed the M-step of the EM algorithm.
T
T
= =((1
II
p(x, æ1..... 2;-1,24;0)
(18)
In Inp(X, 2; Inp(21;0) Σ
Inp(z (2p(2)(21-110)
In pa 01, ; (19)
2=
Notice that
s
Q(0, (old) = Σ
Ya (1) +
Σ
Σ
Sz. 1. (1pp((/z1))))
=1=1
1=1=
(20)
T
s Ns. (t) x1. 21-1,,
Problems regarding the scaling factor in the the Viterbi algorithm for predicting the most probable hidden sequence are identical to the plain HMM, which can found (Bishop & Nasrabadi, 2006).
algorithm for numerical stability and
13

---

Published as a conference paper at ICLR 2024
A.2 THRESHOLD
Fig. 6 shows the balanced accuracy of the adjacency matrices and the adjacency prior matrix by thresholding function of the threshold varying from to 0.5. The plots demonstrate that, in general, the accuracy very sensitive to the threshold.
adjacency
adjacency prior
GHG
OHG
balanced accuracy
0.6
0.5
0.4
0.0
0.1
0.2
0.3
0.4
0.5
0.0
0.1
0.2
0.3
0.4
0.5
threshold
Figure 6: Using different thresholds to discretize the weight to obtain the adjacency and adjacency prior. The straight dashed red line is the balanced accuracy Ao obtained by OHG directly.
14

---

Published as a conference paper at ICLR 2024
A.3 SYNTHETIC DATASET
Fig. 7 shows the state inference of all models on one of the synthetic spike trains.
Irue
IOMM Seen MMM Carr
NO
HC41
GMQ
GHG413
QHG
1000
2000
time
3000
4000
5000
Figure 7: The inferred state sequences of all models applied the one trial of the synthetic spike train data. Different colors represent different states.
15

---

Published as a conference paper at ICLR 2024
A.4 PFC-6 DATASET
A.4.1 STATES VISUALIZZATION OF CONSECUTIVE TRIALS
Fig. 8 shows the inferred state sequences of all models on trials 15-24.
consecutive trials from trial 15 to trial 24
state 1
2
stare
itart (stimuucs onset)
end
incorect brial end
Figure 8: The inferred state sequences of all models applied to consecutive trials of the PFC-6 spike train data.
A.4.2 DECODING TASK INFORMATION FROM INFERRED LATENT STATES
To further confirm our interpretation regarding the inferred states from OHG, we use logistic regres- sion to decode the correctness of cach trial from the inferred states. Specifically, each trial is viewed as a data point in logistic regression. The input variable is the one-hot representation of the inferred hidden states of size S T. We the one-hot representation since the state in each time bin is categorical variable. The output is binary variable, representing the correctness of a trial. We use 2/3 trials to train the logistic regression and test on the remaining 1/3 trials.
Fig. 9 shows that the logistic regression fitted to the inferred states from OHG obtains the highest decoding accuracy. This means the inferred states from OHG do include enough information related to the correctness of each trial. From the interpretation in the main content, we mention that the animal will enter state if is correct trial because of obtaining the reward the correct target lo- cation. This is consistent with the positive coefficients of state at the end period of trials, indicated by the black square in Fig.
HMM-GLM, accuracy 0.72
000
100
200
Caussian HMM-GLM, accuracy: 0.56
state
0.0
0.1
1.00
200
300
600
500
600
700
accuracy:
0.05
0.00
3-
2005
100
200
300
500
600
100
Figure 9:
Coefficient matrices of logistic regression models correctness LogisticRegres- sion(inferred states) and the corresponding accuracy.
16

---

Published as a conference paper at ICLR 2024
To further confirm the irreplaceable role of the inferred latent states in predicting trials' correctness, we train multilayer perceptron (MLP) neural network with one hidden layer of size 100 (we tried different MLP configurations and selected the best one) predict the correctness of each trial di- rectly using the neural spike train as the input. The test accuracy is only 0.72, which significantly worse than OHG. This implies that OHG plays very important role in summarizing the task in- formation from the neural spike train, similar to the irreplaceable role of the convolutional layers in CNN.
A.4.3
OHG WITH UP TO 20 STATES
-3565
7280
-3570
7260
-3575
1bg (Relnoos
3560
7180
-3555
35
19
states
States
Figure 10: OHG's log-likelihood (left) and Bayesian information criterion (BIC) (right) w.r.t. up to 20 number of states. The performance does not increase significantly and becomes flat when S > 5.
time
Figure 11: Inferred states of OHG with up 20 number of states. Although more numbers of states are assumed, only around four effective states are learned and the interpretations are all similar to that of the 4 states explained in the main content.
17

---

Published as a conference paper at ICLR 2024
A.5 BARREL CORTEX DATA WITH 5 HIDDEN STATES
As noted in the main text, OHG exhibits increasing test log-likelihood with an increasing number of states S. When S 5, there were typically 2 3 dominant states inferred from OHG, with the other states being inferred only rarely across the sessions. Fig. 12 shows an example of trial with S OHG exhibits one dominant hidden state (blue) with the other states being inferred for short intervals of duration 0.1-0.3 S, showing complex activation patterns in the vicinity of whisker contacts. The corresponding weight and adjacency matrices are shown in Fig. 13 Further analysis is needed to determine the significance of such states.
angle (deg)
whisker
20
contacts
000
C2
HG
inferred states
GHG
OHG
-2
-1
2
Time (s)
Figure 12: Example trial from barrel cortex data with S = hidden states.
18

---

Published as a conference paper at ICLR 2024
con ca
weight
HG
0deedo
2 2.021
adjacency prior
1d0e00
adjacency
weight
GHG
.2 00-41
adjacency prior
adjacency
5.06.1
2.
weight
OHG
6.0+000
adjacency prior
adjacency
5.6 61
50021
Figure 13: Weights, adjacencies, and adjacency prior for each state of HG, GHG, and OHG applied
to the barrel cortex data session shown in Fig. 12
19

---

Published as a conference paper at ICLR 2024
A.6 SUBPOPULATION (MULTI-REGION PROBLEMS
Although all HMM-GLMs in this paper including newly proposed GHG and OHG only work for one global prior, still possible to apply the model to multi-region data. For example, C groups of neurons N1, N2.... ....... Nc evolve largely independently and only rarely communicate. Further, assume each group of neurons has its own global structure and its own number of states St, ..., Sc. Then, we can reduce such problem into model with one single globally shared ..... structure diag( A1,, A2.0.... Ac,o). Then, there will be 5 S x S2 x ... x Sc states for the whole groups of neurons total.
For better illustration, we run a simple example on C = 3 subpopulations (groups) and each group has neurons and states. Therefore, we need model of 15 neurons and states accommodate this configuration.
A)
200
0.008
0.4
1p Welhood
100
0.006
weiht
0.004
0.2
0.3
pifer
0.3
0.2
-200
01
0.1
HG
GHG
OHG
HG
GHG
OHG
HG
GHG
CHG
HG
GHG
OHG
HG
GHG
OHG
8)
state 0
state
state 2
State
state
state 5
state
state 7
110
GHC
ONG
time
Figure 14: A) The quantitative results with 5 metrics for HG, GHG, and OHG. B) The learned weight matrices in all states. The top-left block represents the weight matrices corresponding to group I; the middle block represents the weight matrices corresponding to group the bottom-right block represents the weight matrices corresponding to group 3. C) The true and inferred states by HG, GHG, and OHG. colors represent states. Particularly, at each time bin if the state is ($1, $2, 33), then the overall state is the 2 x + 2 $9 + 20 x $3. Le., (S1, $2, $3) is the binary encoding the overall state s.
Fig. I4A shows that OHG is better than HG and GHG in terms of LL and weight error. For state accuracy, adjacency accuracy, and adjacency prior accuracy both GHG and OHG are better than
20

---

Published as a conference paper at ICLR 2024
HG. However, since these models are not targeted tasks including subpopulations, the overall state accuracies for all models are worse than usual. The reason is that the state complexity the re- duced problem increases exponentially w.r.t the number of groups. Fig. [4B shows the true weight matrices all 8 combination states (using binary encoding) and the learned weight matrices from HG, GHG, and OHG. Consistent with the weight error reported in Fig. [4p, OHG is better than GHG and is better than HG. Particularly, OHG learns meaningful weight matrices in each group. For example, the top-left block of OHG in states
and corresponds the state O weight matrix of group 1. The top-left block of OHG in states 5 and 6 corresponds to the state I weight matrix of group c Fig. [4C qualitatively shows that the inferred states from GHG and OHG are an acceptable level compared with the true overall state transitions.
A.7 RELATIONSHIPS TO SLDS, RSLDS, AND MP-RSLDS
Instead of considering state switching on neural connectivities as our HMM GLM--ased models,
SLDS (Ackerson & Fu 1970, Chang & Athans 1978 Hamilton 1990 Ghahramani & Hinton
1996 2000 Murphy] 1998: Fox et al. 2008). rSLDS (Linderman et al. 2016 2017). and mp-rSLDS (Glaser et al. (020)) consider state switching on underlying linear dynamics governing the observed spike trains. Besides, mp-rSLDS also considers incorporating prior information (such as anatomy) into the linear mappings different states. However, its shared prior known hyperparameter, but the shared global prior in our GHG and OHG are learnable.
Although SLDS, rSLDS, and mp-rSLDS don't learn neural connectivities different states explic- itly, both SLDS-based models and HMM-GLM GLMM-based models learn discrete state switches from spike trains. Since we don't consider multi-region or subpopulations in this work, we compare the inferred states from OHG with those from SLDS and rSLDD on the PFC-6 dataset.
Fig. 15 shows the inferred states from SLDS and rSLDS exhibit fast-switching phenomena, which hinders their interpretability. This result might imply that state switching over neural connectivities could be an important assumption that should taken into account when dealing with spike train data collected from multi-stage experiments.
consecutive trials from trial to trial
state
state 2
state
state
trial start (stimulus onset)
correct trallend
Incerrect triil end
Figure 15: The inferred states from OHG, SLDS, and rSLDS applied to consecutive trials of the PFC-6 spike train data.
21

---

Published as a conference paper at ICLR 2024
A.8 SCALABILITY LARGE NUMBERS OF NEURONS
From the synthetic dataset, we observe that the state accuracies of all HMM-GLM-based models start to drop when there are 40-50 neurons. To this scale, there will be than S x [1600, 2500] edges (connections) that need to be learned in the network, which introduces challenges in deter- mining the correct state switches. Under such situations, the effectiveness of both the E-step and the M-step in the algorithm would be mutually influenced by each other. However, this does not mean that the HIMM-LLM-BRE be worth trying HMM-GLM GL-G-LM-A M-based models even if the data consists of a large number of neurons, since Fig. sooss that the per-neuron fog-likelihood does not drop when increasing the number of neurons. This means that HMM-GLM- models (especially OHG) can still predict firing rates effectively for spike train data reconstruction. We would like to view this as an important future direction.
models cannot be applied to real-world datasets. It might still
-410
860
per nouron log likelihood
9000
940
method
-90
HMM GLM
Gaussian HMM--GMM
980
One hot HMM GLM
10
20
30
40
50
60
neurens
Figure 16: The per-neuron log-likelihoods of HG, GHG, and OHG w.r.t the number of neurons.
A.9 PRIOR ON THE TRANSITION MATRIX
An intuitive way of suppressing the fast state switches in HG is to add an L2 regularization the transition matrix. However, Fig. 17 shows that when the number of state switches is suppressed, the inferred states are still meaningless. Specifically, most switches happen within a short duration, which looks like nothing but noisy state switches. Only one major state governs the whole trial.
0.
time
Figure 17: The inferred states from HGs with different regularization terms applied to consecutive trials of the PFC-6 spike train data.
22


Reviews:
[{"review_id": "Ttx6ulAozw", "reviewer": "Reviewer_hZX1", "summary": "The paper discusses an extension of generalized linear models for a population of neurons used (binned spike trains under Poisson firing rate assumption)  that involves latent states and factorized latent-state-dependent inter-neuron connection weights.  The latter goes beyond previous work with a specific factorization that involves a mixture factor over at the simplex, which at its extremes provides a one-hot encoding that determines the existence of a connection and its sign (excitatory or inhibitory), and the state-dependent weight magnitude. Estimation of the parameters of this model requires an expectation maximization algorithm, which is briefly described. Baseline models from the literature and additional novel baselines are constructed by involving various aspects of the proposed approach. Results are presented for a synthetic experiment and two real-world data sets, with known task/stimulus/environmental timing.", "questions": "How would the number of states be selected in practice? \n\nHow scalable is the model in terms of subpopulations with their own dynamics?\n\nHow scalable is the model and algorithm in terms of the number of neurons?  \n\nHow quickly can inference be done at run time?", "limitations": "", "rating": 8, "confidence": 4, "soundness": 4, "presentation": 4, "contribution": 3, "strengths": "The paper is an original contribution for GLM models of neuron spike trains. The method and results are well-presented and clear. The figures and equations are clear. A number of baselines are compared and the results are consistent.  From the results it would seem that the latent state inference is meaningful, this could be significant for neuroscientists who wish to study.", "weaknesses": "The synthetic study seems quite limited to the type of data the model is designed for (a single global state).  It is not clear to me how well it will work if the neurons are organized into groups with their own state dynamics (which evolve largely independently) and only rarely communicate. I.e. the topology of the network could be loose connections between tightly interconnected subnetworks. \n\nA principled approach for the selection of the number of states is not discussed. At one point the paper mentions that the log-likelihood is higher with additional states although these states are rare: \"there are many sessions with rarely occupied states, and the distinction\nbetween states becomes subtle\". This seems to be a flaw in the modeling if someone does not know how many true states. Should the reader be suggested to look at the distribution of states to decide? Perhaps a model selection criterion is needed. \n\nAlong similar lines, an analysis of the decoding of task information from the latent state would help understand in the real-world tasks the utility of the state estimate. \n\nQuestions of scaling could provide better significance:\n\nHow scalable is the model and/or the algorithm? New recording technology including optical calcium imaging can record from hundreds to close to thousands of neurons.  The number of neurons in the synthetic study could be ramped up to see this. \n\nIt is not clear how quickly can inference be performed after model fitting. If a neuroscientist wants to use the inferred state to control a stimulus is it possible to operate in real-time with a minimal delay?", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "reKAkcNWkj", "reviewer": "Reviewer_zShZ", "summary": "This paper proposes a prior-informed state-switching generalized linear model with hidden Markov models (HMM-GLM) called one-hot HMM-GLM (OHG), capable of estimating dynamically changing functional interactions under different states. Learnable priors are introduced to capture the state-constant interaction and reveal the underlying anatomical connectome. Experiments on simulated data demonstrated its effectiveness and practical applications achieved interpretable interaction structures and hidden states with the highest predictive likelihood.", "questions": "1. As shown in Table 2, the results of different numbers of states were similar to that of one-state GLM. It can be explained that global static connection patterns dominate functional interactions in all states as mentioned in the manuscript. Then was the state division biologically reasonable? Perhaps only the features of the global prior were extracted or there was only one state.\n2. The experiments fixed the generative hyperparameters and claimed that this set was noninformative priors and insensitive to different datasets. Is there any support for this declaration?", "limitations": "", "rating": 3, "confidence": 4, "soundness": 2, "presentation": 3, "contribution": 2, "strengths": "1. This paper proposed a novel OHG framework to estimate time-varying functional interaction in multi-state neural systems. The one-hot prior yielded better connectivity patterns and hidden states and provided more biological plausibility.\n2. This paper provided detailed algorithms of the proposed model and conducted extensive experiments on both synthetic and real neural datasets to demonstrate its superiority.", "weaknesses": "1. This paper seems to propose two frameworks: the naïve one is GHG and the effective one is OHG. What’s the relationship between them? In the abstract, the authors only mention the two priors (Gaussian and one-hot) without the names of the frameworks. In the conclusion, only OHG is mentioned. Thus, it is confusing.\n2. In the method, the authors first describe OHG and then introduce GHG. They are both variants of HMM-GLM but OHG outperforms GHG. Thus, the order seems unreasonable. What’s more, the experimental results showed that GHG was unable to achieve this paper’s goal. Then what’s the value of GHG?", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "Ait13RqMK0", "reviewer": "Reviewer_G7kx", "summary": "The authors address the challenge of modeling dynamic functional neural interactions. They note that existing methods often lack biological plausibility, primarily because they don't account for the influence of anatomical structures on functional neural interactions. To rectify this, the authors introduce a one-hot prior to the GLM model. The method was evaluated on one synthesized dataset and two real-world datasets, achieving state-of-the-art results.", "questions": "I'm keen to understand the authors' future direction and insights drawn from this research. Does incorporating an increasing number of biological constraints into models always lead to better outcomes? Or are there potential trade-offs to be mindful of? Going forward, are the authors considering other factors that might influence interactions? For instance, within an E-I balanced network, given identical anatomical structures and brain states, interactions could vary based on the stage and phase of short-term synaptic depression. This suggests that intrinsic governing features could arise when adding more biological constraints or features. I'd appreciate the authors' perspective on this.", "limitations": "", "rating": 8, "confidence": 5, "soundness": 4, "presentation": 4, "contribution": 4, "strengths": "This paper is technically robust. The underlying problem is well-defined and builds upon a lineage of substantial research. Drawing insights from neuroscience, the authors convincingly argue that anatomical structures influence dynamic functional neural interactions. Their approach to address this hypothesis is adeptly framed, straightforward, and effective. The evaluation is comprehensive, encompassing a broad spectrum of models related to the problem, and it's tested across varied datasets. The inclusion of the whisking dataset is particularly intriguing, and the visual illustrations enhance clarity. Overall, this paper is commendable and would be a valuable contribution to the ICML community, showcasing the intersections of machine learning and neuroscience research.", "weaknesses": "(1) While the overall presentation of the paper is commendable, there is room for improvement in Sections 2 and 3. These sections could benefit from more intuitive and lucid explanations accompanying the mathematical equations, making it more accessible for readers.\n\n(2) I believe the prior work by Glaser et al. [1] deserves acknowledgment. It might also be valuable to include it in the comparative models, given that their focus on cluster (population) structures aligns with the theme of underlying structures.\n \n[1] Glaser, Joshua, et al. \"Recurrent switching dynamical systems models for multiple interacting neural populations.\" Advances in Neural Information Processing Systems 33 (2020): 14867-14878.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Decision: Accept (poster)