Inferring neural dynamics of memory during naturalistic social communication

Rich Pang, Christa A. Baker, Mala Murthy, Jonathan W. PillowbioRxiv 2024 · DOI

Abstract: Memory processes in complex behaviors like social communication require forming representations of the past that grow with time. The neural mechanisms that support such continually growing memory remain unknown. We address this gap in the context of fly courtship, a natural social behavior involving the production and perception of long, complex song sequences. To study female memory for male song history in unrestrained courtship, we present ‘Natural Continuation’ (NC)—a general, simulation-based model comparison procedure to evaluate candidate neural codes for complex stimuli using naturalistic behavioral data. Applying NC to fly courtship revealed strong evidence for an adaptive population mechanism for how female auditory neural dynamics could convert long song histories into a rich mnemonic format. Song temporal patterning is continually transformed by heterogeneous nonlinear adaptation dynamics, then integrated into persistent activity, enabling common neural mechanisms to retain continuously unfolding information over long periods and yielding state-of-the-art predictions of female courtship behavior. At a population level this coding model produces multi-dimensional advection-diffusion-like responses that separate songs over a continuum of timescales and can be linearly transformed into flexible output signals, illustrating its potential to create a generic, scalable mnemonic format for extended input signals poised to drive complex behavioral responses. This work thus shows how naturalistic behavior can directly inform neural population coding models, revealing here a novel process for memory formation.

Introduction

In neuroscience, a significant gap often exists between high-resolution neural recordings and the animal's natural behavior. Most detailed recordings are conducted in "head-fixed" preparations where the animal is immobilized, potentially missing the complex, history-dependent computations required for natural social communication.

Fruit fly (D. melanogaster) courtship provides a compelling model for studying these processes. During courtship, a male produces a complex sequence of "sine" and "pulse" songs. Previous research suggests that females integrate and remember these song features over several minutes—a timescale far exceeding the sub-second processing typically studied. The fundamental challenge is identifying how the brain encodes this "continually growing" past to guide behavior. This study seeks to bridge this gap by identifying a biologically plausible model that explains how female flies process and store minutes of song history to modulate their locomotion.

Methods: The Natural Continuation Framework

To evaluate candidate neural codes, we introduced Natural Continuation (NC), a general, simulation-based protocol. This framework allows for the evaluation of encoding models using naturalistic behavioral data through four key steps:

  1. Model Selection: Candidate encoding models (e.g., Linear-Nonlinear or Multiplicative Adaptation) are fitted to existing neural data, such as calcium imaging (GCaMP6s) from 50 different cell types in head-fixed female flies.
  2. Behavioral Data Extraction: A separate dataset of unrestrained courtship interactions is used to extract the stimulus (binarized male song) and the behavioral output (female walking speed).
  3. Simulation: The candidate models are applied to the stimuli experienced during natural behavior to generate "artificial" neural population recordings.
  4. Scoring: Models are evaluated based on how well their simulated activity can predict the animal's actual behavioral output through a simple linear readout.

We specifically compared the standard Linear-Nonlinear (LN) model against a Multiplicative Adaptation (MA) model. The MA model is a dynamical system where song input is processed by fast nonlinear adaptation—which reduces responses to steady stimuli—and then integrated into persistent, slowly decaying activity.

The Natural Continuation (NC) framework (G) and simulated model responses to natural song (H).

Results: Predicting Behavioral Dynamics

The MA population model significantly outperformed the LN model and previous state-of-the-art behavioral models (such as average song bout duration) in predicting female walking speed. As shown in the model scores, the MA population model ("MA (pop)") explains a substantially higher percentage of walking speed variance compared to other candidates.

Key insights from the MA model's success include:

  • Adaptation and Integration: The interplay between fast adaptation and slow integration allows the system to remain sensitive to changes in song patterns while accumulating signals into a persistent memory.
  • Population Heterogeneity: A population of neurons with diverse adaptation timescales creates a rich, high-dimensional representation of song history. This diversity allows the fly to track different features of the song simultaneously.
  • Mnemonic Reservoir: The population response resembles a physical process of "advection-diffusion," where "advection" (drift) encodes the total amount of song and "diffusion" (spreading) separates different temporal patterns. This allows the neural state to follow a unique trajectory for every unique song history, acting as a flexible reservoir for behavioral control.
Female locomotion predictions (I) and encoding model scores (J) comparing LN and MA models against behavioral data.

Discussion

The Natural Continuation approach demonstrates that naturalistic behavior can directly inform and validate neural population coding models. Our findings suggest that a "fast-adapt/slow-integrate" mechanism is a powerful principle for converting extended input sequences into a scalable mnemonic format. This mechanism enables the female fly to maintain a multi-dimensional memory of courtship history, which is then linearly transformed into behavioral outputs like walking speed.

While the NC approach is limited by the initial set of candidate models and the resolution of behavioral data, it offers a generalizable framework for other systems. Future work could apply NC to resolve neural computations during other naturalistic behaviors, such as odor-tracking, or use these biological principles to inform the design of memory architectures in artificial intelligence.

Summary updated

Abstract

Memory processes in complex behaviors like social communication require forming representations of the past that grow with time. The neural mechanisms that support such continually growing memory remain unknown. We address this gap in the context of fly courtship, a natural social behavior involving the production and perception of long, complex song sequences. To study female memory for male song history in unrestrained courtship, we present ‘Natural Continuation’ (NC)—a general, simulation-based model comparison procedure to evaluate candidate neural codes for complex stimuli using naturalistic behavioral data. Applying NC to fly courtship revealed strong evidence for an adaptive population mechanism for how female auditory neural dynamics could convert long song histories into a rich mnemonic format. Song temporal patterning is continually transformed by heterogeneous nonlinear adaptation dynamics, then integrated into persistent activity, enabling common neural mechanisms to retain continuously unfolding information over long periods and yielding state-of-the-art predictions of female courtship behavior. At a population level this coding model produces multi-dimensional advection-diffusion-like responses that separate songs over a continuum of timescales and can be linearly transformed into flexible output signals, illustrating its potential to create a generic, scalable mnemonic format for extended input signals poised to drive complex behavioral responses. This work thus shows how naturalistic behavior can directly inform neural population coding models, revealing here a novel process for memory formation.
BibTeX
@misc{pang2024inferring,
  author = {Rich Pang and Christa A. Baker and Mala Murthy and Jonathan W. Pillow},
  title = {{Inferring neural dynamics of memory during naturalistic social communication}},
  year = {2024},
  doi = {10.1101/2024.01.26.577404},
  howpublished = {bioRxiv},
}
Figure