The Relationship Between Defense Mechanisms and Attachment as Measured by Observer-Rated Methods in a Sample of Depressed Patients: A Pilot Study

Despite many theoretical and clinical writings, the theorized connection between defense mechanisms and adult attachment in depressed patients has received little empirical attention. This is the first study to examine patients’ defense mechanisms in relation to their attachment in a clinical sample of depressed patients and also the first to use observer-rated measures for assessing both defense mechanisms and attachment. In this pilot study, we aimed to investigate the relationship between patients’ attachment and their use of defense mechanisms in psychotherapy sessions, as well as patterns of change over treatment. We conducted a secondary analysis of data from a randomized controlled trial of 30 patients receiving psychotherapy for major depression. Session transcripts were previously coded for defense mechanisms using the Defense Mechanisms Rating Scales, and depression severity data were collected by the clinician-rated HRSD-17 and the self-report BDI-II. Patients’ attachment was assessed in two transcripts, one in an early session and a second in a late session, using the novel observer-rated Patient Attachment Coding System. In contrast with expectations, in the early phase of therapy, preoccupied attachment-related characteristics were significantly positively related to overall defensive functioning and negatively related to Depressive immature defenses. In the late phase of treatment, preoccupied attachment-related characteristics were negatively correlated with Non-depressive immature defenses. Moreover, as expected, early-phase defense use was related to late phase attachment; specifically, early neurotic and immature Depressive and Non-depressive defenses predicted an increase in avoidant, whereas immature Non-depressive defenses predicted a decrease in preoccupied attachment-related characteristics over the course of treatment, after controlling for early attachment effects. The results imply a longitudinal relationship between defenses and change in attachment-related characteristics over the course of treatment in a depressed sample and warrant further research about the relationship between defenses and attachment during psychotherapy.

Despite many theoretical and clinical writings, the theorized connection between defense mechanisms and adult attachment in depressed patients has received little empirical attention. This is the first study to examine patients' defense mechanisms in relation to their attachment in a clinical sample of depressed patients and also the first to use observer-rated measures for assessing both defense mechanisms and attachment. In this pilot study, we aimed to investigate the relationship between patients' attachment and their use of defense mechanisms in psychotherapy sessions, as well as patterns of change over treatment. We conducted a secondary analysis of data from a randomized controlled trial of 30 patients receiving psychotherapy for major depression. Session transcripts were previously coded for defense mechanisms using the Defense Mechanisms Rating Scales, and depression severity data were collected by the clinician-rated HRSD-17 and the self-report BDI-II. Patients' attachment was assessed in two transcripts, one in an early session and a second in a late session, using the novel observer-rated Patient Attachment Coding System. In contrast with expectations, in the early phase of therapy, preoccupied attachment-related characteristics were significantly positively related to overall defensive functioning and negatively related to Depressive immature defenses. In the late phase of treatment, preoccupied attachment-related characteristics were negatively correlated with Non-depressive immature defenses. Moreover, as expected, early-phase defense use was related to late phase attachment; specifically, early neurotic and immature Depressive and Non-depressive defenses predicted an increase in avoidant, whereas immature Non-depressive defenses predicted a decrease in preoccupied attachment-related characteristics over the course of treatment, after controlling for early attachment effects. The results imply a longitudinal relationship between defenses and change in attachment-related characteristics over the course of treatment in a depressed

INTRODUCTION
Patients' attachment-related differences and defense mechanisms are the two main aspects of personality functioning and are thought to be important predictors of symptom severity and psychotherapy outcome (Blatt and Levy, 2003;Perry, 2014;Dagan et al., 2018;Perry et al., 2020). Despite increasing interest in the topic over the past few years, there is still little empirical research conducted on the associations between defense mechanisms and patient's attachment, especially in depressed patients. In this study, we sought to address this important gap in the literature by empirically examining the relationship between patients' attachment-related characteristics and their use of defense mechanisms in treatment sessions conducted as part of a previous RCT for depression.
Defense mechanisms can be defined as automatic reactions to internal and external stressors or conflicts aimed at warding off negative emotional experiences. They are thought to underlie a wide range of healthy and psychopathological phenomena, including depression (Perry, 2014). The use of defense mechanisms in any given situation is mostly out of the individual's awareness; however, the type of defense mechanism used can lead to considerable differences in mental health and interpersonal functioning (Vaillant, 2020).
Defense mechanisms can be categorized hierarchically, based on their general level of adaptiveness (Perry, 1990;Perry and Bond, 2017). Of the tripartite defense categories, mature defense mechanisms are deemed the most adaptive strategies to maximize gratification and allow relatively good conscious awareness of feelings, ideas, and their behavior-related consequences. Though all defense mechanisms are thought to protect the individual from anxiety, mature defenses do not threaten interpersonal relationships or distort reality in order to do so. The intermediate level of neurotic defense mechanisms functions to keep distressing thought content out of awareness, also with minimal reality distortion. In contrast, the low level, mostly maladaptive immature defenses act through strong reality distortion or detachment from reality (Perry and Bond, 2017) and are associated with mental health problems and lower interpersonal functioning, characteristic of severe mood and anxiety disorders (Trower and Chadwick, 1995;Calati et al., 2010;Perry and Bond, 2012;Berney et al., 2014;Ciocca et al., 2017).
Relevant to patients who suffer from depression, the immature defense category can be further subdivided into Depressive and Non-depressive Defenses. Depressive defenses have been empirically associated with depression, whereas Non-depressive defenses were negatively associated with depression (Høglend and Perry, 1998). In depressed patients, the use of immature defenses has been found to decrease by the end of treatment, whereas neurotic and mature defenses remain unchanged (e.g., Mullen et al., 1999). Moreover, within immature defenses, the subgroup of Depressive defense mechanisms is linked to decreases in depression symptomatology specifically .
Attachment theory (Bowlby, 1969) offers a cogent framework for understanding the development and treatment of psychopathologies such as depression (Cummings and Cicchetti, 1990;Williams and Riskind, 2004;Dykas and Cassidy, 2011;Lakey and Orehek, 2011;Hames et al., 2013). There appears to be an overrepresentation of patients with insecure attachment in clinical populations in general and in clinically depressed samples in particular, compared with non-clinical samples (Bakermans-Kranenburg and van Ijzendoorn, 2009; for a recent meta-analysis see Dagan et al., 2018). Similarly, individuals with insecure attachments have been shown to experience higher levels of depression than securely attached individuals (Fonagy et al., 1996;Borelli et al., 2010;Ivarsson et al., 2010).
John Bowlby developed his theory of attachment partly to explain why some of his patients appeared to eschew intimacy and defend against experiencing emotions, with calamitous consequences for their social adaptation (Duschinsky, 2020). Bowlby posited that individual differences in early relationships with one's primary caregivers are carried forward and shape relationships with others (e.g., peers and romantic partners; Bowlby, 1988;Roisman, 2006;Feeney, 2008;Holland and Roisman, 2010;Groh et al., 2014). Following Bowlby's innovative theorizing, a host of studies have confirmed that early differences in attachment relationships later impact cognitive and affective processing of expectations about closeness and support from others. Beginning in the sixties, attachment researchers established that differences in parental sensitivity and responsiveness give rise to distinct infant tendencies to establish proximity with the caregiver, which in turn seem to be underpinned by differing expectations concerning caregiver availability (Ainsworth et al., 1978). In particular, Ainsworth and colleagues proposed that infants seek proximity with their caregiver in one of three ways: secure, involving actively seeking proximity if they generally expect the caregiver to be available when they are distressed; avoidant, if they do not hold such an expectation, they seem to defensively inhibit their search for physical proximity; and resistant (or ambivalent), if they expect the caregiver to be unpredictable or inconsistent leading to constantly monitoring their proximity to the caregiver even when he or she is within reach.
Later work showed that these infant differences are robustly predicted by parent's attachment representations, as assessed in a semi-structured interview, the Adult Attachment Interview (AAI; Main et al., 1985). Namely, parents of secure infants in the AAI appear to openly access their own representations and memories of their relationships with their parents and are termed "secure-autonomous. " Parents of avoidant infants seem to shift their attention away from discussing attachment relationships and stressful episodes and are termed "dismissing, " Frontiers in Psychology | www.frontiersin.org while parents of resistant infants appear to focus excessively on such topics and are termed "preoccupied. " According to one popular view, whereas secure attachment is related to an unbiased way of processing affectively laden information, with little need to use reality-distorting defense mechanisms (Cramer and Kelly, 2010;Dykas and Cassidy, 2011), insecure attachment reflects defensive responses to negative emotions, threats to separation, or distress more generally (Ein-Dor et al., 2016). In this view, attachment is seen as an adaptation strategy to a given environment (Luyten et al., 2021).
Certain defense mechanisms are prominent in the interpersonal patterns that convey the effect of attachment insecurity on psychological distress, such as depression. For example, dismissing attachment classifications seem to be associated with denying one's own weaknesses and those of one's attachment figures (Main et al., 2002). Conversely, preoccupied attachment may be associated with hyperactivating the expression of distress and maintaining a consistent focus on negative emotions, which may work to gain and maintain others' proximity -at least in the short term.
Indeed, attachment theory can be understood as a two-person theory of conflict and defense. It emphasizes the coping or defensive processes required to deal with fearful arousal within the context of attachment relationships. In Bowlby's view, defensive exclusion occurs when attachmentrelated information is kept out of awareness to prevent the painful effect associated with attachment system activation when no perceived comfort from attachment figures (real or representational) is available (Bowlby, 1980). In contrast to an intrapsychic theory of defense, attachment theory locates the ontogeny of defenses in an intersubjective field. The development of defensive styles is theorized to occur at the interface between a child's fearful arousal and the subsequent responses of important attachment figures. More specifically, the infant-caregiver interactions that occur around distress and comfort result in defensive adaptations, in the form of defense mechanisms (Lyons-Ruth, 2003). In other words, in relation to adult attachment patterns, defenses are conceptualized as the mechanism that modulates the attachment system in order to reduce distressing feelings associated with negative expectancies, both at the intrapersonal and interpersonal levels (Kobak and Bosmans, 2019), and as such are directly related to emotion dysregulation (Malik et al., 2015).
Despite many theoretical and clinical writings, this hypothesized connection between attachment and defense mechanisms has received little empirical attention. The few existing empirical studies generally suggest that insecure attachment is typically associated with an increased use of immature defense mechanisms (e.g., Prunas et al., 2019) and that this overreliance on immature defenses leaves insecurely attached individuals particularly vulnerable to psychopathology, such as depression (e.g., Laczkovics et al., 2018;Ciocca et al., 2020). Up until now, however, empirical studies investigating the association between attachment and defenses have been conducted in non-clinical samples (Ciocca et al., 2020) rather than clinical or treatment samples.
Previous studies on the relationship between attachment and defense mechanisms have been further limited by their reliance on self-report questionnaires. Self-report measures may be more biased (when compared to observer-based measures) when aiming to identify processes that are predominantly unconscious, such as attachment and defenses. Whereas preliminary evidence shows that self-report and observer-rated defense ratings may align (Di Giuseppe et al., 2020), it is increasingly well-agreed that self-report measures of attachment (for example, the Experience of Close Relationships Scale; Brennan et al., 1998) and observer-rated measures of attachment (such as the AAI) do not cohere empirically and may in fact capture different constructs (Roisman, 2006;Strauss et al., 2015).
In the current study, we sought to address this gap in the literature by examining the association between attachment and defense mechanisms in patients undergoing psychotherapy for depression, using a novel observer-rated method for assessing attachment, the Patient Attachment Coding System (PACS; Talia et al., 2017), in addition to the well-established observerrated DMRS for defenses. The PACS was initially developed in an effort to find verbal markers that would distinguish the discourse of patients who had been independently classified as secure, dismissing, or preoccupied on the AAI (Talia et al., 2014(Talia et al., , 2017(Talia et al., , 2019b. This work led to distinct identifying markers that can be reliably scored in any session of psychotherapy transcribed verbatim, regardless of the therapeutic orientation (Talia et al., 2014). Because the PACS markers occur regardless of whether patients speak about attachments or other topics that they find distressful, Talia and his colleagues have described them first and foremost as capturing differing ways in which patients collaborate with the therapist, rather than defenses (Talia et al., 2019a).

Aims
Given the importance of attachment security and defense mechanisms in the development of psychopathology, such as depression (Høglend and Perry, 1998;Martin-Joy et al., 2017) and their general importance in treatment formulations (e.g., Fonagy, 2001;Eagle, 2013), it is important to better understand the relationship between these two processes. Thus, the overall aim of our study was to investigate the relationship between patients' attachment and their use of defense mechanisms in psychotherapy for depression, as well as any patterns of change over time. Of note, in contrast with previous studies, where attachment style was assessed as a predictor of defense use, in this present pilot study, we aimed to explore the role of defense mechanism in predicting changes in in-session attachment-related characteristics over treatment. Specifically, we explored the following two research questions: 1. What is the relationship between depressed patients' in-session attachment-related characteristics and their defense mechanisms? We hypothesized that patients with secure attachment would exhibit higher overall defensive functioning, would use more mature defenses, and less immature defenses, in both the early and late sessions. Conversely, we also expected that patients with insecure attachment, specifically Frontiers in Psychology | www.frontiersin.org avoidant and preoccupied patterns, would use more immature defenses, in particular more Depressive defenses. 2. Does patients' defensive functioning in the early session predict their attachment security in the late phase of treatment? We expected that patients' overall defensive functioning, and amount of mature or immature defense use, early in treatment would predict attachment-related characteristics in the late phase of treatment. More specifically, within this clinically depressed sample, we expected that lower-level defenses, such as Immature, and especially, early Depressive Immature defense use would predict insecure (avoidant and preoccupied) attachment-related characteristics in the late phase of treatment.

Treatment Trial
This study reports on secondary analyses of existing treatment data collected as part of a previously conducted randomized controlled treatment trial (RCT) of 30 patients undergoing treatment for major depression (see Perry et al., 2021 for a detailed description of the RCT). Inclusion criteria in the study were having acute recurrent major depression and a 17 or higher score on the Hamilton Depression Rating Scale; exclusion criteria included psychotic or bipolar type I disorders, substance use or dependence serious enough to interfere with therapy, and an effective response to antidepressant medications, if tried, in the past 4 weeks. Nineteen patients (63%) were female, and mean age was 41 years (SD = 12.43). As part of the RCT, patients were randomly assigned to either cognitive behavior psychotherapy (CBT; n = 13), supportive psychotherapy (ST; n = 7), or psychodynamic psychotherapy (PDT; n = 10). On average, the CBT treatments consisted of 21.00 (SD = 10.44) sessions over 14 months (range = 2.75-21.75) and the ST consisted of 17.00 (SD = 9.04) sessions over 14 months (6.5-27.5), whereas the PDT treatments were longer and consisted of an average of 62.7 (SD = 23.43) sessions over 21 months (range = 7.5-24.5). Depressive symptoms were assessed at baseline and at the end of treatment. Baseline depression scores on the BDI-II (M = 23.34, SD = 6.97) and HRSD-17 (M = 17.48, SD = 6.10) significantly correlated (r = 0.48, p < 0.01), and both significantly decreased by termination [t(27) = 5.63, p < 0.001 and t(27) = 4.22, p < 0.001, respectively]. As a part of the original RCT, the treatment sessions were audio-recorded and transcribed and coded for individual defense mechanisms, hierarchically organized into subsequent defense categories. For further details on the trial and the participants, please see Perry et al. (2021).

Existing Measurements Depression
The clinician-rated Hamilton Depression Rating Scale (HRSD-17; Hamilton, 1960) was used to assess depression levels pre-and post-treatment. The HRSD-17 is a 17-item semi-structured interview, which assesses depression on a 5-point Likert scale, ranging from 0 to 4. The HRSD-17 has demonstrated good internal consistency in previous studies with a mean alpha of 0.79 across studies, in our report Cronbach's alpha = 0.83.
The self-report Beck Depression Inventory II (BDI-II; Beck, et al., 1996) was also administered pre-and post-treatment. The BDI-II is a widely used 21-item measure of Depressive symptoms experienced during the previous week, using a four-point Likert scale. Internal consistency of the BDI-II has been reported to be good in several studies, for example, a Cronbach alpha of 0.90 has been reported (Storch et al., 2004). Cronbach's alpha for BDI-II was 0.96 in the present report.

Defense Mechanisms
The observer-rated Defense Mechanism Rating Scales (DMRS; Perry, 1990) was used to assess defense mechanisms in session transcripts in the early and late treatment phases. The DMRS identifies 30 individual defenses (Perry, 1990) as they occur in the text. The individual defense mechanisms are hierarchically arranged into three categories: Mature, Neurotic, and Immature defenses, and the Immature category can be further subdivided into Depressive and Non-depressive immature defenses. In addition to the tripartite categories, a score for overall defensive functioning (ODF) is calculated by summing the weighted average of each defense based on its defense level. The ODF can range between 1 and 7, with higher scores indicating more adaptive defensive functioning. Inter-rater reliability of the three defense categories, the Depressive and Non-depressive defenses, and the ODF have been shown to be satisfactory (Perry, 2014).

Novel Observer-Rated Method Attachment
For this secondary analysis, the Patient Attachment Coding System (PACS; Talia et al., 2014) was used to assess patients' attachment. The PACS is a transcript-based measure that yields classifications of patients' attachment based on a single therapy session transcribed verbatim in any treatment modality, regardless of the stage of treatment and of therapist's activity. Recent work in attachment-informed psychotherapy research (Talia et al., 2017) has shown that patients' discourse style during psychotherapy reliably predicts their independently obtained attachment classification on the AAI. PACS attachment security has been found to predict greater in-session mentalizing (Talia et al., 2017), greater resolution of relational ruptures in psychotherapy (Miller-Bottome et al., 2018), and patient-therapist physiological synchrony (Kleinbub et al., 2020). The PACS has also been shown to predict patients' AAI classification even when applied to post-treatment interviews rather than therapy sessions (Talia et al., 2019b).
When coding with the PACS, the coder assesses the frequency and intensity of 40 different discourse markers as they occur in a transcript, which are grouped into five main scales used to assign a final main attachment classification to the patient: Proximity seeking, Exploring, and Contact maintaining which are associated with Secure attachment; Avoidance which is associated with Avoidant attachment; and Resistance which is associated with Preoccupied attachment. A sixth scale, Balance, is used as a global score of security which encompasses the five main PACS scales. As such, although a person may exhibit predominantly secure attachment characteristics, they may also exhibit some avoidant and resistant markers.
In this study, we report on the scores on the three PACS scales reflecting attachment-related characteristics, including secure attachment (Balance scale), avoidant attachment (Avoidance scale), and preoccupied attachment (Resistance scale). In order to avoid multiple testing of related variables, we used Balance as a proxy for attachment security (and did not include the three secure scales). The rater assigns a rating from 1 to 7 in 0.5 increments based on both the frequency and intensity of the markers of each subscale identified in the transcript. More specifically, the Balance score reflects the degree of attachment security exhibited by the patient including the open expression of emotions in the present, communication of feeling and needs in the therapeutic relationship, autonomous reflections, and positive emotions. The Avoidance scale assesses the level of evasion of inquiries into the patient's positive and negative experience and the level of minimization or deferment of any mental state previously conveyed (e.g., the patient affirms that he or she has no right to complain; chuckles about his or her own distress). The Resistance scale captures discourse markers that enlist the therapist's agreement with the patient's views or otherwise restrict the therapist's capacity to disagree, for example, by being vague or excessively detailed. In order to assign an overall attachment classification (Secure, Avoidant, or Preoccupied) for the patient, a proportional index of balance, avoidant, and resistant characteristics is calculated (for a more detailed description of the PACS, see Talia et al., 2017).

Procedures
In order to become reliable PACS coders, four clinical psychology doctoral students completed a one-week comprehensive training workshop in the use of the PACS taught by the developer (A.T.) and attended weekly reliability consensus meetings on practice transcripts for 3 months following the training workshop. When their ICC with the developer of the PACS reached 0.80 or above, the students started coding the session transcripts for the study. Session transcripts were randomly assigned across the four raters. Throughout the coding, the raters received ongoing intensive supervision from the developer of the PACS. Inter-rater reliability was calculated on 29 (50%) out of 58 coded sessions, and the ICC between the developer and the coders was 0.85. From the available session transcripts already coded on the DMRS, two sessions per treatment were coded with the PACS, one session from the early phase of treatment (the second session) and a session at the late phase of treatment (the penultimate session), altogether resulting in a sample of 60 PACS coded sessions, reflecting 30 treatments.

Data Analysis
In the reported analyses, the total sample of 30 treatments was used. Two patients were dropped out during treatment; therefore, the cross-sectional analysis at the early phase was based on n = 30, whereas the analyses at the late phase of treatment and the change across treatment included n = 28. The use of an existing data set and observer ratings meant that there were no missing attachment or defense scores. To compare initial attachment and defense scores across the three treatment arms, we conducted one-way ANOVA. The small number of patients in each treatment modality only allowed us to conduct pilot comparisons and to report effect sizes and not values of p.
The attachment and defense variables were not normally distributed (skewness and kurtosis more than twice the standard error). Both at the early and late phases, attachment scores on the Balance scale were significantly positively skewed, due to the high prevalence of insecure patients in the sample (n = 21). Therefore, non-parametric tests of defenses and attachment were used in subsequent analyses. Wilcoxon signed-rank test was used to compare attachment and defenses in the early and late phases of the treatments. A paired samples t test was used to compare self-rated and observer-rated depression scores at pre-and posttreatment. Spearman's rho correlations were used to analyze the relationship between variables on the DMRS and the PACS. Linear regression analysis was used to examine whether early-phase defensive functioning predicted latephase attachment. For checking the assumptions for the regression models, we confirmed that the data contained approximately normally distributed errors with equal variance and met the assumptions of homogeneity of variance and linearity. Two-tailed tests of significance were applied throughout. Given the exploratory nature of the examinations and the relatively low power, we did not apply a correction for multiple correlations. All statistical analyses were conducted using SPSS 24.0.

Patient Attachment and Defenses Early in Treatment
In the early sessions, the majority of the 30 patients were classified on the PACS as Preoccupied (n = 15). Nine patients were classified as Secure and six as Avoidant. Regarding the scales, the average rating on the PACS Balance scale suggested that overall the patients in this sample were relatively insecurely attached (M = 2.93; SD = 1.4) at baseline, a score which is significantly lower than in other mixed outpatients' samples [M = 3.7, SD = 1.3, t(188) = 2.79, p < 0.01; Talia et al., 2017]. Moreover, these depressed patients also scored higher on the PACS Resistance scale (M = 4.20; SD = 2.47), indicating that their attachment was significantly more preoccupied than is generally seen in outpatient samples [M = 3.3, SD = 2.00, t(188) = 2.18, p < 0.05], whereas the PACS Avoidance scale Frontiers in Psychology | www.frontiersin.org (M = 2.79; SD = 1.77) was in line with previous findings [M = 2.8, SD = 1.60, t(188) = 0.00, p = ns; Talia et al., 2017].
Average overall defensive functioning (M = 4.88; SD = 0.57) early in treatment fell into the level usually associated with acute depression or personality disorders and was comparable to other mixed outpatient groups reported in the literature [M = 4.62, SD = 0.27, t(49) = 1.93, p = ns.; Perry and Henry, 2004]. Table 1 shows the means, standard deviations, and significant changes in the relevant variables.
Early-phase PACS and defense variables differed in the three treatment arms. Pilot comparison using Eta-squared showed that variance in early treatment PACS variables across the three treatment arms was Balance η 2 = 0.010, Avoidance η 2 = 0.158, and Resistance η 2 = 0.154; and variance based on the treatment arms in early-phase defense variables ranged between Neurotic defenses η 2 = 0.035 and ODF η 2 = 0.108.

Research Question 1: Relationship Between the Patients' Attachment-Related Characteristics and Their Use of Defense Mechanisms
Spearman's rho correlations were used to test the relationship between in-session attachment-related characteristics (PACS Balance, PACS Avoidance, and PACS Resistance) at both early and late phases of treatment and patients' use of defense mechanisms (DMRS variables: ODF, Mature, Neurotic, Immature including Depressive and Non-depressive Immature defenses). No significant correlations between attachment security (PACS Balance scale) or avoidance (PACS Avoidance scale) and the DMRS variables were found in the early or late sessions. In the early sessions, the PACS Resistance scale was significantly related to ODF (r s = 0.37, p = 0.043) and negatively associated with the DMRS Depressive Immature defenses (r s = −0.45, p = 0.012; see Table 2). At the late phase of treatment, the PACS Resistance scale negatively correlated with the DMRS Non-depressive immature defenses (r s = −0.42, p = 0.027; see Supplementary Material).

Research Question 2: Patients' Use of Defense Mechanisms Early in Treatment and Attachment-Related Characteristics Late in Treatment
In order to establish whether there was any relationship between patients' use of defense mechanisms early in treatment and improvement in their attachment-related characteristics during treatment, we used Spearman's rho correlations between the defense variables (DMRS scales: ODF, Mature, Neurotic, Immature) at the early phase of the treatment and attachment variables (PACS scales: Balance, Avoidance, Resistance) at the late phase of the treatment. Results showed a significant negative correlation between early DMRS Neurotic defenses and latephase PACS Avoidance scale (r s = −0.44, p = 0.020) and a significant negative correlation with the PACS Resistance scale at the end phase of treatment (r s = −0.42, p = 0.030). Early DMRS Immature defenses were significantly and positively correlated with late-phase PACS Avoidance scale (r s = 0.51, p = 0.005) and negatively with late-phase PACS Resistance scale (r s = −0.48, p = 0.009; see Supplementary Material).
Based on these significant relationships between DMRS defenses early in treatment and PACS scales in the late phase of treatment, we conducted linear regressions to establish whether defense use (DMRS Immature, Neurotic defenses) in the early phase predicts attachment-related characteristics (PACS Avoidance, Resistance scales) in the late phase of treatment, after controlling for early levels of attachment-related characteristics. Since the DMRS Immature defenses category can be divided into the two mutually exclusive subcategories of Depressive immature defenses and Non-depressive immature defenses, we substituted these subcategories in the regression model, rather than the less specific DMRS Immature defense category. We used stepwise regression to assess the unique contribution of Depressive and Non-depressive defenses in predicting the change in attachment-related characteristics.
As Table 3 shows, both early Depressive and Non-depressive immature defenses significantly predicted late-phase PACS

DISCUSSION
This pilot study is the first to examine patients' defense mechanisms in relation to their attachment in a clinical sample of depressed patients and also the first to use observer-rated measures for assessing both defense mechanisms and attachment. Specifically, the present study explored the role of early-phase defense mechanisms in predicting changes in attachment-related characteristics over the course of psychotherapy. We first hypothesized that patients with higher overall defensive functioning, more Mature defenses, and less Immature defenses would be associated with more attachment security across all sessions. This first hypothesis was not supported. We found that attachment security (PACS Balance) and PACS Avoidance were not related to defenses, but PACS Resistance was positively associated with overall defensive functioning at the early phase of treatment and negatively associated with Depressive Immature defenses in the early phase. PACS Resistance was also negatively associated with Non-depressive immature defenses at the late phase of treatment.
Our second hypothesis was partly supported, in that earlyphase Immature and Neurotic defense use was related to latephase attachment-related characteristics. We found that Immature defenses, and specifically, both Depressive and Non-depressive immature defense use and Neurotic defense use, were associated  with more late-phase PACS Avoidance, even after controlling for early-phase PACS Avoidance levels. Moreover, more Non-depressive defense use during the early phase of therapy predicted less PACS Resistance at the late phase, after controlling for the effect of early PACS Resistance levels.
The positive relationship between overall defensive functioning and preoccupied attachment-related characteristics at the early phase of treatment may be explained by the fact that defensive functioning is usually at its lowest, not at the beginning of psychotherapy but somewhat later in treatment, when the patient is more deeply engaged in working on difficult topics in therapy. Thus, even though attachment-related characteristics may be detected already in early sessions, defense style of the patient when dealing with stressful conditions (or topics) may only be displayed later in therapy or across several sessions. Moreover, we assessed defenses and attachment in only one session transcript from each time point. The last sessions before termination often trigger attachment-related issues and may bring up relational insecurities, which might result in bias toward lower defensive functioning and more insecure attachment characteristics than what the patient would typically display. Although this treatment trial allowed for a pilot comparison between three different psychological treatments, the variability in the number of sessions and length of therapy across the three treatment arms (an average of 21 sessions in CBT, 17 in ST, and 62 in PDT) limited the ability to interpret the temporal relationship between defenses and attachment in our study. Future studies using more sessions per treatment may more reliably assess change processes during the course of treatment.
Another explanation for the relative lack of a cross-sectional relationship between defenses and attachment-related characteristics might also be methodological. Both defense mechanisms and attachment were coded across whole therapy sessions, as they occurred, and summary scores for both constructs were used in the subsequent analyses. It is thus possible that unrelated segments were coded as defense and as attachment episodes, with relatively little overlap, manifesting in divergent results. As such, future studies implementing a more fine-grained approach focusing on identifying episodes when defense and attachment events overlap in the transcripts may more accurately reflect the association between specific defense mechanisms and attachment-related characteristics.
When interpreting the cross-sectional associations between defense use and patient attachment, it is important to also consider that our depressed sample included patients with relatively low defensive functioning and mostly insecure attachment classification (n = 21, 70%), with half of the patients (n = 15, 50%) classified as preoccupied. A predominance of insecure and especially preoccupied attachment in a depressed sample is to be expected, as these have been proposed to relate to psychopathology, and specifically, depression (e.g., Laczkovics et al., 2018;Ciocca et al., 2020); however, the widely varying prevalence of the three attachment styles in our sample limited a fair comparison of patients with different attachment classifications.
It is important to also note that the comparison of the results based on self-report and observer-rated methods is limited, due to the inherent differences occurring when studying phenomena at least partly outside of awareness, such as defense mechanisms and attachment. Findings obtained by self-report measures may not be directly translatable to results with observer-rated methods, such as the AAI interview and the PACS, and vice versa.
Our results imply a longitudinal relationship between immature and neurotic defense use and attachment security, in which patients who used more immature (both Depressive and Non-depressive) or neurotic defenses early in treatment displayed an increase in PACS Avoidance late in treatment, whereas patients who used more Non-depressive immature defenses early in treatment displayed a decrease in PACS Resistance by the late phase of treatment, independently of their early attachmentrelated characteristics. That is, in this depressed sample, which had a high prevalence of neurotic and immature defenses at the beginning of treatment, the use of these defenses was related to a reduction in characteristics related to preoccupied attachment and an increase in avoidant attachment-related characteristics over the course of treatment. Previous studies showed that insecure attachment, and especially preoccupied attachment, is associated with more vulnerability to psychopathology and especially depressive symptoms, compared to not only secure but also avoidant attachment (Cole-Detke and Kobak, 1996;Fonagy et al., 1996;Rosenstein and Horowitz, 1996;Borelli et al., 2010;Laczkovics et al., 2018). In our study, increase in avoidance and decrease in preoccupied characteristics thus might be considered as a possible proxy for improvement in attachmentrelated problems within insecure attachment.
The longitudinal (but not cross-sectional) findings of our pilot study support the theorized connection between defense mechanisms and adult attachment in depressed patients, as well as the few empirical findings that examined this association in non-clinical samples. These studies found that insecure attachment is typically associated with the less adaptive defense mechanisms (e.g., Prunas et al., 2019). Whereas our study did not find the expected relationship between attachment and defense variables in the same session, our findings showed that neurotic and immature defenses are related to change and possibly, improvement in insecure attachment over the course of treatment.

Limitations
Observer-rated codings are a strength but may also limit generalizability outside the session. As mentioned earlier, even though observer ratings may be less biased and better able to assess processes outside of the patient's awareness, observer ratings are limited in that they assess patient functioning in a specific context, that is, a session, which might be affected by various circumstances, including the topic of the session or the level of alliance with the therapist. In a recent metaanalysis by Spruit et al. (2020), the type of instrument used to assess attachment uniquely contributed to the explanation of variance in depression symptoms among adolescents, and studies including self-report tools reported bigger effect sizes compared to those based on interviews and observations. Frontiers in Psychology | www.frontiersin.org 9 September 2021 | Volume 12 | Article 648503 Although beyond the scope of the current investigation, it would be interesting to examine whether similar patterns between attachment and defenses would emerge if self-report assessments of attachment were used. Furthermore, the PACS observer-rated coding system at the moment does not include the fourth attachment category Unresolved/disorganized (insecure) attachment. The inclusion of an additional attachment category may differentiate within the large proportion of patients currently classified as Preoccupied in our study.
Another limitation of this study is the relatively small sample size, which allowed for running correlations on the higher order defense and attachment categories, but did not allow for testing regression or mediation models on defense levels or individual defenses. The considerable differences in treatment length, especially the significantly longer psychodynamic therapies, also limit the generalizability of our results regarding temporal changes. Furthermore, we could only report initial comparisons across treatment arms. Given that some of the effect sizes across treatment modalities were large (Avoidance η 2 = 0.158, and Resistance η 2 = 0.154), further studies with larger sample sizes (powered to assess between-treatment effects) are warranted. Thus, this study can be seen as an exploratory pilot study, and larger-scale studies should examine the exact nature of the relationship between defense mechanisms and attachment security, testing mediation models of attachment, defenses, and psychopathology. A better understanding of the connections between insecure attachment and immature defenses with specific symptom clusters might induce clinicians to assess and intervene both on manifest symptoms and on defensive and relational styles, to help improve severe symptoms in depressed patients during the course of treatment.
Future research examining the association between adult attachment patterns and depressive symptoms should also examine further mediators and moderators. Attachment is likely best conceptualized as one etiological factor that interacts with many contextual and individual factors influencing risk for depression later in life (Cummings and Cicchetti, 1990;Rosen and Rothbaum, 1993;Belsky, 1997;De Wolff and Van Ijzendoorn, 1997;Sroufe, 2005;). As such, the association between adult attachment and depressive symptoms may be mediated by cognitive, behavioral, relational, physiological, and affective processes (e.g., emotion regulation; Malik et al., 2015). Identifying these mechanisms may offer novel targets for the treatment of depression.
Using the PACS system to study patients' attachment in session transcripts illustrates the potential clinical relevance of applying post hoc observer-rated measurements within the context of a highly controlled research design, such as an RCT. These observer codings are not only relevant with regard to the research insights they provide, but also might provide a useful clinical training tool to graduate students, who are interested in learning more about the psychotherapy process and how to attune their interventions to different types of patients. Furthermore, developing simple observer-rated methods that require minimal or no training to use are warranted. These methods could provide tools for clinicians to assess their patients' defensive and attachment-related patterns in situ, at any time point during treatment, which has the potential to significantly enhance case formulation and tracking treatmentrelated changes over time.

DATA AVAILABILITY STATEMENT
The data analyzed in this study is subject to the following licenses/restrictions: The IRB decision did not allow publishing the dataset. Requests to access these datasets should be directed to vera.bekes@yu.edu.

ETHICS STATEMENT
The studies involving human participants were reviewed and approved by the Research Ethics Committee of the Jewish General Hospital in Montreal, Quebec, Canada (original RCT) and Yeshiva University's IRB (WIRB), New York, NY (secondary data analysis). The patients/participants provided their written informed consent to participate in this study.

AUTHOR CONTRIBUTIONS
VB: original idea, study coordination, data analysis, and manuscript write-up. KD: conceptual contribution, study coordination, and manuscript write-up. DS: conceptual contribution, data analysis, and manuscript write-up. AT: conceptual contribution, coding supervision, and manuscript write-up. CS: manuscript write-up. JP: providing data from the original RCT and conceptual contribution. All authors contributed to the article and approved the submitted version.