summaries: The paper presents a deep Markov factor analysis (DMFA), which is a generative model that employs Markov property in a chain of low dimensional temporal embeddings as well as spatial inductive assumptions in order to capture temporal dynamics in functional magnetic resonance imaging (fMRI). The paper shows that DMFA has capability to cluster fMRI data in its low temporal embedding in regards to subject and cognitive state variability. The advantages of DMFA are demonstrated both through synthetic and application data. The paper Deep Markov Factor Analysis (DMFA): Towards Concurrent Temporal and Spatial Analysis of fMRI Data proposes a scalable approach to factorize the data of each subject into a product of a small number of spatial and temporal components. Following on the work of (Manning et al., Topographic Factor Analysis, Plos ONE 2014) on topographical factor analysis, each spatial component is given by a radial basis function. The temporal components are modeled from a set of latent satisfying the Markov property. The first latent is conditioned on the data class giving to the model clustering capabilities. Variational inference is used to derive a lower bound of the log-likelihood which is then optimized via stochastic gradient descent. In a first experiment on resting state data (Autism dataset), DMFA is used to obtain subject specific atlases that allow to seggregate ASD and control subjects with an accutacy of 60 % (it is definitely hard to read). On a second experiment (Depression dataset), MDD and controls are exposed to different musical stimuli and DMFA is able to seggregate well the data of different subjects without supervision. In some extend it gives some hint about the kind of stimuli and the conditions of the subjects but results are not so convincing (the authors are honest about this).  In a third experiment they show that DMFA gives better results than other methods in terms of held-out log-likelihood and prediction of the next time point given the history. The code for DMFA is available. Pre-trained model are given and the code to generate the figures from pre-trained model works.  This paper introduces Deep Markov Factor Analysis (DMFA). DMFA can model spatiotemporal BOLD fMRI time series by using time-varying latent factors that govern time-varying spatial maps consisting of spatial mixtures of RBFs. Latent time series are associated to a categorical clustering variable in order to enable grouping. Certain links in the Bayesian diagram are modeled using deep neural networks. Optimization is done by a variational approach. Experiments are performed on a simulated data set with known ground truth, the ABIDE autism data set, and a Depression study data set. Some clustering of relevant clinical outcomes is observed.    The authors present deep Markov factor analysis (DMFA) to capture temporal dynamics in functional magnetic resonance imaging data. The method chosen by the authors is relevant since existing methods overlook the highly nonlinear and complex temporal dynamics of neural processes when factorizing their imaging data. The authors claim that their method (DMFA) is able to cluster fMRI data in its low dimensional temporal embedding, which enables validation of fMRI related hypotheses. The paper proposes deep Markov factor analysis (DMFA) that uses the Markov process to capture the temporal dynamics in the fMRI dataset and maps the high spatial dimensions to a low-dimensional feature space. DMFA can cluster fMRI responses into “low dimensional temporal embedding” based on subject or cognitive state. The empirical studies on synthetic and real fMRI datasets illustrate that DMFA generates better performance in comparison with state-of-the-art techniques --- such as NTFA and HTFA.
abstractText: Factor analysis methods have been widely used in neuroimaging to transfer high dimensional imaging data into low dimensional, ideally interpretable representations. However, most of these methods overlook the highly nonlinear and complex temporal dynamics of neural processes when factorizing their imaging data. In this paper, we present deep Markov factor analysis (DMFA), a generative model that employs Markov property in a chain of low dimensional temporal embeddings together with spatial inductive assumptions, all related through neural networks, to capture temporal dynamics in functional magnetic resonance imaging (fMRI) data, and tackle their high spatial dimensionality, respectively. Augmented with a discrete latent, DMFA is able to cluster fMRI data in its low dimensional temporal embedding with regard to subject and cognitive state variability, therefore, enables validation of a variety of fMRI-driven neuroscientific hypotheses. Experimental results on both synthetic and real fMRI data demonstrate the capacity of DMFA in revealing interpretable clusters and capturing nonlinear temporal dependencies in these high dimensional imaging data.
authors.name: Amirreza Farnoosh
references.authors: Alexandre Abraham Michael P Milham Adriana Di Martino R Cameron Craddock Dimitris Samaras Bertrand Thirion Gael Varoquaux
references.title: Deriving reproducible biomarkers from multi-site resting-state data: An autism-based
references.venue: example. NeuroImage,
references.authors: Bahar Azari Christiana Westlin Ajay B Satpute J Benjamin Hutchinson Philip A Kragel Katie Hoemann Zulqarnain Khan Jolie B Wormwood Karen S Quigley Deniz Erdogmus
references.title: Comparing supervised and unsupervised approaches to emotion categorization in the human brain, body, and subjective experience
references.venue: Scientific reports,
references.authors: Mohammad Taha Bahadori Qi Rose Yu Yan Liu
references.title: Fast multivariate spatio-temporal analysis via low rank tensor learning
references.venue: In Advances in neural information processing systems,
references.authors: Philipp Becker Harit Pandya Gregor Gebhardt Cheng Zhao C James Taylor Gerhard Neumann
references.title: Recurrent kalman networks: Factorized inference in high-dimensional deep feature spaces
references.venue: In International Conference on Machine Learning,
references.authors: Christian F Beckmann Stephen M Smith
references.title: Tensorial extensions of independent component analysis for multisubject fmri analysis
references.authors: Samuel R Bowman Luke Vilnis Oriol Vinyals Andrew M Dai Rafal Jozefowicz Samy Bengio
references.title: Generating sentences from a continuous space
references.venue: In 20th SIGNLL Conference on Computational Natural Language Learning,
references.authors: Yongjie Cai Hanghang Tong Wei Fan Ping Ji Qing He
references.title: Facets: Fast comprehensive mining of coevolving high-order time series
references.venue: In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining,
references.authors: Laurent Charlin Rajesh Ranganath James McInerney David M Blei
references.title: Dynamic poisson factorization
references.venue: In Proceedings of the 9th ACM Conference on Recommender Systems,
references.authors: Po-Hsuan Chen Janice Chen Yaara Yeshurun Uri Hasson James V Haxby Peter J Ramadge
references.title: A reduceddimension fmri shared response model
references.venue: In NIPS,
references.authors: Xinyu Chen Zhaocheng He Yixian Chen Yuhuan Lu Jiawei Wang
references.title: Missing traffic data imputation and pattern discovery with a bayesian augmented tensor factorization model
references.venue: Transportation Research Part C: Emerging Technologies,
references.authors: Junyoung Chung Kyle Kastner Laurent Dinh Kratarth Goel Aaron C Courville Yoshua Bengio
references.title: A recurrent latent variable model for sequential data
references.venue: Advances in neural information processing systems,
references.authors: Andrzej Cichocki
references.title: Tensor decompositions: new concepts in brain data analysis
references.venue: Journal of the Society of Instrument and Control Engineers,
references.authors: Pierre Comon Christian Jutten Jeanny Herault
references.title: Blind separation of sources, part ii: Problems statement
references.venue: Signal processing,
references.authors: Cameron Craddock Yassine Benhajali Carlton Chu Francois Chouinard Alan Evans András Jakab Budhachandra Singh Khundrakpam John David Lewis Qingyang Li Michael Milham
references.title: The neuro bureau preprocessing initiative: open sharing of preprocessed neuroimaging data and derivatives
references.venue: Frontiers in Neuroinformatics,
references.authors: Nicha C Dvornek Daniel Yang Pamela Ventola James S Duncan
references.title: Learning generalizable recurrent neural networks from small task-fmri datasets
references.venue: In International Conference on Medical Image Computing and Computer-Assisted Intervention,
references.authors: Joset A Etzel Valeria Gazzola Christian Keysers
references.title: An introduction to anatomical roi-based fmri classification analysis
references.venue: Brain research,
references.authors: Amirreza Farnoosh Hamid Soltanian-Zadeh
references.title: Information theoretic evaluation of brain connectivity compared to cross correlation using simulated resting state fmri data
references.venue: Iranian Conference on Electrical Engineering (ICEE),
references.authors: Amirreza Farnoosh Bahar Azari Sarah Ostadabbas
references.title: Deep switching auto-regressive factorization: Application to time series forecasting
references.venue: In Proceedings of the AAAI Conference on Artificial Intelligence,
references.authors: Marco Fraccaro Simon Kamronn Ulrich Paquet Ole Winther
references.title: A disentangled recognition and nonlinear dynamics model for unsupervised learning
references.venue: In Advances in Neural Information Processing Systems,
references.authors: Soham Gadgil Qingyu Zhao Adolf Pfefferbaum Edith V Sullivan Ehsan Adeli Kilian M Pohl
references.title: Spatiotemporal graph convolution for resting-state fmri analysis
references.venue: In International Conference on Medical Image Computing and Computer-Assisted Intervention,
references.authors: Gary H Glover
references.title: Overview of functional magnetic resonance imaging
references.venue: Neurosurgery Clinics,
references.authors: R Devon Hjelm Eswar Damaraju Kyunghyun Cho Helmut Laufs Sergey M Plis Vince D Calhoun
references.title: Spatio-temporal dynamics of intrinsic networks in functional magnetic imaging data using recurrent neural networks
references.venue: Frontiers in neuroscience,
references.authors: Matthew D Hoffman David M Blei Chong Wang John Paisley
references.title: Stochastic variational inference
references.venue: The Journal of Machine Learning Research,
references.authors: Samuel B Hopkins Jonathan Shi David Steurer
references.title: Tensor principal component analysis via sum-of-square proofs
references.venue: In Conference on Learning Theory,
references.authors: Jocelyn V Hull Lisa B Dokovna Zachary J Jacokes Carinna M Torgerson Andrei Irimia John Darrell Van Horn
references.title: Resting-state functional connectivity in autism spectrum disorders: A review
references.venue: Frontiers in psychiatry,
references.authors: Aapo Hyvarinen Hiroshi Morioka
references.title: Nonlinear ica of temporally dependent stationary sources
references.venue: In Artificial Intelligence and Statistics,
references.authors: Peiguang Jing Yuting Su Xiao Jin Chengqian Zhang
references.title: High-order temporal correlation model learning for time-series prediction
references.venue: IEEE transactions on cybernetics,
references.authors: Fikret Işik Karahanoğlu Dimitri Van De Ville
references.title: Transient brain activity disentangles fmri resting-state dynamics in terms of spatially and temporally overlapping networks
references.venue: Nature communications,
references.authors: Maximilian Karl Maximilian Soelch Justin Bayer Patrick van der Smagt
references.title: Deep variational bayes filters: Unsupervised learning of state space models from raw data
references.venue: In 5th International Conference on Learning Representations,
references.authors: Amirali Kazeminejad Roberto C Sotero
references.title: Topological properties of resting-state fmri functional networks improve machine learning-based autism classification
references.venue: Frontiers in neuroscience,
references.authors: Rahul Krishnan Uri Shalit David Sontag
references.title: Structured inference networks for nonlinear state space models
references.venue: In Proceedings of the AAAI Conference on Artificial Intelligence,
references.authors: Jong-Hwan Lee Te-Won Lee Ferenc A Jolesz Seung-Schik Yoo
references.title: Independent vector analysis (iva): multivariate approach for fmri group study
references.authors: Rebecca J Lepping Ruth Ann Atchley Evangelia Chrysikou Laura E Martin Alicia A Clair Rick E Ingram W Kyle Simmons Cary R Savage
references.title: Neural processing of emotional musical and nonmusical stimuli in depression
references.venue: PloS one,
references.authors: Jeremy R Manning Rajesh Ranganath Waitsang Keung Nicholas B Turk-Browne Jonathan D Cohen Kenneth A Norman David M Blei
references.title: Hierarchical topographic factor analysis
references.venue: In 2014 International Workshop on Pattern Recognition in Neuroimaging,
references.authors: Jeremy R Manning Rajesh Ranganath Kenneth A Norman David M Blei
references.title: Topographic factor analysis: a bayesian model for inferring brain networks from neural data
references.venue: PloS one,
references.authors: Jeremy R Manning Xia Zhu Theodore L Willke Rajesh Ranganath Kimberly Stachenfeld Uri Hasson David M Blei Kenneth A Norman
references.title: A probabilistic approach to discovering dynamic full-brain functional connectivity patterns
references.authors: Sarah Parisot Sofia Ira Ktena Enzo Ferrante Matthew Lee Ricardo Guerrerro Moreno Ben Glocker Daniel Rueckert
references.title: Spectral graph convolutions for population-based disease prediction
references.venue: In International conference on medical image computing and computer-assisted intervention,
references.authors: Karl Pearson
references.title: Liii. on lines and planes of closest fit to systems of points in space
references.venue: The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science,
references.authors: Russell A Poldrack
references.title: Region of interest analysis for fmri
references.venue: Social cognitive and affective neuroscience,
references.authors: Maria Giulia Preti Thomas AW Bolton Dimitri Van De Ville
references.title: The dynamic functional connectome: State-of-the-art and perspectives
references.authors: Rajesh Ranganath Chong Wang Blei David Eric Xing
references.title: An adaptive learning rate for stochastic variational inference
references.venue: In International Conference on Machine Learning,
references.authors: Emile Richard Andrea Montanari
references.title: A statistical model for tensor pca
references.venue: In Advances in Neural Information Processing Systems,
references.authors: Hugo Richard Luigi Gresele Aapo Hyvärinen Bertrand Thirion Alexandre Gramfort Pierre Ablin
references.title: Modeling shared responses in neuroimaging studies through multiview ica
references.venue: In Advances in Neural Information Processing
references.authors: Mark Rogers Lei Li Stuart J Russell
references.title: Multilinear dynamical systems for tensor time series
references.venue: In Advances in Neural Information Processing Systems,
references.authors: Eli Sennesh Zulqarnain Khan Yiyu Wang J Benjamin Hutchinson Ajay Satpute Jennifer Dy Jan-Willem van de Meent
references.title: Neural topographic factor analysis for fmri data
references.venue: Advances in Neural Information Processing Systems,
references.authors: Chandan Singh Beilun Wang Yanjun Qi
references.title: A constrained, weighted-l1 minimization approach for joint discovery of heterogeneous neural connectivity
references.venue: graphs. CoRR,
references.authors: John Z Sun Dhruv Parthasarathy Kush R Varshney
references.title: Collaborative kalman filtering for dynamic matrix factorization
references.venue: IEEE Transactions on Signal Processing,
references.authors: Lei Sun Yanfang Xue Yining Zhang Lishan Qiao Limei Zhang Mingxia Liu
references.title: Estimating sparse functional connectivity networks via hyperparameter-free learning model
references.venue: Artificial Intelligence in Medicine,
references.authors: Lijun Sun Xinyu Chen
references.title: Bayesian temporal factorization for multidimensional time series prediction
references.venue: CoRR, abs/1910.06366,
references.authors: Koh Takeuchi Hisashi Kashima Naonori Ueda
references.title: Autoregressive tensor factorization for spatio-temporal predictions
references.venue: IEEE International Conference on Data Mining (ICDM),
references.authors: Nicholas B Turk-Browne
references.title: Functional interactions as big data in the human
references.venue: brain. Science,
references.authors: Erik-Jan Van Kesteren Rogier A Kievit
references.title: Exploratory factor analysis with structured residuals for brain network data
references.venue: Network Neuroscience,
references.authors: M Alex O Vasilescu Demetri Terzopoulos
references.title: Multilinear independent components analysis
references.venue: IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’05),
references.authors: Lebo Wang Kaiming Li Xu Chen Xiaoping P Hu
references.title: Application of convolutional recurrent neural network for individual recognition based on resting state fmri data
references.venue: Frontiers in neuroscience,
references.authors: Mingliang Wang Jiashuang Huang Mingxia Liu Daoqiang Zhang
references.title: Modeling dynamic characteristics of brain functional connectivity networks using resting-state functional mri
references.venue: Medical image analysis,
references.authors: Manuel Watter Jost Springenberg Joschka Boedecker Martin Riedmiller
references.title: Embed to control: A locally linear latent dynamics model for control from raw images
references.venue: In Advances in neural information processing systems,
references.authors: Liang Xiong Xi Chen Tzu-Kuo Huang Jeff Schneider Jaime G Carbonell
references.title: Temporal collaborative filtering with bayesian probabilistic tensor factorization
references.venue: In Proceedings of the 2010 SIAM international conference on data mining,
references.authors: Weizheng Yan Vince Calhoun Ming Song Yue Cui Hao Yan Shengfeng Liu Lingzhong Fan Nianming Zuo Zhengyi Yang Kaibin Xu
references.title: Discriminating schizophrenia using recurrent neural network applied on time courses of multi-site fmri
references.venue: data. EBioMedicine,
references.authors: Hsiang-Fu Yu Nikhil Rao Inderjit S Dhillon
references.title: Temporal regularized matrix factorization for high-dimensional time series prediction
references.venue: In Advances in neural information processing systems,
sections.heading: 1 Introduction
sections.text: Functional magnetic resonance imaging (fMRI) has been extensively used in cognitive neuroscience to study brain structures and their interactions at rest or during a cognitive task [Glover, 2011]. fMRI also provides insights into how brain’s functional connectivity changes during different experimental conditions [Preti et al., 2017, Azari et al., 2020]. However, due to high dimensional nature of fMRI data (tens of thousands of voxels in few seconds-long sessions), analyzing functional connectivity of brain could get very challenging [Turk-Browne, 2013]. Most classical methods employ region of interest (ROI)-based approaches to reduce size of data for processing [Poldrack, 2007, Etzel et al., 2009, Farnoosh and Soltanian-Zadeh, 2017, Gadgil et al., 2020]. However, averaging across many voxels within each region could wash out signals from small number of task-relevant voxels with noise from non-activated voxels, therefore results in a loss of information [Poldrack, 2007].
  35th Conference on Neural Information Processing Systems (NeurIPS 2021)
  Recently, few approaches have been proposed, based on probabilistic generative models, for topographic factorization of fMRI data into a weighted summation of few localized activation sources (i.e., temporal weights and topographic spatial factors), among which topographic factor analysis (TFA) [Manning et al., 2014b] and its multi-subject extension, hierarchical TFA (HTFA) [Manning et al., 2018], and neural TFA (NTFA) [Sennesh et al., 2020] are the most noted ones. This factorization serves as a necessary preparation step for subsequent statistical analysis that can effectively characterize subject- and stimulus-level variations and reveal task- or cognitive state-related networks in brain. However, TFA approaches assume a prior in which temporal weights are conditionally independent as a function of time, which means they do not encode temporal dynamics. Given the non-linearity and complex time-dependencies inherent in fMRI, a model is required that can capture and represent these dependencies.
  In this paper, we propose deep Markov factor analysis (DMFA)1, a Bayesian model for factorization of fMRI data that learns a deep generative Markovian prior to reason about nonlinear temporal dynamics. This is realized by a chain of low dimensional temporal embeddings related through neural networks. This prior is further augmented by a discrete latent for multimodal dynamical estimation, and clustering subject- and task-level variations directly in its low dimensional temporal embedding. To accommodating high spatial dimensionality, DMFA generatively parameterize spatial factors from a low dimensional spatial latent through neural networks.
  We evaluate the performance of DMFA on a synthetic and two real large-scale fMRI datasets. Our experiments demonstrate that DMFA uncovers meaningful clusters in these data and achieves better predictive performance for unseen data relative to the state-of-the-art.
sections.heading: 2 Related Work
sections.text: Factor Analysis in fMRI: Factor analysis in neuroimaging includes a wide range of approaches for reducing data dimensionality to facilitate their interpretability and computational tractability. Principal component analysis (PCA) [Pearson, 1901] and independent component analysis (ICA) [Comon et al., 1991] are among the most well-known classical factor analysis methods. To accommodate tensor data and mitigate scalability issues, multilinear versions of PCA and ICA have been proposed in Vasilescu and Terzopoulos [2005], Beckmann and Smith [2005], Cichocki [2011], Richard and Montanari [2014], Hopkins et al. [2015]. Specifically, for multi-subject fMRI study, Lee et al. [2008] proposed independent vector analysis (IVA) and Richard et al. [2020] developed MultiView ICA to model shared responses. Likewise, Chen et al. [2015] developed a shared response model (SRM) for aggregating multi-subject fMRI data and highlighting group differences, and Van Kesteren and Kievit [2021] incorporated structured residuals into the exploratory factor analysis (EFA) framework. Karahanoğlu and Van De Ville [2015] deconvolved hemodynamic response from rest fMRI time series and then performed temporal clustering on the resulting whole-brain innovation signals to recover the corresponding spatial patterns. However, spatial factors obtained by these methods are unstructured, often have the same size as the images in the original dataset, and may include many small and large voxel clusters across the brain, therefore are not directly interpretable [Manning et al., 2014b]. More important, these methods are permutation invariant along temporal dimension (i.e., do not assume any relationships between temporal dimensions), therefore do not model temporal dynamics [Yu et al., 2016].
  To enhance spatial interpretability, Manning et al. [2014b] introduced topographic factor analysis (TFA), a probabilistic technique that casts each brain image as a weighted sum of Gaussian spatial factors. In this way, each Gaussian blob (a.k.a topographic factor) can be thought of as a brain region for which activation levels are estimated over time, and is easily interpreted through its set of parameters. Later on, authors proposed a hierarchical version of TFA (HTFA) [Manning et al., 2018] to incorporate data from multiple subjects and enable hypothesis testing across subjects by applying hierarchical Gaussian priors for global and subject-specific parameters of temporal and topographic factors. These linearly-dependent hierarchical Gaussian priors, though, favor estimation of unimodal distributions and limit the model’s expressivity. Recently, Sennesh et al. [2020] proposed neural TFA (NTFA) for task fMRI, which extends TFA by incorporating neural networks onto its framework. NTFA assumes separate latent embeddings for participants and stimuli and map them into the temporal and spatial latents with neural networks. However, methods in this line of work
  1The source code is available at https://github.com/ostadabbas/DMFA
  essentially assume a prior in which temporal weights are conditionally independent as a function of time, which means that they do not encode temporal dynamics.
  Dynamical Factorization: A number of matrix/tensor factorization approaches have been proposed for modeling temporal dynamics in sequential data. These methods employ linear-Gaussian statespace models [Sun et al., 2014], autoregressive temporal regularizer [Bahadori et al., 2014, Yu et al., 2016, Takeuchi et al., 2017], and multilinear dynamical systems [Rogers et al., 2013, Cai et al., 2015, Jing et al., 2018]. In contrast to these methods which provide point estimates, Bayesian dynamical factorization has been proposed in Xiong et al. [2010], Charlin et al. [2015], Sun and Chen [2019], in which linear temporal dynamics are applied to factor latents. While some of these methods have been successful in dynamical modeling of sequential data, they are less effective for high dimensional spatial data like fMRI as they do not explicitly adopt any structural constraints for spatial factors. Moreover, their linear dynamical assumptions lack the capacity to characterize nonlinear dependencies.
  Motivated by recent advances in deep learning, several studies have implemented neural networks into Gaussian state space models for nonlinear dynamical modelling [Krishnan et al., 2015, Watter et al., 2015, Chung et al., 2015, Karl et al., 2017, Krishnan et al., 2017, Fraccaro et al., 2017, Becker et al., 2019, Farnoosh et al., 2021]. A common practice is to learn a temporal latent model followed by a mapping to data space, a.k.a. a decoder, and an encoder for amortized variational inference. However, this encoding/decoding framework is not tractable in very high dimensional spatial data like fMRI. To be more specific, it is computationally intensive to feed high dimensional data for amortized estimation, or map to them directly from a latent space (see Section 4.1 for a detailed discussion). Also, several studies have employed recurrent neural networks (RNNs) for temporal analysis of fMRI data [Hjelm et al., 2018, Dvornek et al., 2018, Yan et al., 2019, Wang et al., 2019]. RNN-based methods are not probabilistic and can only process reduced dimensional ROI data. Although convolutional RNN models can capture both temporal and spatial correlations, by construction they do not provide the familiar spatial correlation maps that we expect in neuroimaging analysis and that are necessary for neuroscientific interpretability. In addition, RNN model are harder to train on long sequences due to the vanishing/exploding gradient problem as they feed parameters sequentially. While this problem is much alleviated in LSTM, GRU, and Transformer models, these architectures still result in a huge computational graph and intense GPU memory consumption on long sequences, which leads to very long training times. In contrast, DMFA, as will be explained below, samples from a distinct posterior distribution at each time point and can fit arbitrarily long sequences without any issues (by allowing parallel computations over time), and at the same time infers smooth spatial factors automatically.
sections.heading: 3 Deep Markov Factor Analysis (DMFA)
sections.text: Let’s assume a corpus of N fMRI data {Yn |n ∈ [1:N ]} for Yn ∈ RT×V , where T and V are the number of time points and voxels, respectively. DMFA defines a hierarchical dynamical deep generative model over this corpus in a factorization framework:
  Yn ∼ Norm(W>n Fn, σYI), Wn ∼ Norm(µWθ (ZWn ), σWθ (ZWn )),
  Fn = [ fk,v := RBFk(v; ρk, γk) ] ,
  ρ, γ ∼ Norm(µFθ(zFn), σFθ(zFn)), zFn ∼ Norm(0, I), ZWn ∼ pθ(ZWn |Cn), Cn ∼ Cat(π).
  where Fn ∈ RK×V are K V spatial factors and Wn ∈ RK×T are their associated temporal weights, consistent with a factorization framework. pθ(ZWn |Cn) is a deep generative Markovian prior over a set of low dimensional temporal latents ZWn = {zWn,t | t ∈ [0:T ]}
  conditioned on a discrete latent Cn for clustering. The temporal weights Wn are sampled from a Gaussian distribution whose mean and covariance are a function of ZWn and are parameterized by neural networks µWθ and σ W θ , respectively. The spatial factors Fn are determined by a set of K radial basis functions (RBFs) whose parameters {ρ, γ} are sampled from a Gaussian distribution parameterized by neural networks µFθ and σ F θ from a low dimensional spatial latent z F n. All networks have parameters, which are collectively denoted by θ. Finally, σY denotes observation noise. The graphical model for DMFA is depicted in Fig. 1.
  Clustering Latent: We assume that each fMRI data Yn belongs to a specific cluster s ∈ [1:S] which is declared by its associated discrete latent Cn ∼ Cat(π) sampled from a categorical prior with assignment probability vector π. This discrete latent conditions the first temporal latent zWn,0 resulting in a Gaussian mixture distribution over this temporal latent:
  pθ(z W n,0|Cn = s) = Norm(µs,Σs),
  where µs and Σs are determined by cluster assignment.
  Deep Generative Markovian prior: We assume that the temporal latents ZWn are related through a Markov chain, for which the transition probability pθ(zWn,t|zWn,t−1) = Norm(µZθ(zWn,t−1), σZθ(zWn,t−1)) is a Gaussian distribution whose mean and covariance are parameterized by neural networks from zWn,t−1. We further blend the estimated mean from neural network with a linear transformation of zWn,t−1 to support both nonlinear and linear transitions (we dropped n for brevity):
  µZθ(z W t−1) = (1− g) µ Z,L θ (z W t−1) + g µ Z,NL θ (z W t−1)
  where µZ,Lθ (·) represents a linear mapping, µ Z,NL θ (·) is the nonlinear mapping of neural network, and g ∈ [0, 1] is a weighting vector estimated from zWt−1 with another neural network. Temporal Weights & Spatial Factors: As with the transition model, we assumed Gaussian distributions for temporal weights, such that their means and covariances are a function of their associated temporal latents:
  wn,t ∼ Norm(µWθ (zWn,t), σWθ (zWn,t)), where µWθ and σ W θ are neural network functions. The high spatial dimensionality in fMRI data encourages the need for a hierarchical analysis that summarizes spatial factors with fewer parameters. Therefore, consistent with Manning et al. [2014b,a, 2018], we represent each spatial factor as a radial basis function (i.e., a Gaussian blob):
  fkv := RBFk(v; ρk, γk) = exp ( − ‖pv − ρk‖ 2
  exp (γk)
  ) ,
  where pv ∈ R3 denotes the position of voxel with index v, and ρk, γk ∈ R3 denote the center and extent of the Gaussian blob, respectively. The set of all RBF parameters {ρk, γk | k ∈ [1:K]} ∼ Norm(µFθ(z F n), σ F θ(z F n)) are sampled from a Gaussian distribution whose mean and covariance are a function of the shared spatial latent zFn. Introducing z F n as a low dimensional spatial embedding encourages estimation of a multi-modal distribution among spatial factors.
sections.heading: 3.1 Learning DMFA with Variational Inference
sections.text: We train DMFA with stochastic variational methods [Hoffman et al., 2013, Ranganath et al., 2013]. These methods approximate the posterior pθ(W,ZW, zF,C, ρ, γ|Y ) using a variational distribution qφ(W,Z
  W, zF,C, ρ, γ), where φ denotes parameters of the variational model, by maximizing a lower bound on the log-likelihood of the data:
  L(θ, φ) = log pθ(Y )− KL ( qφ(W,Z W, zF,C, ρ, γ) || pθ(W,ZW, zF,C, ρ, γ|Y ) ) .
  By maximizing this bound with respect to the parameters θ and φ, we learn a deep generative model and perform Bayesian inference, respectively.
  Parameterizing Variational Distribution: We assume a fully factorized variational distribution and introduce trainable variational parameters for each data as mean and covariance of a diagonal Gaussian:
  qφ(W,Z W, zF,C, ρ, γ) = N∏ n=1 q(Cn)q(zWn,0)q(z F n) K∏ k=1 q(ρn,k, γn,k) T∏ t=1 q(zWn,t)q(wn,t),
  where q(·) for continuous latents are parametric Gaussian distributions. Note that due to the high dimensionality of fMRI data (V N , i.e., number of voxels are much larger than number of data), we do not utilize an amortized inference (where a single parametric function maps each data to a set of variational parameters) as it could be computationally very expensive and result in over-fitting (see Section 4.1). Although we can define variational parameters for categorical distributions q(Cn), we approximate it with posterior p(Cn|zWn,0) to compensate information loss induced by the mean-field approximation:
  q(Cn = s) ' p(Cn = s|zWn,0) = p(Cn = s)p(zWn,0|Cn = s)∑S s=1 p(Cn = s)p(z W n,0|Cn = s)
  This approximation has a two-fold advantage: spares the model additional trainable parameters for variational distribution, and further links variational parameters of qφ(zWn,0) to generative parameters of pθ(zWn,0) and pθ(c), hence results in a more robust learning and inference algorithm.
  Derivation of Evidence Lower Bound (ELBO): Once the generative model and variational distribution are determined, we can derive the ELBO which contains a reconstruction term and regularization terms for each latent to bring their variational posterior as close as possible to their generative prior: Ln(θ, φ) = Eqφ(Wn)qφ(ρn,γn) [ log pθ(Yn|Wn, Fn) ] (Likelihood)
  − ∑ Cn qφ(Cn) KL ( qφ(z W n,0)||pθ(zWn,0|Cn) ) − KL ( qφ(Cn)||p(C) ) (Clusters)
  − ∑ t Eqφ(zWn,t−1) [ KL ( qφ(z W n,t)||pθ(zWn,t|zWn,t−1) )] (Markov Transitions)
  − ∑ t Eqφ(zWn,t) [ KL ( qφ(wn,t)||pθ(wn,t|zWn,t) )] (Weights)
  − ∑ k Eqφ(zFn) [ KL ( qφ(µn,k, γn,k)||pθ(µn,k, γn,k|zFn) )] − KL ( qφ(z F n)||p(zF) ) . (Factors)
  We compute Monte Carlo estimate of gradient of the ELBO using a reparameterized sample from the variational distribution of continuous latents. For the discrete latent, Cn, we compute the expectations over qφ(Cn) by summing over all the possibilities, hence no sampling is performed. We analytically calculate the KL terms of ELBO for both multivariate Gaussian and categorical distributions, which leads to lower variance gradient estimates and faster training as compared to e.g., noisy Monte Carlo estimates often used in the literature.
sections.heading: 4 Training Details
sections.text: We described the network architectures of DMFA in Table 1, where Dt and De are the dimensions of hidden layers for (µZθ, σ Z θ) and (µ W θ , σ W θ ), respectively. We did all the programming in PyTorch v1.3 and used Adam optimizer with learning rate of 0.01. We initialized all the parameters randomly except for locations of Gaussian blobs for which we set initial values to local extrema in their averaged fMRI data. We clipped Gaussian blob parameters to the confines of brain if needed. We used a linear KL annealing schedule, [Bowman et al., 2016], which increased from 0.01 to 1 over 100 epochs. We learned/tested all models on an Intel Core i7 CPU @3.7 GHz with 8 Gigabytes of RAM, which proves tractability of the learning process. Per-epoch training time varied from 0.1 minutes in small datasets to 6.0 minutes in larger experiments and 200 epochs sufficed for most experiments.
sections.heading: 4.1 Discussion of Parameter Count for DMFA
sections.text: The number of learnable parameters for variational distribution in DMFA is O(NTK). DMFA has O(KDe+Dt) parameters for its temporal generative model and O(K) parameters for its spatial generative model. Note that the clustering latent, C, does not impose additional parameters to the variational distribution, while only adds O(S) parameters to the temporal generative model.
  While DMFA introduces extra features and more complex modeling assumptions for fMRI experiments compared to TFA methods of Manning et al. [2014b,a, 2018], (i.e., infers nonlinear temporal dynamics and performs clustering), we emphasize that it has the same order of parameters as these methods. TFA methods similarly have O(NTK) parameters as they employ a fully factorized variational distribution. We also want to highlight that DMFA is tractable in very high dimensional spatial data like fMRI in contrast to nonlinear state-space models of Watter et al. [2015], Krishnan et al. [2017], Fraccaro et al. [2017], Karl et al. [2017], Becker et al. [2019]. The encoder/decoder structure in these works, i.e., qφ(Wn|Yn)/pθ(Yn|Wn), immediately scales both generative and variational parameters to at least O(KV), where V ∼ 105 NT in fMRI data, hence causes extensive computational burden and more importantly overfitting. Furthermore, these methods do not learn a generative model for spatial factors, i.e., pθ(ρ, γ), and as a result are not able to reason about subject-level variabilities in this respect. We overcome these challenges in DMFA by carefully designing our non-amortized variational inference and imposing functional form assumptions on spatial factors in a factorization framework. The proposed learning and inference algorithm keep generative parameters in O (KDe + Dt) O(KV), and variational parameters in O(NTK), where NT ∼ 102 − 105, yield an observation to parameter ratio of O( NTVNTK ) = O( V K ) for all the experiments, therefore permit an efficient learning process.
sections.heading: 5 Experimental Results
sections.text: We analysed the performance of DMFA on a synthetic and two large-scale fMRI datasets. In the first experiment, we verified DMFA’s capability in recovering the true clusters and capturing the underlying temporal dynamic in a synthesized fMRI dataset (visualized in Fig. 2). Next, we evaluated the performance of DMFA on a large scale resting-state fMRI data, Autism dataset [Craddock et al., 2013], and a task fMRI data, Depression dataset [Lepping et al., 2016]. We assessed the clustering feature of DMFA on both datasets in terms of disease and cognitive state separation tasks, visualized in Fig. 3 and Fig. 4. We further provided a quantitative comparison with two state-of-the-art Bayesian generative models for fMRI data, HTFA [Manning et al., 2018] and NTFA [Sennesh et al., 2020], and a deep state-space model, RKN [Becker et al., 2019], in terms of synthesis quality of the generative models on both datasets by computing held-out log-likelihood and prediction accuracy, respectively, in Table 2.
sections.heading: 5.1 Synthetic fMRI
sections.text: We generated synthetic fMRI data using a MATLAB package provided by Manning et al. [2014b], which is known to be useful for analysing fMRI models. The synthesized brain image for each trial (time point) is a weighted summation of a number of radial basis functions (spatial factors) randomly located in brain. This synthesized fMRI data is then convolved with a hemodynamic response function (HRF) and zero-mean Gaussian noise with a medium-level signal-to-noise ratio is added. Here, we considered 30 activation sources (spatial factors) randomly located in a standard MNI-152-3mm brain template with roughly V = 270, 000 voxels and 150 trials. We randomly split these 30 activation sources into 3 groups, each having 10 of the Gaussian blobs. These three groups of sources are periodically activated according to some random weights, one after another, for 5 trials. We generated non-overlapping sequences of T = 5 time points from this synthetic fMRI data. This resulted in 10 data points for each activation group (i.e., N = 30). To train DMFA, we set T = 5, K = 30, Dt = 2, De = 8, S = 3, and σY = 0.01. As depicted in Fig. 2 (a), DMFA was able to successfully recover the 3 clusters of activation that were present in this dataset totally unsupervised. The dynamical trajectory of each cluster mean in the temporal latent (i.e., µzWt |µzWt−1 ,C) is predicted sequentially from the learned generative model and is visualized in the bottom-right of Fig. 2 (a), and appears to be partitioned into three consecutive rotational dynamics. This is consistent with the periodic activations of sources in data clusters (which come in tandem). Predictions of the learned generative model for a selected activation source are visualized in Fig. 2 (d) for the next 50 time points, estimated as follows: wt ∼ p(wt|zt), where zt ∼ p(zt|zt−1) for t = {151, . . . , 200}. These predicted samples perfectly follow hemodynamic response function, confirming DMFA’s capacity in capturing the underlying nonlinear HRF by using neural networks in its deep temporal generative model.
sections.heading: 5.2 Autism Dataset
sections.text: We used the publicly available preprocessed resting state fMRI (rs-fMRI) data from the Autism Brain Imaging Data Exchange (ABIDE) collected at 16 international imaging sites [Craddock et al., 2013]. This dataset includes rs-fMRI imaging from 408 individuals suffering from Autism Spectrum
  Disorder (ASD), and 476 typical controls. Each scan has T = 145 ∼ 315 time points at TR = 2, and V = 271, 633 voxels. We split the signals into sequences of 75 time points. We take two approaches to evaluate the performance of DMFA in separating ASD from control: (i) Cluster data directly in the low dimensional latent, ZW, using the clustering feature of DMFA (called DMFA), (ii) Extract functional connectivity matrices, [Hull et al., 2017], from learned temporal weights, W , followed by a 10-fold SVM for classification (called DMFA+SVM). As baselines, we performed a 10-fold SVM classification on extracted connectivity matrices from (i) averaged signals of 116 ROIs in automatic anatomical labeling (AAL) atlas [Kazeminejad and Sotero, 2019] (called ROI+SVM) and (ii) a hundred time courses obtained with nonlinear spatial ICA of Hyvarinen and Morioka [2017] (called ICA+SVM). Several studies have been done on this dataset to differentiate ASD group from control [Abraham et al., 2017, Parisot et al., 2017, Singh et al., 2017, Kazeminejad and Sotero, 2019, Wang et al., 2021, Sun et al., 2021], all of which using supervised methods, and could achieve accuracies up to 72% using the signals extracted from anatomically labeled regions in the brain by carefully splitting data to be as homogeneous as possible and reducing site-related variability.
  We set T = 75, K = 100, De = 15, Dt = 5, S = 2, σY = 0.01, and trained DMFA for 200 epochs on the entire dataset (Full), and also datasets from 9 imaging sites (with more balanced datasets) separately: Caltech, Leuven, MaxMun, NYU, SBL, Stanford, UM, USM, Yale. As shown in Fig. 3 (Right), DMFA and DMFA+SVM outperformed baselines in Caltech, SBL, Stanford, and Yale (at p-value < 0.005, corrected for multiple comparisons), while ROI+SVM and ICA+SVM only performed better in NYU dataset. DMFA+SVM performed slightly better than baselines on the entire dataset (Please note that DMFA is a clustering approach, hence, no error bars are provided for it in Fig. 3). Clustering results for Caltech, Maxmun, SBL, and Stanford are shown in Fig. 3 (Left) in which ASD and control seems to be partially separable (see Fig. S1 in supplementary for more visualization results).
sections.heading: 5.3 Depression Dataset
sections.text: In this dataset [Lepping et al., 2016], 19 individuals with major depressive disorder (MDD) and 20 never-depressed control participants listened to standardized positive and negative emotional musical and nonmusical stimuli during fMRI scanning. Each participant underwent 3 musical, and 2 nonmusical runs each for 105 time points at TR=3 with V = 353, 600 voxels. During each run, each stimulus type (positive, and negative) was presented for 33 seconds (∼ 11 time points) interleaved with instances of neutral tone of the same length. We discarded instances of neutral tone, and split each run into non-overlapping sequences of T = 6 time points in agreement with stimuli design (each stimuli block is split into two sequences). In other words, each run has 4 sequences associated with “positive stimuli”, and 4 with “negative stimuli” resulting in a total of 8 data points for each run.
  In the first experiment, we trained DMFA on the entire musical runs (N = 39 × 3 × 8 = 936) by setting T = 6, K = 100, De = 15, Dt = 5, σY = 0.001 for 200 epochs. The results are shown in Fig. 4 (a, Left). We observed that DMFA fully separated the data points associated with each subject into distinct clusters across the low dimensional temporal latent space. In other words, DMFA was able to re-unite pieces of signals associated with each subject without any supervision. More importantly, DMFA was able to partially separate the data points associated with MDD group from control. As seen in Fig. 4 (a, Left), the MDD group data points are fairly populated in the center of temporal latent while control group are dispersed across the latent space. However, DMFA was not able to meaningfully separate “negative” and “positive” music pieces in its low-dimensional latent space from a subject-level perspective, since the variation between runs of a subject dominates the stimulus-level variation. For this reason, in a second experiment, we focused on 5 subjects, and their first musical run from both MDD and control group and trained DMFA respectively. Again, as expected, data points from each subject were distinctly clustered in the latent space (see middle and right columns in Fig. 4 (a)). Additionally, DMFA was able to fit two partially separating Gaussians to “positive”, and “negative” stimuli per subject. However, since the number of data points for each subject and run is limited, the significance of these clusters are not conclusive. A dataset with longer runs could possibly answer that.
sections.heading: 5.4 Comparison with State-of-the-Art
sections.text: We further evaluated DMFA against HTFA [Manning et al., 2018], an established probabilistic generative model for multi-subject fMRI analysis, which uses unimodal Gaussian priors for both temporal weights and spatial factor parameters, and its neural network-based extension NTFA [Sennesh et al., 2020] in terms of held-out log-likelihood, and a state-of-the-art deep state-space model, recurrent Kalman networks (RKN) [Becker et al., 2019], in terms of next-time-point prediction accuracy of test set (see Table 2). Held-out likelihood is an established metric for evaluating generative models (in lack of a ground-truth) and measures how probable an unseen data is under the generative model. For next-time-point prediction, we adopt a rolling prediction scheme as in Chen et al. [2019], and predict next time point on the test set sequentially from historical data using the generative model and spatial factors learned on the train set.
  We split our data to train and test as follows. We used the Caltech site subset from autism dataset and split each subject’s fMRI time series into two half (each with T = 70). We trained the models on the first half, and tested on the second half. For the depression dataset, we considered 4 sequences from each subject’s run for training and tested on the remaining 4 sequences. We set K = 100 spatial factors for all the models and trained each with their default hyperparameters. For the RKN model, we fit AAL atlas ROI signals as it is intractable to feed raw high-dimensional data. We reported average normalized prediction error (NRMSE%) for both RKN and DMFA on AAL atlas regions to make a fair comparison. For the synthetic fMRI, we set K = 30 and picked half of the data for test, and used the 30 Gaussian blob activations as ROI signals for reporting prediction accuracy in RKN and DMFA. The results are shown in Table 2, which proves that DMFA resulted in models with higher likelihood on the test sets, hence it is a better fit when compared to NTFA and HTFA models. DMFA also resulted in better predictions on the test sets of autism, depression, and synthetic datasets when compared with RKN.
sections.heading: 5.5 Ablation Study
sections.text: We performed two ablation studies to further evaluate (and quantify) the impact of deep neural networks and Markov temporal apriori. First, we trained a version of DMFA in which we removed nonlinear activation functions (i.e., PReLU), denoted as DMFA. As reported in Table 2, in our datasets, this resulted in a decrease in held-out likelihood. Also, the inferred temporal latents lacked the interpretable patterns seen in Fig. 3 and Fig. 4 in terms of clinical/cognitive separability as latents collapsed into the conditional Gaussian priors. Second, we trained a version of DMFA in which we removed the temporal connections (i.e., temporal transition model), denoted as DMFA. Again, this resulted in a drop in held-out likelihood as reported in Table 2, however, the temporal latents preserved their interpretable patterns.
sections.heading: 6 Conclusion
sections.text: We presented deep Markov factor analysis, DMFA, a new probabilistic model for robust factor analysis of high dimensional fMRI data. We employed a chain of low dimensional Markovian latents connected by deep neural networks and conditioned on a discrete latent as a state-space embedding for temporal weights to account for nonlinear dynamics, enable data clustering in a low dimensional space, and provide informative visualizations about data. To tackle high spatial dimensionality in fMRI, we employed a low dimensional spatial embedding to generatively parameterize spatial factors. DMFA proves fast and capable on large-scale fMRI data.
sections.heading: Acknowledgment
sections.text: This work was supported by award numbers 1944964 and 1835309 from the national science foundation (NSF). The authors would also like to thank the anonymous reviewers for their insightful feedback.
title: Deep Markov Factor Analysis: Towards Concurrent Temporal and Spatial Analysis of fMRI Data