Emotional Content and Semantic Structure of Dialogues Predict Interpersonal Neural Synchrony in the Prefrontal Cortex

A fundamental characteristic of social exchanges is the synchronization of individuals’ behaviors, physiological responses, and neural activity. However, the influence of how individuals communicate in terms of emotional content and expressed associative knowledge on interpersonal synchrony has been scarcely investigated so far. This study addresses this research gap by bridging recent advances in cognitive neuroscience data, affective computing, and cognitive data science frameworks. Using functional near-infrared spectroscopy (fNIRS) hyperscanning, prefrontal neural data were collected during social interactions involving 84 participants (i.e., 42 dyads) aged 18-35 years. Wavelet transform coherence was used to assess interpersonal neural synchrony between participants. We used manual transcription of dialogues and automated methods to codify transcriptions as emotional levels and syntactic/semantic networks. Our quantitative findings reveal higher than random expectations levels of interpersonal neural synchrony in the superior frontal gyrus (p = 0.020) and the bilateral middle frontal gyri (p < 0.001; p = 0.002). Stepwise models based on dialogues’ emotional content only significantly predicted interpersonal neural synchrony across the prefrontal cortex Conversely, models relying on semantic features were more effective at the local level, for predicting brain synchrony in the right middle frontal gyrus Generally, models based on the emo-tional content of dialogues lose predictive power when limited to data from one region of interest at a time, whereas models based on syntactic/semantic features show the opposite trend, losing predictive power when incorporating data from all regions of interest. Moreover, we found an interplay between emotions and associative knowledge in predicting brain synchrony, especially in social interactions based on role-play techniques, providing quantitative support to the major role played by the prefrontal cortex in conditions of identity faking. Our study identifies a mind-brain duality in emotions and associative knowledge reflecting neural synchrony levels, opening new ways for investigating human interactions.


Introduction
Social interactions serve as catalysts for human development and well-being.As in many other social species, human newborns need a significant other to regulate their physiological states and guarantee their survival [1].Ever since childhood, individuals engage in social exchanges transmitting cognitive, social, and emotional competencies or skills [2,3].Newborns are inherently prepared for this task.Extensive research in cognitive neuroscience has shown that evolution has equipped newborns with a series of mechanisms that enable them to pay attention and adequately respond to the social world around them [4].Importantly, social interactions remain fundamental in adulthood, with the quality of one's social exchanges being a predictive factor of both the susceptibility to psychiatric disorders and the mortality risk [5,6].
Recognizing the paramount importance of social interactions in people's lives, numerous studies have investigated the characteristics of adaptive social exchanges (e.g., a mother talking to their child or teachers pointing at some writing on a blackboard) [7].In particular, the mutual attunement of behavioral and physiological signals between interactive partners, known as bio-behavioral synchrony, has emerged as a fundamental mechanism through which social interactions influence individuals' development and well-being [8][9][10].Traditional research on synchrony has predominantly explored behaviors, hormonal fluctuations, and physiological responses, reporting attunement over these multiple levels during social exchanges [11].Recently, the introduction of the hyperscanning approach in cognitive neuroscience has expanded the bio-behavioral synchrony framework to go beyond behavioral and physiological data, including the analysis of the neural level [12].Based on the simultaneous recording of brain activity in two (or even more) individuals, the hyperscanning approach allows the investigation of the neural underpinnings of dyadic (or group-level) social interactions [13].Initial hyperscanning studies used traditional neuroimaging techniques (e.g., electroencephalography (EEG), functional magnetic resonance imaging (fMRI)) to assess instances of interpersonal neural synchrony (e.g., [13,14]).In these studies, participants interacted in highly controlled experimental situations because of the characteristics of the adopted neuroimaging instrument.In fact, both EEG and fMRI require participants to minimize their body movements in order to collect usable neural data.Moreover, fMRI requires that participants lay supine within a scanner.Altogether, these features did not allow participants to interact as they would normally do in daily social exchanges.More recently, thanks to the advent of functional near-infrared spectroscopy (fNIRS), hyperscanning research has shown promise for the study of social interactions in real-life scenarios.Recent fNIRS hyperscanning studies have demonstrated that interpersonal neural synchrony can serve as a marker of the quality of relational social exchanges [15][16][17].
In recent hyperscanning studies, tasks replicating naturalistic interactions, such as mother-child free play, have become increasingly prevalent (e.g., [18,19]).Despite this trend, the exploration of the affective component, which constitutes the core of real-life social interactions, in the context of interpersonal neural synchrony remains largely unexplored [20][21][22].The affective dimension of social exchanges plays a pivotal role in various aspects, including the establishment of social cohesion and the determination of one's inclination toward engaging in prosocial behaviors [23,24].Notably, some seminal studies have investigated the impact of emotions on interpersonal neural synchrony.The seminal studies by Azhari et al. [18], by Nummenmaa et al. [25], and Santamaria et al. [26] showed that higher emotional valence of stimuli or interactions is associated with higher interpersonal neural synchrony.In other words, the presence of emotions eliciting more extreme pleasantness or unpleasantness leads to higher coherence between individuals in terms of their respective brain signals.However, the direction of the association between the valence of emotions and interpersonal neural synchrony is unclear.Some studies report higher interpersonal neural synchrony for negatively-valenced emotional content (e.g., [25]), while others reported the same effect for positively-valenced emotional content (e.g., [26,27]).
A key channel through which emotions are conveyed between individuals is language [28].Language represents an evolutionary achievement enabling the sharing of communicative intentions between individuals.These intentions encode ideas and emotions either in written (i.e., text) or verbal form (i.e., speech).Speech is a complex system [29,30], where spoken words can be assembled to denote more elaborate ideas, with distinctive non-cognitive features, like emotions [31].Speech does not depend only on its "bag" of words [32] (i.e., words in a speech or text) but also on the structure of word-word relationships [31,33] (e.g., on the syntactic links mixing words to convey efficiently meanings and emotional states) [34].How people communicate might be more or less effective depending on the specific structure of conceptual relationships and emotional eliciting employed in dialogues.For instance, when conversing, people can superficially explore different topics or, conversely, they can dive into a deep discussion of one topic of interest [30,35].Cognitive science [34,36,37] and neuroscience [8,38] pose converging evidence that three key features of language might influence the quality of the social exchange as well as the level of interpersonal neural synchrony: (i) the emotional content (e.g., a portion of language eliciting emotions like anger or trust); (ii) the syntactic and semantic organization of ideas/concepts (e.g., synonyms being used to specify similar ideas); (iii) frequency effects (e.g., turn-taking frequency of quips).In terms of frequency effects, some recent studies have already shown that the rhythm of the interaction, as measured in terms of turn-taking frequency, predicts interpersonal neural synchrony in mother-child dyads with verbal and even pre-verbal children [39,40].However, the effect of the emotional content and semantic structure remains scarcely investigated.
This paper aims to fill this research gap in the relevant literature.To do so, we introduce a quantitative framework investigating the two dimensions of dialogues' emotional content and syntactic/semantic structure for predicting interpersonal neural synchrony during naturalistic social exchanges.Our study, thus, bridges innovative cognitive neuroscience data [41,42] with affective computing and cognitive data science frameworks [31], integrating mind and brain data [43,44].In particular, we leverage the recent modeling framework of Textual Forma Mentis Networks (TFMNs) for representing conceptual associations encoded in text and retrieved via artificial intelligence (AI) and psychologically validated data [33,45].TFMNs can encode associated mindsets (e.g., ways of associating concepts together).
We hypothesize that: 1.The emotional content of dialogues predicts interpersonal neural synchrony.Specifically, we hypothesize that higher expression of emotions could predict higher interpersonal neural synchrony in dialogues; 2. The structure of syntactic/semantic associations between concepts in dialogues predicts interpersonal neural synchrony.
To explore the interplay between these two dimensions, we use recently available data from a fNIRS hyperscanning study, under three conditions (i.e., natural conversation, role-play, and role reversal) based on dialogues among participants [41,42].We observe that significant patterns of interpersonal neural synchrony emerge in portions of people's prefrontal cortex (i.e., the superior frontal gyrus and the bilateral middle frontal gyri).Moreover, we observe that the reconstructed emotional content of dialogues [46] together with the syntactic/semantic associations between expressed ideas predict interpersonal neural synchrony.More specifically, the emotional content of dialogues is a better predictor of interpersonal neural synchrony at the global level of analysis (i.e., across the whole prefrontal cortex), while the syntactic/semantic aspects of dialogues are better predictors of interpersonal neural synchrony at the local level (i.e., in the right middle frontal gyrus).However, the combination of affective and syntactic/semantic cues emerges as highly relevant for predicting interpersonal neural synchrony, especially in social interactions based on role-play techniques.

Results
Before investigating the role of emotional content and semantic structure of dialogues in predicting interpersonal neural synchrony, a preliminary analysis of synchrony across real (face-to-face conversationalists) and surrogate (randomly-paired and noninteracting) dyads, regions of interest (i.e., anterior prefrontal cortex, superior frontal gyrus, left middle frontal gyrus, right middle frontal gyrus, left inferior frontal gyrus, and right inferior frontal gyrus), and experimental conditions (i.e., natural conversation, role-play, and role reversal) was conducted.
To investigate how the emotional content of dialogues predicts interpersonal neural synchrony, we conducted a stepwise linear regression using the experimental conditions and the eight basic emotions encoded in EmoAtlas [46] as predictors and Wavelet Transform Coherence (WTC) values as the dependent variable.We used the same approach with the semantic structure of dialogues.Finally, we combined information regarding both the emotional content and the semantic structure of dialogues to predict the interpersonal brain synchrony in the whole prefrontal cortex.

Interpersonal Neural Synchrony Across Experimental Tasks and Regions of Interest
As reported in Figure 1, we compared the WTC in each of the six regions of interest computed between real and surrogate dyads (see Methods).Statistically significant differences emerged between real and surrogate dyads in the WTC in their superior frontal gyrus (U = 9143; p = 0.020), left middle frontal gyrus (U = 9710, p < 0.001), and right middle frontal gyrus (U = 9169, p = 0.002).No statistically significant difference emerged in the WTC computed in the anterior prefrontal cortex (U = 7432, p = 0.667), left inferior frontal gyrus (U = 6811, p = 0.107), and right inferior frontal gyrus (U = 6952, p = 0.098).For this reason, the subsequent statistical analyses will exclude WTC from these regions of interest that did not show significant differences between true and surrogate dyads.Moreover, a two-way repeated ANOVA revealed that there was no statistically significant interaction between the effects of the experimental condition and the region of interest (F (4, 353) = 0.248, p = 0.911).Main effects analysis showed that the experimental condition did not have a statistically significant effect on interpersonal neural synchrony (p = 0.243) and that the region of interest did not have a statistically significant effect on interpersonal neural synchrony (p = 0.721).Hence, we conclude that the variance observed in the interpersonal neural synchrony cannot be explained by the three experimental conditions nor by the regions of interest.Therefore, WTC values from all experimental conditions and regions of interest can be investigated together in subsequent predictive models.

Using Emotional Content of Dialogues to Predict Interpersonal Neural Synchrony
In this analysis, we used emotional z -scores provided by EmoAtlas (see Section 5.7) as proxies of the emotional content of dialogues.

Analysis on Individual Regions of Interest
The stepwise regression of interpersonal neural synchrony based on emotional content revealed no significant model fit when limited to individual regions of interest across the prefrontal cortex.When predicting the WTC in individual regions of interest during each experimental condition, some predictive models showed a significant fit

Analysis on the Whole Prefrontal Cortex
When analyzing all scores from the prefrontal cortex, we can either put all regions of interest together or perform the regressions on each region of interest separately.When predicting the WTC with emotional z -scores across all sub-regions of the prefrontal cortex and with additional categorical variables coding for the experimental condition, we find the following.The analysis revealed a significant model fit (F (340, 5) = 2.374, p = 0.039, R 2 adj = 3.89%).The final model included the role-play condition (β = -0.005,SE = 0.005, p = 0.3401), the role reversal condition (β = -0.011,SE = 0.005, p = 0.028), the emotions of anger (β = -0.004,SE = 0.002, p = 0.066), disgust (β = 0.004, SE = 0.002, p = 0.103), and anticipation (β = -0.003,SE = 0.001, p = 0.031).Thus, the predictive model of WTC across the experiment and across regions of interest was significantly influenced by the role reversal condition (lower synchrony as compared to the others) and by the emotion of anticipation.

Using Syntactic/Semantic Structure of Dialogues to Predict Interpersonal Neural Synchrony
In this analysis, we employ TFMNs (see Section 5.8) as proxies of the syntactic/semantic associations between concepts encoded within communicative intentions.
When predicting the WTC in individual regions of interest during each experimental condition, the predictive model of WTC in the right middle frontal gyrus during role reversal showed a significant model fit but did not survive Bonferroni correction (F (34, 3) = 3.763, p = 0.020, R 2 adj = 18.30%).Comparing all the above results, we notice that the emotional content of conversations does not act as a significant predictor of interpersonal neural synchrony in individual regions of the prefrontal cortex.Instead, syntactic/semantic properties are significant predictors of brain synchrony already at the local level (i.e. in the right regions of the prefrontal cortex).This distinctiveness calls for additional inquiry within the Discussion.

Analysis on the Whole Prefrontal Cortex
When predicting the WTC across all subregions of the prefrontal cortex, the analysis revealed a significant model fit (F (349, 2) = 5.172, p = 0.006, R 2 adj = 2.32%).The final model included the number of connected components (β = 0.004, SE = 0.001, p = 0.005) and degree assortativity (β = -0.036,SE = 0.013, p = 0.004) as predictor variables.A comparison with the model fitting the same data but with emotional information shows that the model based on emotional scores performed better (see Section 2.2.2).
Overall, we notice that emotional scores show higher predictive power when predicting brain synchrony across the whole prefrontal cortex and across conditions, while the semantic/syntactic properties of dialogues are better predictors of brain synchrony at the local level, in individual regions of interest.

Discussion
The current study investigated how emotions and associative knowledge in dialogues predict interpersonal neural synchrony during a hyperscanning experiment.Prefrontal neural activity data were measured with fNIRS.Pre-recorded dialogues [41,42] among social dyads were manually transcribed and investigated.Automated methods of emotional content detection and syntactic/semantic structure mapping were adopted [33,46].By using this mind-brain approach, we observe that the emotional content and the syntactic/semantic structure of dialogues significantly predict interpersonal neural synchrony across regions of the prefrontal cortex: the superior frontal gyrus and the bilateral middle frontal gyri.
Firstly, we observe that, across the whole prefrontal cortex, these regions of interest show a significant difference in interpersonal neural synchrony between real versus surrogate dyads.Our findings agree with past results observed by the pioneering hyperscanning study conducted by Cui et al. [47].More in detail, Cui and colleagues found that the superior frontal cortex shows increased interpersonal neural synchrony in cooperative tasks different from the experimental conditions tested here (i.e., computer-based cooperation game).As for the authors, these portions of the prefrontal cortex could have a role in controlling processes related to coordination with others within the theory of mind [48].Conversely, brain synchrony in the anterior prefrontal cortex and the bilateral inferior frontal gyri does not appear to differ between true and surrogate dyads across the experiment.This result contrasts with previous hyperscanning studies that found above-chance levels of brain synchrony in these regions (e.g., [39,49]).These differing patterns might be explained by the specific conditions of the current experiment, where participants had to interact while playing the role of another persona.In fact, the prefrontal cortex is involved in situations of identity conflict and faking [41,[50][51][52], with the inferior frontal gyrus being more involved in identity concealment, and the medial regions of the prefrontal cortex being more involved during identity faking [51,52].Among the two conditions, identity faking is the one that resembles the tasks of the current study.
Moreover, in interacting individuals, we find that the synchronization between the superior frontal gyrus and the bilateral middle frontal gyri is predicted by both the emotional content and the syntactic/semantic structure of dialogues.This finding seems in contrast to the results of the EEG hyperscanning study by Kinreich et al. [53], in which the authors observed that interpersonal brain synchrony did not vary based on emotional, reminiscent, and practical aspects of conversations.However, Kinreich and colleagues considered these aspects as being binary variables (i.e., either present or absent according to human raters).Our analysis adopts a different human-centered AI approach, going beyond binary characterizations and reconstructing the complex network structure of emotions and associative knowledge expressed in dialogues.This finer level of resolution, enabled by more recent natural language processing techniques, can explain such a difference.Speech in dialogues represents a complex system [31] where naturalistic social interactions convey various pieces of information beyond the content alone.For example, dialogues can be characterized by the emotions that they convey [54] or by the syntactic/semantic associations between ideas expressed by the speaker [30].
In the present study, the emotional content did not significantly predict the activity of a single individual region of interest, neither across all nor in individual conditions.However, emotions in dialogues predict interpersonal neural synchrony in the superior frontal gyrus and the left middle frontal gyrus when these regions are considered together.Both these regions are known in the literature for being involved in emotional processing and regulation strategies [55].The superior frontal gyrus tends to show higher activation when the person up-or down-regulates emotional states [56].The rostral part of the middle frontal gyrus -which is a part we explored with fNIRSis involved in the meaning-making of emotional stimuli that depend on salience and relevance for the self [57,58].In other words, this brain region assigns a meaning to stimuli based on self-related implications.Indeed, the rostral middle frontal gyrus also shows prolonged activity in response to emotional events [59].To testify for their role in emotional processing, both the left middle frontal gyrus and superior frontal gyrus show higher spontaneous activity in individuals with affective disorders (e.g., major depressive disorder) [60] and when people assess the emotional expression of music [61].
Dialogues' syntactic/semantic structure highlights different patterns compared to emotional content.Higher interpersonal neural synchrony in the right middle frontal gyrus is predicted across all conditions by: (i) a higher number of connected components and (ii) negative values of degree assortativity [62].Therefore, couples with higher interpersonal neural synchrony in the right middle frontal gyrus tended to: (i) explore more distinct but syntactically/semantically disconnected topics, and (ii) link highly connected words (e.g., frequent or general terms) with less connected ones (e.g., more infrequent or specific terms).This trend might suggest a relationship between language entropy and interpersonal neural synchrony in the right middle frontal gyrus.When looking specifically at the interpersonal neural synchrony in the right middle frontal gyrus during the role reversal condition, a relationship between syntactic/semantic features of dialogues and brain synchrony emerges but does not survive Bonferroni correction.At this preliminary stage, we chose the Bonferroni correction due to its highly conservative nature, which assumes all tests are independent.However, this assumption may not always hold true for stepwise linear regressions.Future research with larger sample sizes and less conservative corrections could reveal additional effects.While we cannot exclude the possibility of further effects at this stage, given the preliminary nature of this work, we preferred using a highly conservative correction like Bonferroni's.Regarding the observed results, previous studies have shown that the middle frontal gyrus is involved in syntactic/semantic processes.This brain region shows enhanced activity for semantically distant or unrelated words when compared to activity elicited by semantically similar or related words [63][64][65].More specifically, the activity in the right portion of the middle frontal gyrus is reportedly modulated by categorical relationships among words [66][67][68].Hence, our findings agree with past results indicating that the middle frontal gyrus should intervene when processing words with different syntactic and semantic connectivity.
When predicting interpersonal neural synchrony across the prefrontal cortex, models based on emotional content only outperform their counterparts (e.g., models using syntactic/semantic network features only or in combination with emotions).Moreover, models based on syntactic/semantic network features lose predictive power as compared to when they are used with data from individual regions of interest.This pattern might not be due to selectivity for emotional aspects in the prefrontal cortex, as the prefrontal cortex is involved in both emotional and syntactic processes [69,70].Instead, our findings might relate to the difference in global and local processing of emotional and syntactic/semantic aspects in the prefrontal cortex during social interactions.On one hand, the emotional content of conversations appears to be a predictor of brain synchrony across the whole prefrontal cortex and only marginally of synchrony in specific subregions.Emotional information possibly requires larger samples to demonstrate its predictive power at the local level of analysis.Conversely, syntactic/semantic features of dialogues emerge as better predictors of brain synchrony at the local level, specifically in the right middle frontal gyrus.When introducing scores of brain synchrony from other regions of the prefrontal cortex, models based on syntactic/semantic properties tend to show lower performance, probably due to the introduction of noise.
Lastly, when participants interact while playing the role of another persona, the combination of emotional and syntactic/semantic features is predictive of WTC.Conversely, the predictive models considering either emotions or syntactic/semantic network structure show only some predictive trend but do not reach statistical significance after Bonferroni correction, which, to reiterate, was chosen because of its highly conservative nature.Among models solely based on one channel of information, only the one using syntactic/semantic properties of dialogues to predict brain synchrony across the prefrontal cortex in role-play activities reached statistical significance.However, when incorporating information on the emotional content of dialogues, this model increased its predictive power by more than seven times.These differences underlie an interplay between emotions and expressed associative knowledge in predicting prefrontal brain synchrony during role-playing and perspective-taking activities.Moreover, they support the active involvement of regions such as the superior and the bilateral middle frontal gyri in social interactions characterized by identity faking.

Limitations and Future Research
In discussing the results of the study, it is important to acknowledge certain aspects that should be considered as potential limitations and serve as a foundation for future research.
Firstly, our investigation utilized fNIRS hyperscanning to assess neural activity in prefrontal cortex regions.While the prefrontal cortex is recognized for its involvement in social processes [71], it is now known that other brain regions (e.g., temporo-parietal junction) exhibit interpersonal neural synchrony [16], which might be influenced by factors such as emotional content and the syntactic/semantic structure of dialogues, especially in natural conversations.Moving forward, potential lines of research could expand upon the current findings by exploring other brain regions exhibiting interpersonal neural synchrony.
Secondly, our study employed the emotional content of dialogues as a predictor of interpersonal neural synchrony.However, emotions are not solely conveyed through speech content [54].Rather, an individual's emotional state may emerge through nonverbal cues or subtle indicators, such as facial expressions or tone of voice.Future works might capitalize on recent developments in cognitive data science to assess automatically visual and auditory channels through which emotions are conveyed among humans [72].
Thirdly, our study focuses only on one socio-cultural set of conditions (e.g., close friends within the Italian population).This limitation was mostly due to technical issues with sampling individuals through hyperscanning.Future research could involve different types of dyads (e.g., romantic partners, strangers, parent-child relationships) to see how our current results generalize across different types of social bonds and potentially different levels of empathy.
Taking these limitations into account, the current work represents a pioneering and human-centered AI exploration into understanding the role of emotions and associated knowledge in predicting interpersonal neural synchrony.

Conclusion
The current fNIRS hyperscanning study has provided valuable insights into bridging neuroscientific, affective, and cognitive aspects of interpersonal synchrony building on past mind-brain approaches [41][42][43][44].More in detail, we quantified how the emotional content and syntactic/semantic associations within dialogues can predict interpersonal neural synchrony in the prefrontal cortex.Specifically, the emotional content of conversations tended to be a consistent predictor of brain synchrony throughout the whole prefrontal cortex, losing its predictive power when analyzing data from smaller regions of interest.Conversely, associative knowledge structure [31] was found to be more predictive of interpersonal neural synchrony in the right middle frontal gyrus, losing part of its predictive power when incorporating data from all the regions of the prefrontal cortex.Our transdisciplinary data-informed approach corroborates the significance of the affective component in real-life social interactions, within the context of the bio-behavioral synchrony framework [10].

Study Design
All data for the study were obtained from a cross-cultural investigation testing the neural underpinnings of role-play [41,42], which is a clinical technique used to alleviate psychopathological symptoms.Data were collected with a hyperscanning approach based on fNIRS.Participants were asked to interact freely for 5 minutes in three different conditions: natural conversation, role-play, and role reversal.The same experiment was conducted in Italy and Singapore, but for the current study, we used only the data from the Italian cohort.All the interactions were recorded and manually transcribed.To identify dialogues' emotional content and semantic structure, we used automated methods such as EmoAtlas and TFMNs.Ultimately, emotional z -scores and the main properties of the semantic network were used to predict interpersonal neural synchrony across different sub-regions of the prefrontal cortex of the brain.Data collections were approved by the University of Trento (2022-059) and by Nanyang Technological University (NTU-IRB-2021-03-013).The conduction of the experiment followed the guidelines provided by the Declaration of Helsinki.Informed consent was obtained from all participants.

Participants
As mentioned above, for the current study, we used only the data from the cohort in Italy (N = 84 participants, i.e., 42 dyads; age range = 18-35 years old).Participants were recruited via convenience and snowball sampling from social media sites.All the recruited dyads had an existing peer relationship and participants had no history of known and/or diagnosed health or neurological conditions, particularly conditions that may alter the oxygen-binding capacity of the blood.

Experimental Protocol
The experimental procedure consisted of four separate phases, in which neural data were obtained employing fNIRS [41,42].Firstly, the experiment began with two minutes of resting state to record the neural activity at rest.During the resting state, participants were asked to sit silently in front of each other and not to move their limbs as much as possible (see Figure 2A for the experimental setup).The subsequent phases were: (2nd) natural conversation, (3rd) role-play, and (4th) role reversal.Each of these phases lasted for five minutes.In the natural conversation condition, participants could interact as they would normally do in a daily conversation.In the role-play phase, participants were asked to interact by pretending to be another pair of mutual friends among their peer group.In the role reversal phase, participants were asked to interact by exchanging their roles (i.e., participant A pretending to be participant B, and vice versa).To provide a common framework for dialogues, a shared prompt was used across all interactive conditions.In this prompt, participants were instructed to pretend that they spotted each other at the shopping mall while trying to buy each other presents.To reduce primacy effects, the order of natural conversation, role-play, and role reversal was randomized.For all conditions, we truncated all data from the first and fifth minutes of interactions, as the beginnings and endings of conversations are structurally different from the main interaction [41,73].

Acquisition of Neural Data
fNIRS hyperscanning was used in all experimental tasks to monitor participants' brain activity.Participants' caps were set up with 8 LED sources emitting light at wavelengths of 760nm and 850nm, and 7 detectors, arranged following a standard prefrontal cortex montage [18,74].The overall configuration of sources and detectors resulted in 20 fNIRS channels for each participant, to monitor the activity of the prefrontal cortex.fNIRS channels were aggregated into the following regions of interest: anterior prefrontal cortex, superior frontal gyrus, left middle frontal gyrus, right middle frontal gyrus, left inferior frontal gyrus, and right inferior frontal gyrus (see Figure 2B).The placement of channels followed the standard international 10-20 electroencephalography layout [75].Optode stabilizers were used to ensure that the distance between sources and detectors never exceeded 3 cm, to ensure a good signal-to-noise ratio [76].For the data collection, a NIRSport2 device (NIRx Medical Technologies LLC) was used, with a sampling rate of 10.17 Hz.

Processing of Neural Data
Neural data were processed using pyphysio [77].Missing values in neural data were imputed.Subsequently, the quality of fNIRS signals was assessed using deep learning [78,79].More in detail, we used a convolutional neural network architecture trained to classify the quality of fNIRS segments.Motion artifacts were removed from fNIRS signals using spline interpolation [80] and wavelet filtering [81].The processed data were Fig. 2 Schematic summary of the experimental procedure.A) Setup of devices and sitting arrangement of dyads during the experimental sessions.B) Image from [18].Schematic diagram depicting the position of 20 functional near-infrared spectroscopy (fNIRS) channels and their corresponding positions to measure the activity of the superior frontal gyrus (SFG), middle frontal gyrus (MFG), inferior frontal gyrus (IFG), and anterior prefrontal cortex (aPFC).C) Emotional content of sentences computed using EmoAtlas [46].D) Syntactic parsing of sentences.E) Representation of the semantic/syntactic structure of sentences using textual forma mentis networks [33].
subsequently converted to oxygenated (HbO) and deoxygenated hemoglobin (HbR) using the Beer-Lambert law [82].We focused only on HbO values as in past studies (e.g., [16,83]).A band-pass filter was then applied to the neural data to remove high-(>0.5Hz) and low-frequency (<0.005Hz) components.Neural data from individual channels were ultimately aggregated into the regions of interest.The brain activity of each region of interest was obtained by computing the average of the normalized channels that composed each cluster [84].To ensure good quality signals in the regions of interest, a region of interest signal was computed only if at least 2 channels with good quality were available [84].

Interpersonal Neural Synchrony
Interpersonal neural synchrony was computed between homologous brain regions of interest in the two conversationalists with Wavelet Transform Coherence (WTC) [16,85,86].By using WTC, we assessed the coherence between individual fNIRS time series in each dyad and each region of interest as a function of frequency and time.WTC is particularly advantageous as it considers both phase-lagged correlations and in-phase correlations, enabling the assessment of global coherence patterns of brain activity [16].
For each dyad, we obtained eighteen values of WTC: one for each region of interest in each of the three experimental conditions (natural conversation, role-play, and role reversal).WTC was computed across the frequencies from 0.01 to 0.20 Hz in steps of 0.01 Hz [42,87].
Moreover, for each region of interest in each experimental condition, we computed WTC between surrogate dyads, i.e., randomly paired participants taken from different real dyads.In this way, we obtain a "control" value of WTC derived from participants involved in a social task but that did not interact with one another directly.

Emotional Content of Dialogues
To analyze the emotional content in the transcribed dialogues, we employed EmoAtlas [46], a framework building TFMNs and performing emotional profiling based on Plutchick's theory [54] (see Figure 2C).EmoAtlas operationalizes the quantification of eight emotions in text: joy, trust, fear, surprise, sadness, disgust, anger, and anticipation.For each emotion, the tool provides a z -score, indicating the intensity of that specific emotion within the dialogue compared to random assemblies of words from the underlying psychological data.Consider a text containing m emotional words.Random assemblies are created by sampling uniformly at random m words from the emotional lexicon of EmoAtlas.Because of uniform sampling, random assemblies will naturally reflect frequency effects in the emotional lexicon (e.g.there are more words eliciting trust rather than disgust).The library repeats random sampling 1000 times, creating a distribution of emotional word counts k i ei of finding that on the i-th sampling, k i e random words elicited the emotion e. Emotional z -scores are then computed as the observed counts of m e words eliciting emotion e among the m ones found in text: e ⟩ σ e where σ is the error margin attributed to the sample mean computed over iterations i s.
EmoAtlas was chosen due to its similar or superior performance compared to stateof-the-art natural language processing techniques [46].
To represent the emotional content of the dialogue at the dyad-level, we aggregated the z -scores for each emotion across participants within the (social) dyad.
In some cases, EmoAtlas is unable to assign reliable z -scores due to the low number of words in the provided text.In these cases, we excluded the specific dyad from the analysis of the emotional content of dialogues and interpersonal brain synchrony (n = 2).

Semantic Structure of Dialogues
To analyze the semantic structure of dialogues, we employed textual forma mentis (Latin for "mindset") networks (TFMNs) [33], built via EmoAtlas [46] (see Figure 2D  and 2E).TFMNs map the associative knowledge of dialogues using network theory principles, wherein words/concepts serve as nodes associated by semantic (synonyms) or syntactic (specifications) links.TFMNs split any text into sentences and, then, sentence by sentence, they link words if they are nearby (at distance K ≤ 4) on the syntactic parsing tree of the sentence itself.TFMNs can, thus, spot specifications between words that are not adjacent or nearby in texts (i.e., separated by a few other words).This crucial difference makes TFMNs better at capturing syntactic relationships compared to word co-occurrence networks [88].The syntactic parsing tree [33] (i.e., a tree graph determining syntactic dependencies) is computed sentence by sentence through a pre-trained AI model (from spaCy, see [46]).The K threshold is needed to link only syntactically close concepts and can be tuned by the experimenter.The value K ≤ 4 was selected in agreement with past findings showing in English syntactic distances between words mostly around 3 because of language optimization effects [89].The syntactic network extracted by linking non-stopwords (at distance K leq4 on the parsing tree) is then enriched with synonyms and psychological emotional data to become a multiplex feature-rich network, where links can be either syntactic or semantic and words can be labeled as positive/negative/neutral and as eliciting one or more emotions (see [33,45,46]).
After computing the semantic network for each dyad in every condition, we extracted the following network measures [31,90]: the total number of nodes |V |, the total number of edges |E|, the average local clustering, the number of connected components |C|, and degree assortativity (see Figure 3).The total number of nodes |V | and |E| edges correspond to the number of words and syntactic/semantic associations included within the network, respectively.For instance, in a network representing a text corpus, |V | would represent the count of distinct words or concepts, while |E| would indicate how these words are connected based on their syntactic or semantic relationships.Average local clustering is an index of the likelihood that the neighbors of a node are linked with each other.Thus, average clustering measures the tendency of nodes to form clusters.In a semantic network, higher average clustering indicates that words or concepts tend to be densely interconnected within localized groups.The number of connected components |C| indicates the count of subsets within the network where there is a path between every pair of nodes.In other words, if the network consists of three groups of words where each group is internally connected but has no connections with the other groups, then the number of |C| would be 3. Finally, degree assortativity measures the association among nodes of similar weight, where weight can represent the number of connections (degree) a node has in the network.Higher degree assortativity values signify that nodes with a high degree (i.e., more connections) are linked to nodes with similarly high degrees.For all semantic metrics, individual values were aggregated to represent dyad-level data in each experimental condition.

Data Analysis
The analytical plan was divided into four phases: 1.A preliminary analysis of interpersonal neural synchrony across regions of interest and experimental condition; 2.An analysis of how the emotional content of dialogues predicts interpersonal neural synchrony; 3.An analysis of how the semantic structure of dialogues predicts interpersonal neural synchrony; 4.An analysis of how the emotional content and the semantic structure of dialogues together predict interpersonal neural synchrony.
Initially, we compared the WTC in specific regions of interest between true versus surrogate dyads.To do so, six Mann-Whitney U tests were computed, one for each region of interest.After the statistical tests, all regions of interest with a significant difference in WTC scores between real and surrogate data were deemed eligible for the subsequent statistical analyses.Subsequently, we compared the WTC scores between the remaining regions of interest and between experimental tasks with a two-way repeated ANOVA.
To investigate whether emotional z -scores predict interpersonal neural synchrony, we conducted a series of stepwise linear regressions, with a backward elimination method [91].In the first regression, we predicted WTC scores in one brain region of interest at a time.In this phase, we used the three conditions (natural conversation, role-play, and role reversal) and aggregated emotion z -scores as predictors.For this analysis, Bonferroni correction was used to correct the α level and control the risk of false positive results when conducting multiple comparisons.In this way, the α level was set at 0.05/3 (the number of regions of interest).To adopt a rigorous approach, dyads with missing WTC values in one of the three experimental conditions were excluded from this analysis (n = 2 for superior frontal gyrus; n = 3 for left middle frontal gyrus; n = 3 for right middle frontal gyrus).Subsequently, a series of stepwise linear regressions with a backward elimination method was conducted on the subset related to each experimental condition (i.e., natural conversation, role-play, role reversal).Bonferroni correction was used to correct the α level at 0.05/9 (3 conditions x 3 regions of interest).The same analysis was repeated by using the whole dataset to predict WTC scores across all subregions of the prefrontal cortex using the condition and emotion z -scores.In this case, individual data points with missing WTC values were removed.Individual stepwise linear regressions were run by subdividing the dataset across experimental conditions (α level = 0.05/3 conditions).
The same analytical approach was used to investigate whether the semantic structure of dialogues predicts interpersonal neural synchrony.In this case, the experimental condition and the TFMNs measures were used as predictors of WTC in individual regions of interest and, subsequently, in the whole prefrontal cortex.
Finally, we combined the experimental condition, emotional z -scores, and TFMNs' syntactic/semantic structural features to predict interpersonal neural synchrony in the whole prefrontal cortex.Separate linear models were conducted to investigate the predictors of WTC in each experimental task (α level = 0.05/3 conditions).

Declarations
Funding.Not applicable.
Competing interests.The authors declare no competing interests.
Consent to participate.The conduction of the experiment followed the guidelines provided by the Declaration of Helsinki and informed consent was obtained from all participants.

Fig. 3
Fig.3Network measures extracted from the semantic network built using textual forma mentis networks (TFMNs).From the semantic network, we extracted the total number of nodes |V |, the total number of edges |E|, the average local clustering, the number of connected components |C|, and degree assortativity.