Flexible Bayesian Dynamic Modeling of Correlation and Covariance Matrices

Shiwei Lan, Andrew J. Holbrook, Gabriel A. Elias, Norbert J. Fortin, Hernando Ombao, Babak Shahbaba · DOI

Abstract

Modeling correlation (and covariance) matrices can be challenging due to the positive-definiteness constraint and potential high-dimensionality. Our approach is to decompose the covariance matrix into the correlation and variance matrices and propose a novel Bayesian framework based on modeling the correlations as products of unit vectors. By specifying a wide range of distributions on a sphere (e.g. the squared-Dirichlet distribution), the proposed approach induces flexible prior distributions for covariance matrices (that go beyond the commonly used inverse-Wishart prior). For modeling real-life spatio-temporal processes with complex dependence structures, we extend our method to dynamic cases and introduce unit-vector Gaussian process priors in order to capture the evolution of correlation among components of a multivariate time series. To handle the intractability of the resulting posterior, we introduce the adaptive $\Delta$-Spherical Hamiltonian Monte Carlo. We demonstrate the validity and flexibility of our proposed framework in a simulation study of periodic processes and an analysis of rat's local field potential activity in a complex sequence memory task.

Introduction

In multivariate statistics, modeling covariance matrices—which describe the joint variability of multiple random variables—presents two significant challenges. First, the positive-definiteness constraint requires that any valid covariance matrix must be positive definite (PD). Maintaining this constraint, particularly in dynamic settings where the matrix evolves over time, is computationally demanding. Second, researchers often face rigid priors. The standard Bayesian tool, the Inverse-Wishart distribution, is frequently too restrictive because it forces all components to share the same degrees of freedom. This makes it difficult to model systems where some variables are highly correlated while others remain independent.

This paper introduces a novel Bayesian framework designed to overcome these limitations, providing a flexible and scalable approach for modeling dynamic, high-dimensional dependencies.

Methodology

The proposed framework utilizes a "separation strategy," decomposing the covariance matrix into individual variances and a correlation matrix. The core innovation lies in the geometric representation of the correlation matrix.

Sphere-Product Representation and Flexible Priors

The authors employ a Cholesky-like decomposition where each row is treated as a point on a unit sphere. This geometric construction inherently guarantees that the resulting matrix is positive definite, bypassing the need for rejection sampling or complex constrained optimization.

To allow for diverse dependency structures, the model maps distributions from a simplex (such as the Dirichlet distribution) onto the sphere, creating "squared-Dirichlet" priors. This allows researchers to encode specific prior knowledge, such as favoring sparse correlations or uniform dependencies.

Visualizing the flexibility of squared-Dirichlet priors on a sphere for different concentration parameters $\alpha$.

Dynamic Modeling and Inference

To capture temporal evolution, the framework introduces Unit-Vector Gaussian Processes (uvGP). By extending standard Gaussian Processes to operate on unit vectors, the model allows correlations to "flow" smoothly over time.

Sampling from these complex, constrained spaces is achieved via a specialized algorithm: Adaptive $\Delta$-Spherical Hamiltonian Monte Carlo ($\Delta$-SphHMC). This algorithm accounts for the spherical geometry and automatically tunes its step size and path length, ensuring efficient posterior inference.

Experiments and Results

The framework was validated through both synthetic simulations and real-world neuroscientific data.

Simulation Studies

The authors tested the model on 2D and 100D synthetic datasets featuring periodic processes. The results demonstrated that the model could accurately recover complex, oscillating correlation patterns that change over time. Notably, by assuming a "w-band" structure (where only nearby variables are correlated), the model successfully scaled to 100-dimensional data, proving its utility for modern large-scale problems.

Rat Hippocampus LFP Analysis

The model was applied to Local Field Potential (LFP) signals recorded from 24 electrodes in the CA1 region of a rat's hippocampus during a sequence memory task. The goal was to identify connectivity patterns associated with correct versus incorrect odor sequence identification.

The model identified a critical window approximately 500ms after odor presentation where brain connectivity patterns significantly diverged between correct and incorrect trials. This high-resolution temporal analysis provides a window into the neural dynamics underlying memory retrieval and decision-making.

Discussion

A key advantage of this framework is the decoupling of mean, variance, and correlation, allowing them to evolve independently. This is particularly vital in neuroscience, where a region's average activity level may remain constant even as its functional connectivity with other regions shifts.

While powerful, the current approach has limitations. It is sensitive to the ordering of variables due to the Cholesky-based decomposition. Future work may explore alternative decompositions or hierarchical extensions to account for variation across multiple subjects. Additionally, extending the framework to model precision matrices could help distinguish between direct and indirect interactions in complex networks.

Summary updated

BibTeX
@inproceedings{lan2019flexible,
  author = {Shiwei Lan and Andrew J. Holbrook and Gabriel A. Elias and Norbert J. Fortin and Hernando Ombao and Babak Shahbaba},
  title = {{Flexible Bayesian Dynamic Modeling of Correlation and Covariance Matrices}},
  booktitle = {Bayesian},
  year = {2019},
  doi = {10.1214/19-ba1173},
}
Figure