Adolescents with depression were sampled from the IMPACT trial (Improving Mood with Psychoanalytic and Cognitive Therapies). The IMPACT trial is a randomised clinical treatment trial with three psychosocial intervention arms performed at 15 NHS clinics in the UK. We've recently shown that all treatment arms are equally effective in reducing the symptoms of depression (ref Goodyer), hence for the current study all participants were combined in one group. Adolescents were measured at six time points, two of which will be used in the current study: prior to treatment (i.e. baseline, when all patients were acutely depressed) and post-treatment (i.e. baseline + 36 weeks, when a substantial proportion of patients had recovered). At baseline, participants were between 11.3 and 18.0 years old. 75% of patients were female. For each measurement, patients and parents were sent a pack of questionnaires and were invited to come in for an in unit assessment including diagnostic interviews.

Attrition between baseline and post-treatment was 68.4% for questionnaire data and 60.7% for the in unit assessments. Missing data was imputed in a single model step-wise multiple imputation procedure. At each time point, missing data (MFQ item scores and MDD status) was estimated based on the data from the previous time point and a set of population-derived parameters related to the risk of missingness (ses, gender, age, family history, etc.). Estimations were repeated 50 times and the average was taken. For details, see .... All analyses in the main manuscript are based on the imputed data set unless otherwise specified. As a check, all analyses were also repeated in the non-imputed (smaller) datasets, reported in the supplement.

A baseline-matched never-depressed control sample was drawn from the Neuroscience in Psychiatry Network (NSPN) cohort. Male and female adolescents in this population-based cohort (n=2403, age 14-24) participated in either one, two or three rounds of questionnaire assessments. A subset of participants (n=792) were also invited to take part in an in-person assessment that included a SCID diagnostic interview. For a full description of control participant selection and matching strategy, see Supplement X. In brief: for inclusion in the current study, healthy participants were required to, at all assessments, a) report no lifetime history of a clinical diagnosis of depression or any other psychiatric condition (specific phobia and childhood-limited enuresis were allowed); b) report no lifetime history of psychological treatment or psychoactive medication; c) have a total MFQ score below the clinical cut-off (=27). Those who participated in in-person assessments were also required to not meet DSM-IV or DSM-5 diagnostic criteria for any psychiatric condition (other than specific phobia). The total number of eligible never-depressed participants within the age-range of the patient group was 1295. From those, we selected a control group that matched the patient group on baseline age and sex. Due to differences in sample composition, matching was only partially successful and patients with no corresponding match in the control group were excluded as well. The final matched groups consisted of 377 patients and 377 controls between the ages of 14 and 18 years old, 74.3% female (Table 1, Supplement 1).