Expectancy is a core mechanism for constructing affective and cognitive experiences of music. However, research on musical expectations has been largely founded upon the perception of tonal music. Therefore, it is still to be determined how this mechanism explains the cognition of sound-based acoustic and electroacoustic music, such as complex sound music (CSM). Additionally, the dominant methodologies have consisted of well-controlled experimental designs with low ecological validity that have overlooked the listening experience as described by the listeners.This paper presents results concerning musical expectancy from a qualitative research project that investigated the listening experiences of 15 participants accustomed to CSM listening. Corbin and Strauss’  groundedCross-modal musical expectancy (CMME) emerged from the data as a subcategory that explained prediction through the interaction of multimodal elements beyond just the acoustic properties of music. The results led to hypothesise that multimodal information coming from sounds, performance gestures, and indexical, iconic, and conceptual associations re-enact cross-modal schemata and episodic memories where real and imagined sounds, objects, actions, and narratives interrelate to give rise to CMME processes. This construct emphasises the effect of CSM’s subversive acoustic features and performance practices on the listening experience. Further, it reveals the multiplicity of factors involved in musical expectancy, such as cultural values, subjective musical and non-musical experiences, music structure, listening situation, and psychological mechanisms. Following these ideas, CMME is conceived as a grounded cognition process. Expectancy is a default brain function through which individuals make affective and cognitive sense of their experiences by comparing the actual unfolding of events against their predictions . ThroughIn music listening, as an aesthetic experience, expectancy contributes to the comprehension of high-order formal structures , disambiHowever, most of the research on musical expectancy has employed tonal music. Few works have focused on non-metrical, sound-based music , here coUnderstanding expectancy in CSM is relevant because of several reasons. First, it is a subversive avant-garde genre constantly bringing about tradition-breaking sounds, instruments, instrumental techniques, and performance practices. Consequently, schematic predictions associated with tonal syntactic rules  are unliFurthermore, the research on CSM expectations consists of theoretical frameworks  and empiGiven the relevance of expectancy for the advancement of cognitive science, the lack of research on prediction in CSM listening, the importance of understanding how CSM enculturated listeners establish motivating listening experiences, and the dominant experiment-based approaches, this paper offers a qualitatively grounded framework that sheds light upon the conditioning factors involved in CSM expectancy in enculturated listeners, emphasising the role of cross-modality. Analyses of interviews and the musical pieces that were the object of reflection during the interviews were triangulated following Corbin and Strauss’  groundedI will argue that musical expectancy in CSM integrates multimodal information derived from (1) the unique acoustic features of CSM pieces; (2) the visually perceived actions and objects, as well as further acoustical information from the listening situation ; and (3) indexical, iconic, and conceptual associations that arise from the listener’s past musical as well as non-musical sonic experiences. The integration of all or some of these sensory modalities  into a single expectancy process fuels and re-enacts cross-modal schemata that enable prediction and induce affective-cognitive outcomes. Additionally, I will argue that CSM listening generates cross-modal expectations more readily and overtly than traditional music due to the subversive structure and practices that place CSM on a perceptual midpoint between music and daily sonic experiences.complex sound: an ambiguous sonority that eludes classifications as either pitchless timbre, pitch, or harmony, and is composed by inharmonic spectra . I defined CSM as a musical genre that comprises acoustic and electroacoustic repertoire characterised by inharmonic spectra; perceptually ambiguous sounds (between pitch and pitchless timbre); non-metrical rhythmic designs; and perceptually uncertain sound sources.I coined CSM after Schaeffer’s  construcCSM belongs to a broader category of sonoristic music  that embCultural schemata have been considered essential for musical expectancy since Meyer’s  seminal On the other hand, musical expectancy studies have contemplated two types of adaptive responses: affective e.g.,  and cognIn summary, most musical expectancy models , 1973 haHowever, recent research on rhythm prediction has supported theories that involve cross-modal representations of rhythmic structure where sound and movement interrelate in sensorimotor simulations . These sCross-modality is at the core of grounded cognition theories. For example, Barsalou  suggesteAccording to Barsalou , re-enacGrounded cognition is vital to understand sounds as indexes and icons. Following Barsalou’s  principlThese associative memories give musical sounds the category of indexes, a sign that refers to its object because it is affected by it . AccordiOn the other hand, memories also give musical sounds the category of icons. Drawing again from Peirce, an icon is a sign that refers to an object because it resembles its object. Musical sounds resemble other sounds, such as emotional voices  and the M = 44.4, SD = 12; 4 women, 11 men). Seven were professional acquaintances of the researcher, one responded to an invitation posted on a website devoted to contemporary music, three were directly invited by the researcher because of being acknowledged figures in the local contemporary art music scene, and the other four were recommended by other participants. The participants were chosen under the main criteria of their declared preferences for avant-garde music and their interest in contributing to the study. They reported a frequency of CSM listening that ranged from once a week to every day .There were fifteen participants aged between 20 and 56 , nationality  and country of residence . Ten participants were professional musicians , one undergraduate music student, one philosophy teacher, one graphic designer, one administrative clerk, and one radio programmer. The philosophy teacher, the graphic designer, and the administrative clerk were the only participants with no musical training.The sample was intended to reach variation in terms of educational degree, musical training, years of listening to CSM  emerged from the data as a subcategory of a nuclear phenomenon dubbed “affective-cognitive listening experience”. CMME was defined as a mental mechanism that processes the stimuli . In this grounded model, each of the main categories is defined in terms of their properties and the dimensions of the properties. For instance, one of the subcategories of the musical structure is “change”. It varies between two extremes: “infrequent-frequent” see . On the Guero as a revelation. He described it as an assemblage of ‘completely undocumented’ sonorities that answered a personal search as a composer: ‘I was looking for sounds, but I couldn’t find what I actually wanted to hear, and I heard it with this piece’. P10 related that search to what he described as an innate curiosity connected to a particular sensitivity for timbre and his personal interests as a composition student.The “personal background” was essential to enable CMME via a positive “self-relevance appraisal” of the stimuli. Its properties, “personal features”, through the dimensions “curiosity” and “timbral sensitivity”, and “personal interests” explained this appraisal and its affective consequences. For example, P10 described his first listening to Guero from the first listening, which was on a tape player. The initial gesture is a delicate rattle produced by rolling the fingers at different speeds and directions on the piano keyboard without drawing any pitches (see https://www.youtube.com/watch?v=sVHl-pqaIYM as a reference). P10 said: ‘I could see, even the first time I heard it, something was rolling […] I wasn’t sure how exactly he was producing the sounds […] it was rough […] it had some sort of regular edges.’ Later P10 said he could see the movement going to the left and the right at different speeds. He explained that this gesture evoked images of himself as a child producing this kind of rolling sound with ‘a stick against a fence’ and added: ‘I think, even unconsciously, these sounds are so primordial […] and kind of resonate with you very deeply’. That resonance means that ‘that sound energy […] engages [him] more, it makes [him] more related to this piece […] because [he has] more things to grasp.’“Personal memories” were also essential for CMME because they provided the substrate for “indexical, iconic, and conceptual associations”. For example, P10 described a particular interest in the initial gesture of From these data, it could be inferred that P10 had a sound-source-action of production schema that activated an indexical association enabling him to imagine a generic shape and material density of the source and to predict the speed and direction of the sound-producing actions; that is, a CMME process within a “local formal dimension”.Other examples of indexical associations involved in CMME in “acousmatic situations”  included P4’s failure to predict the spectromorphological possibilities of a string quartet: ‘I wanted to know how to get those timbres out of the instruments […] what a blow how they come to sound so different from the solo instrument’. Also, P11 constructed a narrative upon the affective-cognitive meanings of sound-source-action schemas: ‘The first part tells us about the beauty of this specific element that is the hinge […] but at the same time the composer knows that he cannot continue with that, and therefore the noises of running footsteps appear, which here break with that discourse, introducing an important dramatic element’.Guero’s rattling gesture and the rolling ‘stick against a fence’ from his childhood. These memories might have contributed to the expectancy experience as an episodic event and an instantiation of the indexical schema sound-source-action. Other examples of iconic associations were more abstract and contributed to the conceptual narrative side of CMME processes. Such was the case for P14’s apperception of specific moments of De Natura Sonoris No. 2: ‘It begins with a musical saw crying, singing. That first gesture really grows into that big moment […] that hammering gesture’ in measures 32 and 33, which she associated with the hammering of Christ’s crucifixion.On the other hand, some memories revealed iconic associations, such as P10’s resemblance between The common affective outcome of these CMME processes was an engaging, positive feeling. Nevertheless, there were other concurrent feelings such as ‘awe’ and ‘anxiety’ for P4, ‘scape’ and ‘drama’ for P11, ‘sadness’ and ‘tragedy’ for P14, and, for P10, what I interpreted as a positive appraisal of sound patterns that were not ‘just abstractions but […] part of [his] life’. This variation in the affective consequences was possibly due to the mental mechanisms interacting with the expectancy processes. The “non-specific” affect of engagement or motivation might have been a by-product of the self-relevance appraisal and the prediction process, while the more “specific” or categoric emotions were probably related to the content of the subjective iconic and conceptual associations.To conclude with the illustration of CMME based on P10’s case, I propose that his CMME process received “overt attention” caused by a positive “self-relevance appraisal” of the “music structure”. The appraisal was due to what I interpret from the interviews as “liking for timbre”, “curiosity”, search for “innovation”, and “personal interest” in musical sounds that relate to his daily extramusical sonic experience. This appraisal facilitated the focus on a “local formal dimension”  and the sounds, objects, and actions interrelated in re-enacted cross-modal schematic and episodic memories that were essential to making sense of the musical passage. Therefore, it can be assumed that musical structure and associations were insufficient to start the CMME process. Instead, the self-relevance appraisal, conditioned by “personal features”, “personal interests”, and “sonoristic values”, triggered the process.Having Never Written a Note for Percussion in a recital where the percussionist sat facing a tam-tam (see https://www.youtube.com/watch?v=Zd5WNTiwiU8 as a reference). The piece consisted of a continuous tremolando. It started in a nearly inaudible pianissimo, grew to a fortissimo, and returned to the first extremely low intensity. He read the programme notes and was prepared to hear nothing but a tremolando on a tam-tam. P2 said he was ‘marvelled’ by not being able to recognise the sound of the tam-tam once the piece had started: ‘that sound threshold at the beginning of the piece where one is not sure if one is imagining that things are already sounding or they are sounding, and the same at its end’. The beginning and the end of the piece were P2’s favourite moments, and they have since produced a similar affective outcome after 17 years and tens of new hearings in different “situations”. He said that ‘there is always a strange moment where the noise of the world’ fusions with the beginning and the end of the piece and added: ‘not being certain about when the piece begins and ends is what captures my attention’.Other CMME cases involved online multimodal stimuli from “live” concert “situations”. For instance, P2 recalled his first experience with It is inferred that P2 was affectively engaged with the performance because it violated a cross-modal sound-source-action-space schema, which was covertly re-enacted since the moment he read the programme notes. The elements of such schema were the sound whose source was momentarily uncertain; the real source (the tam-tam); the action of tremolando; and the “real space”  and its noises (‘the noise of the world’) that blended with the extremely low intensity at the beginning and the end of the piece. I propose that during that first experience, P2 was pre-attentively receiving multimodal information from the performance , but he could not confirm his cross-modal predictions. Once he realised this, he felt ‘marvelled’ by those moments of complete uncertainty about what was sonically occurring.Thus, this is also a “local” CMME process. Further, similar to P10, this process might have been only possible due to P2’s reported “timbral sensitivity”: ‘when I was a child I had a secret fascination […] the noise of electrical generators […] I could stay fascinated, listening to that buzz for long periods […] Sometimes I would pick up the phone until the tone went off, just because I wanted to hear the beep’. I interpret that this timbral sensitivity, added to other sonoristic values, determined the positive “self-relevance appraisal” necessary to start the CMME process.Other examples of being motivated by uncertainty or violations of sound-source-action-space schemata in “live” situations were observed in the cases of P3 and P6. They reported cross-modal schemata violations in live electroacoustic concerts because the instruments and the performers’ actions were not coherent with the sounds from the speakers. The incoherence was due to the effect of the electronics on the timbre and the movement of the sounds in the “composed space” . P6 said: ‘[…] you are not sure if the resonance is coming from the guitar or the computer; that’s what I like.’ Later he added: ‘it stops the possibility of receiving confirmation of what you hear from what you see […] you hear the guitar being played in the centre [of the “real space”] and the [processed guitar sounds] go around the public as if the guitar were embracing it.’ In the case of P3, the first violation was the rarity of the instrument: a comb. She said: ‘knowing where the sound comes from causes curiosity or interest […] it is like an illusion [that] can only happen with a visual element, be it live or multimedia’. She also referred to the stereophonic movements of the electroacoustically transformed comb’s sounds as a kind of uncertain dynamism that maintained her engagement; she emphasised that had the space been “static”, it would have been ‘predictable’ and ‘not interesting’.Guero. During his interview, we watched the YouTube version cited above. The piece starts with the commented rattling gesture on the white keys, which develops with some other pitchless plucks on the keys, strokes on the piano rim, resonances caused by depressing the sustain pedal, and, later, more rattling sounds on the black keys. At 2:03, the performance introduces resonant pitches from a gentle stroke on the piano’s harp and progresses by juxtaposing all these gestures in what P13 called a ‘subtle development’. From the musical analysis, the harp stroke at 2:03 is defined as a highly “unexpected change”, and from the interview data, it emerges as a positive predictive error that marks a reference point in P13’s narrative. The musical analysis also reveals “gradual, infrequent” timbral “changes” from non-resonating pitchless timbres to a mixture of resonating pitchless and pitched timbres. These timbres are drawn first from the outer parts of the piano (white keys and rim); then from the black keys that are spatially closer to the harp; and finally, from the harp.The presented cases showed an action of listening focused on “local” dimensions. Other cases like P13’s had a more “global formal focus” and produced what I interpret as a “narrative, conceptual association”. P13 also chose I inferred that P13 built a narrative based on both the gradual timbral changes and the performers’ actions that progress from the outer to the inner parts of the piano. For P13, the piece represented the construction of a new instrument based on a metaphorical güiro, represented by the initial rattling, güiro-like gesture. From the interview data, I interpret P13 judged this gesture as ‘perplexing’ because it did not correspond with his cultural concept of the piano. I propose that perplexity was crucial for P13’s understanding of the gradual timbral changes as a construction of a new instrument because the rattling gesture, being an “unexpected” pianist’s performing action and an icon of the güiro, was a good candidate to symbolically start a gradual construction that evolves from a non-pianistic gesture to more recognisable piano sonorities. Thus, in this analysis, the performer’s actions represented a symbolic progression towards the final section (after 2:03). P13 identified this final section with the morphological ‘core’ of the piano (the harp) and the ‘heart of the piece’. He called it ‘the heart of the piece’ because he recognised that all the previous musical gestures juxtaposed in a ‘subtle development’. Consequently, I interpret this final section as the formal goal of P13’s narrative about constructing a new instrument, symbolising the fusion of the metaphorical güiro and the piano.It can also be inferred that the main surprises he perceived  were violations of cross-modal schemas that interrelate his cultural concept of the piano, the acoustical tendencies of the piece, and the performer’s actions he was watching (the YouTube video was his first encounter with the piece). Particularly, the harp stroke at 2:03 violated three tendencies: the pitchless timbral tendency; the tendency of the performer’s actions to roll the fingers on, and strike, the outer parts of the piano; and the conceptual tendency to regard the initial part of the performance as distant from the cultural/sonic schema of the instrument . In conclusion, this was a CMME process across the entire piece that was realised through the use of indexical, iconic, and conceptual associations in interrelation with the spectromorphological tendencies of the piece.The presented cases covered all the categories involved in CMME. “Personal memories” that fed “indexical, iconic, and conceptual associations”; “sonoristic values” as sources of cultural schemata that make participants enjoy, give meaning to, and expect complexity and uncertainty; “personal features” that together with the sonoristic values were essential for the “self-relevance appraisal” of CSM affordances; properties of the “musical structure” that constituted these affordances, triggered the mechanism of “expectancy”, and influenced the focus of the “action of listening”; and finally, the “affective-cognitive listening experience” that comprised both “non-specific” and “specific” affects such as liking, engagement, wonder, sadness and anxiety, and also “concepts” and “narratives” built upon, and contributing to, the expectancy processes. These findings point out the complexity of CMME in terms of its multiple factors and what traditional musical expectancy models are yet to address.On the other hand, some of the experiences presented here could have been explained solely in terms of these traditional models . For instance, P10’s prediction of the gesture’s speed can be explained by the gestalt law of good continuation in sound patterns; the surprise P13 received at 2:03  can be interpreted as a result of a dynamic prediction ; and othThis paper started by questioning whether the models of musical expectancy based on the perception of traditional music explain the cognition of CSM. Some results, particularly those not presented here . Additionally, the participants showed an educated listening for timbre . Concerning personal features, many participants identified themselves as curious and possessing a “timbral sensitivity” traced back to an age before their sonoristic enculturation . The appraisal itself is an expectancy process that initiates even before the listening experience, helping to prepare the individual for the listening event. Affective responses arise from the appraisal and move the action of listening towards, or away from, other prediction processes the stimulus/event will trigger. If the event is not rejected, it will re-enact cross-modal schemas and episodes whose sources include musical and non-musical sonic experiences. The prediction, as in other models, consists of what might happen and when it might be happening; thus, like Huron’s  ITPRA moThe CMME cycle complements or extends other music expectancy models, such as ITPRA, in three main aspects: first, it is sustained by self-relevance appraisal; second, the action of listening is focused on a multimodal structure determined by the listening situation and re-enacted memories; and third, these memories consist of cross-modal schemata and episodes derived from musical and non-musical sonic experiences. In the case of the ITPRA model, a self-relevance appraisal based on cultural values and idiosyncratic criteria is not considered, the event/stimulus consists of only musical sounds, and the schematic and episodic memories that lead to predictions are not conceived as re-enactments and come exclusively from auditory musical experiences. Hence, models like ITPRA partially explain a complex CMME process. In this complex process, musical expectancy cannot happen removed from other concomitant stimuli of different modalities, associative memories, and sensorimotor simulation brought about by these memories.Furthermore, most previous musical expectancy models considered mainly pitch-based music. The perceptual closeness of CSM’s and everyday sounds had a decisive impact on the configuration of the CMME model. A relevant question arises from this argument: would the general CMME hypothesis be valid only for CSM? This study cannot answer the question, although ways can be suggested. While traditional music is based on strict, culture-driven syntactical systems, I propose CSM is based on ‘complex sounds’  organiseThis view is supported by Cayol and Nazir’s  LIAMBS mThis constraint could have facilitated the emergence of the CMME cycle from the data as a sort of ITPRA model that includes self-relevance appraisal, the cross-modal nature of the stimuli, and the re-enactment of cross-modal episodic and schematic memories. The participants’ cross-modal experiences support this view and suggest that indexical associations are essential in this re-enactment. Despite indexes’ essential role, the evidence cannot fully support the theoretical assumption about low-level indexes as foundations of iconic and conceptual associations.On the other hand, the results do not suggest that simulation systems are only relevant for CSM cognition. It has been argued that simulation is crucial for disambiguating our experience of traditional music . CMME isRelevant categories and the complexity of the phenomenon emerged from this qualitative analysis. However, as a grounded theory this study can only provide hypotheses to be tested through other methods. Furthermore, details of the cognitive process cannot be accessed. For instance, it is impossible to know if reported CMME started pre-consciously, or if cross-modality appeared once the process became accessible to consciousness. Similarly, it is not feasible to disentangle the order in which indexes, icons and concepts contributed to expectancy. Additionally, I suggested memories were crucial for CMME, but an alternative explanation based on Gibson’s  ‘self-atAlso, specific to this study is the fact that only three participants had no musical training . Although, there were no general differences observed between those three participants and the rest, in terms of the subcategories and their dimensions (see On the other hand, the assumed influence of CSM on the role of non-musical sonic memories in CMME makes it necessary to explore the CMME hypothesis in the experience of pitch-based music. It might be beneficial for the understanding of the listening experience to design studies that compare CSM and tonal music listening. For instance, if the acoustic properties of CSM make this music rely mainly upon simulations to induce CMME, then affective responses to CSM should be less intense in patients with environmental sound agnosia  than theFinally, not every participant described experiences interpreted as CMME (see This investigation of musical expectancy in CSM further reveals that musical listening is a multifaceted, complex experience. The results suggest that CSM structure extends beyond the auditory stimuli. The participants’ action of listening could not be disentangled from the situation it was embedded in nor from relevant re-enacted musical and extramusical past experiences. Barsalou’s situated action cycle framework helped to understand CMME as a complex process that incorporates cognitivist expectancy models’ principles and puts them in interaction with mechanisms like self-relevance appraisal and re-enacted associative memories grounded in the entire sonic experience of the listener, not just music listening. Due to the novel practices of CSM, sounds were significantly appreciated as indexes of sources, actions, and dynamic spaces, beyond mere continuations of low-level gestalt and high-level abstract sound patterns. Sound indexes emerged as key elements for CMME. They appeared as a construct that unifies a tridimensional structure of the listening experience founded on enculturation, subjective experiences, and mental mechanisms. Regarding the enculturation and the subjective experience, the participants might have learned to use sounds as indexes through their interactions within physical and social environments. Regarding the mental mechanisms, sound indexes, in the Peircean sense, have been part of all sound-sensitive species because sonic waves existed before the arrival of life on earth. Thus, sound indexes should be understood as an environmental source of natural selection pressure that enabled living things to acquire sound perception as a skill to guide effective actions and interactions in natural environments and allowed modern humans to develop music listening as one of the most distinctive features of their kind.The data that support the findings of this study are available on request from the author. They are not publicly available due to information that could compromise the privacy of participants.The additional file for this article can be found as follows:10.5334/joc.281.s1Appendix.Examples of excerpts, coded as the properties’ dimensions, according to the participants listed in the last column of Table 2.


TorchLens, a new open-source Python package for extracting and characterizing hidden-layer activations in PyTorch models. Uniquely among existing approaches to this problem, TorchLens has the following features: (1) it exhaustively extracts the results of all intermediate operations, not just those associated with PyTorch module objects, yielding a full record of every step in the model's computational graph, (2) it provides an intuitive visualization of the model's complete computational graph along with metadata about each computational step in a model's forward pass for further analysis, (3) it contains a built-in validation procedure to algorithmically verify the accuracy of all saved hidden-layer activations, and (4) the approach it uses can be automatically applied to any PyTorch model with no modifications, including models with conditional (if–then) logic in their forward pass, recurrent models, branching models where layer outputs are fed into multiple subsequent layers in parallel, and models with internally generated tensors . Furthermore, using TorchLens requires minimal additional code, making it easy to incorporate into existing pipelines for model development and analysis, and useful as a pedagogical aid when teaching deep learning concepts. We hope this contribution will help researchers in AI and neuroscience understand the internal representations of DNNs.Deep neural network models (DNNs) are essential to modern AI and provide powerful models of information processing in biological neural networks. Researchers in both neuroscience and engineering are pursuing a better understanding of the internal representations and operations that undergird the successes and failures of DNNs. Neuroscientists additionally evaluate DNNs as models of brain computation by comparing their internal representations to those found in brains. It is therefore essential to have a method to easily and exhaustively extract and characterize the results of the internal operations of any DNN. Many models are implemented in PyTorch, the leading framework for building DNN models. Here we introduce  A DNN implements a series of operations that transform inputs into outputs. For many practical applications it is not necessary to examine the results of intermediate operations in DNNs. However, probing the intermediate steps can help us understand the computations used by a particular model to transform inputs into outputs, illuminating the reasons for its successes and failures and informing the development of better models.Deep neural network models (DNNs) have emerged as the dominant class of AI models for performing many tasks, and as promising, albeit debated, candidate models for how the brain functions5. This requires comparing not just their performance on task benchmarks, but also the degree to which their intermediate representations match those observed in brains. A growing variety of DNN models are now used as candidate models for brain computation, including not just visual recognition models, but also language models7, multimodal models8, auditory models10, generative models11, and deep reinforcement learning models12, and it is increasingly common to compare how well multiple models predict brain activity, both in individual studies14 and in competitive benchmarks such as Brain-Score15 and the Algonauts Challenge16 in which different research groups submit models that are compared based on a shared dataset.In addition, neuroscientists seek to evaluate how well DNNs model brain functionany DNN without requiring model-specific tinkering by the user, such as editing of a model’s code, since this approach can become time-consuming and error-prone when examining many models, and since users vary in their technical background in working with DNNs. Second, it should be able to extract the results of all internal computations within a model, rather than just a subset. Third, it should render transparent—for instance, through visualization or through intuitive metadata—where a given layer fits within the broader information flow of a network. This is essential because the function of a layer depends on the other operations performed in a network, and models often include architectural complexities such as branching or recurrence. Finally, given the infinite space of possible DNN models that can be constructed, and the rapid pace of model development, it is desirable to have an automated method for validating the correctness of the extracted activations for novel models.Since advancing the practical goal of improving DNN task performance and the scientific goal of comparing DNNs to brains often involves comparing many different models, it is desirable to have convenient methods at hand for extracting the results of these intermediate operations and understanding their role in the information processing of each network. Ideally, such a feature extraction method should have the following qualities. First, it should easily work for 18, one of the most popular libraries for implementing DNNs for both academic and industrial applications. One approach to feature extraction is to simply edit a model’s code to return the results of any intermediate operation. This approach can be time-consuming and error-prone, especially when we have to edit the code for many models. Another option is to use PyTorch’s built-in functionality to attach “forward hooks” that return the results of PyTorch module data structures. PyTorch modules provide a convenient way of flexibly organizing model code and ensuring that a training optimizer can access a model’s parameters. The user can additionally attach “forward hooks”: functions linked to a module that are executed when a tensor enters or leaves that module. This is a popular approach to PyTorch feature extraction because it requires no direct modification of a model’s code. However, it comes with several limitations. First, there is no universal naming convention for characterizing the modular organization of DNNs. A user examining a collection of models must become acquainted with the nomenclature of all of them. Second, and more importantly, PyTorch operations not associated with a module cannot be extracted using this approach. These include many elementary operations  that have no module equivalent (unless the model designer chooses to encode them as such), and operations that the model designer has implemented as functions rather than modules. For example, a ReLU operation can be implemented either as a module object (where its activations can be extracted using the forward-hooking approach), or simply as a function call . Thus, the ability to extract activations from a given intermediate DNN operation in PyTorch with the forward hook approach often depends on computationally irrelevant programming choices made by the model designer, which can complicate the construction of an analysis pipeline that examines many models. Put differently, while PyTorch modules are indispensable units of code organization, they do not directly map onto the elementary computational “units” of DNNs—single operations on tensors—making them suboptimal for the purpose of exhaustively characterizing the internal operations of a network.None of the currently existing methods of feature extraction fulfill all the above desiderata Table . We focuThingsVision19 is a Python package with user-friendly functionality for loading pre-existing DNNs, extracting their activations either to common image datasets or to user-defined datasets, and performing various common analyses on the extracted features, such as representational similarity analysis20. While it can extract activations from a large and convenient library of pre-existing models, it does not automatically work for arbitrary new models , and can only extract the outputs of PyTorch modules, not every operation in the model. Another Python package, Net2Brain21, has functionality for loading pre-existing DNNs, extracting their activations to stimuli, analyzing the extracted activations, and comparing them to brain activity measurements, but is similarly limited to a pre-defined library of models, and can only extract the outputs of PyTorch modules, not every tensor operation in a model. Another approach is the feature_extraction module provided in Torchvision22, which works on novel models (not just a predefined library), and can extract the results of non-module operations, but does not support models with dynamic control flow, where the computational graph of a network can vary across forward passes24. Examples of such models include recurrent neural networks that execute a varying number of loops until a given criterion is reached25, reinforcement learning models where the agent’s behavior can vary stochastically or based on model inputs26, and graph convolutional networks where the computational graph can vary across model inputs27. A fourth package is Surgeon-PyTorch28. This package can extract intermediate activations from both module and non-module operations for models with a static computational graph, and can additionally isolate subcomponents of models such that they can be separately trained. However, for models with dynamic control flow, this package can only extract the results of module operations, and thus lacks the ability to extract non-module operations for dynamic models.In addition to these manual approaches for extracting intermediate activations from DNNs, four open-source packages now exist for facilitating this process. TorchLens, that overcomes the limitations of these approaches: it works for arbitrary PyTorch models  and can extract the results of all intermediate operations (not just module outputs), requiring just a single line of code from the user. The ability to extract information about every operation in the model’s computational graph comes with three substantial further benefits. First, it enables the model’s computational graph to be automatically visualized, revealing the structure of the model and where a given layer is located within it. The computational graph provides a valuable aid for understanding a model’s architecture without manually inspecting its code. This visual representation of the model can also help with layer selection, especially for architectures containing complexities such as branching or recurrence, where indexing a layer by an ordinal position  may not clearly convey where a layer is situated in the network. Second, tracing all intermediate operations of a model enables producing a full characterization of the model’s computational graph—encompassing the child-parent relationships between layers, the functions executed by each layer, and so on—such that the user can programmatically select layers meeting certain criteria , perform analyses that might draw on graph-theoretic properties of the network , and characterize other useful properties of the network, such as the execution time required for different kinds of layers. Finally, extracting the results of all intermediate operations enables an automated approach for verifying the correctness of saved activations without manual troubleshooting. This verification method re-executes the functions associated with each layer using the saved activations of the inputs to that layer and checks that the resulting downstream model outputs match the ground-truth outputs. Given the large space of possible DNN models, and the fact that feature extraction bugs can easily yield “silent errors” , verification ensures that feature activations are being correctly extracted for novel models that may have complex architectures.Here, we introduce a new Python package, TorchLens. The user simply passes a model and input into the main function of TorchLens, log_forward_pass, and receives a ModelHistory object that encodes information both about the entire model and about each individual layer, including the saved activations for each layer. Layer information is retrieved simply by indexing the ModelHistory object with any valid layer label. If specified, the same function call also automatically generates a visualization of the model’s computational graph , we adopt the practice that while the full layer label is always provided in outputs, the user can also refer to layers with a truncated label that only specifies the first index . In cases where a model has a branching structure , such that layers do not have a unique ordinal position, numbering is based on the programmatic execution order of the layers in the code, which guarantees that a given layer always has a lower positional index than any downstream layers . In case a model is recurrent and a layer contains multiple passes, the specific pass of a layer is indicated with a colon; for instance, conv2d_3_7:2 is the second pass of the third convolution layer . The logic of assigning operations to the “same” layer is described in the section “29 consists of a nested design with two top-level modules: a “features” module containing the convolutional layers, and a “classifier” module with the fully-connected layers, each of which itself contains a module for each of the individual operations in that block. The second convolutional layer of AlexNet is the fourth submodule of the “features” module, so the “module name” of that layer would be features.3 (following Python’s zero-indexing convention). Under the default naming convention of TorchLens, the same layer would be indexed as conv_2_4 or conv_2. Layers can be fetched with their “module address” at any level of nesting: for instance, the output of the third pooling layer in AlexNet is the output of module “features.12”, but also of the higher-level module “features” (of which “features.12” is the last submodule).In addition to this default naming convention, which provides a way of referring to layers that is common across models, layers are also labeled based on the module for which they are an output. To provide a specific example, the PyTorch implementation of AlexNetTorchLens (returned by log_forward_pass and get_model_metadata) is an object of class ModelHistory, which contains both metadata about the entire model, and information about each individual layer, including both metadata and the saved activations for that layer if specified by the user. Broadly, the provided metadata includes information about the overall structure of the network’s computational graph, the tensor returned by a given layer, the function executed by each layer , and the parent–child relationships between layers along with further graph metadata . This metadata also includes useful performance-relevant data for a network: for instance, it includes the execution time of each layer, the memory size of the tensor returned by each layer, and the memory size of any trainable model parameters associated with a layer, facilitating profiling of the execution time and memory usage of a model. Supplementary Table TorchLens. Simply printing the ModelHistory object provides an overall summary of the model, with further metadata available by indexing the attributes of the object. Data about each layer can be retrieved by indexing ModelHistory, using any of several valid labels for a layer: the “default name” of a layer, such as conv2d_3_7 or conv2d_3, the “module name” of a layer, such as “features.8”, or the overall ordinal position of the layer in the network, following the conventions of Python list indexing . If only a subset of layers is saved, numerical indexing is performed with respect to the saved layers only.The core user-facing data structure used by TorchLens can also automatically produce a visualization of the model’s computational graph  show parent–child relationships between layers . Input layers are shown in green, output layers are shown in red, and layers whose functions have trainable parameters are shown in gray. Elliptical nodes are single operations that are not associated with a module, whereas rectangular nodes are associated with a “bottom-level” module associated with a single operation; for instance, a ReLU operation implemented as a function call would be shown as an ellipse, and a ReLU operation connected with a module is shown as a rectangle. In addition to these “bottom-level” modules that only execute a single tensor operation, PyTorch contains “higher-level” modules that encompass multiple operations, which are shown as  rectangles surrounding the nodes corresponding to layers contained within those modules , a nesting depth of 2 means that top-level modules and modules one level deeper will be visualized, but not modules deeper than that, and so on. Figure 31, which has a nested hierarchical organization.The visualization produced by les Fig. C. Since The visualization includes metadata both about the overall model, and about each individual layer. For the overall model, the visualization shows the name of the model class, the number of tensor operations in the model along with the total memory size of the resulting output tensors, and the number of trainable parameters in the model, along with the total memory size of these parameters Fig. A. The noTorchLens indicates several other kinds of information to remove ambiguity about the structure of models that include less common “special case” components. Some PyTorch models contain internally-generated tensors that are not computed from the model’s input, but contribute to the model’s computations . These operations are indicated with dashed lines, intended to make it easy to visually distinguish them from layers whose inputs originate from model inputs, such that the user can visually trace the path from input to output  on the outputs of multiple parent layers Fig. D, the fubel Fig. F. Markinpublicly available collection of visualizations for over 800 commonly used image, video, audio, and language models, demonstrating the generality of this automated visualization approach.We include a TorchLens has built-in procedures that automatically identify and demarcate recurrent layers, using the convention of marking passes of a layer with a colon as noted above .Since many DNN models contain recurrent (feedback) processing, An important conceptual question to address is what counts as a “recurrent layer”. At a ground-truth level, a DNN is simply a series of tensor operations, some of which have trainable parameters associated with them. A complete description can be given of a network in this way without invoking the notions of “feedforward” and “recurrent” processing. Nonetheless, distinguishing feedforward and recurrent operations can be helpful in clarifying the computational structure of a network. We stipulate that in a “feedforward” network, each layer executes one operation, but in “recurrent” networks a layer may execute its associated operation multiple times during a forward pass. Thus, identifying “recurrent” layers corresponds to finding sets of operations in the computational graph that can be usefully regarded as belonging to “the same layer”. The most obviously useful operations to treat in this way are ones in which functions with the same trainable parameters are executed multiple times during a forward pass. For example, if a convolution operation with a given set of weights is executed three times over the course of a network, these operations should be regarded as being associated with the “same” layer. However, other operations may also be usefully regarded as “the same”. For instance, if each of the three aforementioned convolutional layers is followed by an identical ReLU layer and a pooling layer, it is also sensible to group together these three ReLU operations as belonging to “the same” layer, and likewise for the three pooling layers. Finally, if a repeated and contiguous series of operations with no stored parameters is executed , it is also useful to regard this as a “loop” in the graph, and to mark corresponding operations in the loop as the same layer.TorchLens thus adopts the following conventions .Note that these are simply conventions to aid in quickly understanding a model, since whether a layer is “recurrent” is to some degree a matter of definition.TorchLens also includes functionality for showing the model in both unrolled format, where separate operations of a recurrent layer are shown as different nodes, and in rolled format, where separate operations of a recurrent layer are shown as just one node .For visualizing recurrent models Fig. , TorchLeode Fig. . In the TorchLens  may change the values of a tensor without changing its shape, such that an error in saving the activations would be harder for the user to detect. Since manually checking the correctness of saved activations for a new model can be time-consuming and error-prone, TorchLens contains a built-in procedure for algorithmically validating the accuracy of saved activations. This is achieved by re-executing the function associated with each layer with the saved tensor values of the layer’s parents and verifying that the resulting tensor matches the saved tensor for the layer. This procedure is described in more detail in the “The approach used by 22, including various visual transformer models, (2) over 700 models in the TIMM model zoo, (3) the CORNet class of image models inspired by the primate ventral visual pathway32, (4) all models in the TorchAudio model zoo, and (5) the language models BERT33 and GPT234. Based on these extensive tests, we believe TorchLens works robustly. In case any architectural “edge cases” are not currently accounted for by TorchLens, this built-in validation procedure will detect such cases and allow them to be corrected in subsequent updates to TorchLens.So far, this procedure has been internally run on a large collection of DNNs, including (1) all image and video models in the TorchVision model zooTorchLens: a user has either designed their own PyTorch model, or downloaded a model and wishes to extract the activations from a selected set of layers.Inspect the model graph. First, to get a sense of how large the model is and which layers may be interesting to examine, the user calls the show_model_graph function to visualize the computational graph of a model without saving any activations. The user notes that the network is very large, such that saving the activations of all layers may use up a prohibitive amount of RAM, and selecting only a subset of layers to save may be desirable. The user notes that the model is organized into several high-level modules, each of which contains multiple recurrent feedback loops, and further note that the model contains many cases where a pooling layer follows a ReLU layer.Optionally use model structure to find representations of interest. The user decides they wish to extract the outputs of all high-level modules in the model, the end of each pass of the recurrent loops within the modules, and the results of all pooling layers that follow a ReLU layer. To identify these ReLU-pooling layer pairs, the user calls get_model_metadata to extract the metadata of the model, loop through each layer’s metadata, and find all pooling layers that have a ReLU layer as a parent.Extract activations for representations of interest. Finally, the user calls log_forward_pass, specifying the desired layers whose activations they wish to save, and verify that the activations were accurately saved for this new model by calling validate_saved_activations for the model and input.As a way to summarize the elements of the user interface described above, we briefly describe an imagined use-case for TorchLens. As laid out in the introduction, we sought an approach that could automatically extract the results of any tensor operation from arbitrary PyTorch DNN models without manually editing model code. As noted earlier, currently existing approaches face various limitations: for example, they can extract the results of module operations but not the results of operations that are not linked to modules, or they only work in the case of models with a static computational graph, but not for models with a dynamic computational graph that can vary across forward passes .We now describe the internal implementation of TorchLens applies this decorator to all PyTorch functions that return a tensor as output, and a forward pass is then run on the model. The model’s code remains unchanged, but the functions called within that code now are decorated with the additional logging functionality, and thus log their results to ModelHistory. Additionally, in order to log the modules in which operations occur, TorchLens also attaches a forward hook to each module that tracks whenever a tensor enters or leaves the module and logs this to ModelHistory. When the forward pass is completed, the logging decorators are removed from the PyTorch functions, returning them to their original definitions.To overcome these limitations, we devised a dynamic tracing approach that relies upon Python’s built-in decorator functionality in order to transiently modify all built-in PyTorch functions that return a tensor. These modified functions log information related to each tensor operation. A decorator is a Python function that wraps another function with additional code that is executed whenever that function is called. To extract the results of the tensor operations in a model, we constructed a decorator that inspects the inputs and outputs of a PyTorch function call and logs information about the function and its inputs and outputs to a Python object of a class called ModelHistory that we implemented for this purpose. Additionally, any output tensors are tagged with a “barcode” (simply an identifier attribute assigned to the tensor data structure) such that when any subsequent functions are called on that tensor, the parent layers feeding into that function can be looked up from ModelHistory, thus establishing the parent–child relationships in the computational graph. To log the results of the forward pass of a model, TorchLens properly handles the logic of logging the results for each elementary operation, it should in principle be able to work for all models built from the elementary operations, instead of being limited to a predefined library of models. We note that this approach sometimes requires dealing with various “special case” functions. For example, some functions change their input tensors in place and either return nothing or return the same tensor object (without creating a new tensor), and some return a list or tuple of tensors rather than a single tensor. Each of these cases must be specifically dealt with, and it is possible that new elementary operations with unique programming logic will be added to PyTorch with further updates. However, PyTorch’s elementary operations will always constitute a finite set, and it should be straightforward to address them as they arise with further updates to TorchLens. Furthermore, since TorchLens also contains a built-in validation procedure (implementation described below), it can detect these special cases when they arise. Thus, the approach used by TorchLens should be both broadly generalizable to any PyTorch model, and easily adapted to any potential further additions to PyTorch’s set of elementary operations.The advantage of this approach is that PyTorch contains a limited  set of elementary operations from which nearly all higher-level functions are constructed; thus, so long as TorchLens attempts to infer cases where the model contains conditional branching via if–then statements. To do this, it identifies and marks operations whose output is a tensor consisting of a single Boolean value that is not subsequently fed into any further operations, which is a plausible candidate for an operation evaluated in an “if” block. While this is not a bulletproof heuristic, there are few cases in which a coder would compute a childless Boolean tensor in this way that is not part of an “if” block. Additionally, TorchLens traces backwards from the layer whose output is this Boolean tensor until it finds a layer that is an ancestor of the model’s output, and marks this transition point as the beginning of an “if” branch. For example, if an “if” statement consists of “if torch.mean(x − 5) > 3”, the “greater than” operation would be the childless node that returns a single Boolean value, and the subtraction operation would be the first operation that branches off from the input and leads into the series of calculations involved in evaluating this if-statement  for operations performed on internally generated tensors—for instance, via functions such as torch.ones, or torch.rand. Since these tensors can be generated inside a module, the module in which they are generated cannot be inferred on the fly by tracking the modules entered by any ancestor tensors. To correct this, TorchLens recursively traces the children of these layers until it finds a layer that descends from the model input—which will have accurate module containment information—and propagates this information backwards to the internally generated tensors.Fourth, TorchLens identifies and marks recurrent layers in the network. While the question of which layers should count as “recurrent” is a matter of definition, we stipulate that an operation is associated with a recurrent layer if it meets any of these conditions:It contains trainable parameters and is executed more than once during the forward pass.It is a parent or child of a pass of a layer meeting condition #1, and there is another operation of the same type adjacent to another pass of that layer . This condition is applied recursively , growing out a block of repeated layers surrounding the repeated-parameter layers, until no further layers can be added in this manner.It is part of a sequence of operations that adjacently repeats, signifying a computational “loop”; corresponding operations in each pass of the loop are marked as passes through the same layer.Fifth, These conditions are illustrated in Fig. To identify these repeated layers, we apply the following algorithm. First, candidate sets of “repeated layers” are identified in an initial first pass: these include layers in which the same trainable parameters are applied multiple times during the forward pass, and layers with no trainable parameters for which the same function with the same non-tensor arguments is applied multiple times during the forward pass . Second, the algorithm checks whether these candidate layers meet any of the above three criteria to count as “repeated”. To do this, the algorithm applies a procedure where it begins from any parentless layers  and steps forward one layer at a time, successively grouping together repeated sets of operations into blocks. For instance, for a given operation X  that recurs multiple times, the algorithm identifies cases where that operation is also followed by recurring operations Y and Z , identifying XYZ “blocks”. Third, after identifying these repeated blocks, it checks whether these blocks either contain a layer with trainable parameters, or repeat back to back ; if so, the corresponding operations in each block are marked as different passes of the “same” layer, completing the process.Finally, all layer metadata is processed into its user-facing, human-readable form, and returned to the user.TorchLens contains a built-in procedure for validating the accuracy of saved activations. This procedure works by executing the function  associated with a target layer on the saved values of the input layer(s) for that target layer, and verifying that the resulting output of this function call matches the saved tensor of that target layer. As a further check, it substitutes in random values instead of the saved values for the parent layers, and verifies that executing the function on these nonsense activations returns a tensor that differs from the saved tensor of the target layer . If the values of the target layer are saved correctly, then this procedure establishes that the parent layers of this target layer were also correctly saved. Since the final ground-truth outputs of the model are known, this procedure begins by using the model outputs as the “target” layer, and checking the parent layers to this target layer. If these parent layers pass the test, then they each become the new “target layer”, and the same procedure is applied to the parents of these layers. The procedure is then recursively applied until only layers with no parents  are left.As noted above, it remains possible that unanticipated “edge case” scenarios may emerge for graphs with unexpected architectures, or that future updates to PyTorch may introduce elementary tensor functions that raise unique programming peculiarities. Thus, as a way of detecting such cases when they occur, and of ensuring the accuracy of any saved activations, all intermediate tensors, which can impose high memory demands for large models.This approach has the benefit of requiring no manual troubleshooting, and is fully automatic. One drawback is that it logically requires saving the values of TorchLens is compatible with both CPU and GPU processing, and has been validated for PyTorch versions 1.9.0 and higher. Currently, it has not been tested in the case of parallel computing, although further updates to TorchLens are intended to address this.TorchLens provides a method for not only automatically and exhaustively extracting the results of intermediate activations from arbitrary PyTorch DNN models, but also understanding the structure of these models via visualizations and metadata. We envision several possible use cases for TorchLens.TorchLens works automatically for arbitrary PyTorch models, exhaustively extracts the results of any desired operations without limitation, and provides metadata and visualizations to help characterize how a given layer fits into the broader architecture of the network. Since the ModelHistory object returned by TorchLens constitutes a full and easily queried representation of the model’s computational graph, it can also facilitate programmatic graph-theoretic analyses of a network, such as assessing how the similarity of the representations in two layers varies based on the nature of the intervening layers. The fact that TorchLens works for arbitrary PyTorch models makes it especially useful for computational neuroscientists who may wish to compare many different DNNs as models for brain function.First, it can be used to streamline analysis pipelines for extracting and analyzing the internal representations encoded by DNNs for the purposes of better understanding their underlying computational principles and comparing these intermediate processing stages to those of the brain. Uniquely among existing approaches for this goal, TorchLens can be used as a prototyping, profiling, and visualization tool during model development. Since its visualization features provide an intuitive “picture of the code” for a model, it can provide a helpful visual aid when designing large or complicated models. Furthermore, the model metadata it provides includes information about the execution time of the functions in the model, and about the memory space used by the parameters and output tensors of all operations in the model, revealing runtime and storage bottlenecks. The automatic visualization functionality may also be useful when preparing presentations or publications describing a model.Second, TorchLens being pedagogically useful. For individuals who are first becoming acquainted with implementing deep learning models, the visualizations and information it provides can help in translating between model code and underlying concepts. Even for more seasoned practitioners, the ability to automatically generate a visual representation of a model can accelerate the process of understanding a new and complex model, which might otherwise require cumbersome inspection of a model’s code.Third, we envision TorchLens can be readily imported and used in other deep learning analysis pipelines. While our strategy of logging PyTorch tensor operations using decorators and assembling them into a full representation of the model’s computational graph is conceptually simple, implementing this functionality involves various technical complexities , and so we hope that other pipelines can benefit from the flexible feature extraction enabled by TorchLens with minimal changes to their code. We note that while TorchLens can readily extract intermediate activations given a model and input, it does not have functionality for loading models or inputs, or for performing further analyses on the extracted activations. We make this design choice because we intend for TorchLens to be applicable in any of the many domains in which DNNs are used rather than tying it to a particular use case, making it infeasible to implement general functionality for loading models or stimuli and analyzing activations. We note, however, that field-specific packages already exist for these purposes, enabling workflows that mix and match different packages. For example, ThingsVision19 or Net2Brain21 could be used for loading pretrained models and fetching stimuli, TorchLens could be used for visualizing the models, selecting layers, and extracting layer activations, and packages such as rsatoolbox36, Himalaya37, or Net2Brain21 could be used for analyzing the extracted activations and comparing them to neural measurements using techniques such as representational similarity analysis or voxelwise encoding.Fourth, TorchLens to be largely self-contained, its ability to automatically extract a complete representation of the computational graph of a model does raise the potential for further applications built upon the same groundwork. One intriguing possibility is the ability to easily change or intervene upon an existing DNN model without directly changing the code, making it easier to apply causal inference methods38 to DNNs to evaluate causal claims about the effect of interventions, or to conduct counterfactual simulations. Since TorchLens stores the actual functions used in the forward pass of a model, the model can also be “re-run” from any intermediate stage, potentially with targeted changes introduced. For instance, if a user wishes to test how using a different nonlinearity function in a model changes a model’s internal representations, keeping all else the same, it would be simple to alter these nodes in the computational graph to use the new nonlinearity. Another example would be to “lesion” parts of a model by zeroing out particular parameters or values of a layer’s output tensor to examine the causal contribution of particular DNN units to a model’s behavior.While we intend for the current functionality of TorchLens will serve the role of removing arbitrary limitations to extracting and characterizing the results of internal DNN operations, streamlining both the scientific investigation and engineering of DNNs.In summary, we hope that Supplementary Table 1.


In “The Paradox of Suicide Prevention”, Turner and colleagues made an important contribution: they applied Rose’s prevention paradox to suicide prevention efforts in healthcare systems. However, in doing so, they conflated prevention and treatment and did not distinguish suicide from suicidality. Their views may confuse efforts to design and implement clinical pathways for preventing suicide. In “The Paradox of Suicide Prevention,” Turner and colleagues  made an Turner et al. used terms associated with prevention—specifically selected and indicated interventions—but co-opted them to describe treatment. The Institute of Medicine  has defiIn contrast, Turner et al. defined the populations for selected and indicated interventions in altogether different ways. They stated that selected interventions are for “people presenting to services in distress or as suicidal” (p. 7) because they are a population that is at an increased risk of suicide. They further asserted that indicated interventions are for those who, among other things, present with “features of higher risk such as high lethality attempts” (p. 7). In both cases, Turner et al. described populations that are already manifesting suicidality, which is the realm of treatment and not prevention according to the Institute of Medicine’s model. Thus, the terms selected and indicated interventions are inappropriate and misleading. A second issue in the paper is that Turner et al. did not distinguish outcomes from the conditions responsible for those outcomes. The authors focused on preventing suicide, which is, on the face of it, very reasonable. However, outcomes are prevented by preventing the condition that, once manifested, is responsible for said outcomes. The psychiatric condition that is most proximally responsible for suicide is suicidality . To prev


Alexithymia has been found to be associated with several somatic illnesses, such as cardiovascular, indicating that it might be a risk factor for early death in the long-term course of post-myocardial infarction. From the cardiology perspective, the aim was to collect current evidence about the relationship between alexithymia and somatic illness.The literature was synthesized and summarized in a narrative format. The literature search was carried out in PubMed. Pertinent studies published in the last 50 years written in English were included and organized by three main topics  to be discussed.High alexithymia is a dimensional trait that affects around 10% of the general population and up to 55% of people with essential hypertension. Also, the link between alexithymia and cardiovascular activity has been pointed out. There are several validated tools to assess alexithymia, as well as treatment options.Knowledge about the main features of alexithymia, as well as its assessment and treatment, can promote a multifactorial approach to the primary, secondary, and tertiary prevention of cardiac diseases. When asked about their feelings in emotional situations, they might experience confusion  difficulty in discriminating one emotion from the others, as well as between somatic states and emotions; b) difficulty in communicating emotions to other people; c) lack of imaginative processes; d) cognitive style environmental stimulus oriented , 3-5.Individuals with high alexithymia do not repress or hinder or deny emotions: they do not recognize them, lacking mental representations of emotions due to a deficit in their cognitive processing -8. This Alexithymia is a dimensional trait that is thought to affect 10% of the general population when it is relevant clinically , 14. TheMacbeth, wrote “Give sorrow words; the grief that does not speak knits up the o-er wrought heart and bids it breaks”. This sentence seems to describe what happens to people with a high level of alexithymia. They suffer from somatic symptoms more than psychological or relational difficulties. They can show sudden anger or cry without knowing why; they tend to express emotions through action and behaviors; they show a poor oneiric life. Furthermore, they appear as “pseudo-normal” persons by their behaviors, with poor gesturing and empathy. People with high alexithymia often show an undifferentiated negative emotive state that often makes them bore to the interlocutor. During psychodynamic psychotherapy, such people have been described as unproductive, unimaginative, boring, and stiff. Therapists have high difficulty establishing therapeutic relationships with them, and such psychotherapies lead to poor benefit , this overview aims to collect pertinent evidence about the relationship between alexithymia and somatic illness from the cardiology perspective, with particular attention to the assessment of alexithymia and its treatment, to provide a comprehensive framework about a multifactorial approach to the primary, secondary and tertiary prevention of cardiac diseases.2The literature search was carried out in October 2022 in the electronic databases PubMed/Medline, by title/abstract, with the following keywords: “care-seeking behavior” OR “cardiovascular disease” OR “cardiovascular diseases” OR “cardiovascular health” OR “cardiovascular” OR “acute myocardial infarction” OR “somatic illness” OR “somatic disease” OR “hypertension” OR “interview” OR “questionnaire” OR “treatment” OR “psychotherapy” OR “psychological support” OR “death risk” AND “alexithymia.All kinds of pertinent articles that were published in the last 50 years and written in English were included. It was decided to extend the search within the last 50 years because the initial papers related to alexithymia date back to that period. Relevant papers were also extracted by clicking “Related Articles” on a pertinent citation shown in PubMed, and from the references provided in the collected papers.The pertinence and the relevance of the papers needed for their selection were judged by two of the authors (F.S. and M.G.C.).Finally, the findings of relevant articles were reported and discussed in paragraphs focused on three main topics and summarized in Table 3The search by combinations of the keywords revealed 1.803 articles. After the removal of duplicate articles, the pertinence of the remaining articles was analyzed.Twenty-eight articles were included and then organized by three topics  to be presented and discussed. As shown in Table 3.1The link between alexithymia and cardiovascular activity has been pointed out by research. Several studies show that alexithymia is related to higher levels of resting (tonic) sympathetic or cardiovascular activity and arousal, heart rate, and blood pressure reactivity to experimental stressors .Coherently with these results, alexithymia was significantly high in samples of newly diagnosed yet untreated hypertensive subjects  and amonIn 2010, a 20 years-longitudinal study  on 2.321More recently, a longitudinal study on 1.122 young adults and adolescents of the same Finnish cohort  evaluateFinally, in a study among a cohort of 83 people with ST-segment elevation myocardial infarction (STEMI), it was found that between individuals evaluated about their state in life and those who were not high alexithymia, was a significant determinant of early death in the long term (10 years later) after STEMI, controlling for age, sex and alexithymia level .People with post-acute myocardial infarction (AMI) developed high levels of alexithymia within 3 to 6 months after discharge, with low temporal stability suggesting that secondary alexithymia could raise after AMI . PatientOther studies, among which a systematic review  and a me3.2During the past years, different tools have been developed to assess alexithymia, including self-report questionnaires, observer-rated measures, structured interviews, and performance-based tests .In the research field, the widest instrument used to assess alexithymia is the Toronto Alexithymia Scale – 20 item (TAS-20) , 36, whiIt is a self-report questionnaire that includes 20 items. The subject has to respond on a Likert scale composed of 5 points. The factorial analyses of the instrument point out three factors, that correspond to the main features of the construct: 1) difficulty in identifying emotions and distinguishing them from emotions and bodily sensations (DIF); 2) difficulty in describing and communicating emotions (DDF); 3) externally oriented thinking, that is too realistic, with poor fantasies (EOT). Timing to fill out the questionnaire can vary between 5-10 minutes. Four scores can be obtained from the questionnaire: one for each factor and one total score. The distribution in the general population is normal. Even if alexithymia should be considered a continuous trait as said above, the research pointed out that a score ≥ 61 indicates high alexithymia, a score <51 indicates low alexithymia, with an intermediate score indicating a medium level of alexithymia.Before this version, the Toronto Alexithymia Scale (TAS)  was deveA critical issue that has been pointed out about the assessment of alexithymia by the TAS-20 is whether individuals with high levels of alexithymia can reliably self-evaluate their ability to identify and describe their own emotions : there iAnother limit regards an overlap with self-report measures of negative affect, and the absence of items to assess fantasy and imaginal activities , 36, 40.To partially address these issues, there are three interview-based alexithymia assessment approaches.Several decades ago, Sifneos  was the Even if the BIQ was often used in the original or modified form as the criterion against which other alexithymia measures have been validated , it is nTo overcome some of these limits, a more structured interview method for assessing alexithymia — the Toronto Structured Interview for Alexithymia (TSIA) was developed . The TSIOne potential constraint in TSIA usage is the amount of time it takes to administer and score, which is around 50 to 60 minutes. As such, a short version of the interview retaining item providing maximum information was tested . It resuAnother interview-based tool to assess alexithymia is the structured interview based on the Diagnostic Criteria for Psychosomatic Research (DCPR) , which cThe item/questions regarding alexithymia are the following :1. When you experience something good or bad, are you able to describe your emotions ?2. When you experience either good or bad events, do you talk about what has happened and what you feel inside of you?3. Do you often daydream and let your imagination run away?4. Do your thoughts concern your internal emotions and feelings more often?i.e.: sick to stomach, etc.?)5. When you experience a strong emotion, do you also feel physical reactions?  version was developed , modifyii.e.: close friend, romantic partner, spouse, sibling, parent, adult child, etc.) for a “target” person who was selected among someone they knew very well.The participants served as “informants”  to 5 (strongly agree). Scoring is the same with higher scores indicating a greater degree of alexithymia. The validation study confirmed the three-factor structure of the TAS-20, as well the correlation between the two versions was statistically significant .3.3People with a high level of alexithymia often experience psychological distress as somatic symptoms or by “emotional storms”  which caPsychotherapy assumes that individuals have some access to their feelings. Thus, people with high alexithymia, who are unable to identify, differentiate, and articulate their emotions, often are a difficult challenge for a therapist. Alexithymia has little effect on treatment preferences, yet there was some tendency for people with alexithymia to prefer group therapy . HoweverSupportive psychotherapy, including an initial part of psychoeducation, different from the traditional interpretative psychodynamic approach, could be more useful with people with high alexithymia . In the Biofeedback, relaxation techniques, autogenic training, and meditative practices are therapeutic possibilities useful to start from the bodily component of emotions which is what people with high levels of alexithymia can access first , 49.Another element that could be useful for the treatment of people with high alexithymia is building a “real relationship” with the patient , where tIf individual sessions are useful to educate people with high alexithymia about their deficit in emotion regulation, the group setting allows them to improve their ability to recognize emotion through interaction with other people, especially about the impact of the poor empathy they usually show.A study to evaluate the efficacy of group psychotherapy on 20 people who survived after an acute myocardial infarction showed a significant improvement in alexithymia after 4 months with one session/week, each lasting 90 minutes compared with an educational treatment focused on cardiovascular risk factors . The groThe evaluation by the TAS was conducted before and after treatment. Furthermore, it was repeated by follow-up 6, 12, and 24 months after the end of the treatment. Over time, cardiac conditions were assessed in terms of the occurrence of new myocardial infarction, death, arrhythmia, the occurrence of angina, and hospitalization after angina. The results were very interesting, even if the small sample size: in comparison with the control group, TAS scores were significantly lower after the group therapy and remained lower during all the follow-up assessments. Furthermore, people who improved in alexithymia scores showed a frequency of cardiac complications significantly lower over time.This overview provides a synthesis of previously published studies regarding the relationship between alexithymia and somatic illness from the cardiology perspective. It points out the link between alexithymia and cardiovascular activity, the role of alexithymia as a risk factor for early death in the long-term course of post-myocardial infarction, as well as its impact on dysfunctional healthcare-seeking behavior when an acute myocardial infarction occurs. Finally, it describes validated assessment tools for the evaluation of alexithymia, as well as psychotherapeutic treatment options and implications.Alexithymia is a personality trait that refers to difficulty identifying feelings, difficulty describing feelings to other people, a reduced ability to create fantasies, and a thought content that reveals a preoccupation with the minute details of bodily sensations and/or the external environment. These features reflect a deficit in the cognitive processing and regulation of emotions.Alexithymia can be reliably assessed by several instruments, and it can be improved after supportive psychotherapeutic interventions able to impact the cognitive deficit to recognize emotions.Literature suggested that a multifactorial approach to the primary, secondary, and tertiary prevention of cardiac diseases is needed to further reduce morbidity and mortality rates. While it remains unclear how alexithymia can contribute directly to organic diseases, such as cardiovascular ones, there is evidence that it is associated with several illnesses that involve disturbances in emotional regulation and that it may also negatively impact health behaviors.Even if exhaustive, this overview does not systematically include all the literature in this field. However, its narrative approach allows clinicians to get basic knowledge about the features of the alexithymia construct and its prevalence among people with cardiovascular diseases, indicating that poor cardiovascular health is often associated with higher alexithymia. It also makes available some tips to evaluate alexithymia levels with valid instruments already used in the cardiologic field, as well as to indicate proper interventions to support patients with high levels of alexithymia to improve their ability to recognize emotions.