Introduction

Understanding the ways in which changes in neuron activity mediate learning is a fundamental concern of neuroscience. This problem becomes increasingly challenging when investigating complex forms of learning such as appetitive operant conditioning, which forms an association between a behavior and a reward1,2. It is well-established that learning results in a memory that can persist across multiple temporal domains (i.e., short-term and long-term)3. Whether each temporal domain engages different network structures or ensembles is an area of active investigation4,5,6,7.

Aplysia feeding behavior is useful for studying the neuronal dynamics of short-term and long-term operant conditioning, in part because the buccal ganglia, which mediate feeding behavior, constitute a small brain model system that contains large identifiable neurons8. These features have facilitated the identification of neurons key to operant conditioning of Aplysia feeding behavior9,10,11,12,13. Feeding behavior is mediated by a central pattern generator (CPG) circuit predominantly in the buccal ganglia8,14. Feeding behaviors consist of buccal motor patterns (BMPs) that contain three main movements: protraction, retraction, and closure of the radula, a tongue-like structure. BMPs can be classified as ingestion buccal motor patterns (iBMPs) or rejection BMPs (rBMPs) based on the timing of closure relative to retraction and protraction movements. An in vitro analog of operant conditioning increases iBMPs9,12,13,15,16, and this increase persists for at least 24 h9. One retraction neuron, B51, has been reported to increase in excitability in short- and long-term operant conditioning9,11. Other sites of long-term plasticity have not been investigated.

Voltage-sensitive dye (VSD) imaging measures the activity of a large number of neurons simultaneously17,18,19,20,21. Examining changes in neuronal activity in operant conditioning could be aided by VSD recording, followed by dimensionality reduction approaches such as non-negative matrix factorization (NMF)22. NMF has been widely used to uncover low-dimensional structure in population activity23,24,25,26,27. Some of these studies have focused on source extraction and studying working memory27, whereas others decompose imaging data into spatial and temporal modules of neural activity. Costa et al.23 applied VSD recording and NMF to an in vitro analog operant learning paradigm of Aplysia feeding behavior, revealing low-dimensional neural signatures for short-term operant conditioning. NMF reduced neuronal activity of Aplysia feeding behavior into two modules: a protraction module associated with neuronal activity that mediates the outward movement of the radula (i.e., protraction), and a retraction module associated with neuronal activity that mediates radula inward movement (i.e., retraction)23. Moreover, NMF revealed that operant conditioning induced an earlier recruitment of the retraction module immediately after training. In intact animals, this earlier recruitment might contribute to earlier radula closure during the retraction phase and increased inward movement of food into the gut. The increase in excitability of retraction neurons such as B51 may lead to this earlier recruitment of retraction neurons, for short-term and, possibly, long-term operant conditioning13,16.

Here, we used VSD imaging to examine neuronal activity 24 h after an in vitro analog of operant conditioning (i.e., long-term operant conditioning). NMF isolated the learning signature of neuronal activity in long-term operant conditioning, and these results were compared to short-term operant conditioning23. Our findings pointed to an increased recruitment of neurons during long-term operant conditioning as well as an earlier recruitment of retraction neurons. Therefore, long-term operant conditioning has unique features as well as shared features with short-term operant conditioning.

Results

An in vitro analog of operant conditioning increased the rate of iBMPs 24 h after training

As a first step to investigate the low-dimensional signature of long-term operant conditioning, we examined whether operant conditioning resulted in changes in fictive motor behavior 24 h after training in isolated buccal ganglia. BMPs were monitored by extracellular nerve recordings of buccal nerves that mediate feeding movements. BMP activity consists of a protraction phase defined here by activity in Bn.1 and a retraction phase defined by activity in Bn.2,3. The timing of activity in the radula nerve (Rn) was used to classify BMPs as either ingestion (iBMP) or rejection (rBMP) (see Methods). Stimulation of the esophageal nerve 2 (En.2), which contains dopaminergic afferents, served as the reward9,12,15,16,28,29. The in vitro analog of operant conditioning included two training groups of isolated buccal ganglia: contingent and yoke. In the contingent group, En.2 stimulation immediately followed iBMPs (Fig. 1A-D). Individual yoke and contingent preparations were paired, and paired yoke preparations received simultaneous stimulation of En.2, regardless of yoke nerve activities. Both preparations received monotonic stimulation of Bn.2,3 to increase motor pattern activity.

Fig. 1: In vitro analog of operant conditioning.
Fig. 1: In vitro analog of operant conditioning.
Full size image

A Schematic of isolated ganglia for simultaneous extracellular recording and VSD imaging. The activities of buccal nerves (Bn) 1, 2, and 3 and radula nerve (Rn) were recorded using suction electrodes. The esophageal nerve (En.2) was stimulated using a suction electrode. Ganglia were stained with Di-4-ANEPPS to detect neuronal firing activity by VSD imaging (Methods). B Timeline and training paradigm. C Example of ingestion-like buccal motor pattern (iBMP). Bn.1 is active during the protraction phase, indicated in orange. Bn.2 and Bn.3 are active during the retraction phase. Rn is active during closure and is used to classify the BMP. Rn has a longer duration of activity during retraction than protraction. D Example of rejection-like buccal motor pattern (rBMP), Rn has a longer duration of activity during protraction than retraction. E Contingent preparations had a greater increase in the percentage of iBMPs compared to yoke preparations, showing the in vitro analog of operant conditioning increases iBMPs. The star represents statistical significance (p-value < 0.05). F The total number of BMPs did not differ significantly between contingent and yoke preparations. G1 Example of a contingent preparation nerve recording. Protraction is defined by Bn.1 activation, retraction by Bn.2 and Bn.3, closure by Rn. Green circles indicate iBMPs and black circles indicate rBMPs. G2 An example of the yoke preparation.

The BMPs were examined 24 h following training. Consistent with previous studies9,11, the percentage of iBMPs (iBMPs / total BMPs) increased in contingently reinforced preparations compared to yoke controls (contingent, 60 ± 17%; median ± standard error of the median; yoke, 14 ± 15%; Wilcoxon signed-rank test, W = 49, n = 11, P = 0.027). The effect size (Cohen’s r) was 0.66 with a 95% confidence interval (CI) of the effect size of [0.102, 0.903] (Fig. 1E). In contrast, the in vitro analog of operant conditioning did not significantly alter the total number of BMPs (Fig. 1F) produced in contingently reinforced preparations compared to yoke controls (contingent, 5  ±  1.19 BMPs; yoke, 5  ±  1.79; Wilcoxon signed-rank test, W = 16.5, n = 11, P = 0.888; effect size, 0.00; CI [−0.600, 0.600]). Examples of nerve recordings in a pair of contingent and yoke preparations are seen in Fig. 1G1, G2, respectively. The increased percentage of iBMPs indicated that the neuronal activity was reconfigured 24 h following operant conditioning training.

VSD recordings revealed that neurons burst phasically with nerve BMP activity

We next used VSD imaging to investigate the neuronal activity that underlies the operant conditioning-induced change in BMPs (Fig. 2A–B). Isolated buccal ganglia were stained with the fluorescent VSD Di-4-ANEPPS 2 h before recording, and were imaged at a frame rate sufficient to capture spiking activity, 1.25 kHz21,30. VSD imaging appeared to capture some subthreshold voltage fluctuations (e.g., neuron 23, Fig. 2B1). However, in this study, for simplicity, we focused on the spiking activity (see Methods) (Fig. 2A3). Over all preparations, 74 ± 8 neurons (median ± S.E. of the median) were observed to be active per experiment. Many neurons exhibited bursts of spike activity that were temporally aligned to protraction (e.g., neuron 16, Fig. 2A1) or to retraction (e.g., neurons 3,4,5, and 6, Fig. 2A1). Other neurons exhibited nearly continuous spike activity with seemingly little relation to BMP activity (e.g., neurons 12, 28, and 36, Fig. 2A1). Some neurons seemed to fire predominantly when the retraction phase had a longer duration (e.g., neurons 1 and 2, Fig. 2A1). Therefore, we observed a high degree of diversity in the firing patterns among the neurons, which may relate to their roles in protraction and retraction and may be differentially affected by operant conditioning.

Fig. 2: VSD imaging of buccal motor patterns.
Fig. 2: VSD imaging of buccal motor patterns.
Full size image

A1 Same contingent recording as Fig. 1G1 with the VSD traces shown. Retraction and protraction phases of BMPs and closure are shown on top with colored bars. Colored circles indicate the occurrence of iBMPs (green) and rBMPs (black). Recordings of nerve activity (Rn, Bn.1, Bn.2, and Bn.3) are shown in the top traces. VSD recording is shown in all traces below the nerve traces, with the numerical identifier of each neuron on the left. Action potentials can be seen as rapid downward deflections of the VSD traces, indicated in the red box. Each spike is represented in binary and will be input (X matrix in Methods) for NMF after being convolved with a Gaussian. A2 Image of the neurons recorded in A1. A3 A 10-s segment of the VSD recording of neuron 4 from A1, indicated with a red bar. Action potentials detected by the spike detection algorithm are indicated by red circles below the trace. B1 Same recording as Fig. 1G2 with the VSD traces shown. B2 Image of the neurons recorded in B1.

In three of the 11 contingent preparations and one of the 11 yoke preparations, there appeared to be an abrupt transition in the activity of most neurons, associated with high levels of synchronous activity (Supplementary Fig. 1). It is unclear whether these state changes, or highly synchronous firing, are related to long-term operant conditioning. These abrupt state changes were not reported in previous studies of short- or long-term operant conditioning9,10,12,23,31.

Long-term operant conditioning has a similar temporal signature within BMPs as does short-term operant conditioning

NMF was used to reduce the dimensionality of the VSD recording data, to determine whether a low-dimensional signature could explain some of the elements of long-term operant conditioning and whether this signature was similar to that of short-term operant conditioning23. Consistent with short-term operant conditioning23, NMF analysis revealed two modules (Fig. 3) that aligned with protraction and retraction phases (Fig. 3A, B, top). NMF revealed two separate groups of neurons, one contributing more heavily to protraction, the other to retraction. These contributions can be seen in the stem plots (Fig. 3A, right).

Fig. 3: NMF analysis indicated that contingent training leads to earlier recruitment of the retraction module.
Fig. 3: NMF analysis indicated that contingent training leads to earlier recruitment of the retraction module.
Full size image

A NMF of the recording in Fig. 2A1 into two modules. Protraction and retraction are represented on top by orange and blue lines, respectively, with vertical lines representing the endpoints of the phases. Temporal magnitudes of the NMF modules (H matrix in Methods) are shown by orange and blue area plots at the top. The contributions of individual neurons to the protraction and retraction modules (W matrix in Methods, normalized to range from 0 to 1) are indicated by horizontal stem plots on the right. Neuronal firing activities are illustrated in a heat map (middle, X matrix in Methods). Neuron indices correspond to Fig. 2A1. B NMF of the recording in Fig. 2B1 into two modules. Three BMPs are shown, and neuron indices correspond to Fig. 2B1. C1 Temporal patterns for protraction during a BMP, normalized by phase duration of contingent (solid orange) and yoked (dashed orange). Dashed line represents the transition between protraction and retraction. 0 represents the start of protraction and 1 represents the end of retraction. Lines and shading represent mean and standard errors, respectively. C2 Temporal patterns for retraction during a BMP normalized for phase duration of contingent (solid blue) and yoked (dashed blue). Dashed line represents the transition between protraction and retraction. Lines and shading represent mean and standard errors, respectively. D1 Box plot of peak times for protraction. Each contingent/yoke pair is indicated by a line. Peak time was measured as the normalized time value that corresponded to the maximum magnitude of the protraction module. No significant difference was observed in protraction peak times, between contingent and yoke. D2 Box plot of peak times for retraction. Contingent preparations had an earlier peak time compared to yoke preparations. E1 Box plot of peak magnitudes for protraction. No significant difference was observed between contingent and yoke. E2 Box plot of peak magnitudes for retraction. No significant difference was observed between contingent and yoke.

We examined whether two NMF modules were sufficient to explain the temporal structure of the data. Additional modules did not seem to add information, in that they failed to align in a meaningful way with the phases of the BMPs (Supplementary Fig. 2). Therefore, we analyzed the results of the two-module NMF. The NMF temporal magnitudes were extracted for each BMP and averaged across all BMPs in a single experiment to examine whether there was a temporal shift in the recruitment of neurons or an increase in the peak magnitude during a fictive motor pattern (Fig. 3C1, C2). Short-term operant conditioning was previously found to result in earlier recruitment of the retraction module (i.e., earlier peak time)23. Similarly, we found that the peak time of the retraction module (Fig. 3D2) occurred earlier in contingent preparations compared to yoked controls (contingent, 0.749 ± 0.063 normalized time; yoke, 0.822 ± 0.039; Wilcoxon signed-rank test, W = 10, n = 11, P = 0.042; effect size, −0.62; CI [-0.888, -0.026]). The peak times for the protraction module (Fig. 3D1) were not significantly different (contingent 0.291 ± 0.054 normalized time; yoke 0.286 ± 0.031; Wilcoxon signed-rank test, W = 28, n = 11, P = 0.700; effect size, −0.13; CI [ − 0.679, 0.507]).

We next compared the maximum instantaneous slope. For retraction, there was a trend toward an increased average maximum slope (contingent, 1.240 ± 0.435 normalized time; yoke, 1.090 ± 0.161 normalized time; Wilcoxon signed-rank test, W = 53, n = 11, P = 0.083; effect size, 0.54; CI [-0.094, 0.860]), but the difference was not statistically significant. For protraction, no significant difference was found in slope (contingent, 0.318 ± 0.223 normalized time/s; yoke, 0.503 ± 0.113 normalized time; Wilcoxon signed-rank test, W = 30, n = 11, P = 0.83; effect size, −0.08; CI [-0.649, 0.546]).

Similar to short-term operant conditioning23, there was no difference between the peak magnitudes for either protraction (Fig. 3E1) or retraction (Fig. 3E2). Protraction: contingent, 0.016 ± 0.002 a.u.; yoke, 0.018 ± 0.002 a.u.; Wilcoxon signed-rank test, W = 30, n = 11, P = 0.831; effect size, 0.08; CI [−0.546, 0.649]. Retraction: contingent, 0.016 ± 0.002 a.u.; yoke, 0.016 ± 0.001 a.u.; Wilcoxon signed-rank test, W = 40, n = 11, P = 0.577; effect size, 0.19; CI [−0.465, 0.708]. These findings support the hypothesis that operant conditioning results in an earlier recruitment of retraction neurons that persists for at least 24 h.

Increased recruitment of active neurons was observed for long-term operant conditioning but not short-term operant conditioning

We next investigated whether there was a spatial signature of long-term operant conditioning for the same contingent and yoke preparations. We focused on neurons with a substantial contribution (>0.4) to either protraction or retraction (see Methods). This threshold was chosen because neurons rarely (~1% of the total neurons imaged) exhibited a contribution value greater than 0.4 for both protraction and retraction modules. Quadrants were determined taking the centroid of all neurons (regardless of contribution value) and neurons were counted per quadrant per preparation (Fig. 4). Smaller neurons (associated with sensory neurons) contributing to the retraction module in the contingent preparations were observed to be distributed primarily in quadrant 1 of the buccal ganglion (Fig. 4A2), whereas larger neurons (associated with motor neurons) contributing to protraction in contingent preparations were distributed in quadrant 2 (Fig. 4A1). Yoke protraction neurons were observed to be distributed primarily in quadrant 3 of the buccal ganglion (Fig. 4B1), whereas yoke retraction neurons were observed to be spread over all four quadrants (Fig. 4B2).

Fig. 4: Contingent training increases neuronal recruitment and spatial localization in quadrant I, for the retraction module.
Fig. 4: Contingent training increases neuronal recruitment and spatial localization in quadrant I, for the retraction module.
Full size image

A1–A2 Overlay of all neurons with a high contribution (>0.4) for all contingent preparations, for protraction (A1) and retraction (A2) neurons. Quadrants are labeled by Roman numerals. B1–B2 Overlay of all neurons with a high contribution (>0.4) for all yoke preparations for protraction (B1) and retraction (B2) neurons. C1 Neuron count per quadrant for protraction neurons in both contingent and yoke conditions. No statistically significant differences were observed in any quadrant between contingent and yoke. C2 Neuron count per quadrant for retraction neurons in both contingent and yoke. There was a significant difference in retraction neuron count in quadrant I between contingent and yoke. D1 Neuronal recruitment measured as the percentage of neurons per preparation that have a contribution value greater than 0.4 for the protraction module. D2 Neuronal recruitment for contingent retraction was statistically greater than in yoke preparations.

We examined, by quadrant, the numbers of neurons contributing to the protraction and retraction modules, for contingent and yoke preparations (Fig. 4C1–2). For protraction neurons, no statistically significant difference was observed in their distribution (median number ± S.E.) between contingent and yoke conditions in any quadrant: quadrant 1 (contingent, 1 ± 0.20; yoke, 0  ±  0.00; Wilcoxon signed-rank test, W =  24, n =  11, P  =  0.125; effect size, 0.57; CI [−0.046, 0.872]), quadrant 2 (contingent, 3 ± 0.595; yoke, 2  ±  0.793; W  =  29, P  =  0.156; effect size, 0.41; CI [–0.254, 0.810]), quadrant 3 (contingent, 1 ±  0.60; yoke, 3  ±  0.79; W  =  16, P  =  0.130; effect size, −0.47; CI [-0.836, 0.176]), or quadrant 4 (contingent, 0  ±  0.60; yoke, 0  ±  0.20; W  =  11, P  =  0.500; CI effect size, 0.00; [-0.600, 0.600]). For retraction neurons, analysis of three of the quadrants (Fig. 4C2) showed no statistically significant difference in the distribution of neurons between contingent and yoke conditions: quadrant 2 (contingent, 1  ±  0.79; yoke, 1  ±  0.40; Wilcoxon signed-rank test, W  =  34, n  =  11, P  =  0.215; effect size, 0.42; CI [-0.245, 0.813]), quadrant 3 (contingent, 1  ±  0.79; yoke, 2  ±  0.79; W  =  8, P  =  0.719; effect size, 0.00; CI [-0.600, 0.600]), and quadrant 4 (contingent, 2  ±  0.99; yoke, 1 ±  0.40; W  =  41, P  =  0.195; effect size, 0.42; CI [-0.235, 0.817]). However, a statistically significant difference in retraction neurons was observed in quadrant 1 (contingent, 4  ±  3.77; yoke, 3  ±  0.99; W  =  52, P  =  0.012; effect size, 0.74; CI [0.252, 0.928]).

The quadrant analysis was also performed on the short-term data from Costa et al.23 (Supplementary Fig. 3). No statistically significant difference was observed in the distribution of protraction neurons, between contingent and yoke conditions, for any quadrant: quadrant 1 (contingent, 0  ±  0.00; yoke, 0  ±  0.21; Wilcoxon signed-rank test, W  =  0, n  =  8, P  =  0.250; effect size, 0.00; CI [-0.753, 0.753]); quadrant 2 (contingent, 0  ±  0.21; yoke, 0  ±  0.21; W  =  0, P  =  1.000; effect size, 0.00; CI [-0.753, 0.753]); quadrant 3 (contingent, 2  ±  0.41; yoke, 1 ±  0.83; W  =  14, P  =  0.688; effect size, 0.31; CI [−0.579, 0.861]); and quadrant 4 (contingent, 1 ±  0.83; yoke, 1  ±  1.03; W  =  1, P  = 1.000; effect size, 0.00; CI [−0.753, 0.753]). Moreover, no statistically significant difference in the distribution of retraction neurons was observed between contingent and yoke conditions in any quadrant: quadrant 1 (contingent, 0  ±  0.00; yoke, 0  ±  0.00; Wilcoxon signed-rank test, W  =  0, n  =  8, P  =  1.000; effect size, 0.00; CI [0.000, 0.000]); quadrant 2 (contingent, 0  ±  0.21; yoke, 0  ±  0.000; W  =  0, P  =  1.000; effect size, 0.00; CI [−0.753, 0.753]); quadrant 3 (contingent, 3  ±  1.03; yoke, 1 ±  1.45; W  =  12, P  =  0.719; effect size, 0.00; CI [−0.753, 0.753]); and quadrant 4 (contingent, 3  ±  0.41; yoke, 4  ±  1.24; W  =  10, P  =  0.938; effect size, 0.00; CI [-0.753, 0.753]).

Finally, we examined whether the percentages of total neurons recruited in the protraction or retraction modules differed between contingent and yoke preparations. For retraction neurons, the percentage of total neurons in the contingent group contributing a value greater than 0.4 was significantly greater than that in the yoked group (contingent, 15.873 ± 5.896%; yoke, 8.791 ± 2.154%; Wilcoxon signed-rank test, W = 56, n = 7, P = 0.042; effect size, 0.62; CI [0.026, 0.888]) (Fig. 4D2). For protraction neurons, no statistical difference was observed in neurons between contingent and yoke groups (contingent, 7.143 ± 1.378%; yoke, 5.634 ± 1.802%; Wilcoxon signed-rank test, W = 45, n = 7, P = 0.320; effect size, 0.32; CI [-0.345, 0.772]) (Fig. 4D1). In contrast, when the same analysis was conducted on the short-term data from Costa et al.23, we found no statistically significant differences, between contingent and yoke, in percentages of neurons recruited for protraction (contingent, 2.703 ± 0.721%; yoke, 2.655 ± 1.964%; Wilcoxon signed-rank test, W = 15, n = 7, P = 0.938; effect size, -0.06; CI [-0.779, 0.724]), or retraction (contingent, 4.545 ± 0.875%; yoke, 4.425 ± 1.063%; Wilcoxon signed-rank test, W = 10, n = 7, P = 0.578; effect size, −0.26; CI [−0.846, 0.616]) modules (Supplementary Fig. 3).

We also compared the difference in the percentage of neurons recruited in short- and long-term conditions. Protraction differences in the percentage of neurons recruited were not significant (short-term, -0.100 ± 2.008%; long-term, 0.806 ± 1.677%; Mann–Whitney U test, U = 46, short-term = 7, long-term = 11, P = 0.210; effect size, -0.31; CI [−0.678, 0.184]). Retraction differences in the percentage of neurons recruited was significant (short-term, -0.145 ± 1.335%; long-term, 11.094 ± 5.824%; t-test, t(16) = -2.633, short-term = 7, long-term = 11, P = 0.024; effect size, -1.02; CI [-2.019, -0.011]).

Thus, the long-term memory for operant conditioning is correlated with a greater number of recruited neurons in the retraction module, an effect restricted to the upper right quadrant. Interestingly, this quadrant includes the sensory neuron cluster of the ganglion32, indicating that long-term operant conditioning may increase the recruitment of sensory neurons.

Discussion

NMF was used to analyze the dynamics of neuronal activity during Aplysia fictive feeding behavior, 24 h after operant conditioning, and compare these results with the short-term memory of operant conditioning. The results demonstrate the power of NMF to capture neural adaptations across temporal domains of learning and memory. Similar to the results of Costa et al.23 for short-term operant conditioning, our analysis identified two modules that coincide with the protraction and retraction phases of feeding. In combination, these results indicate that these two modules are a consistent feature of the feeding CPG. Similar to the effects of short-term operant conditioning23, the retraction module was recruited earlier in the retraction phase in long-term operant conditioning. This similarity suggests that earlier recruitment of the retraction module is a consistent marker of operant conditioning across short- and long-term temporal domains. Similar to short-term operant conditioning23, we did not observe a difference in recruitment times for the protraction module or changes in the magnitudes. Taken together, these results suggest that short- and long-term operant conditioning share some similar features.

However, we also found that long-term operant conditioning increases the number of recruited neurons contributing to the retraction module, whereas no increase was observed when analyzing data from the previous study23 of short-term operant conditioning. The finding that long-term operant conditioning increases the number of recruited retraction neurons suggests that, for this system, long-term memory involves a more extensive neuronal network than does short-term memory. The increased recruitment could be mediated in part by increased intrinsic excitability11, reduction in the strength of inhibitory synaptic connections such as has been observed in short-term operant conditioning10, an increase in the strength of excitatory synaptic connections as has been observed with long-term classical conditioning and sensitization33,34, or possibly structural changes at the cellular and subcellular levels as has been observed in other systems35.

The neurons recruited specifically for long-term operant conditioning in Aplysia appear predominantly located within the sensory neuron cluster. Previous mammalian studies have also observed increases in neurons recruited due to learning36,37 and that neurons fall into distinct spatial clusters38,39. For example, fear conditioning in mice led to an increased recruitment of neurons as measured with c-Fos+ labeling 15 h after training40. Fear conditioning also led to an increased recruitment of neurons when fear memory was reactivated at later time points (e.g., 7 d and 14 d)41. Another study identified functionally distinct neuronal ensembles for memory generalization and discrimination of contextual fear conditioning42. Olfactory reward conditioning in honeybees was associated with an increase in mushroom body output neurons43. Short-term sensitization of the Tritonia swim motor program also resulted in an increased recruitment of neurons18. These persistent changes suggest that long-term memory results in part from increased activity of distinct spatial clusters, in mammals as well as Aplysia.

In the present study, the increased number of sensory neurons recruited during long-term operant conditioning may not only reflect memory storage, it also reflects a shift in how the circuit functions. With long-term operant conditioning, an efference copy44 of the motor command may be sent to sensory neurons to prepare them for expected input. The efference copy could prime the network, making the feeding system more sensitive and thus more responsive to food. Another possibility is that the sensory cluster contains more than just sensory neurons and includes previously overlooked neurons involved in orchestrating retraction movements. Our results suggest a more thorough investigation of the neurons within the sensory cluster may provide additional insights into the mechanisms of motor pattern generation of Aplysia feeding behavior.

This study suggests several directions for future research. For example, we have not attempted to identify the specific neurons within each module (i.e., according to their established nomenclature, e.g., B51). Identifying these neurons and examining how their activity changes as a result of operant conditioning would provide additional insight into the cellular mechanisms underlying long-term memory. Remarkably, VSD was able to capture subthreshold voltage fluctuations (see Fig. 2). However, in this study, we only examined the dynamics of spiking activity. Future studies could look at ways in which these subthreshold signal influences may help mediate the behavioral changes of short- and long-term operant conditioning. Finally, extending this approach to other learning paradigms and animal models could help determine the extent to which the low-dimensional signatures of long-term memory identified in our study are conserved across different species and systems. In other animals, we might expect similar low-dimensional memory signatures, involving a larger, more distributed set of neurons to support memory stabilization and behavioral flexibility.

Materials and methods

Animals

Buccal ganglia were excised from Aplysia californica (60–100 g), which were obtained from the National Resource for Aplysia (University of Miami, FL). Animals were housed in plastic containers inside aerated tanks containing artificial seawater (Instant Ocean; Aquarium Systems; ASW) maintained at 15 °C. Animals were fed a 5 × 3 cm (0.08 g) piece of seaweed two times per week. Animals were food-deprived for two to four days before the experiment and anesthetized by isotonic MgCl2 (360 mM) with a volume in milliliters equal to half the animal’s body weight in grams.

The buccal mass was removed and placed in a Sylgard-lined dissection chamber containing ASW with a high (3.3x) concentration of divalent ions (HiDi) [245 mM NaCl, 10 mM KCl, 145 mM MgCl2(6H2O), 20 mM MgSO4, 30 mM CaCl2(2H2O), 10 mM HEPES, pH 7.5], which suppressed all visible movement of the buccal mass. The buccal ganglia and peripheral nerves were isolated from the buccal mass and pinned down in a Sylgard-lined recording chamber with the caudal side facing upwards. The chamber solution was changed to normal ASW [450 mM NaCl, 10 mM KCl, 30 mM MgCl2 (6H2O), 20 mM MgSO4, 10 mM CaCl2(2H2O), 10 mM HEPES, pH 7.5]. Similar to previous publications20,23,30, to minimize nerve activation, the preparation was held in HiDi solution while the nerves were drawn into the suction electrodes, which contained an Ag/AgCl electrode. This procedure resulted in HiDi solution in the suction electrodes, which did not appear to affect the nerve recordings.

Classification of BMPs

BMPs were monitored by extracellular suction electrode recordings of ipsi- and contralateral buccal nerves 1, 2, and 3 (Bn.1, Bn.2, and Bn.3), and closure activity was monitored by recording ipsi- and contralateral radula nerve 1 (Rn). The start of the protraction phase was considered to be the beginning of activity of the last burst in Bn.1 preceding the start of retraction. The start of the retraction phase was considered to be the end of activity in Bn.1. The end of the retraction phase was considered to be the end of activity in Bn.2. For a BMP to be considered in the dataset, the start of the protraction phase and the end of the retraction phase must have both occurred within the 2-min recording.

For Rn, large-unit activity in retraction was defined as spikes with a greater amplitude than the smallest Rn spike occurring during protraction9,11,13,16. BMPs having a greater duration of large unit Rn activity in retraction compared to protraction were classified as ingestions (iBMP). Otherwise, they were classified as rejections (rBMP).

Analysis of extracellular nerve activity

The signals from the extracellular nerve electrode recordings were amplified (A-M Systems, 1700 Differential AC Amplifier) and digitized by an Intan Recording Controller (Intan, 128ch Stimulation/Recording Controller). The extracellular voltage signals were low-pass filtered using the signal processing toolbox in MATLAB (Elliptic lowpass filter, attenuation = 20 Hz, passband = 400 Hz, stopband = 1000 Hz). The threshold for detecting a spike in a nerve was an upstroke of 2.25 times the SD (standard deviation). The performance of nerve spike detection was confirmed by visual inspection.

In vitro operant conditioning and voltage-sensitive dye (VSD) imaging

Following ganglia isolation and establishing extracellular nerve signals, the preparation underwent in vitro operant conditioning training. During a 10-min training period, sustained rhythmic BMP activity was elicited by monotonic stimulation (World Precision Instruments, Stimulus Isolator 1835-B) of contralateral nerve Bn.2,3 (0.5 ms, 2 Hz), whereas stimulation of En.2 (0.5 ms, 10 Hz) served as reinforcement. The intensity of nerve stimulation of Bn.2,3 was adjusted until 5 consecutive stimuli elicited one BMP (4-25 V). The intensity of En.2 stimulation was adjusted so that one BMP would be generated with stimulation of 10 Hz for 5 s (4-25 V).

Each experiment included two groups: a contingent reinforcement group that received En.2 stimulation immediately following the expression of iBMPs and a yoke control group. Each contingent preparation was paired with a yoke preparation, and both received simultaneous En.2 stimuli. Thus, the yoke preparation received En.2 stimulation that was uncorrelated with pattern expression. The experiment was terminated if the preparation did not receive at least two rewards during the 10-min training period.

Following the in vitro operant conditioning, the buccal ganglia were placed in a Sylgard-coated dish containing normal ASW at 12°C for 24 h. The ganglia remained pinned down, and the dish was tightly covered with Parafilm to minimize evaporation. The osmolarity was checked (Wescor, Vapor Pressure Osmometer 5520) after 24 h to confirm the bath did not become hyperosmotic. After these 24 h, the ganglia and nerves were transferred back to the VSD recording chamber. The recording chamber was custom-designed and 3D-printed on a MakerBot® Replicator® Z1830. The solution in the dish was exchanged from normal ASW to HiDi, and the nerves were drawn into the glass pipettes again, containing HiDi and an Ag/AgCl electrode. The buccal ganglia comprise a symmetric pair connected by a commissure; thus, each preparation contained left and right buccal ganglia. The buccal ganglia were positioned with the caudal surface facing upwards, towards the camera. The HiDi was then exchanged for normal ASW.

The preparation was stained for 2 h with the VSD Di-4-ANEPPS (Biotium). First, 0.25 mg of dye was stored in solution with 100 μL of DMSO (MilliporeSigma) at room temperature. At the time of the experiment, 900 μL of HiDi was added to the solution and sonicated (Branson, Ultrasonic Cleaner 1200) for 30 s. The dye was then applied to the bath by a 1 mL bolus (0.25 mg/mL) to give a final concentration of 0.08 mg/mL. After 2 h, the bath was exchanged with normal ASW without di-4-ANEPPS and remained in this solution for the rest of the experiment. The left hemiganglion was imaged, and the nerves were recorded for 2 min at the focal plane that captured the most neurons, without nerve stimulation, constituting the long-term recording.

Imaging was performed with an Olympus BX50WI upright microscope equipped with a 20×0.95-NA XLUMPLFLN water immersion objective (Olympus). A high-power LED with a peak wavelength of 565 nm (ThorLabs, SOLIS®-565 C) powered by the DC2200 LED driver (ThorLabs) was used to excite the Di-4-ANEPPS. The LED light was passed through a 534/30 nm bandpass filter (BrightLine®) for excitation, a 580 nm dichroic mirror (BrightLine®), and a 641/75 nm emission filter (BrightLine®). VSD signals were detected by a 1024 × 1024 CMOS camera (RedShirtImaging™, DaVinci1K), binned to 256 × 256 and sampling at 1.25 kHz.

Analysis of VSD imaging data

Regions of interest (ROIs) were drawn manually around each cell with ImageJ on the Fiji platform45. VSD signals were acquired by averaging the ROI pixels. The raw VSD signals were bandpass filtered in MATLAB (Elliptic lowpass filter, attenuation = 40 Hz, passband = 75 Hz, stopband = 1000 Hz). An action potential in the VSD recording data was detected if the trace had a downward deflection (depolarization) with an amplitude of 2.2 times the SD, followed 2 ms later by an upward deflection (measured from the downward peak) with an amplitude of 2.2 times the SD. A minimum separation between spikes was set to 18 ms to prevent counting a single spike more than once.

Initial signal extraction and analysis were conducted using a graphical user interface developed in MATLAB that can be found at https://github.com/Byrne-Lab/VSD_CFE_analysis.

Non-negative matrix factorization (NMF)

NMF is a dimensionality reduction approach that aims to reconstruct the original data matrix X from a predetermined number of k modules (discussed below). NMF uses non-negativity constraints46 that make NMF suitable for describing neuronal activity data. The fundamental equation of NMF is given by:

$${X}_{n\times t}={W}_{n\times k}{H}_{k\times t}+{E}_{n\times t}$$
(1)

\({X}_{n\times t}\) is the firing activity of n neurons over t time points. The contribution values of individual neurons, n, for each of the k modules are written as\(\,{W}_{n\times k}\). The n rows are termed the neuronal patterns. Conversely, the temporal patterns are written as \({H}_{k\times t}\), which is a matrix that quantifies how the magnitude of each of the k modules varies over the t time points. Each of the k rows is termed a temporal pattern. The approximation error of this decomposition is denoted as \({E}_{n\times t}\). NMF tries to minimize this error.

Using the seqNMF MATLAB package developed by Mackevicius et al.25, NMF was run with the parameter choices L = 1 (capturing spatial patterns in which neurons are active together at one moment), λ = 0 (no regularization parameter), and otherwise default parameters, effectively performing standard NMF46. This MATLAB code was also used in Costa et al.23 (https://github.com/Byrne-Lab/costa_et_al_OC_VSD). To confirm that the results of the NMF algorithm were repeatable and not sensitive to initialization, the NMF algorithm was run eleven times. In all cases, the NMF results for the 11 iterations were indistinguishable; thus, the last iteration was used for subsequent analysis.

The timing of action potentials was converted to binary spike trains. The spike trains were smoothed with a Gaussian convolution. The Gaussian was set such that 67% of the area had a width of 1 s, as in Costa et al.23. We used k = 2 as done previously23 to link neuronal and temporal patterns to the two behavioral phases of protraction and retraction in Aplysia. The smoothed data were then used as input into the NMF algorithm, and as output, we obtained the W and H matrices, which respectively represented neuronal and temporal patterns. Each output’s temporal pattern (H) is normalized to the unit L2 norm by NMF to fix scale ambiguity and ensure interpretability, with the neuronal pattern (W) scaled accordingly to preserve the reconstruction.

The total variance in the data is\(\,\sum {x}^{2}\), which is equivalent to the squared Frobenius norm47:

$${||}X|{|}_{F}^{2}=\mathop{\sum }_{i=1}^{n}\mathop{\sum }_{j=1}^{t}{X}_{{ij}}^{2}$$
(2)

where i and j are individual neurons (from a total of n) and time points (from a total of t), respectively.

The power is given in Mackevicius et al.25, calculated by:

$${Power}=\frac{\sum {X}^{2}-\sum {\left(X-{WH}\right)}^{2}}{\sum {X}^{2}}$$
(3)

Here, X is the original data, and WH is the data reconstruction from NMF. The power is a metric of how well the product of W and H approximates the original data. NMF with k = 2 explained 76.43 ± 6.68% of the total power in the data.

After obtaining the W and H matrices, we needed to determine which module corresponded to protraction and which to retraction. This was achieved by mapping the two corresponding rows of the H matrix, the temporal patterns, to specific nerve activity groups using Pearson correlation coefficients23,48. The module with the greater correlation to Bn.1 spike times was identified as protraction, and the module with the greater correlation to Bn.2 was identified as retraction. This mapping ensured that the temporal and neuronal patterns in the H and W matrices, respectively, were meaningfully aligned with the underlying motor patterns of protraction and retraction.

To compare temporal patterns during BMPs (both iBMPs and rBMPs), we normalized the durations of the overall BMP and each of its modules (protraction and retraction), as these durations varied from pattern to pattern. This normalization was achieved by using linear interpolation to resample temporal patterns during each BMP to a standard of 10,000 time points. Specifically, the protraction module was resampled to fit the range from 0 to 5000 time points, and the retraction module was resampled to fit the range from 5000 to 10,000 time points. Finally, the resampled temporal data were averaged across BMPs to obtain a mean trace for the protraction module and a mean trace for the retraction module, for each preparation. The timing of the peaks was measured on the normalized time scale. The peak magnitude (a.u.) and peak time were determined, for each module, by the highest magnitude and the corresponding time point, respectively.

Recruitment characteristics of neurons

To compare contributions across preparations, we normalized the contribution values of W to the range [0, 1] for each preparation and module. We set a contribution threshold of 0.4 to identify neurons that predominantly contribute to a single module, minimizing the assignment of one neuron to both modules. We imaged a total of 1627 neurons across 22 preparations. Of these, after thresholding, nine preparations showed no overlapping neurons between protraction and retraction, which aligns with our expectation of minimal cross-module contribution. In eight preparations, there was only one overlapping neuron, and in five preparations, there were two overlapping neurons. This indicates that, overall, the overlap between the two modules was minimal, with only ~1% of the total neurons showing overlap.

Statistics and reproducibility

All statistical tests were performed using the MATLAB Statistics & Machine Learning Toolbox and R statpsych package. Normality was not assumed, and two-tailed Wilcoxon signed-rank tests were used to perform paired comparisons between contingent (n = 11) and yoked (n = 11) preparations. W is the test statistic calculated by the Wilcoxon signed-rank test, representing the sum of ranked differences. Alpha was set to 0.05. Normality was assessed using the Lilliefors test. Wilcoxon signed-rank test or Student’s t-test was used to test differences between the groups. Effect sizes49 (Cohen’s r) are reported with 95% confidence intervals of the effect size calculated from the Wilcoxon signed-rank test statistic to quantify the strength of the observed paired differences. Cohen’s guidelines for interpretation are that values of approximately 0.1, 0.3, and 0.5 represent small, medium, and large effects, respectively. We show all central tendencies as the median ± standard error of the median. The standard error of the median was computed using the ci.median function from the statpsych package in R50.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.