Predicting Treatment-Resistant Depression as Treatment Unfolds
Esther Bonnet summarizes her Master's thesis, in which she investigated whether knowledge of a patient's treatment history facilitates the prediction of treatment-resistant depression.
Antidepressants are commonly used to treat depression, alongside psychological treatments such as cognitive behavioral therapy. Treatment may involve trying one medication and switching to another if its benefits are insufficient or side effects are difficult to tolerate. Patients may switch medication, discontinue treatment, or restart after an interruption. Each event adds information that was unavailable when treatment began. For predictive modeling, this raises a question: can an evolving treatment history help us anticipate progression towards treatment-resistant depression?
The study investigated this question using models that represent treatment pathways and update predictions during follow-up. In a synthetic patient cohort, incorporating treatment history improved prediction in some settings. However, the benefits depended on the event being predicted, and better discrimination did not consistently translate into accurate risk estimates.
From a Starting Point to a Treatment Pathway
Some patients with major depressive disorder experience insufficient benefit from successive antidepressant treatments and develop treatment-resistant depression. Predicting this progression requires decisions about both the outcome and the timing of the prediction. What can we predict when treatment begins? What changes once a patient has switched medication or experienced an interruption?
At treatment initiation, predictions can draw on demographic characteristics and clinical history. As treatment unfolds, further information becomes available: how long a patient remained on a medication, whether the treatment was interrupted, and how quickly they progressed to the next treatment stage. These observations could help update the assessment of what happens next.
The study investigated whether representing this evolving pathway improves prediction compared to using baseline information alone. Treatment resistance was identified through a prescription-based rule involving two consecutive antidepressant switches, each antidepressant line of therapy lasting at least 6 weeks. This allowed the outcome to be defined based on treatment histories, although it did not directly establish symptom response or reasons for switching.
Building a Synthetic Treatment Cohort
A synthetic cohort of 15,000 patients was developed to emulate the structure of longitudinal data anticipated in linked UK Biobank records. Baseline characteristics were generated using linked conditional distributions, with shared latent factors creating correlations between related variables, such as socioeconomic circumstances, smoking, and comorbidities.
Treatment histories were then simulated using patient-specific switching propensities derived from demographic, clinical, socioeconomic, and genetic characteristics. These influenced both the probability and timing of treatment changes. The generator also produced discontinuation, restart, death, and censoring times. Figure 1 shows the possible patient trajectories that were modeled. Competing events determined which outcomes were observed: for example, a potential treatment switch remained unobserved if death occurred first.
Clinical definitions and broad population characteristics were informed by published research, while other relationships were specified as simulation assumptions. This provided a controlled setting for constructing treatment pathways and evaluating predictions. Nonetheless, the cohort did not reproduce actual UK Biobank participants or their empirical distributions. Its results describe model performance under the chosen assumptions; testing whether those findings hold in observed patient records is the next step.
Three Ways to Make a Prediction
The study compared three approaches based on Cox models, which model the timing of events [1].
The first was a baseline model that used information available at treatment initiation to predict subsequent treatment resistance. The second used staged, transition-specific models to examine individual steps in the treatment pathway. The third used dynamic models, making predictions at defined points during follow-up and incorporating treatment timing and accumulated history.
A multi-state framework connected these approaches to the treatment pathway [2]. Patients could progress between treatment stages, discontinue treatment, restart, or die. Representing these events separately allowed the analysis to ask where predictive information was useful. The information needed to anticipate discontinuation, for example, might differ from the information needed to anticipate progression towards treatment resistance.
The dynamic approach used information available at each prediction point [3]. Its purpose was to assess whether observations collected during treatment added predictive value beyond the information recorded at the start.
When Did Treatment History Help?
For a shared comparison, all three approaches were evaluated on the same task: predicting treatment resistance as the next transition within six months of a patient’s first entry into second-line treatment.
The dynamic model achieved a mean AUC of 0.649, compared with 0.593 for the baseline model and 0.571 for the staged model. AUC measures how well a model ranks patients by risk. These results therefore suggested better discrimination from the dynamic approach on this particular task, although performance remained modest.
The broader analyses revealed a more nuanced pattern. Accumulated treatment history contributed most clearly to predicting progression from second-line treatment to treatment resistance. State and timing information was particularly useful for predicting discontinuation. Additional dynamic information did not improve discrimination consistently across all transitions.
The comparison also had limits. The staged model used fewer baseline predictors than the other approaches, so differences in performance reflected both model structure and the information included.
What Treatment Records Can Tell Us
Treatment histories provide useful information, but their interpretation has limits. A medication switch might reflect insufficient benefit, side effects, or other circumstances. Similarly, discontinuation does not necessarily mean that a patient has recovered, and a prescription does not establish that medication was taken as intended.
The models did not include direct measurements of symptom response, adherence, or reasons for treatment changes. Their predictions therefore concerned progression through a recorded treatment pathway. Adding these clinical details could help distinguish different reasons for similar prescription patterns and potentially improve prediction.
What Comes Next?
The main contribution of this thesis is a framework for examining when updated treatment information helps prediction. In the synthetic cohort, its value differed across the pathway: timing information was particularly useful for predicting discontinuation, while accumulated history contributed to predicting progression towards treatment resistance.
The next step is to apply the framework to observed patient records from the UK Biobank. This requires checking whether treatment histories can be reconstructed reliably and whether the predictive gains seen in the simulation persist. Where available, symptom measurements, adherence information, and reasons for switching could provide a richer picture of how treatment unfolds.
Ultimately, the aim is to investigate whether predictions made during treatment could support decisions such as earlier review or closer follow-up. Establishing that value will require evidence that the predictions are reliable and that acting on them benefits patients.
References
[1] Cox, D. R. (1972). Regression models and life-tables. Journal of the Royal Statistical Society: Series B (Methodological), 34(2), 187–220. https://doi.org/10.1111/j.2517-6161.1972.tb00899.x
[2] Meira-Machado, L., de Uña-Álvarez, J., Cadarso-Suárez, C., & Andersen, P. K. (2008). Multi-state models for the analysis of time-to-event data. Statistical Methods in Medical Research, 18(2), 195–222. https://doi.org/10.1177/0962280208092301
[3] van Houwelingen, H. C. and Putter, H. (2008). Dynamic predicting by landmarking as an alternative for multi-state modeling: An application to acute lymphoid leukemia data. Lifetime Data Analysis, 14(4):447–463. https://doi.org/10.1177/0962280208092301