ABSTRACT
All sensory systems must reliably translate information about the environment into a neural code, mediating perception. The most relevant aspects of stimuli may change as behavioral context changes, making efficient encoding of information more challenging. Sensory systems must balance rapid detection of a stimulus with perception of fine details that enable discrimination between similar stimuli. We show that in a species of weakly electric fish, Apteronotus leptorhynchus, two coding strategies are employed for these separate behavioral tasks. Using communication signals produced in different contexts, we demonstrate a strong correlation between neural coding strategies and behavioral performance on a discrimination task. Extracellular recordings of pyramidal cells within the electrosensory lateral line lobe of alert fish show two distinct response patterns, either burst discharges with little variation between different signals of the same category, or a graded, heterogeneous response that contains enough information to discriminate between signals with slight variations. When faced with a discrimination-based task, the behavioral performance of the fish closely matches predictions based on coding strategy. Comparisons of these results with neural and behavioral responses observed in other model systems suggest that our study highlights a general principle in the way different neural codes are utilized in the sensory system.
SIGNIFICANCE STATEMENT Research relating the structure of stimuli to the response of sensory neurons has left us with a detailed understanding of how different neural codes can represent information. Although various aspects of neural responses have been related to perceptual abilities, general principles relating behavioral tasks to sensory coding strategies are lacking. A major distinction can be made between signals that must simply be detected versus stimuli that must also be finely discriminated and evaluated. We show that these two different perceptual tasks are systematically matched by distinct neural coding strategies and we argue that our study identifies a general principle that is observed in various sensory systems.
Conflict of interest statement The authors declare no competing financial interests.
INTRODUCTION
Most animals must navigate complex environments, coping with constant sensory input. Being successful requires being adequately prepared to cope with unpredictable stimuli of varying intensity, structure, and behavioral salience. Sometimes an organism merely needs to detect a specific signal within a continuous and noisy sensory stream (1–5). Alternatively, the organism might need to finely evaluate the properties of the signals in order to discriminate meaningful variations(3–5). Our goal is to demonstrate that these two different sensory needs – detection vs. discrimination- are met with different, uniquely optimized, sensory coding schemes.
Deciphering the relationship between the activity of sensory neurons and perception can be divided into three challenges: 1-understanding how relevant sensory information is represented in the neural code; 2-probing sensory abilities through behavior; and 3- correlating the two into a cohesive understanding of “perception”. The relationship between the sensory codes and sensory abilities of an organism has been explored in several systems (7–10). In the visual and vibrissae systems neural codes change as adaptation to a stimulus sets in. After adaptation the initial low-threshold detectability of a novel stimulus is traded for increased discriminability between similar stimuli (11, 12) a change reflected in the behavioral performance of the animal (13). Two neural coding schemes have repeatedly been shown to provide streams of information for the detection vs. discrimination of signals. The first relies on synchronous high frequency firing – typically bursting– over a population, for detection of important stimulus features (14, 15). The second relies on graded responses with heterogeneous firing across the population to support the evaluation and discrimination of fine features of the stimulus (16–18). The relationship between these two strategies and stimulus encoding is firmly established, but we have yet to demonstrate that they indeed are systematically mediating different behavioral tasks. Here we use the weakly electric fish communication system to demonstrate a close association between the stimulus encoding method and the associated behavior. We propose a general principle linking differing sensory codes to two different perceptual tasks: detection vs. discrimination.
Weakly electric fish communication signals, chirps, are transient modulations of their ongoing oscillating electric field, or EOD (electric organ discharge). Two fish interacting will perceive each other’s field as quasi-sinusoidal modulations of their own EOD –called beats– and chirps as transient disruptions of this regular background. In typical male-female courtship interactions, signals will consist of high frequency beats with males producing big (type 1) chirps (19). Male-male aggressive interactions elicit the production of small (type 2) chirps that typically interrupt a low-frequency beat (20). Neurophysiological recordings of the primary electrosensory area in the brain, the electrosensory lateral line lobe (ELL), show that small chirps on low frequency beats are encoded by synchronized bursting among the population of pyramidal cells consistent with a feature detection code. Courtship signals, big chirps on high frequency beats, are encoded via graded, heterogeneous firing (21). This latter response type, but not the former, is well suited to support the efficient discrimination of small variations in chirp properties.
Although the signals described above are typical of courtship and aggression respectively, signaling patterns are presumably more diverse than previously reported. Recent field studies report the use of small chirps paired with high frequency beats during courtship (22), behavior not previously seen in lab studies. Thus, this system offers a unique opportunity to ask the following question: is the neural code employed simply a function of the signal or is it consistently matched to the behavioral task in order to enhance either the capacity to discriminate or simply detect the stimulus?
RESULTS
In this study, three types of communication signals were used: low frequency beats (10 Hz, typical of agonistic encounters) paired with small chirps and high frequency beats (120 Hz, typical of courtship) with either big chirps or small chirps. We presented several chirp variants, differing in duration and in frequency rise within a range typical of A. leptorhynchus signals for each chirp type. We used a spike metrics distance and ROC analysis to characterize the similarity in response pattern between responses of a population of pyramidal neurons (up to 20 ON or OFF cells) to a given chirp stimulus and across responses to variants (Fig S1). The result is presented as percent error (Figures 1 and 2) representing how often an ideal observer would classify a chirp incorrectly as a function of the number of neurons included in the analysis. Efficient discrimination should be accurate even when based on only a few neurons. Alternatively, the pooled responses from many neurons may not contain enough information to accurately discriminate between two stimuli.
Encoding of aggressive signals does not efficiently represent chirp properties
Small chirp stimuli cause abrupt phase-shifts in a low frequency beat cycle (Fig 1A). The spatial geometry of the electric field and electroreceptors is such that a stimulus that increases electrical amplitude on one side of the body will cause a decrease in amplitude on the other side, eliciting a response from ipsilateral ON-cells and OFF-cells respectively. As we have shown before (23), superficial ON-cells of the lateral segment of the ELL respond with a more salient response than other cells in the ELL: they produce a high-frequency stereotyped burst of spikes after the chirps that serves as a particularly effective chirp-detection mechanism. While both bursting and non-bursting responses contain some information about the amplitude modulation (AM) shape of the chirp stimulus there is still high error even when pooling the responses for 13 cells (Fig 1B). Importantly, this information about AM shape does not allow an observer to discriminate differences in the parameters of the emitted chirps such as duration or frequency rise (Fig 1C). For these stimuli, a chirp X with a specific duration and frequency occurring at a given phase will cause a different AM than the same chirp occurring at a different phase (compare stimuli in Fig 1A). Consequently, two chirps that differ in parameters could elicit responses that are more similar to each other than to the response of the same chirp occurring at different phases. A decoder cannot rely on spiking pattern to estimate variation in any variable parameter of these chirp signals as both duration and frequency information are obscured by the phase parameter which is not controlled by the emitting fish (24). In the context of natural behavior the signal’s characteristics hinder discrimination and as a result is encoded with a synchronized bursting code that is efficient for detection (23) but less so for discrimination (Fig 1C).
Chirp properties are accurately encoded in high-frequency beat contexts
Big and small chirps occurring on high frequency beats span several cycles of the beat and thus the overall AM shape of the signals is virtually unaffected by the phase at which the chirp started (25). Big chirps cause a transient increase in beat frequency that is accompanied by a decrease in the beat amplitude directly proportional to the frequency increase (24). These chirps cause a graded increase in firing rate in OFF-cells and a cessation of firing in ON-cells (Fig 1D). The increase in OFF-cell firing can be of only a few Hz in some cells or of a few hundred Hz in others (21). For chirps that differ in duration ON and OFF cells, both allow accurate discrimination based on the responses of 12 cells (Fig 1E), the duration of the response being proportional to the duration of the chirp. When presented with two chirps that do not differ in duration but only in frequency, this pause in ON-cell firing cannot allow accurate discrimination. OFF-cells respond in a graded manner, increasing firing in relation to both chirp duration and frequency increase, allowing for efficient discrimination even when chirp duration is identical (Fig 1F). These data show that big chirps on high frequency beats are encoded with spiking patterns that allow the identification and discrimination of chirp characteristics.
Even though small chirps and big chirps are categorically different signals that often mediate different behaviors (19, 20), their behavioral impact (26–28) and the way they are encoded in the electroreceptors (29) depends on the beat frequency(25). Our data also suggest that the ELL responses to small chirps on high frequency beats are more similar to big-chirps than small chirps on low-frequency beats. OFF-cells respond with a variable increase in firing and ON-cells with a pause in firing (Fig 2A). The small chirps shown in Figure 2 cause an average increase in firing of 20 Hz in OFF-cells, which corresponds to a doubling of baseline frequency. This increase appears slightly stronger and longer in the larger of the small chirps (Fig 2B). Similar to the response of OFF-cells to big chirps (21), this population response is relatively invariant from trial to trial, therefore the difference in response shape between two chirps is larger than the typical variability in the response to a single given chirp. This is quantified by the discrimination error level, which reaches very low values for OFF-cell population responses of 12 neurons (Fig 2C). Also like the response to big chirps, ON-cell responses differ for the various small chirps but those differences are small relative to the trial-to-trial response variability leading to inaccurate discrimination coding. It is possible that larger populations (>>13 cells) could lead to error-less discrimination as the variability in the population response could be partially averaged out. Therefore, we conclude that both ON-cells and OFF-cells could support the discrimination of small chirps on high frequency beats but that OFF-cells do so more efficiently.
Correlating behavior with coding strategy
Our neurophysiological data argue for a match between a signal with a structure that prevents chirp properties from being readily discriminated (i.e. small chirps occurring on low frequency beats) and a neural code that provides reliable detection, but does not support efficient discrimination: synchronous bursting (Fig 1B). In contrast, signals with structures better suited for discrimination are encoded with graded, heterogeneous responses that efficiently carry information about varying chirp characteristics. However, the neurophysiological data cannot demonstrate is that this change in coding strategy in fact mediates different perceptual tasks. In the following experiments, we test the hypothesis that behavioral discrimination can occur only in the context of a high frequency beats, Consistent with predictions made from the observed coding strategies, behavioral responses to small chirps on low frequency beats should be indiscriminant of chirp properties.
To test behavioral discrimination performance, we used a paradigm that has been used successfully in a wide variety of animals and modalities (30–33), a habituation-dishabituation assay. Animals respond most strongly to novel stimuli and habituate to a stimulus presented repeatedly. In the habituated state, the animal responds relatively weakly or not at all to the stimulus but when a novel stimulus is presented the animal displays a resurgence of response that reflects the fact the stimulus is perceived as novel. This dishabituation response -or lack thereof-demonstrates that the animal discriminated -or not-between the first and second stimulus. One of the strengths of this assay is that it takes advantage of the animal’s innate response to a stimulus rather that forcing an artificial behavior onto the animal (e.g. classical conditioning). The test therefore reveals how perceptual abilities are used to guide innate behaviors. In this case, sensory information about a stimulus’ novelty is used to drive an increase in behavioral response. Brown ghost knifefish placed in a confined space (here, an aquarium of 30 cm ×30 cm ×10 cm) will react to a conspecific signal by increasing swimming movement and speed, swimming around the source of the stimulus as if “investigating” and sometimes chirping, biting or lunging in that direction (Fig 3A). Our stimulation regime leads to habituation in the first 60 minutes. After 90 minutes of stimulation with a given chirp, the stimulus was switched (Fig 3B) to a stimulus with the same beat frequency and the same chirp type but different chirp parameters (frequency rise or duration) as used in the neurophysiological experiments.
Swimming speed changes in response to chirps on high frequency beats
Various aspects of the behavioral response were quantified and several showed some habituation-dishabituation effect (biting, lunges, chirping; data not shown). Counting lunges or chirps clearly showed habituation but only revealed dishabituation in a small subset of individuals. If the dishabituation response is not strong enough to cross the threshold where it would produce one of these highly aggressive behaviors the measure would not reveal the phenomenon. We found swimming speed and changing distance from the stimulus source be more sensitive measures of dishabituation.
The distribution of swimming speeds during a given stimulation bout typically had a bimodal form with a peak at slower swimming speed indicative of a passive state and the faster swimming speed occurring during active swimming. We take the ratio of time spent in these two states (normalized for each fish; see SI for details) to quantify the strength of the behavioral response. The ratio will be higher than 1 at the beginning of the assay when the fish reacts most strongly (i.e. swims faster) to the stimulus and also if the fish exhibits dishabituation to the novel stimulus.
Swimming speed decreased markedly in the first hour of stimulation and there was no difference in average swimming speeds across stimulus type at the beginning of the stimulation protocol (ANOVA for time 0 of chirp X stimulation: p=0.3). The first stimulus bout with a new chirp led to a small but not significant increase in speed ratio for both small and big chirps on high frequency beats and no increase for small chirps on low frequency beats (Fig S2). Two factors affect the magnitude of this dishabituation effect: 1-The dishabituation response is marked in the first few seconds of stimulation but disappears quickly. Averaged across the whole minute of stimulation the short dishabituation effect does not influence values much; 2-dishabituation is observed more clearly in some fish than others as a function of the position of the fish when the new stimulus starts (see next paragraph and Fig 4A). To counter the short-lived response time we quantified speed ratios in the first 5 seconds of each bout (Fig 3D). These 5-second samples show a similar habituation trend that plateaus after 60 minutes. The dishabituation when the new stimulus is played is obvious (see figure legend for statistics) for chirps of both types on high frequency beats but not for small chirps on low frequency beats.
Location affects dishabituation response
When identifying factors that influence dishabituation, we observed that some fish did not show a recovery of active swimming when the new stimulus was played. In every case, the fish was close to the stimulation electrode just prior to the start of the 1-minute playback. In contrast, fish that were positioned further from the electrode more reliably recovered active swimming when a new chirp on a high frequency beat was delivered. We quantified the position effect by separating the trials based on the position of the fish in the 1 second prior to the start of the new stimulus. Trials where the fish had over 50% of their body length in the “far” zone (Fig 3A) were categorized as being “away” from the stimulus, whereas fish in either remaining zone were defined as being “nearby”. We contrasted the speed ratio in the three stimulation bouts pre-stimulus-change (only the first 5 seconds of stimulation are used, as in Fig 3D) to the swimming speed in the first seconds of post-chirp-change stimulation. Our data confirm that dishabituation is observable only if the fish is not in close proximity to the stimulation electrode (Fig 4A, statistics in figure legend).
Position in the tank also reveals changes in behavioral responsiveness of the fish if the fish remains close to the stimulus source when actively engaged by the stimulus and less so when the behavioral response habituates. A measurement of distance in a small tank between a long fish and a stimulus source that is, not one, but two points is hard to define. To quantify position in a way that is not subject to the choice of two points defining stimulus and fish locations, we categorized the position based on zones (see Fig 3A, SI). Although we repeated our analysis with other ways of quantifying distance (e.g. nose to middle of dipole distance) with qualitatively similar results. The overall fish position distribution did not change as a result of habituation (Fig S3). When habituated the fish often remained still on one of the sides of the tank (near or far from the electrodes) leading to a broad distribution of positions. By again selecting the first 5 seconds of each stimulus and categorizing the trials based on position just prior to the novel stimulus we can see a change in the position of the fish for stimuli on high frequency beats (Fig 4B). This is consistent with the scenario that leads to the results in Figure 4A: in the first few seconds of a new high frequency beat stimulus, if the fish is far from the electrode it swims towards the electrode and passes over it several times presumably to investigate the source of the new stimulus, indicating that it has perceived the chirps as two distinct stimuli.
DISCUSSION
An ideal coding system balances reliable detection of a signal with minimal error and effective discrimination between closely related stimuli to perform efficiently during behavioral tasks (34). However, balancing these goals may drive a tradeoff between efficient detection of a signal and detailed discrimination between two similar signals (13, 35, 36). In A. leptorhynchus we argue that two separate coding strategies developed as a way to maximize both efficient categorical perception as well as discrimination of detailed information about chirp structure dependent on which need is most behaviorally relevant in a given context.
Neural coding is matched to context dependent signal structure
Small chirps occurring on low frequency beats cause large shifts in the background beat, but vary dramatically in the shape of the electrical image dependent on which phase of the beat they occur on. This phase variance masks properties of small chirps such as duration and frequency rise. Emitting fish do not actively control which phase of the beat they chirp on (24). Likewise, a given small chirp presented at different phases is encoded in an invariant manner in the midbrain and elicits invariant behavioral responses in the receiving fish (37). The lack of phase control in chirp behavior, and invariance of response in the physiology demonstrates that phase is most likely not relevant to either the emitting or receiving fish and actively hinders the ability to discriminate chirps.
The transient disruptions caused by a small chirp on the slow ongoing background frequency cause a brief synchronization in the firing or quiescence of the electroreceptor afferents (29, 38). Likewise, ON-cells respond with a stereotyped burst of action potentials when presented with small chirps at the beat trough, and OFF-cells respond when the chirp occurs at the beat peak (23). The brief durations of small chirps in conjunction with the long cycles of slow frequency beats hinder discrimination based on chirp duration and frequency rise. Our data confirm the results of Marsat and Maler (21) and Marsat et al. (23) demonstrating that responses to small chirps on low frequency beats cannot be discriminated from one another by a biologically realistic decoding mechanism (39).
At higher beat frequencies both big and small chirps span more than one beat cycle, reducing the effect of phase on the electrical image the fish receives. This change in the signal structure may allow the animal to encode details about chirp duration and frequency more accurately. At these beats electroreceptor afferents phase lock more synchronously, and all chirps disrupt that synchrony (25, 29). Desynchronization in afferent firing may give rise to the observed ON-cell inhibition and variable increase in OFF-cell firing that occurs in response to both chirp types on high frequency beats. This graded OFF-cell response provides sufficient information for an ideal observer to accurately discriminate between big chirps (21). Here, we demonstrate that this coding strategy is not specific to big chirps, but is also incited by small chirps. The change in chirp structure and as a result the change in coding is a product of the social context (beat frequency) rather than due to the properties of the chirp itself.
Perceptual ability corresponds to coding strategy
The structure of a communication signal limits coding, but the behavioral relevance of the signal may also play a role in how a signal is processed. We argue that the type of neural codes used in each situation should be matched to the structure of the signal and the perceptual task being performed. Changing behavioral states, noise present in an environment, and social context may all influence the needs of the organism, and thus how a signal is best encoded. In diverse sensory systems including vision, audition, and touch there are demonstrable links between the coding of a stimulus and the animal’s sensory acuity(7, 40–42). Our behavioral results show not only the differential coding of chirps but systemically correlates that code to different behavioral outcomes. Only chirps presented on high frequency beats produced a dishabituation response indicative of chirp discrimination, while small chirps on low frequency beats induced no behavioral changes. We cannot exclude the possibility that fish perceived a difference in small chirps on low frequency beats but did not react; however, it does not affect the strength of our conclusion. The fact that the behavioral response is determined by the presence or absence of the chirp -not by its detailed characteristics-demonstrates that the behavior is guided by chirp detection. Whether the information to discriminate is present at one point in the nervous system is irrelevant, as this information does not influence behavior.
These results closely match the observed neural coding patterns. The match between signal structure, neural code and behavioral performance could be interpreted as one of these aspects (e.g. signal structure) causing the other to be shaped accordingly. Instead, we put forth that our results argue for the specialization of the sensory system for specific perceptual tasks, either detection or discrimination.
Specialization of coding for separate tasks
In A. leptorhynchus beat frequency establishes the social context of conspecific interaction and may function as a filter, priming the ELL for efficient, task-dependent signal processing. Different sub-populations of cells best encode the signals to be detected versus the signals to be discriminated (ON-cells vs. OFF-cells respectively; (21, 23)). However, these studies and our current results also demonstrate that both subpopulations’ responses allow detection and discrimination. Therefore, the difference in processing is not mainly a difference in the subpopulation that carries out the task, but rather a difference in response pattern and stimulus shape. In other words, the neural coding strategy changes as a function of the stimulus. Ollerenshaw et al. (13) demonstrated in the rodent vibrissae system that adaptation changes the neural code from one primed for detection to one better able to discriminate, a change mirrored in behavioral performance. In this case, changes in coding are not implemented by adaptation but are a consequence of the fixed properties of the network such as feedforward frequency tuning (25) and feedback (16). As indicated by our results and studies of coding strategies in diverse sensory systems (Visual (43, 44); insect auditory (45, 46)), adaptive changes in coding specialized for detection and discrimination tasks (47) might be a wide-spread phenomenon that allows efficient coding in a constantly changing environment.
Burst firing is a particularly robust method of encoding sensory information (14). This feature detection scheme is especially useful when encoding transient, but important communication signals (23) or small prey items (48). In this light, the stereotyped burst response produced by small chirps on low frequency beats may reflect their ethological significance to the animal. On low frequency beats, indicative of same sex interactions between closely sized animals, small chirps are most commonly produced during agonistic encounters, and are often used for establishing territorial dominance (20, 22). Behavioral studies indicate that chirp timing is a key determinant of the interaction they mediate (49). Presumably, the chirp emission pattern rather than the detailed structure of each chirp carries the information to guide behavioral responses. Detailed discrimination of these chirps may be sacrificed for reliability in detection. The need for an efficient detection code might not be obvious in a laboratory setting when two fish engage in close-range aggression but this task is artificially easy compared to natural interactions. Root masses and other obstructions, distance and eavesdropping scenarios, the presence of multiple conspecifics, movement of various nearby signals, healthiness of the sensory surface (the skin) and various other factors can make the chirp-detection task harder. In these settings it may be beneficial to have a readily detectable signal that indicates conspecific presence efficiently, rather than the more intense bouts of courtship chirping.
Burst structure is stereotyped and in large part dictated by the burst mechanism. While some stimulus features may be extracted from bursts (50) they are limited in the amount of information they can encode in their structure due to that stereotyped structure. Discrimination tasks therefore benefit from an alternate form of coding. High entropy population responses with graded heterogeneous responses are well suited for that purpose since they accomplish signal whitening (21) and thus maximize channel capacity (51, 52). The heterogeneous responses of the population may sacrifice the reliability of burst coding for the detailed coding of chirp features. As beats greater than 100 Hz are generally indicative of male-female interactions, chirps produced in this context are more likely to be courtship-related than agonistic (19, 22). For such interactions, it is possible that the need to assess mate fitness or establish individual identity becomes more valuable than reliable detection. Switching from a burst code to a graded one may enhance the ability to differentiate between subtly different chirps.
METHODS
See SI for full methods
Neurophysiology:
All methods were approved by WVU IAUCUC (Protocol 1512000009). Surgical methods are based on those described in Marsat, Proville, and Maler (23) and Marsat and Maler (21). Fish of both sexes were used. In vivo recordings were made via extracellular electrodes (Frank & Becker, 1964). Pyramidal cells of the lateral segment of the ELL were targeted and identified by location in relation to major surface blood vessels, depth from the surface of the brain, as well as neural response properties (53, 54).
Stimulation during neurophysiology
All stimuli were sampled at 20 kHz and created using MATLAB. Stimulus strength was adjusted to provide ~20% contrast as measured close to the fish’s skin.
Chirp stimuli consisted of a Gaussian frequency modulation of the background beat presented once per second on either a 10 or 120 Hz beat. The frequency and duration of chirps were chosen to mimic a range of natural signals (55). Details about chirp properties can be found in SI methods.
Neural data analysis
Analysis of discrimination is based on Marsat and Maler (21) and modifications to methods originally described by van Rossum (56). This method quantifies how similar or dissimilar spiking patterns are using firing rate and spike timing. Jackknife resampling was used to calculate the standard errors displayed in Figures 1 and 2.
Behavioral paradigm
Recordings were acquired from 250 trials using fish of both sexes. Stimuli were played via a pair of submerged electrodes located in one quadrant of the tank (Fig 4A) at a strength replicating the average fish’s electric field. Fish were played one of three chirp stimuli matched those used in the neurophysiology experiment. These chirps were played at a rate of twice per second for one minute, followed by a two-minute break. This stimulation pattern was repeated for 90 minutes. After 90 minutes a chirp of the same category (either small or big) but with a different frequency increase and duration was played on the same beat frequency (Fig 3B).
Behavioral Analysis
The video files were analyzed in MATLAB. For each 1-minute stimulus bout, the distribution of swimming speeds was calculated (Fig 3C) based on the distance moved between each video frames and the resulting data were used as described in the Results section.
Acknowledgments
Funding was provided by West Virginia University and the National Science foundation grant IOS-1557846. The authors would like to thank Dr. Len Maler for his assistance and resources for a pilot study related to this study and Drs Andrew Dacks and G. Troy Smith for helpful comments on the manuscript.