TraceLAB: A MATLAB Toolbox for Interindividual Synchrony Analysis of Facial Expression and Head Movement Data Acquired via Trace
Abstract
1. Introduction
1.1. Background
1.2. Overview of Trace
2. Methods
2.1. Overview of Preprocessing in TraceLAB
2.2. Head Movement Synchrony
2.3. Emotion Classification Synchrony
2.4. Correlated Component Analysis
2.5. Data Preparation
3. Results
3.1. SUSY—Example with Simulated Data
3.2. CorrCA—Example with Simulated Data
3.3. CorrCA—Example with Real Data
3.4. Gamma Sensitivity Analysis
4. Discussion
4.1. Open Research Questions
4.2. Limitations
4.3. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Ekman, P. An argument for basic emotions. Cogn. Emot. 1992, 6, 169–200. [Google Scholar] [CrossRef]
- Butler, E.A. Temporal interpersonal emotion systems: The “TIES” that form relationships. Pers. Soc. Psychol. Rev. 2011, 15, 367–393. [Google Scholar] [CrossRef]
- Ekman, P.; Friesen, W.V. Constants across cultures in the face and emotion. J. Pers. Soc. Psychol. 1971, 17, 124–129. [Google Scholar] [CrossRef]
- Ekman, P.; Freisen, W.V.; Ancoli, S. Facial signs of emotional experience. J. Pers. Soc. Psychol. 1980, 39, 1125–1134. [Google Scholar] [CrossRef]
- Barrett, L.F. The theory of constructed emotion: An active inference account of interoception and categorization. Soc. Cogn. Affect. Neurosci. 2017, 12, 1–23. [Google Scholar] [CrossRef] [PubMed]
- Barrett, L.F.; Adolphs, R.; Marsella, S.; Martinez, A.M.; Pollak, S.D. Emotional expressions reconsidered: Challenges to inferring emotion from human facial movements. Psychol. Sci. Public Interest 2019, 20, 1–68. [Google Scholar] [CrossRef] [PubMed]
- Riehle, M.; Kempkensteffen, J.; Lincoln, T.M. Quantifying facial expression synchrony in face-to-face dyadic interactions: Temporal dynamics of simultaneously recorded facial EMG signals. J. Nonverbal Behav. 2017, 41, 85–102. [Google Scholar] [CrossRef]
- Mønster, D.; Håkonsson, D.D.; Eskildsen, J.K.; Wallot, S. Physiological evidence of interpersonal dynamics in a cooperative production task. Physiol. Behav. 2016, 156, 24–34. [Google Scholar] [CrossRef] [PubMed]
- Hess, U.; Bourgeois, P. You smile–I smile: Emotion expression in social interaction. Biol. Psychol. 2010, 84, 514–520. [Google Scholar] [CrossRef]
- Ramseyer, F.; Tschacher, W. Nonverbal synchrony in psychotherapy: Coordinated body movement reflects relationship quality and outcome. J. Consult. Clin. Psychol. 2011, 79, 284–295. [Google Scholar] [CrossRef]
- Lakin, J.L.; Chartrand, T.L. Using nonconscious behavioral mimicry to create affiliation and rapport. Psychol. Sci. 2003, 14, 334–339. [Google Scholar] [CrossRef]
- Wood, A.; Lipson, J.; Zhao, O.; Niedenthal, P. Forms and Functions of Affective Synchrony. In Handbook of Embodied Psychology; Robinson, M.D., Thomas, L.E., Eds.; Springer: Cham, Switzerland, 2021; pp. 381–404. [Google Scholar] [CrossRef]
- Kayser, D.; Egermann, H.; Barraclough, N.E. Audience facial expressions detected by automated face analysis software reflect emotions in music. Behav. Res. Methods 2022, 54, 1493–1507. [Google Scholar] [CrossRef] [PubMed]
- Golland, Y.; Arzouan, Y.; Levit-Binnun, N. The mere co-presence: Synchronization of autonomic signals and emotional responses across co-present individuals not engaged in direct interaction. PLoS ONE 2015, 10, e0125804. [Google Scholar] [CrossRef] [PubMed]
- Cheong, J.H.; Molani, Z.; Sadhukha, S.; Chang, L.J. Synchronized affect in shared experiences strengthens social connection. Commun. Biol. 2023, 6, 1099. [Google Scholar] [CrossRef]
- Golland, Y.; Mevorach, D.; Levit-Binnun, N. Affiliative zygomatic synchrony in co-present strangers. Sci. Rep. 2019, 9, 3120. [Google Scholar] [CrossRef] [PubMed]
- Bruder, M.; Dosmukhambetova, D.; Nerb, J.; Manstead, A.S. Emotional signals in nonverbal interaction: Dyadic facilitation and convergence in expressions, appraisals, and feelings. Cogn. Emot. 2012, 26, 480–502. [Google Scholar] [CrossRef]
- Shannon, C.E. A mathematical theory of communication. Bell Syst. Tech. J. 1948, 27, 379–423. [Google Scholar] [CrossRef]
- Carter, F.; Gilchrist, I.D.; Stanton-Fraser, D. Electroencephalographic Functional Connectivity, Heartrate Synchrony, and Eye Movements Reveal Distinct Components within Narrative Engagement and Immersion. J. Cogn. Neurosci. 2025, 37, 1787–1808. [Google Scholar] [CrossRef]
- Hammond, H.; Armstrong, M.; Thomas, G.A.; Gilchrist, I.D. Audience immersion: Validating attentional and physiological measures against self-report. Cogn. Res. Princ. Implic. 2023, 8, 22. [Google Scholar] [CrossRef]
- Pérez, P.; Madsen, J.; Banellis, L.; Türker, B.; Raimondo, F.; Perlbarg, V.; Adam, N.; Kassim, M.; Buxbaum, L.; Sitt, J.D.; et al. Conscious processing of narrative stimuli synchronizes heart rate between individuals. Cell Rep. 2021, 36, 109692. [Google Scholar] [CrossRef]
- Cohen, S.S.; Parra, L.C. Memorable audiovisual narratives synchronize sensory and supramodal neural responses. eNeuro 2016, 3, ENEURO.0203-16.2016. [Google Scholar] [CrossRef] [PubMed]
- Dmochowski, J.P.; Sajda, P.; Dias, J.; Parra, L.C. Correlated components of ongoing EEG point to emotionally laden attention–a possible marker of engagement? Front. Hum. Neurosci. 2012, 6, 112. [Google Scholar] [CrossRef]
- Tschacher, W.; Tröndle, M.; Weining, C. Music synchronizes the bodies of its audience. Mind Matter 2024, 22, 203–226. [Google Scholar] [CrossRef]
- Noldus. FaceReaderTM 7: Tool for Automatic Analysis of Facial Expressions; Noldus Information Technology: Wageningen, The Netherlands, 2016. [Google Scholar]
- Oakes, R.A.; Peschel, L.; Barraclough, N.E. Inter-subject correlation of audience facial expressions predicts audience engagement during theatrical performances. iScience 2024, 27, 110013. [Google Scholar] [CrossRef] [PubMed]
- Richardson, M.; Carter, F.; Levordashka, A.; Gilchrist, I.D.; Fraser, D.S. Adapting a Live Streamed Digital Theatre Experience Using Physiological Synchrony. Projections 2025, 19, 77–95. [Google Scholar] [CrossRef]
- Levordashka, A.; Richardson, M.; Hirst, R.J.; Gilchrist, I.D.; Fraser, D.S. Trace: A research media player measuring real-time audience engagement. Behav. Res. Methods 2025, 57, 44. [Google Scholar] [CrossRef]
- Peirce, J.W.; Hirst, R.J.; MacAskill, M.R. Building Experiments in PsychoPy, 2nd ed.; Sage: London, UK, 2022. [Google Scholar]
- Pavlovia. Available online: https://pavlovia.org (accessed on 18 March 2025).
- The MathWorks Inc. MATLAB, Version 2024a. [Computer software]. The MathWorks, Inc.: Natick, MA, USA, 2024.
- face-api.js. Available online: https://justadudewhohacks.github.io/face-api.js/ (accessed on 18 March 2025).
- Levordashka, A.; Stanton Fraser, D.; Gilchrist, I.D. Measuring real-time cognitive engagement in remote audiences. Sci. Rep. 2023, 13, 10516. [Google Scholar] [CrossRef]
- Tschacher, W.; Haken, H. The Process of Psychotherapy; Springer International Publishing: Berlin, Germany, 2019. [Google Scholar]
- TraceLAB GitHub Repository. Available online: https://github.com/FelixCarter/tracelab (accessed on 25 February 2026).
- Dodgson, N.A. Variation and extrema of human interpupillary distance. In Stereoscopic Displays and Virtual Reality Systems XI. International Society for Optics and Photonics; International Society for Optics and Photonics: Bellingham, WA, USA, 2004; Volume 5291, pp. 36–46. [Google Scholar] [CrossRef]
- Richardson, M.; Gilchrist, I.D.; Stanton Fraser, D. Validating face-api.js for the detection of emotional facial expressions via Trace. Open Sci. Framew. 2024. Available online: https://osf.io/e8zj2/overview (accessed on 25 February 2026).
- Parra, L.C.; Haufe, S.; Dmochowski, J.P. Correlated components analysis-extracting reliable dimensions in multivariate data. arXiv 2018, arXiv:1801.08881. [Google Scholar] [CrossRef]
- Madsen, J.; Parra, L.C. Cognitive processing of a common stimulus synchronizes brains, hearts, and eyes. PNAS Nexus 2022, 1, pgac020. [Google Scholar] [CrossRef]
- Livingstone, S.R.; Russo, F.A. The Ryerson Audio-Visual Database of Emotional Speech and Song (RAVDESS): A dynamic, multimodal set of facial and vocal expressions in North American English. PLoS ONE 2018, 13, e0196391. [Google Scholar] [CrossRef]
- Wingenbach, T.S.; Ashwin, C.; Brosnan, M. Validation of the Amsterdam Dynamic Facial Expression Set–Bath Intensity Variations (ADFES-BIV): A set of videos expressing low, intermediate, and high intensity emotions. PLoS ONE 2016, 11, e0147112. [Google Scholar] [CrossRef]
- Berndt, D.J.; Clifford, J. Using dynamic time warping to find patterns in time series. In Proceedings of the 3rd International Conference on Knowledge Discovery and Data Mining, Seattle, WA, USA, 31 July–1 August 1994; pp. 359–370. [Google Scholar]
- Sun, Y.; Day, S.; Gilbert, T.; Maria, B.; Hamilton, A.F.D.C.; Ward, J.A. Quantification and Visualisation of Interpersonal Synchrony using Wearable Sensors and Time Series Similarity Analysis. Authorea Prepr. 2024. [Google Scholar] [CrossRef]
- Toiviainen, P.; Hartmann, M. Analyzing multidimensional movement interaction with generalized cross-wavelet transform. Hum. Mov. Sci. 2022, 81, 102894. [Google Scholar] [CrossRef]
- Tripathi, S.C.; Garg, R. Consistent movement of viewers’ facial keypoints while watching emotionally evocative videos. PLoS ONE 2024, 19, e0302705. [Google Scholar] [CrossRef] [PubMed]
- Pandey, R.K.; Karmakar, S.; Ramakrishnan, A.G.; Saha, N. Improving facial emotion recognition systems using gradient and laplacian images. arXiv 2019, arXiv:1902.05411. [Google Scholar] [CrossRef]
- Robinson, J.P.; Li, Y.; Zhang, N.; Fu, Y.; Tulyakov, S. Laplace landmark localization. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Republic of Korea, 27 October–2 November 2019; pp. 10103–10112. [Google Scholar] [CrossRef]
- Ekman, P.; Friesen, W.V. Facial Action Coding System: A Technique for the Measurement of Facial Movement; Consulting Psychologists Press: Palo Alto, CA, USA, 1978. [Google Scholar] [CrossRef]
- Hamm, J.; Kohler, C.G.; Gur, R.C.; Verma, R. Automated facial action coding system for dynamic analysis of facial expressions in neuropsychiatric disorders. J. Neurosci. Methods 2011, 200, 237–256. [Google Scholar] [CrossRef] [PubMed]
- Jiang, B.; Valstar, M.F.; Pantic, M. Action unit detection using sparse appearance descriptors in space-time video volumes. In Proceedings of the 2011 IEEE International Conference on Automatic Face & Gesture Recognition (FG), Santa Barbara, CA, USA, 21–25 March 2011; pp. 314–321. [Google Scholar] [CrossRef]







| Condition | N | Mean ISC Per Subject (SE) |
|---|---|---|
| Neutral | 95 | 0.32 (0.02) |
| Calm | 192 | 0.41 (0.01) |
| Happy | 189 | 0.20 (0.01) |
| Sad | 192 | 0.27 (0.01) |
| Angry | 192 | 0.25 (0.01) |
| Fearful | 191 | 0.19 (0.01) |
| Disgusted | 192 | 0.29 (0.01) |
| Surprised | 191 | 0.20 (0.01) |
| Condition | N | Mean ISC Per Subject (SE) |
|---|---|---|
| Neutral | 10 | 0.63 (0.05) |
| Happy | 12 | 0.57 (0.07) |
| Sad | 10 | 0.35 (0.06) |
| Fearful | 12 | 0.41 (0.08) |
| Disgusted | 9 | 0.48 (0.09) |
| Embarrassed | 12 | 0.49 (0.08) |
| Pride | 15 | 0.36 (0.05) |
| Contempt | 11 | 0.60 (0.04) |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Carter, F.; Richardson, M.; Stanton Fraser, D.; Gilchrist, I.D. TraceLAB: A MATLAB Toolbox for Interindividual Synchrony Analysis of Facial Expression and Head Movement Data Acquired via Trace. Entropy 2026, 28, 503. https://doi.org/10.3390/e28050503
Carter F, Richardson M, Stanton Fraser D, Gilchrist ID. TraceLAB: A MATLAB Toolbox for Interindividual Synchrony Analysis of Facial Expression and Head Movement Data Acquired via Trace. Entropy. 2026; 28(5):503. https://doi.org/10.3390/e28050503
Chicago/Turabian StyleCarter, Felix, Mike Richardson, Danaë Stanton Fraser, and Iain D. Gilchrist. 2026. "TraceLAB: A MATLAB Toolbox for Interindividual Synchrony Analysis of Facial Expression and Head Movement Data Acquired via Trace" Entropy 28, no. 5: 503. https://doi.org/10.3390/e28050503
APA StyleCarter, F., Richardson, M., Stanton Fraser, D., & Gilchrist, I. D. (2026). TraceLAB: A MATLAB Toolbox for Interindividual Synchrony Analysis of Facial Expression and Head Movement Data Acquired via Trace. Entropy, 28(5), 503. https://doi.org/10.3390/e28050503

