Selective serotonin reuptake inhibitor (SSRI)-associated mood destabilisation, encompassing hypomania, mania, and mixed-state induction, is an important pharmacological safety concern in bipolar disorder. Current clinical decision-making relies largely on static baseline risk factors and therefore may not capture the temporal evolution of symptoms, medication exposure, adherence, sleep, and physiological measures across follow-up visits. This methodological proof-of-concept study evaluates whether longitudinal modelling of entirely synthetic electronic health record (EHR)-like trajectories can identify patterns associated with later simulated destabilisation. It does not use real clinical records or provide external clinical validation. We developed a Temporal Convolutional Network (TCN) with dilated causal convolutions using an entirely synthetic cohort of N = 750 SSRI-exposed simulated patients with bipolar disorder. No real patient records, registry data, or hybrid clinical-synthetic records were used. Each trajectory contained up to 12 visits and 14 time-varying features: MADRS and YMRS scores, GAF, SSRI dose, mood-stabiliser level proxy, HRV SDNN, sleep duration, daily step count, self-reported mood and anxiety, visit gap, medication-change flag, side-effect burden, and prescription fill ratio. The endpoint was a simulator-defined incident hypomanic, manic, or mixed episode occurring within the follow-up horizon. For destabilised cases, all observations at and after event onset were excluded and masked. The TCN used four residual blocks with two kernel-size-3 causal convolutions per block and dilations 1, 2, 4, and 8, yielding an effective receptive field of 61 visits. A patient-level out-of-fold stacking ensemble combined TCN and XGBoost probabilities through a logistic-regression meta-learner. Temporal gradient saliency was used to examine the contribution of observed pre-event visits. On the held-out test set, logistic regression achieved the highest AUC (0.974), followed by the proposed ensemble (0.950), XGBoost (0.948), LSTM (0.915), and the standalone TCN (0.844). The ensemble achieved F1 = 0.826, sensitivity = 0.827, specificity = 0.923, and AUC = 0.950 (95% CI: 0.892 - 0.989). Thus, the ensemble did not outperform logistic regression in discrimination, although it provided competitive performance and the highest estimated net benefit across the reported decision-curve threshold range. Temporal saliency showed a strong contribution at the initial visit and a later increase around visits 7 - 10 in the synthetic destabilised trajectories. These model-dependent patterns are exploratory and should not be interpreted as a validated clinical monitoring window. Longitudinal modelling of synthetic EHR trajectories can recover temporally distributed patterns associated with later simulator-defined SSRI-related mood destabilisation. In this simulation, temporal attributions were distributed across early and later pre-event observations rather than establishing a single definitive monitoring interval. Prospective validation on real, independently collected EHR data is required before any monitoring schedule or clinical alert can be recommended.
Cite this paper
Filippis, R. D. and Foysal, A. A. (2026). Before the Wave: A Synthetic Longitudinal EHR Proof-of-Concept Study of SSRI-Associated Mood Destabilisation in Bipolar Disorder. Open Access Library Journal, 13, e15674. doi: http://dx.doi.org/10.4236/oalib.1115674.
Pacchiarotti, I., Bond, D.J., Baldessarini, R.J., Nolen, W.A., Grunze, H., Licht, R.W., and Vieta, E. (2013) The International Society for Bipolar Disorders (ISBD) Task Force Report on Antidepressant Use in Bipolar Disorders. <i>American Journal of Psychiatry</i>, 170, 1249-1262.
Altshuler, L.L., Post, R.M., Leverich, G.S., Mikalauskas, K., Rosoff, A. and Ackerman, L. (1995) Antidepressant-Induced Mania and Cycle Acceleration: A Controversy Revisited. <i>American Journal of Psychiatry</i>, 152, 1130-1138.
Bai, S., Kolter, J.Z. and Koltun, V. (2018) An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling. <br>https://arxiv.org/abs/1803.01271
Wang, Z., Yan, W. and Oates, T. (2017) Time Series Classification from Scratch with Deep Neural Networks: A Strong Baseline. 2017 <i>International Joint Conference on Neural Networks</i> (<i>IJCNN</i>), Anchorage, 14-19 May 2017, 1578-1585. <br>https://doi.org/10.1109/ijcnn.2017.7966039
Rajpurkar, P., Hannun, A.Y., Haghpanahi, M., Bourn, C. and Ng, A.Y. (2017) Cardiologist-Level Arrhythmia Detection with Convolutional Neural Networks. <br>https://arxiv.org/abs/1707.01836
He, K., Zhang, X., Ren, S. and Sun, J. (2016) Deep Residual Learning for Image Recognition. 2016 <i>IEEE Conference on Computer Vision and Pattern Recognition</i> (<i>CVPR</i>), Las Vegas, 27-30 June 2016, 770-778. <br>https://doi.org/10.1109/cvpr.2016.90
Chen, M.X., Firat, O., Bapna, A., <i>et al</i>. (2018) The Best of Both Worlds: Combining Recent Advances in Neural Machine Translation. <i>Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics</i> (Volume 1: Long Papers) (pp. 76-86), Melbourne. <br>https://doi.org/10.18653/v1/P18-1008
Simonyan, K., Vedaldi, A. and Zisserman, A. (2013) Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps. arXiv:1312.6034.
Lundberg, S.M., and Lee, S.-I. (2017) A Unified Approach to Interpreting Model Predictions. <i>Proceedings of the </i>31<i>st International Conference on Neural Information Processing Systems</i>, Long Beach, 4-9 December 2017, 4768-4774.
Chen, T. and Guestrin, C. (2016) XGBoost: A Scalable Tree Boosting System. <i>Proceedings of the </i>22<i>nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining</i>, San Francisco, 13-17 August 2016, 785-794. <br>https://doi.org/10.1145/2939672.2939785
Hochreiter, S. and Schmidhuber, J. (1997) Long Short-Term Memory. <i>Neural Computation</i>, 9, 1735-1780. <br>https://doi.org/10.1162/neco.1997.9.8.1735
DeLong, E.R., DeLong, D.M. and Clarke-Pearson, D.L. (1988) Comparing the Areas under Two or More Correlated Receiver Operating Characteristic Curves: A Nonparametric Approach. <i>Biometrics</i>, 44, 837-844. <br>https://doi.org/10.2307/2531595
Yatham, L.N., Kennedy, S.H., Parikh, S.V., Schaffer, A., Bond, D.J., Frey, B.N., <i>et al</i>. (2018) Canadian Network for Mood and Anxiety Treatments (Canmat) and International Society for Bipolar Disorders (ISBD) 2018 Guidelines for the Management of Patients with Bipolar Disorder. <i>Bipolar Disorders</i>, 20, 97-170. <br>https://doi.org/10.1111/bdi.12609
Insel, T.R. (2017) Digital Phenotyping: Technology for a New Science of Behavior. <i>JAMA</i>, 318, 1215-1216. <br>https://doi.org/10.1001/jama.2017.11295