Eelbrain, a Python toolkit for time-continuous analysis with temporal response functions

  1. Christian Brodbeck  Is a corresponding author
  2. Proloy Das
  3. Marlies Gillis
  4. Joshua P Kulasingham
  5. Shohini Bhattasali
  6. Phoebe Gaston
  7. Philip Resnik
  8. Jonathan Z Simon
  1. University of Connecticut, United States
  2. Stanford University, United States
  3. KU Leuven, Belgium
  4. Linköping University, Sweden
  5. University of Toronto, Canada
  6. University of Maryland, College Park, United States

Abstract

Even though human experience unfolds continuously in time, it is not strictly linear; instead, it entails cascading processes building hierarchical cognitive structures. For instance, during speech perception, humans transform a continuously varying acoustic signal into phonemes, words, and meaning, and these levels all have distinct but interdependent temporal structures. Time-lagged regression using temporal response functions (TRFs) has recently emerged as a promising tool for disentangling electrophysiological brain responses related to such complex models of perception. Here we introduce the Eelbrain Python toolkit, which makes this kind of analysis easy and accessible. We demonstrate its use, using continuous speech as a sample paradigm, with a freely available EEG dataset of audiobook listening. A companion GitHub repository provides the complete source code for the analysis, from raw data to group level statistics. More generally, we advocate a hypothesis-driven approach in which the experimenter specifies a hierarchy of time-continuous representations that are hypothesized to have contributed to brain responses, and uses those as predictor variables for the electrophysiological signal. This is analogous to a multiple regression problem, but with the addition of a time dimension. TRF analysis decomposes the brain signal into distinct responses associated with the different predictor variables by estimating a multivariate TRF (mTRF), quantifying the influence of each predictor on brain responses as a function of time(-lags). This allows asking two questions about the predictor variables: 1) Is there a significant neural representation corresponding to this predictor variable? And if so, 2) what are the temporal characteristics of the neural response associated with it? Thus, different predictor variables can be systematically combined and evaluated to jointly model neural processing at multiple hierarchical levels. We discuss applications of this approach, including the potential for linking algorithmic/representational theories at different cognitive levels to brain responses through computational models with appropriate linking hypotheses.

Data availability

The data analyzed here was originally released with DOI: 10.7302/Z29C6VNH and can be retrieved from https://deepblue.lib.umich.edu/data/concern/data_sets/bg257f92t. For the purpose of this tutorial, the data were restructured and rereleased with DOI: 10.13016/pulf-lndn at http://hdl.handle.net/1903/27591. The companion GitHub repository contains code and instructions for replicating all analyses presented in the paper (https://github.com/Eelbrain/Alice).

The following previously published data sets were used

Article and author information

Author details

  1. Christian Brodbeck

    University of Connecticut, Storrs, United States
    For correspondence
    christian.brodbeck@uconn.edu
    Competing interests
    The authors declare that no competing interests exist.
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0001-8380-639X
  2. Proloy Das

    Stanford University, Stanford, United States
    Competing interests
    The authors declare that no competing interests exist.
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0002-8807-042X
  3. Marlies Gillis

    KU Leuven, Leuven, Belgium
    Competing interests
    The authors declare that no competing interests exist.
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0002-3967-2950
  4. Joshua P Kulasingham

    Linköping University, Linköping, Sweden
    Competing interests
    The authors declare that no competing interests exist.
  5. Shohini Bhattasali

    University of Toronto, Toronto, Canada
    Competing interests
    The authors declare that no competing interests exist.
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0002-6767-6529
  6. Phoebe Gaston

    University of Connecticut, Storrs, United States
    Competing interests
    The authors declare that no competing interests exist.
  7. Philip Resnik

    University of Maryland, College Park, College Park, United States
    Competing interests
    The authors declare that no competing interests exist.
  8. Jonathan Z Simon

    University of Maryland, College Park, College Park, United States
    Competing interests
    The authors declare that no competing interests exist.
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0003-0858-0698

Funding

National Science Foundation (BCS 1754284)

  • Christian Brodbeck

National Science Foundation (BCS 2043903)

  • Christian Brodbeck

National Science Foundation (IIS 2207770)

  • Christian Brodbeck

National Science Foundation (SMA 1734892)

  • Joshua P Kulasingham
  • Jonathan Z Simon

National Institutes of Health (R01 DC014085)

  • Joshua P Kulasingham
  • Jonathan Z Simon

National Institutes of Health (R01 DC019394)

  • Jonathan Z Simon

Fonds Wetenschappelijk Onderzoek (SB 1SA0620N)

  • Marlies Gillis

Office of Naval Research (MURI N00014-18-1-2670)

  • Shohini Bhattasali
  • Philip Resnik

National Institutes of Health (T32 DC017703)

  • Phoebe Gaston

The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.

Reviewing Editor

  1. Andrea E Martin, Max Planck Institute for Psycholinguistics, Netherlands

Version history

  1. Preprint posted: August 3, 2021 (view preprint)
  2. Received: November 18, 2022
  3. Accepted: November 24, 2023
  4. Accepted Manuscript published: November 29, 2023 (version 1)
  5. Version of Record published: January 11, 2024 (version 2)

Copyright

© 2023, Brodbeck et al.

This article is distributed under the terms of the Creative Commons Attribution License permitting unrestricted use and redistribution provided that the original author and source are credited.

Metrics

  • 1,152
    views
  • 177
    downloads
  • 6
    citations

Views, downloads and citations are aggregated across all versions of this paper published by eLife.

Download links

A two-part list of links to download the article, or parts of the article, in various formats.

Downloads (link to download the article as PDF)

Open citations (links to open the citations from this article in various online reference manager services)

Cite this article (links to download the citations from this article in formats compatible with various reference manager tools)

  1. Christian Brodbeck
  2. Proloy Das
  3. Marlies Gillis
  4. Joshua P Kulasingham
  5. Shohini Bhattasali
  6. Phoebe Gaston
  7. Philip Resnik
  8. Jonathan Z Simon
(2023)
Eelbrain, a Python toolkit for time-continuous analysis with temporal response functions
eLife 12:e85012.
https://doi.org/10.7554/eLife.85012

Share this article

https://doi.org/10.7554/eLife.85012

Further reading

    1. Biochemistry and Chemical Biology
    2. Neuroscience
    Maximilian Nagel, Marco Niestroj ... Marc Spehr
    Research Article

    In most mammals, conspecific chemosensory communication relies on semiochemical release within complex bodily secretions and subsequent stimulus detection by the vomeronasal organ (VNO). Urine, a rich source of ethologically relevant chemosignals, conveys detailed information about sex, social hierarchy, health, and reproductive state, which becomes accessible to a conspecific via vomeronasal sampling. So far, however, numerous aspects of social chemosignaling along the vomeronasal pathway remain unclear. Moreover, since virtually all research on vomeronasal physiology is based on secretions derived from inbred laboratory mice, it remains uncertain whether such stimuli provide a true representation of potentially more relevant cues found in the wild. Here, we combine a robust low-noise VNO activity assay with comparative molecular profiling of sex- and strain-specific mouse urine samples from two inbred laboratory strains as well as from wild mice. With comprehensive molecular portraits of these secretions, VNO activity analysis now enables us to (i) assess whether and, if so, how much sex/strain-selective ‘raw’ chemical information in urine is accessible via vomeronasal sampling; (ii) identify which chemicals exhibit sufficient discriminatory power to signal an animal’s sex, strain, or both; (iii) determine the extent to which wild mouse secretions are unique; and (iv) analyze whether vomeronasal response profiles differ between strains. We report both sex- and, in particular, strain-selective VNO representations of chemical information. Within the urinary ‘secretome’, both volatile compounds and proteins exhibit sufficient discriminative power to provide sex- and strain-specific molecular fingerprints. While total protein amount is substantially enriched in male urine, females secrete a larger variety at overall comparatively low concentrations. Surprisingly, the molecular spectrum of wild mouse urine does not dramatically exceed that of inbred strains. Finally, vomeronasal response profiles differ between C57BL/6 and BALB/c animals, with particularly disparate representations of female semiochemicals.

    1. Neuroscience
    Kenta Abe, Yuki Kambe ... Tatsuo Sato
    Research Article

    Midbrain dopamine neurons impact neural processing in the prefrontal cortex (PFC) through mesocortical projections. However, the signals conveyed by dopamine projections to the PFC remain unclear, particularly at the single-axon level. Here, we investigated dopaminergic axonal activity in the medial PFC (mPFC) during reward and aversive processing. By optimizing microprism-mediated two-photon calcium imaging of dopamine axon terminals, we found diverse activity in dopamine axons responsive to both reward and aversive stimuli. Some axons exhibited a preference for reward, while others favored aversive stimuli, and there was a strong bias for the latter at the population level. Long-term longitudinal imaging revealed that the preference was maintained in reward- and aversive-preferring axons throughout classical conditioning in which rewarding and aversive stimuli were paired with preceding auditory cues. However, as mice learned to discriminate reward or aversive cues, a cue activity preference gradually developed only in aversive-preferring axons. We inferred the trial-by-trial cue discrimination based on machine learning using anticipatory licking or facial expressions, and found that successful discrimination was accompanied by sharper selectivity for the aversive cue in aversive-preferring axons. Our findings indicate that a group of mesocortical dopamine axons encodes aversive-related signals, which are modulated by both classical conditioning across days and trial-by-trial discrimination within a day.