Inter-brain neural dynamics in biological and artificial intelligence systems

4 hours ago 1

Data availability

All data and analyses necessary to understand the conclusions of the Article are presented in the main text and in Extended Data. Source data are provided with this paper.

References

  1. Chen, P. & Hong, W. Neural circuit mechanisms of social behavior. Neuron 98, 16–30 (2018).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  2. Kingsbury, L. & Hong, W. A multi-brain framework for social interaction. Trends Neurosci. 43, 651–666 (2020).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  3. Czeszumski, A. et al. Hyperscanning: a valid method to study neural inter-brain underpinnings of social interaction. Front. Hum. Neurosci. 14, 39 (2020).

    Article  PubMed  PubMed Central  Google Scholar 

  4. Dumas, G. & Fairhurst, M. T. Reciprocity and alignment: quantifying coupling in dynamic interactions. R. Soc. Open Sci. 8, 210138 (2021).

    Article  ADS  PubMed  PubMed Central  Google Scholar 

  5. Dumas, G., Lachat, F., Martinerie, J., Nadel, J. & George, N. From social behaviour to brain synchronization: review and perspectives in hyperscanning. IRBM 32, 48–53 (2011).

    Article  Google Scholar 

  6. Hasson, U., Ghazanfar, A. A., Galantucci, B., Garrod, S. & Keysers, C. Brain-to-brain coupling: a mechanism for creating and sharing a social world. Trends Cogn. Sci. 16, 114–121 (2012).

    Article  PubMed  PubMed Central  Google Scholar 

  7. Kinreich, S., Djalovski, A., Kraus, L., Louzoun, Y. & Feldman, R. Brain-to-brain synchrony during naturalistic social interactions. Sci. Rep. 7, 17060 (2017).

    Article  ADS  PubMed  PubMed Central  Google Scholar 

  8. Tseng, P.-H., Rajangam, S., Lehew, G., Lebedev, M. A. & Nicolelis, M. A. L. Interbrain cortical synchronization encodes multiple aspects of social interactions in monkey pairs. Sci. Rep. 8, 4699 (2018).

    Article  ADS  PubMed  PubMed Central  Google Scholar 

  9. Kingsbury, L. et al. Correlated neural activity and encoding of behavior across brains of socially interacting animals. Cell 178, 429–446 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  10. Zhang, W. & Yartsev, M. M. Correlated neural activity across the brains of socially interacting bats. Cell 178, 413–428 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  11. Botvinick, M., Wang, J. X., Dabney, W., Miller, K. J. & Kurth-Nelson, Z. Deep reinforcement learning and its neuroscientific implications. Neuron 107, 603–616 (2020).

    Article  CAS  PubMed  Google Scholar 

  12. Arulkumaran, K., Deisenroth, M. P., Brundage, M. & Bharath, A. A. Deep reinforcement learning: a brief survey. IEEE Signal Process. Mag. 34, 26–38 (2017).

    Article  ADS  Google Scholar 

  13. Busoniu, L., Babuska, R. & Schutter, B. D. A comprehensive survey of multiagent reinforcement learning. IEEE Trans. Syst. Man Cybern. C 38, 156–172 (2008).

    Article  Google Scholar 

  14. Zhang, K., Yang, Z. & Başar, T. in Handbook of Reinforcement Learning and Control (eds Vamvoudakis, K. G. et al.) 321–384 (2021).

  15. Yizhar, O. et al. Neocortical excitation/inhibition balance in information processing and social dysfunction. Nature 477, 171–178 (2011).

    Article  ADS  CAS  PubMed  PubMed Central  Google Scholar 

  16. Murugan, M. et al. Combined social and spatial coding in a descending projection from the prefrontal cortex. Cell 171, 1663–1677 (2017).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  17. Scheggia, D. et al. Somatostatin interneurons in the prefrontal cortex control affective state discrimination in mice. Nat. Neurosci. 23, 47–60 (2020).

    Article  CAS  PubMed  Google Scholar 

  18. Kingsbury, L. et al. Cortical representations of conspecific sex shape social behavior. Neuron 107, 941–953 (2020).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  19. Frost, N. A., Haggart, A. & Sohal, V. S. Dynamic patterns of correlated activity in the prefrontal cortex encode information about social behavior. PLoS Biol. 19, e3001235 (2021).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  20. Monte, O. D. et al. Widespread implementations of interactive social gaze neurons in the primate prefrontal-amygdala networks. Neuron 110, 2183–2197 (2022).

    Article  Google Scholar 

  21. Li, S. W. et al. Frontal neurons driving competitive behaviour and ecology of social groups. Nature 603, 661–666 (2022).

    Article  ADS  CAS  PubMed  Google Scholar 

  22. Padilla-Coreano, N., Tye, K. M. & Zelikowsky, M. Dynamic influences on the neural encoding of social valence. Nat. Rev. Neurosci. 23, 535–550 (2022).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  23. Merre, P. L., Ährlund-Richter, S. & Carlén, M. The mouse prefrontal cortex: unity in diversity. Neuron 109, 1925–1944 (2021).

    Article  PubMed  Google Scholar 

  24. Abdi, H. & Williams, L. J. Partial least squares methods: partial least squares correlation and partial least square regression. Methods Mol. Biol. 930, 549–579 (2012).

    Article  Google Scholar 

  25. Lopes-dos-Santos, V., Ribeiro, S. & Tort, A. B. L. Detecting cell assemblies in large neuronal populations. J Neurosci. Methods 220, 149–166 (2013).

    Article  PubMed  Google Scholar 

  26. Pereira, T. D. et al. SLEAP: a deep learning system for multi-animal pose tracking. Nat. Methods 19, 486–495 (2022).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  27. Hotelling, H. Relations between two sets of variates. Biometrika 28, 321 (1936).

    Article  Google Scholar 

  28. Liang, E. et al. RLlib: abstractions for distributed reinforcement learning. In Proc. 35th International Conference on Machine Learning 80, 3053–3062 (PMLR, 2018).

  29. Schulman, J., Wolski, F., Dhariwal, P., Radford, A. & Klimov, O. Proximal policy optimization algorithms. Preprint at https://doi.org/10.48550/arxiv.1707.06347 (2017).

  30. Tremblay, R., Lee, S. & Rudy, B. GABAergic interneurons in the neocortex: from cellular properties to circuits. Neuron 91, 260–292 (2016).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  31. Hattori, R., Kuchibhotla, K. V., Froemke, R. C. & Komiyama, T. Functions and dysfunctions of neocortical inhibitory neuron subtypes. Nat. Neurosci. 20, 1199–1208 (2017).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  32. Pinto, L. & Dan, Y. Cell-type-specific activity in prefrontal cortex during goal-directed behavior. Neuron 87, 437–450 (2015).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  33. Dumas, G., Nadel, J., Soussignan, R., Martinerie, J. & Garnero, L. Inter-brain synchronization during social interaction. PLoS ONE 5, e12166 (2010).

    Article  ADS  PubMed  PubMed Central  Google Scholar 

  34. Barraza, P., Pérez, A. & Rodríguez, E. Brain-to-brain coupling in the gamma-band as a marker of shared intentionality. Front. Hum. Neurosci. 14, 295 (2020).

    Article  PubMed  PubMed Central  Google Scholar 

  35. Semedo, J. D., Zandvakili, A., Machens, C. K., Yu, B. M. & Kohn, A. Cortical areas interact through a communication subspace. Neuron 102, 249–259 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  36. Fakhar, K. & Hilgetag, C. C. Systematic perturbation of an artificial neural network: a step towards quantifying causal contributions in the brain. PLoS Comput. Biol. 18, e1010250 (2022).

    Article  ADS  CAS  PubMed  PubMed Central  Google Scholar 

  37. Cowley, B. R. et al. Mapping model units to visual neurons reveals population code for social behaviour. Nature 629, 1100–1108 (2024).

    Article  ADS  CAS  PubMed  PubMed Central  Google Scholar 

  38. Kao, J. C. Considerations in using recurrent neural networks to probe neural dynamics. J. Neurophysiol. 122, 2504–2521 (2019).

    Article  PubMed  Google Scholar 

  39. Vong, L. et al. Leptin action on GABAergic neurons prevents obesity and reduces inhibitory tone to POMC neurons. Neuron 71, 142–154 (2011).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  40. Dimidschstein, J. et al. A viral strategy for targeting and manipulating interneurons across vertebrate species. Nat. Neurosci. 19, 1743–1749 (2016).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  41. Pnevmatikakis, E. A. & Giovannucci, A. NoRMCorre: an online algorithm for piecewise rigid motion correction of calcium imaging data. J. Neurosci. Methods 291, 83–94 (2017).

    Article  CAS  PubMed  Google Scholar 

  42. Zhou, P. et al. Efficient and accurate extraction of in vivo calcium signals from microendoscopic video data. eLife 7, e28728 (2018).

    Article  PubMed  PubMed Central  Google Scholar 

  43. Zhang, M., Wu, Y. E., Jiang, M. & Hong, W. Cortical regulation of helping behaviour towards others in pain. Nature 626, 136–144 (2024).

    Article  ADS  CAS  PubMed  PubMed Central  Google Scholar 

  44. Wu, Y. E. et al. Neural control of affiliative touch in prosocial interaction. Nature 599, 262–267 (2021).

    Article  ADS  CAS  PubMed  PubMed Central  Google Scholar 

  45. Adhikari, R. & Agrawal, R. K. An Introductory Study on Time Series Modeling and Forecasting (Lambert Academic Publishing, 2013).

  46. Sheintuch, L. et al. Tracking the same neurons across multiple days in Ca2+ imaging data. Cell Rep. 21, 1102–1115 (2017).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  47. Musall, S., Kaufman, M. T., Juavinett, A. L., Gluf, S. & Churchland, A. K. Single-trial neural dynamics are dominated by richly varied movements. Nat. Neurosci. 22, 1677–1686 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  48. Lerer, A. & Peysakhovich, A. Maintaining cooperation in complex social dilemmas using deep reinforcement learning. Preprint at https://doi.org/10.48550/arxiv.1707.01068 (2017).

  49. Foerster, J. N. et al. Learning with opponent-learning awareness. In Proc. 17th International Conference on Autonomous Agents and MultiAgent Systems 122–130 (ACM, 2018).

  50. Lu, C., Willi, T., de Witt, C. S. & Foerster, J. Model-free opponent shaping. In Proc. 39th International Conference on Machine Learning Vol. 162, 14398–14411 (PMLR, 2022).

  51. Zhou, J. L., Hong, W. & Kao, J. C. Reciprocal reward influence encourages cooperation from self-interested agents. In Proc. 38th Conference on Neural Information Processing Systems 59491–59512 (Curran Associates, 2024).

  52. Agapiou, J. P. et al. Melting Pot 2.0. Preprint at https://doi.org/10.48550/arxiv.2211.13746 (2022).

  53. Espeholt, L. et al. IMPALA: scalable distributed deep-RL with importance weighted actor–learner architectures. In Proc. 35th International Conference on Machine Learning (PMLR, 2018).

Download references

Acknowledgements

The authors thank D. Buonomano, A. Kennedy, V. Sohal, P. Golshani and A. Churchland for valuable suggestions; and members of the laboratory of W.H. for valuable comments. This work was supported in part by National Institutes of Health grants (R01 MH130941, R01 NS113124, R01 MH132736 and RF1 NS132912), a Packard Fellowship in Science and Engineering, a Vallee Scholar Award and a Mallinckrodt Scholar Award (to W.H.), the NIH DP2 NS122037 and NSF CAREER 194346 (to J.C.K.), the NIH F31 MH134521 and an NSF NRT (to N.P.), and a Brain and Behavior Research Foundation grant (to X.Z.).

Author information

Author notes

  1. These authors contributed equally: Xingjian Zhang, Nguyen Phi

Authors and Affiliations

  1. Department of Neurobiology, David Geffen School of Medicine, University of California, Los Angeles, Los Angeles, CA, USA

    Xingjian Zhang, Nguyen Phi, Qin Li, Ryan Gorzek, Shan Huang, Lyle Kingsbury, Tara Raam, Ye Emily Wu, Don Wei & Weizhe Hong

  2. Department of Biological Chemistry, David Geffen School of Medicine, University of California, Los Angeles, Los Angeles, CA, USA

    Xingjian Zhang, Nguyen Phi, Qin Li, Ryan Gorzek, Shan Huang, Lyle Kingsbury, Tara Raam, Ye Emily Wu, Don Wei & Weizhe Hong

  3. Department of Bioengineering, Henry Samueli School of Engineering, University of California, Los Angeles, Los Angeles, CA, USA

    Qin Li & Weizhe Hong

  4. Department of Electrical and Computer Engineering, Henry Samueli School of Engineering, University of California, Los Angeles, Los Angeles, CA, USA

    Niklas Zwingenberger, John L. Zhou & Jonathan C. Kao

  5. Department of Computer Science, Henry Samueli School of Engineering, University of California, Los Angeles, Los Angeles, CA, USA

    Jonathan C. Kao

Authors

  1. Xingjian Zhang
  2. Nguyen Phi
  3. Qin Li
  4. Ryan Gorzek
  5. Niklas Zwingenberger
  6. Shan Huang
  7. John L. Zhou
  8. Lyle Kingsbury
  9. Tara Raam
  10. Ye Emily Wu
  11. Don Wei
  12. Jonathan C. Kao
  13. Weizhe Hong

Contributions

W.H. and X.Z. designed the experiments. X.Z. carried out all experiments. W.H., N.P., X.Z. and J.C.K. designed the analyses. N.P. carried out most of the computational analyses, including calcium imaging data analyses from mice and multi-agent interaction analyses. X.Z. contributed to some computational analyses. Q.L. contributed to some multi-agent analyses. R.G. designed and carried out the analyses of behavioural space and contributed to some additional analyses. N.Z. provided guidance for the initial setup of the multi-agent environment. S.H. and L.K. made significant initial contributions to the project. T.R. and D.W. assisted in some experiments. J.L.Z. contributed to the coin task. J.C.K. provided critical guidance on multi-agent analyses and valuable feedback on data analyses. W.H., X.Z., N.P., J.C.K. and Y.E.W. wrote the manuscript. W.H. conceived the project and supervised the entire study.

Corresponding authors

Correspondence to Jonathan C. Kao or Weizhe Hong.

Ethics declarations

Competing interests

J.C.K. is a co-founder of Luke Health and is on its board of directors. The other authors declare no competing interests.

Peer review

Peer review information

Nature thanks Steve Chang, Valentin Dragoi, Guillaume Dumas, Francesco Papaleo and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.

Additional information

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Extended data figures and tables

Extended Data Fig. 1 Additional analyses of inter-brain correlation.

a, Example fluorescence images showing the overlay (right) of mDLX-GCaMP6f (left, green) and hSyn-DIO-mCherry expressions in the dmPFC of Vgat-Cre mice (middle, red). Scale bar, 100 µm. b, Quantification of co-localization between mDLX-GCaMP6f and hSyn-DIO-mCherry expressions. c, d, Coronal sections showing the expressions of AAV-CaMKII-GCaMP6f (glutamatergic neurons, c) and AAV-mDLX-GCaMP6f (GABAergic neurons, d) at the injection site. Scale bar, 500 µm. Enlarged views of the injection sites are shown in Fig. 1c. e, Inter-brain correlation of aggregate (mean) activity in dmPFC GABAergic neurons during interaction sessions compared to separation sessions and cross-pair controls. f, Cross-correlation of aggregate (mean) activity of GABAergic neurons during interaction and separation sessions, and the phase-randomized neural activity of interaction sessions. This panel shows a replot of the data from Fig. 1n using a smaller lag window. g, Inter-brain correlation of aggregate (mean) activity in dmPFC glutamatergic neurons during interaction sessions compared to separation sessions and cross-pair controls. h, Cross-correlation of aggregate (mean) activity of glutamatergic neurons in interaction and separation sessions, and the phase-randomized neural activity of interaction sessions. This panel shows a replot of the data from Fig. 1k using a smaller lag window. i, j, Example trace (top) and autocorrelation (bottom) of aggregate (mean) activity (i) and phase randomized control (j). k-m, Inter-brain correlation (PCC) of individual components from the Fourier transform of the aggregate (mean) neural traces (Mean ± SEM). Data from interaction sessions shown in k are replotted in l and m alongside data from the corresponding separation sessions. n, Autocorrelation of an example GABAergic neuron activity before and after pre-whitening. o, Inter-brain correlation of pre-whitened GABAergic (left) and glutamatergic (right) neurons in interaction sessions, separation sessions, and shuffled controls. p, q, Cross-correlation of pre-whitened neural activity in GABAergic (p) or glutamatergic (q) neurons across animals during interaction sessions, compared to separation sessions and shuffled controls (Mean ± SEM). r-s, Inter-brain correlation (PCC) of individual components from the Fourier transform of the pre-whitened aggregate (mean) activity of GABAergic (r) or glutamatergic (s) neurons (Mean ± SEM). Of note, pre-whitening partially removes real signals, potentially reducing the observed difference in inter-brain correlation between interaction and separation sessions. t, Firing rates in GABAergic and glutamatergic neurons. u, v, Firing rates (u) and inter-brain correlation (v) in different cell types after subsampling the top 20% glutamatergic neurons based on firing rates. w-x, Firing rates (w) and inter-brain correlation (x) in different cell types after subsampling the top 50% glutamatergic neurons and the bottom 50% GABAergic neurons based on firing rates. t-x, mean ± SEM. y, z, Inter-brain correlation (PCC) from only social-responsive or non-social-responsive neurons in GABAergic (y) or glutamatergic (z) population. p**** < 0.0001, p*** < 0.001; p** < 0.01; p > 0.05, n.s. Boxplots: medians, interquartile ranges (IQR), and whiskers indicating min-max (y, z) or 1.5× IQR (e, g, o). See Supplementary Table 1 for details of statistical analyses.

Source data

Extended Data Fig. 2 Encoding of social behaviors in GABAergic and glutamatergic neurons.

a-e, Performance of SVM decoders trained to distinguish different behaviors from baseline (non-behavioral moments) using population activity from each cell type, with glutamatergic neurons down-sampled to match the average number of GABAergic neurons. f-i, Performance of SVM decoders trained to distinguish pairs of behaviors using population activity with both neuronal populations down-sampled to 50 neurons per animal. j-n, Performance of SVM decoder trained to decode different behaviors from baseline (non-behavioral moments) using population activity with both neuronal populations down-sampled to 50 neurons per animal. Boxplots: medians, interquartile ranges (IQR), and whiskers indicating min-max (a-n). See Supplementary Table 1 for details of statistical analyses.

Source data

Extended Data Fig. 3 Shared neural dynamics in male and female mice.

a, Number of significantly shared neural dimensions (PLSCs) across animal pairs and cell types in interaction sessions. b-c, PCC of the top shared neural dimensions (PLSC1) in interaction and separation sessions above chance for GABAergic (b) and glutamatergic (c) neurons. Values shown are the PCC of observed data minus the PCC computed from temporally shuffled data. d, e, PCC of the top unique neural dimensions in interaction and separation sessions above chance for GABAergic (d) and glutamatergic (e) populations. Values shown are the PCC of observed data minus the PCC computed from temporally shuffled data. Data for GABAergic and glutamatergic neurons in interaction sessions in a-e were replotted from Fig. 2g–j. f, Neural variance explained by GABAergic or glutamatergic PLSC1 during interaction sessions in female or male mice. g, PCC of top shared dimensions PLSC1 above chance in GABAergic or glutamatergic neurons during interaction sessions in female or male mice. h, PCC of top unique dimensions U1 above chance in GABAergic or glutamatergic neurons during interaction sessions in female or male mice. U1 refers to PC1 of the unique neural subspace. Values in g, h shown are the PCC of observed data minus the PCC computed from temporally shuffled data. i, Inter-brain correlation of top shared or unique neural dimensions in each cell type across different timescales, compared to phase-randomized population aggregate (mean) signals (Mean ± SEM). PLSC1 or U1 neural dimensions for each animal are decomposed into different frequency bands using the Fast Fourier Transform. j, k, Histograms of significant neurons contributing to the top shared versus unique neural dimensions (j) or the first versus second shared neural dimensions (k) in glutamatergic neurons (pooled across all animals). p**** < 0.0001, p*** < 0.001, p** < 0.01, p* < 0.05, p > 0.05, n.s. Boxplots: medians, interquartile ranges (IQR), and whiskers indicating 1.5× IQR (a-h). See Supplementary Table 1 for details of statistical analyses.

Source data

Extended Data Fig. 4 Additional analyses of shared neural subspace.

a-f, Shared neural subspace analysis using inferred spikes. a-b, Number of shared neural dimensions using inferred spikes in GABAergic (a) and glutamatergic (b) neurons during interaction or separation sessions. c, Neural variance explained by shared and unique neural subspace during interaction sessions for each cell type, averaged across all animals, using inferred spikes. d, Neural variance explained by the top shared neural dimensions PLSC1 for each cell type using inferred spikes. e-f, PCC of the top shared (e) or unique (f) neural dimensions above chance. Values shown are the PCC of observed data minus the PCC computed from temporally shuffled data. g-l, Shared neural subspace analysis of the recorded neuronal population down-sampled to 50 neurons per animal. g, h, Number of shared neural dimensions in GABAergic and glutamatergic neurons during interaction or separation sessions. i, Neural variance explained by shared and unique neural subspace during interaction sessions for each cell type, averaged across all animals. j, Neural variance explained by PLSC1 for each cell type. k-l, PCC of the top shared (k) or unique (l) pair of neural dimensions above chance. Values shown are the PCC of observed data minus the PCC computed from temporally shuffled data. m-r, Shared neural subspace analysis of glutamatergic neurons down-sampled to match the average number of GABAergic neurons. m-n, Number of shared neural dimensions in GABAergic (m) and glutamatergic (n) neurons during interaction or separation sessions. o, Neural variance explained by shared and unique neural subspace during interaction sessions for each cell type, averaged across all animals. p, Neural variance explained by PLSC1 for each cell type. q-r, PCC of the top shared (q) or unique (r) pair of neural dimensions across animal pairs and cell types above chance. Values shown are the PCC of observed data minus the PCC computed from temporally shuffled data. In m-r, all GABAergic neuron data are replotted from Fig. 2g,i,n,o, as only the glutamatergic neurons were down-sampled to match the average numbers of GABAergic neurons. s-w, Shared neural subspace analysis using CCA. s, Similarity of the top shared neural dimensions identified using PLSC versus CCA method, measured by their Pearson correlation coefficients (Mean ± SEM). t, Neural variance explained by the top shared neural dimension identified by CCA (CC1). u, PCC of the top shared neural dimensions using CCA above chance. Values shown are the PCC of observed data minus the PCC computed from temporally shuffled data. v-w, Direct comparison of neural variance explained captured by PLSC1 versus CC1 in GABAergic (v) or glutamatergic (w) neurons. p**** < 0.0001, p*** < 0.001; p** < 0.01; p > 0.05, n.s. Boxplots: medians, interquartile ranges (IQR), and whiskers indicating 1.5× IQR (a, b, d-f, g, h, j-l, m, n, p-r, t, u). See Supplementary Table 1 for details of statistical analyses.

Source data

Extended Data Fig. 5 Shared neural subspace during social and non-social moments.

a-h Inter-brain correlation (PCC), number of significant shared neural dimensions, chance-level-subtracted PCC of PLSC1 (the PCC of observed data minus the PCC computed from temporally shuffled data), and fraction of variance explained by shared neural subspace during mutual social, unidirectional social, and non-social moments within interaction sessions in GABAergic (a-d) or glutamatergic neurons (e-h). Comparing mutual social conditions between GABAergic and glutamatergic neurons in a and e, p = 0.0003; b and f, p = 0.0644; c and g, p < 0.0001; d and h, p = 0.0008 (two-way ANOVA followed by Sidák multiple comparisons). i-l: Inter-brain correlation (PCC), chance-level subtracted PCC of PLSC1, fraction of variance explained by shared dimensions, and number of shared dimensions in GABAergic or glutamatergic neurons during mutual social versus concurrent rearing (mutual non-social) behaviors within interaction sessions. In i-l, all mutual social data are replotted from a-h. m, Higher neural variance explained by the glutamatergic shared neural subspace in animals that engaged in a higher level of mutual social interaction. Boxplots: medians, interquartile ranges (IQR), and whiskers indicating 1.5× IQR (a-m). See Supplementary Table 1 for details of statistical analyses.

Source data

Extended Data Fig. 6 Similarity of neural subspaces across time.

a, b, Number of significantly shared neural dimensions (PLSCs) in GABAergic or glutamatergic neurons during the first 10 min of interaction or separation sessions. As a shorter time window contains fewer behavioral interactions, we expect that it exhibits fewer shared dimensions than the full 20-min interaction sessions. c, Neural variance explained by shared neural subspace in GABAergic and glutamatergic populations during the first 10 min of interaction sessions. d, e, Temporal stability of the top shared (PLSC1) or unique (U1) neural dimension in GABAergic (d) or glutamatergic (e) neurons between the first and second 10 min of interaction sessions. f-i, Temporal stability of the PLSC1 or U1 dimensions across different temporal epochs of 1-min length in GABAergic or glutamatergic neurons during interaction sessions. j, k, Cosine similarity between PLSC1s in GABAergic (j) or glutamatergic (k) neurons established from temporally spaced bouts with the same behavioral categories (Mean ± SEM). Behavioral categories are: attack includes attack, tussle, chase, and threaten; defense includes defend, escape, and flinch; sniff includes general-sniffs, face-sniffs, and genital-sniffs; approach includes approach and follow; non-social includes self-groom, dig, explore object, bite object, climb, and stand. l, m, Fraction of variance in GABAergic (l) or glutamatergic (m) neural dimensions PLSC1 or U1 explained by behavioral states and state transitions, behavioral states alone, and their differences, which reflect the unique contribution of transitions. n-q, Differences in x- and y-coordinates between the center of mass of neurons that significantly contribute to PLSC1 versus U1 in the GABAergic or glutamatergic population. 1 pixel corresponds to approximately 2.5 µm. Boxplots: medians, interquartile ranges (IQR), and whiskers indicating 1.5× IQR (a-q). See Supplementary Table 1 for details of statistical analyses.

Source data

Extended Data Fig. 7 Similarity of neural subspaces across different partners and behaviors.

a, b. Cosine similarity between PLSC1 coefficients when one animal interacts with different partners (Mean ± SEM). c-f, Chance-level subtracted cosine similarity between GABAergic PLSC1s (c), GABAergic U1s (d), glutamatergic PLSC1s (e), or glutamatergic U1s (f) established during different categories of behaviors. Asterisks mark the observation groups that are significantly higher than their shuffle controls. Behavioral categories include: attack includes attack, tussle, chase, and threaten; defense includes defend, escape, and flinch; sniff includes general-sniffs, face-sniffs, and genital-sniffs; approach includes approach and follow; non-social includes self-groom, dig, explore object, bite object, climb, and stand. g, Schematics of computing cosine similarity as a measurement of PLSC1 stability during different behavioral feedback from the interaction partner. Created in BioRender. Phi, N. (2025) https://BioRender.com/r9xshzl. h, i, Chance-level subtracted cosine similarity between PLSC1s when a subject animal displays a particular behavior (indicated by the color of the bars) while the partner responds with two different types of behavioral feedback. Asterisks mark the pairs of responses that are significantly more similar than shuffle controls. The results showed that the weights of the shared GABAergic neural subspaces of the subject animals during their non-social moments were more similar between the moment the partner animal was sniffing or approaching and the moment the partner was conducting non-social behaviors (grey bars in h). As animals in both situations were not involved in mutual social interaction, the weights of the shared neural subspace were more similar between the two conditions. However, this does not mean that the shared neural subspace is bigger—the shared neural subspace could be more similar even when it is small. Barplots: mean ± SEM (a-f,h,i). See Supplementary Table 1 for details of statistical analyses.

Source data

Extended Data Fig. 8 Shared neural subspace in aggressive animal pairs.

a, Contribution of annotated behavior to the top shared neural dimension (PLSC1) in glutamatergic neurons (Mean ± SEM). b, Percentage of time showing aggression in mutual social interactions in individual animal pairs (imaged for GABAergic neurons). c-e, Behavior characterization between the aggressive and submissive animals in animal pairs showing a high level of aggression. f, g, Inter-brain correlation in high-aggression animal pairs during interaction sessions, separation sessions, and their shuffle controls in GABAergic (f) or glutamatergic neurons (g). h, i, Number of significant shared dimensions during interaction or separation sessions in GABAergic (h) or glutamatergic neurons (i) in high-aggression animal pairs. j-l, Fraction of variance explained by shared dimensions (j), chance-level subtracted PCC of PLSC1 (k), and chance-level subtracted PCC of U1 (l) in GABAergic and glutamatergic neurons in high-aggression animal pairs. m, n, Inter-brain correlation (PCC) of aggregated (mean) activity during the moments of aggressive behaviors, non-aggressive social behaviors, and non-social behavior, in GABAergic (m) or glutamatergic (n) neurons within interaction sessions. o, p, Fraction of neural variance explained by shared dimensions during the moments of aggressive behaviors, non-aggression social behaviors, and non-social behavior in GABAergic (o) or glutamatergic (p) neurons. Boxplots: medians, interquartile ranges (IQR), and whiskers indicating min-max (c-e) or 1.5× IQR (f-p). See Supplementary Table 1 for details of statistical analyses.

Source data

Extended Data Fig. 9 Additional analyses on intra-brain correlations and neuronal ensembles.

a, Neural variance explained by the first principal component (PC1) during interaction sessions, social or non-social moments within interaction sessions, and during separation sessions in glutamatergic neurons, compared to temporally shuffled data (subsampled to 50 neurons). b, Intra-brain neural correlation, measured by average PCC between individual neurons and PC1 during interaction sessions, social or non-social moments within interaction sessions, and during separation sessions in glutamatergic neurons, compared to temporally shuffled data (subsampled to 50 neurons). c-f, Scatter plots of intra-brain neural correlation versus inter-brain coupling above chance (PCC of observed PLSC1 minus the PCC of temporally shuffled data) during interaction sessions (c), social (d) and non-social (e) moments within interaction sessions, and during separation sessions (f) in glutamatergic neurons. g, h, Average pairwise PCC between neurons within the same neural ensembles identified during social (g) or non-social (h) moments within interaction sessions in glutamatergic neurons. i, Behavior tunings of glutamatergic ensembles identified during social and non-social moments within interaction sessions. j, Neural variance explained by the first principal component (PC1) during social or non-social moments within interaction sessions, and during separation sessions in GABAergic neurons, compared to temporally shuffled data (subsampled to 50 neurons). k, Average PCC values between individual neurons and their corresponding PC1 during social or non-social moments within interaction sessions, and during separation sessions in the GABAergic population, compared to temporally shuffled data (subsampled to 50 neurons). l, Cross-covariance of PLSC1 in GABAergic neurons in separation sessions after disrupting intra-brain coupling or temporal coupling, relative to the shuffle baseline. m, n, Percentage of significant neurons contributing to GABAergic and glutamatergic ensembles identified during interaction (m) or separation (n) sessions. o, p, Percentage of significant neurons contributing to GABAergic or glutamatergic ensembles identified during interaction (o) or separation (p) sessions in animals that contain at least one ensemble (GABAergic or glutamatergic neurons are subsampled to 50 neurons). One animal (glutamatergic) does not contain any ensembles during separation sessions. q, r, Average pairwise PCC between neurons within the same glutamatergic ensembles during interaction (q) or separation (r) sessions after being subsampled to match the average GABAergic neuron numbers (Mean ± SEM). s, t, Average pairwise PCC of GABAergic and glutamatergic ensembles identified during interaction (s) or separation (t) sessions after subsampling glutamatergic neurons to match GABAergic neuron numbers (Mean ± SEM). Boxplots: medians, interquartile ranges (IQR), and whiskers indicating 1.5× IQR (a, b, j-p). Barplots: mean ± SEM (g, h, q-t). See Supplementary Table 1 for details of statistical analyses.

Source data

Extended Data Fig. 10 Additional characterization of behavioral features.

a, Example traces of a subset of raw tracking features and derived behavioral features that constitute the high-dimensional behavior space of each animal, aligned with the behaviors of the subject animal. The raster on top indicates the behaviors of the partner animal during the same period. b, Behavior space derived from animal postural tracking can decode multiple annotated behaviors above chance level, including attack, chase, escape, defend, approach, self-grooming, dig, stand, and sniff. c, d, GLM modeling of individual features of behavioral space by population neural activity in GABAergic (c) or glutamatergic (d) neurons. The fraction of neural variance explained is presented as the value exceeding chance levels (subtracting the chance level determined from a null distribution). Boxplots: medians, interquartile ranges (IQR), and whiskers indicating 1.5× IQR (b-d). See Supplementary Table 1 for details of statistical analyses.

Source data

Extended Data Fig. 11 Neural activity during aggressive behavior.

a, Variance explained by coordinated or uncoordinated behavior subspace during aggressive moments. b, Animals’ speeds during different social behaviors. c, d, Average activity of GABAergic (c) and glutamatergic (d) neurons, sorted based on animals’ speed, in different social behaviors. e, f, No significant linear relationship is identified between speed and average neural activity in both GABAergic (e) and glutamatergic (f) neurons. g, i, Covariance (g) or correlation (i) of the top shared neural dimension (PLSC1) across a lag range of −30 to +30 s using 100 ms timesteps in aggressive mouse pairs. h, j, Comparison of PLSC1 covariance (h) or correlation (j) within a 1-s window before versus after the peak at 0-s lag. k, Correlation of the top coordinated behavior dimension (CC1) across a lag range of −30 to +30 s using 100 ms timesteps in aggressive pairs. l, Comparison of CC1 correlation within a 1-s window before versus after the peak at 0-s lag. In g, i, k, x-axes represent the temporal offset between the more aggressive and more submissive animal in each pair, with positive values indicating that the signal from the aggressive animal precedes that of the submissive animal (Mean ± SEM). Boxplots: medians, interquartile ranges (IQR), and whiskers indicating 1.5× IQR (b-d). Barplots: mean ± SEM (h,j,l). See Supplementary Table 1 for details of statistical analyses.

Source data

Extended Data Fig. 12 Additional analyses on neural and behavioral subspaces.

a, Variance of shared, unique, or full neural spaces explained by the combined behavior space of the subject and partner, accounting for chance in the glutamatergic population. b, c, Variance in shared neural subspace explained by coordinated behavior (b), self-behavior or partner behaviors (c) as a ratio to the total variance that can be explained by behavior in the glutamatergic population. d, e, Variance in the unique neural subspace explained by coordinated behavior (d), self-behavior, or partner behaviors (e) as a ratio to the total variance that can be explained by behavior in the glutamatergic population. f, g, Partner representation is enriched in the shared neural subspace compared to the full neural space in GABAergic (f) or glutamatergic (g) neurons. Partner representation data in the shared neural subspace in f, g are replotted from Fig. 4l and Extended Data Fig. 12c, respectively. Boxplots: medians, interquartile ranges (IQR), and whiskers indicating 1.5× IQR (a). Barplots: mean ± SEM (b-g). See Supplementary Table 1 for details of statistical analyses.

Source data

Extended Data Fig. 13 Shared neural dynamics between artificial agents.

a, Number of significantly shared dimensions in social agent pairs (pooling over training iterations 15000, 16000, 17000, 18000, 19000, and 20000), compared to non-social agents with full vision of the partner trained to a similar stage. b, PCC of the top shared neural dimensions (PLSC1) above chance across social agent pairs, compared to non-social agents with full vision of the partner trained to a similar stage. Values shown are the PCC of observed data minus the PCC computed from temporally shuffled data. c, Number of significantly shared dimensions in social agent pairs (pooling over training iterations 15000, 16000, 17000, 18000, 19000, and 20000) upon removing the moments in which agents exhibited identical actions. d, PCC of the top shared neural dimensions (PLSC1) above chance across social agent pairs, upon removing moments of identical actions between the agents. e, Cross-covariance of PLSC1 in non-social agents after computationally disrupting intra-brain coupling or temporal coupling, subtracting shuffle control as baseline. f, Asymmetric representation of partner’s behaviors, discounting self-behaviors, was observed across agent pairs trained with a different reward structure (Methods). g, Variance explained, subtracting chance level, in neural space of chaser agents by the top 10 PLSC dimensions or 25 random principal components used in perturbation experiments. h, Schematics showing mutual interaction task (Methods). i, j, Number of mutual interactions (i) and percent of time agents keep the partner in vision (j) in trained versus untrained agents. k, Number of shared dimensions in agents behaving in collaborative (mutual social interaction task), competitive (chase-explorer task), and non-social tasks. l, PCC of the top shared neural dimensions (PLSC1) above chance in different tasks. In a-d, k, and l, data from social agents (also labeled as “original” in c and d, and “competitive” in k and l) are replotted from Fig. 6g,h. Data from non-social agents in k and l are also replotted from Fig. 6g,h. m, Schematics showing the Coins task (Methods). Adapted from ref. 51. n, Number of self coins collected in trained versus untrained agents. o, Number of shared dimensions in trained agents from the same (observed) or different (cross-pair) interaction sessions. p, Schematics showing a more complex social interaction task (Methods). Copyright 2024 Google DeepMind. q-s, Number of apples collected (q), acorns collected (r), and social captures (s) in trained versus untrained agents. Trained agents adopt strategies to increase the collection of high-reward items (acorns) while employing a mixed strategy for low-reward items (apples), with some agents prioritizing apple collection and others not. t, Number of shared dimensions in trained agents from the same (observed) or different (cross-pair) interaction sessions. Boxplots: medians, interquartile ranges (IQR), and whiskers indicating min-max (i, j) or 1.5× IQR (a, b, e, g, k, l, n, o, q-t). Barplots: mean ± SEM (c, d, f). See Supplementary Table 1 for details of statistical analyses.

Source data

Supplementary information

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Zhang, X., Phi, N., Li, Q. et al. Inter-brain neural dynamics in biological and artificial intelligence systems. Nature (2025). https://doi.org/10.1038/s41586-025-09196-4

Download citation

  • Received: 09 May 2024

  • Accepted: 27 May 2025

  • Published: 02 July 2025

  • DOI: https://doi.org/10.1038/s41586-025-09196-4

Read Entire Article