Understanding how the brain processes sensory information is often complicated by the fact that neurons exhibit trial-to-trial variability in their responses to stimuli. Indeed, the role of variability in sensory coding is still highly debated. Here, we examined how variability influences neural responses to naturalistic stimuli consisting of a fast time-varying waveform (i.e., carrier or first order) whose amplitude (i.e., envelope or second order) varies more slowly. Recordings were made from fish electrosensory and monkey vestibular sensory neurons. In both systems, we show that correlated but not single-neuron activity can provide detailed information about second-order stimulus features. Using a simple mathematical model, we made the strong prediction that such correlation-based coding of envelopes requires neural variability. Strikingly, the performance of correlated activity at predicting the envelope was similarly optimally tuned to a nonzero level of variability in both systems, thereby confirming this prediction. Finally, we show that second-order sensory information can only be decoded if one takes into account joint statistics when combining neural activities. Our results thus show that correlated but not single-neural activity can transmit information about the envelope, that such transmission requires neural variability, and that this information can be decoded. We suggest that envelope coding by correlated activity is a general feature of sensory processing that will be found across species and systems. correlation | envelope | electrosensory | vestibular | neural coding A lthough correlated activity and neural variability are both observed ubiquitously in the brain, their functional roles have been the focus of much debate (1, 2). Indeed, the conventional wisdom that both are detrimental to coding by introducing redundancy and noise, respectively, has been recently challenged (3, 4). Here, we investigated the effects of variability on the coding by correlated activity of naturalistic sensory stimuli that often have rich spatiotemporal structure characterized by firstand second-order attributes. Specifically, we considered how neural populations within the electrosensory system of weakly electric fish and the vestibular system of monkeys respond to stimuli consisting of a fast time-varying carrier waveform (i.e., first-order attribute) whose amplitude or envelope (i.e., secondorder attribute) varies independently on a longer timescale. Envelopes are critical for perception (5, 6), yet their neural encoding continues to pose a challenge to investigators because they are nonlinearly related to the stimulus waveform (7). Previous studies have shown that single neurons can transmit envelope information through changes in firing rate (8, 9) when the relationship between the stimulus input and the output firing rate is nonlinear. In contrast, here, we focused on neuronal responses that were linearly related to the stimulus waveform.Weakly electric fish generate an electric field around their body throug...