Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2024 Sep 23;20(9):e1012457.
doi: 10.1371/journal.pcbi.1012457. eCollection 2024 Sep.

Characterizing the dynamics, reactivity and controllability of moods in depression with a Kalman filter

Affiliations

Characterizing the dynamics, reactivity and controllability of moods in depression with a Kalman filter

Jolanda Malamud et al. PLoS Comput Biol. .

Abstract

Background: Mood disorders involve a complex interplay between multifaceted internal emotional states, and complex external inputs. Dynamical systems theory suggests that this interplay between aspects of moods and environmental stimuli may hence determine key psychopathological features of mood disorders, including the stability of mood states, the response to external inputs, how controllable mood states are, and what interventions are most likely to be effective. However, a comprehensive computational approach to all these aspects has not yet been undertaken.

Methods: Here, we argue that the combination of ecological momentary assessments (EMA) with a well-established dynamical systems framework-the humble Kalman filter-enables a comprehensive account of all these aspects. We first introduce the key features of the Kalman filter and optimal control theory and their relationship to aspects of psychopathology. We then examine the psychometric and inferential properties of combining EMA data with Kalman filtering across realistic scenarios. Finally, we apply the Kalman filter to a series of EMA datasets comprising over 700 participants with and without symptoms of depression.

Results: The results show a naive Kalman filter approach performs favourably compared to the standard vector autoregressive approach frequently employed, capturing key aspects of the data better. Furthermore, it suggests that the depressed state involves alterations to interactions between moods; alterations to how moods responds to external inputs; and as a result an alteration in how controllable mood states are. We replicate these findings qualitatively across datasets and explore an extension to optimal control theory to guide therapeutic interventions.

Conclusions: Mood dynamics are richly and profoundly altered in depressed states. The humble Kalman filter is a well-established, rich framework to characterise mood dynamics. Its application to EMA data is valid; straightforward; and likely to result in substantial novel insights both into mechanisms and treatments.

PubMed Disclaimer

Conflict of interest statement

I have read the journal’s policy and the authors of this manuscript have the following competing interests: QJMH has obtained a research grant from Koa Health, and obtained fees and options for consultancies for Aya Technologies and Alto Neuroscience. All other authors report no conflicts of interest.

Figures

Fig 1
Fig 1. Dynamical modelling.
A) Graph visualization of the linear dynamical model including external inputs (ut). zt are the latent dynamical states evolving as a Markov process and generating the mood measurements xt. B) Simulated state variables generated by different dynamic matrices: a) shows a fast process generated by a dynamics matrix with eigenvalues close to 0 and b) a slow process generated by a dynamics matrix with eigenvalues close to 1. C) shows the trajectories of a two-dimensional system (happy and sad) starting from a randomly chosen initial point. Whereas sad decays independently of happy, the trajectory of happy is more complex and does not straightforwardly decay to zero because it is influenced by the sad variable. However, both variables do converge to zero at some point. D) Streamplot demonstrating the evolution of both variables from different starting points. The light blue arrows represent the first eigenvector, while the dark blue arrows represent the second eigenvector. E) displays the evolution of the eigenmodes, the independently evolving trajectories resulting from the projecting of the state variables onto the eigenvectors of the dynamics. F) The left singular vectors (U) of the controllability matrix define an energy ellipsoid where the singular directions corresponding to higher singular values (Σ) are more controllable. The same input strength u has a greater impact along the most controllable (U1) than the least controllable direction (U3).
Fig 2
Fig 2. Identifiability of dynamics in experience sampling setting.
A1-D1) Normalized Root Mean Squared Error (NRMSE) between the known and re-estimated latent states, averaged across emotion trajectories, for different time-series length (A1), emotion dimensionality (B1), measurement noise (C1), and process speed (D1). A2-D2) NRMSE between the known and re-estimated dynamics matrix, for varying time-series length (A2), emotion dimensionality (B2), measurement noise (C2), and process speed (D2). A3-D3) Absolute dot product between eigenvectors of the known and re-estimated dynamics matrix under the influence of different factors: time-series length (A3), emotion dimensionality (B3), measurement noise (C3), and process speed (D3).
Fig 3
Fig 3. Parameter recovery.
A) Correlation matrix between true and re-estimated parameters of all single elements of the matrix A for the dataset without inputs. The off-diagonal correlations are mostly low. B) Correlation between true and re-estimated eigenvalues of the matrix A. C) Absolute dot product between true and re-estimated eigenvectors of the matrix A. Despite the relatively low fidelity in the recovery of individual entries of the matrix A, the overall dynamical structure was recovered reasonably in the dataset without inputs. D) Correlation between true and re-estimated bias parameters. Different components of the bias parameter were differently well recovered in the data without inputs. E) Recovery of eigenvalues of the dynamics matrix A in data with inputs. F) Recovery of eigenvectors of the dynamics matrix A in data with inputs. G) Recovery of singular values of the controllability Gramian C in data with inputs. H) Recovery of left singular vectors of the controllability Gramian C in data with inputs. The dominant component of the controllability Gramian is recovered well.
Fig 4
Fig 4. The Kalman filter captures key qualitative features.
Correlations between dynamical features of empirical individual emotion time-series and simulated time-series using the individual parameter estimates from the state space model (blue) and based on the vector autoregressive (VAR) estimates (yellow). A) Empirical mean averaged over time plotted against the mean of the simulated time-series. B) Empirical autocorrelation vs the autocorrelation of the simulated emotion time-series. C) Empirical root mean squared successive difference capturing frequent and abrupt change vs the root mean squared successive difference of simulated time-series. D) Covariance elements of empirical vs simulated data. E) Autocorrelation evolving over lags for empirical and simulated time-series.
Fig 5
Fig 5. Differences between patients and controls.
A) shows the estimates of the dynamics matrix elements averaged over patients (M ± SEM). B) shows the estimates of the dynamics matrix elements averaged over healthy controls (M ± SEM). The black frame indicates the significant difference between estimates after correcting for multiple comparison. Both averaged matrices reveal a plausible pattern wherein positive items (cheerfulness and contentedness) increase each other while decreasing negative items (anxiety and sadness), and vice versa. C) shows the eigenvector corresponding to the dominant eigenvalue for the patient (blue) and control (orange) group. The bars indicate the mean and the dots individual subjects. Significance *≤0.5, **≤0.1, ***≤0.001, ****≤0.0001. Black frames survive correction for multiple comparisons.
Fig 6
Fig 6. Transitioning between emotion states.
A) shows the eigenvectors corresponding to the dominant eigenvalue of the dynamics matrix for the three different phases. B) shows the left singular vectors corresponding to the dominant singular value of the controllability matrix. C) shows the needed input strength to steer the system to a desired state where negative emotions are low and positive emotions are high. D) shows the simulated mood states based on the optimal input.

References

    1. Liu Q, He H, Yang J, Feng X, Zhao F, Lyu J. Changes in the global burden of depression from 1990 to 2017: Findings from the Global Burden of Disease study. Journal of Psychiatric Research. 2020. Jul;126:134–40. doi: 10.1016/j.jpsychires.2019.08.002 - DOI - PubMed
    1. Angst J. The course of affective disorders. Psychopathology. 1986;19 Suppl 2:47–52. doi: 10.1159/000285131 - DOI - PubMed
    1. Angst J, Gamma A, Sellaro R, Lavori PW, Zhang H. Recurrence of bipolar disorders and major depression. A life-long perspective. Eur Arch Psychiatry Clin Neurosci. 2003. Oct;253(5):236–40. doi: 10.1007/s00406-003-0437-2 - DOI - PubMed
    1. American Psychiatric Association. Diagnostic and Statistical Manual of Mental Disorders (5th ed.). American Psychiatric Pub; 2013.
    1. World Health Organization. International statistical classification of diseases and related health problems (11th ed.); 2019.