Anticipating short-term affective instability in bipolar disorder represents a longstanding challenge in computational psychiatry. Early signalling of transitions from stable to depressive, manic, or mixed states could support just-in-time interventions, yet real-world digital phenotyping datasets rarely provide dense temporal sampling, precise transition labels, or sufficient event frequency for training predictive models. To address these methodological barriers, we construct a clinically principled synthetic dataset of multimodal behavioural signals for 50 virtual subjects monitored over 60 days. Six behavioural modalities, physical activity, sleep duration, social interaction, voice features, keystroke dynamics, and screen time are generated 12 times daily using state-specific Gaussian processes modulated by circadian dynamics. A transition-aware labelling function marks the preceding 12 samples of each state change as switch imminent. A sliding-window procedure yields 11,800 sequences consisting of 12 consecutive time steps across 6 behavioural modalities (12 time points × 6 features), creating a highly imbalanced binary classification task (≈8% positive sequences). We develop a lightweight transformer encoder (199,619 parameters) optimized for short sequence modelling and computational efficiency. The model achieves 55.38% accuracy, 0.622 ROC-AUC, 0.597 sensitivity, and 0.174 F1-score on the stratified held-out set. Although performance remains modest due to the synthetic environment’s noise and imbalance, the model successfully identifies temporal micro-patterns preceding transitions patterns not detectable from static features. Behavioural distributions, intramodality correlations, sequence-level label frequencies, training dynamics, confusion structure, and ROC analysis collectively contextualize the model’s discriminative capacity. This synthetic benchmark provides a reproducible, mathematically grounded testbed for developing early-warning algorithms for bipolar instability. Our findings demonstrate that compact transformers can operate effectively under heavy noise and imbalance, offering a viable foundation for future real-world digital phenotyping systems.
Cite this paper
Filippis, R. D. and Foysal, A. A. (2026). A Lightweight Multimodal Transformer for Predicting Imminent Mood State Transitions in Synthetic Bipolar Trajectories. Open Access Library Journal, 13, e14917. doi: http://dx.doi.org/10.4236/oalib.1114917.
Muneer, A. (2016) Staging Models in Bipolar Disorder: A Systematic Review of the Literature. Clinical Psychopharmacology and Neuroscience, 14, 117-130. https://doi.org/10.9758/cpn.2016.14.2.117
McIntyre, R.S., Alda, M., Baldessarini, R.J., Bauer, M., Berk, M., Correll, C.U., et al. (2022) The Clinical Characterization of the Adult Patient with Bipolar Disorder Aimed at Personalization of Management. World Psychiatry, 21, 364-387. https://doi.org/10.1002/wps.20997
Simonetti, A., Koukopoulos, A.E., Kotzalidis, G.D., Janiri, D., De Chiara, L., Janiri, L., et al. (2020) Stabilization Beyond Mood: Stabilizing Patients with Bipolar Disorder in the Various Phases of Life. Frontiers in Psychiatry, 11, Article No. 247. https://doi.org/10.3389/fpsyt.2020.00247
Guglielmo, R., Escelsior, A., Amore, M. and Serafini, G. (2024) Mood Instability as Prodrome of Bipolar Disorder. Journal of Psychopathology, 30, 31-37.
Cochran, A.L. and Vineyard, J. (2025) The Dynamics of Mood in Bipolar Disorder: How Mathematical Models Help Phenotype Individuals, Forecast Mood, and Clarify Underlying Mechanisms. Current Psychiatry Reports, 27, 687-696. https://doi.org/10.1007/s11920-025-01647-z
Hirschtritt, M.E. and Insel, T.R. (2018) Digital Technologies in Psychiatry: Present and Future. Focus, 16, 251-258. https://doi.org/10.1176/appi.focus.20180001
Abbas, A., Schultebraucks, K. and Galatzer-Levy, I.R. (2021) Digital Measurement of Mental Health: Challenges, Promises, and Future Directions. Psychiatric Annals, 51, 14-20. https://doi.org/10.3928/00485713-20201207-01
Ratnaparkhi, A. and Beckett, J. (2024) Digital Phenotyping, Wearables, and Outcomes. Neurosurgery Clinics of North America, 35, 235-241. https://doi.org/10.1016/j.nec.2023.11.009
Perez-Pozuelo, I., Spathis, D., Clifton, E.A.D. and Mascolo, C. (2021) Wearables, Smartphones, and Artificial Intelligence for Digital Phenotyping and Health. In: Syed-Abdul, S., et al., Eds., Digi-tal Health, Elsevier, 33-54. https://doi.org/10.1016/b978-0-12-820077-3.00003-1
Zakai, J.G. and Alharthi, S.A. (2025) Harnessing Digital Phenotyping for Early Self-Detection of Psychological Distress. Healthcare, 13, Article No. 2008. https://doi.org/10.3390/healthcare13162008
Trifan, A., Oliveira, M. and Oliveira, J.L. (2019) Passive Sensing of Health Outcomes through Smartphones: Systematic Review of Current Solutions and Possible Limitations. JMIR mHealth and uHealth, 7, e12649. https://doi.org/10.2196/12649
Altimier, L. and Boyle, B. (2021) Unprecedented Opportunities for a Transformational Change. Journal of Neonatal Nursing, 27, 157-164. https://doi.org/10.1016/j.jnn.2021.04.001
Martinez-Gonzalez, P., Oprea, S., Garcia-Garcia, A., Jover-Alvarez, A., Orts-Escolano, S. and Garcia-Rodriguez, J. (2019) Unrealrox: An Extremely Photorealistic Virtual Reality Environment for Robotics Simulations and Synthetic Data Generation. Virtual Reality, 24, 271-288. https://doi.org/10.1007/s10055-019-00399-5
Hedström, P. and Ylikoski, P. (2010) Causal Mechanisms in the Social Sciences. Annual Review of Sociology, 36, 49-67. https://doi.org/10.1146/annurev.soc.012809.102632
Roh, J., Mavrogiannis, C., Madan, R., Fox, D. and Srinivasa, S. (2021) Multimodal Trajectory Prediction via Topological Invariance for Navigation at Uncontrolled Intersections. Conference on Robot Learning PMLR, London, 8-11 November 2021, 2216-2227.
Ortiz, A., Hintze, A., Burnett, R., Gonzalez-Torres, C., Unger, S., Yang, D., et al. (2022) Identifying Patient-Specific Behaviors to Understand Illness Trajectories and Predict Relapses in Bi-polar Disorder Using Passive Sensing and Deep Anomaly Detection: Protocol for a Contactless Cohort Study. BMC Psychiatry, 22, Article No. 288. https://doi.org/10.1186/s12888-022-03923-1
Zhang, Z.Q., Chou, C.K., Rosberg, H., Perry, W., Young, J.W., Minassian, A., Mishne, G. and Aoi, M. (2025) A Computational Ethology Approach for Characterizing Behavior-al Dynamics in Bipolar Disorder.
Fernando, I., Cohen, M. and Henskens, F. (2012) Pattern-Based Formulation: A Methodology for Psychiatric Case Formulation. Australasian Psychiatry, 20, 121-126. https://doi.org/10.1177/1039856212437255
De Dios, C., Ezquiaga, E., Agud, J.L., Vieta, E., Soler, B. and García-López, A. (2012) Subthreshold Symptoms and Time to Relapse/Recurrence in a Community Cohort of Bipolar Disorder Outpatients. Journal of Affective Disorders, 143, 160-165. https://doi.org/10.1016/j.jad.2012.05.047
Van Meter, A.R., Burke, C., Youngstrom, E.A., Faedda, G.L. and Correll, C.U. (2016) The Bipolar Prodrome: Meta-Analysis of Symptom Prevalence Prior to Initial or Recurrent Mood Episodes. Journal of the American Academy of Child & Adolescent Psychiatry, 55, 543-555. https://doi.org/10.1016/j.jaac.2016.04.017
Fiedorowicz, J.G., Endicott, J., Leon, A.C., Solo-mon, D.A., Keller, M.B. and Coryell, W.H. (2011) Subthreshold Hypomanic Symptoms in Progression from Unipolar Major Depression to Bipolar Disorder. American Journal of Psychiatry, 168, 40-48. https://doi.org/10.1176/appi.ajp.2010.10030328
Lasnier, G., Cardoso, J., Siron, P., Pagetti, C. and Derler, P. (2013). Distributed Simulation of Heterogeneous and Real-Time Systems. 2013 IEEE/ACM 17th International Symposium on Dis-tributed Simulation and Real Time Applications, Delft, 30 October-1 November 2013, 55-62. https://doi.org/10.1109/ds-rt.2013.14
Girod, L., Stathopoulos, T., Ramanathan, N., Elson, J., Estrin, D., Osterweil, E., et al. (2004) A System for Simulation, Emulation, and Deployment of Heterogeneous Sensor Networks. Proceedings of the 2nd International Conference on Embedded Networked Sensor Systems, Baltimore, 3-5 November 2004, 201-213. https://doi.org/10.1145/1031495.1031519
Vestergaard, C.L., Génois, M. and Barrat, A. (2014) How Memory Gen-erates Heterogeneous Dynamics in Temporal Networks. Physical Review E, 90, Article ID: 042805. https://doi.org/10.1103/physreve.90.042805
Cao, G., Kyriakidis, P.C. and Goodchild, M.F. (2011) Combining Spatial Transition Probabili-ties for Stochastic Simulation of Categorical Fields. International Journal of Geographical Information Science, 25, 1773-1791. https://doi.org/10.1080/13658816.2010.528421
Zhao, J., Chevalier, F. and Balakrishnan, R. (2011) KronoMiner: Using Multi-Foci Navigation for the Visual Exploration of Time-Series Data. Proceedings of the SIGCHI Confer-ence on Human Factors in Computing Systems, Vancouver, 7-12 May, 2011, 1737-1746. https://doi.org/10.1145/1978942.1979195
Sminchisescu, C. and Jepson, A. (2004) Generative Modeling for Continuous Non-Linearly Embedded Visual In-ference. 21st International Conference on Machine Learning, Banff, 4-8 July 2004, 96. https://doi.org/10.1145/1015330.1015371
Liu, J.S., Neuwald, A.F. and Lawrence, C.E. (1999) Markovian Structures in Biological Se-quence Alignments. Journal of the American Statistical Association, 94, 1-15. https://doi.org/10.1080/01621459.1999.10473814
Refinetti, R., Sani, M., Jean-Louis, G., Pandi-Perumal, S.R., Du-razo-Arvizu, R.A., Dugas, L.R., et al. (2015) Evidence for Daily and Weekly Rhythmicity but Not Lunar or Seasonal Rhyth-micity of Physical Activity in a Large Cohort of Individuals from Five Different Countries. Annals of Medicine, 47, 530-537. https://doi.org/10.3109/07853890.2015.1085125
Mistlberger, R.E. and Skene, D.J. (2004) Social Influences on Mammalian Circadian Rhythms: Animal and Human Studies. Biological Reviews, 79, 533-556. https://doi.org/10.1017/s1464793103006353
Dijk, D. and Duffy, J.F. (2020) Novel Approaches for Assessing Cir-cadian Rhythmicity in Humans: A Review. Journal of Biological Rhythms, 35, 421-438. https://doi.org/10.1177/0748730420940483
Wright, K.P., Lowry, C.A. and LeBourgeois, M.K. (2012) Circadian and Wakefulness-Sleep Modulation of Cognition in Humans. Frontiers in Molecular Neuroscience, 5, Article No. 50. https://doi.org/10.3389/fnmol.2012.00050
Valdés-Tovar, M., Estrada-Reyes, R., Solís-Chagoyán, H., Argueta, J., Dorantes-Barrón, A.M., Quero-Chávez, D., et al. (2018) Circadian Modulation of Neuroplasticity by Melatonin: A Target in the Treatment of Depression. British Journal of Pharmacology, 175, 3200-3208. https://doi.org/10.1111/bph.14197
Chmiel, J. and Malinowska, A. (2025) The Influence of Circadian Rhythms on Transcranial Direct Current Stimulation (tDCS) Effects: Theoretical and Practical Considerations. Cells, 14, Article No. 1152. https://doi.org/10.3390/cells14151152
Schloss, M.J., Horckmans, M., Nitz, K., Duchene, J., Drechsler, M., Bidzhekov, K., et al. (2016) The Time-of-Day of Myocardial Infarction Onset Affects Healing through Oscillations in Cardiac Neutrophil Recruitment. EMBO Molecular Medicine, 8, 937-948. https://doi.org/10.15252/emmm.201506083
Bityukov, S.I., Maksimushkina, A.V. and Smirnova, V.V. (2016) Comparison of Histograms in Physical Research. Nuclear Energy and Technology, 2, 108-113. https://doi.org/10.1016/j.nucet.2016.05.007
Bityukov, S.I., Krasnikov, N.V., Nikitenko, A.N. and Smirnova, V.V. (2014) A Method for Statistical Comparison of Histograms. Discrete and Continuous Models and Applied Computational Science, 2, 324-330.
Alfalahi, H., Khandoker, A.H., Chowdhury, N., Iakovakis, D., Dias, S.B., Chaudhuri, K.R., et al. (2022) Diagnostic Accuracy of Keystroke Dynamics as Digital Biomarkers for Fine Motor Decline in Neuropsychi-atric Disorders: A Systematic Review and Meta-Analysis. Scientific Reports, 12, Article No. 7690. https://doi.org/10.1038/s41598-022-11865-7
Tripodi, B., Matarese, I. and Carbone, M.G. (2023) A Critical Review of the Psychomotor Agitation Treatment in Youth. Life, 13, Article No. 293. https://doi.org/10.3390/life13020293
McNorgan, C. (2012) A Meta-Analytic Review of Multisensory Im-agery Identifies the Neural Correlates of Modality-Specific and Modality-General Imagery. Frontiers in Human Neuroscience, 6, Article No. 285. https://doi.org/10.3389/fnhum.2012.00285
Dale, A.M. and Halgren, E. (2001) Spatiotemporal Mapping of Brain Activity by Integration of Multiple Imaging Modalities. Current Opinion in Neurobiology, 11, 202-208. https://doi.org/10.1016/s0959-4388(00)00197-5
Parekh, P.K., Johnson, S.B. and Liston, C. (2022) Synaptic Mech-anisms Regulating Mood State Transitions in Depression. Annual Review of Neuroscience, 45, 581-601. https://doi.org/10.1146/annurev-neuro-110920-040422
Liu, Z., Zhang, X., Ru, X., Gao, T., Moore, J.M. and Yan, G. (2024) Early Predictor for the Onset of Critical Transitions in Networked Dynamical Systems. Phys-ical Review X, 14, Article ID: 031009. https://doi.org/10.1103/physrevx.14.031009
Lapeyrolerie, M. and Boettiger, C. (2022) Limits to Ecological Forecasting: Estimating Uncertainty for Critical Transitions with Deep Learning. Methods in Ecology and Evolution, 14, 785-798. https://doi.org/10.1111/2041-210x.14013
Riva, G., Davide, F. and IJsselsteijn, W.A. (2003) Being There: Concepts, Effects and Measurements of User Presence in Synthetic Environments. Ios Press.
Zysman, M., As-selineau, J., Saut, O., Frison, E., Oranger, M., Maurac, A., et al. (2023) Development and External Validation of a Prediction Model for the Transition from Mild to Moderate or Severe Form of Covid-19. European Radiology, 33, 9262-9274. https://doi.org/10.1007/s00330-023-09759-x
Lee, K., Seo, Y., Lee, S., Lee, H. and Shin, J. (2020) Context-Aware Dynamics Model for Generalization in Model-Based Reinforcement Learning. International Conference on Machine Learning PMLR, 13-18 July 2020, 5757-5766.
Volkova, S., Arendt, D., Saldanha, E., Glenski, M., Ayton, E., Cottam, J., et al. (2021) Explaining and Predicting Human Behavior and Social Dynamics in Simulated Virtual Worlds: Reproducibility, Gen-eralizability, and Robustness of Causal Discovery Methods. Computational and Mathematical Organization Theory, 29, 220-241. https://doi.org/10.1007/s10588-021-09351-y
Zhong, R., Wu, X., Chen, J. and Fang, Y. (2025) Using Digi-tal Phenotyping to Discriminate Unipolar Depression and Bipolar Disorder: Systematic Review. Journal of Medical Internet Research, 27, e72229. https://doi.org/10.2196/72229
Maatoug, R., Oudin, A., Adrien, V., Saudreau, B., Bonnot, O., Millet, B., et al. (2022) Digital Phenotype of Mood Disorders: A Conceptual and Critical Review. Frontiers in Psychiatry, 13, Article ID: 895860. https://doi.org/10.3389/fpsyt.2022.895860