function luatexbase.reset_{c}allback(name, make_{f}alse)for_{,}vinpairs(luatexbase.callback_{d}escriptions(name))doluatexbase.remove_{f}rom_{c}allback(name, v)endifmake_{f}alse == truethenluatexbase.disable_{c}allback(name)endendluatexbase.base_{a}dd_{t}o_{c}allback = luatexbase.add_{t}o_{c}allbackfunctionluatexbase.add_{t}o_{c}allback(name, fun, description, priority)localpriority = priorityifpriority == nilthenpriority = #luatexbase.callback_{d}escriptions(name)+ 1endif(luatexbase.callbacktypes[name] == 3andpriority == 1and#luatexbase.callback_{d}escriptions(name) == 1)thenluatexbase.module_{w}arning(”luatexbase”, ”resettingexclusivecallback : ”..name)luatexbase.reset_{c}allback(name)endlocalsaved_{c}allback = , ff, ddfork, vinpairs(luatexbase.callback_{d}escriptions(name))doifk >= prioritythenff, dd = luatexbase.remove_{f}rom_{c}allback(name, v)saved_{c}allback[k] = ff, ddendendluatexbase.base_{a}dd_{t}o_{c}allback(name, fun, description)fork, vinpairs(saved_{c}allback)doluatexbase.base_{a}dd_{t}o_{c}allback(name, v[1], v[2])endreturnendluatexbase.catcodetables = setmetatable([′latex − package′] = 0, ini = 0, string = 0, other = 0, latex = 0, expl = 0, expl3 = 0,_{_{i}ndex=function(t,key)returnluatexbase.registernumber(key)ornilend})functionluatexbase.priority_{i}n_{c}allback(name, description)fori, vinipairs(luatexbase.callback_{d}escriptions(name))doifv == descriptionthenreturniendendreturnfalseendluatexbase.is_{a}ctive_{c}allback = luatexbase.in_{c}allbackluatexbase.base_{p}rovides_{m}odule = luatexbase.provides_{m}odulefunctionluatexbase.errwarinf(name)returnfunction(s, ...)returnluatexbase.module_{e}rror(name, s : format(...))end, function(s, ...)returnluatexbase.module_{w}arning(name, s : format(...))end, function(s, ...)returnluatexbase.module_{i}nfo(name, s : format(...))end, function(s, ...)returnluatexbase.module_{i}nfo(name, s : format(...))endendfunctionluatexbase.provides_{m}odule(info)luatexbase.base_{p}rovides_{m}odule(info)returnluatexbase.errwarinf(info.name)endlocalcopynode = node.copylocalnewnode = node.newlocalnodesubtype = node.subtypelocalnodetype = node.idlocalstringformat = string.formatlocaltableunpack = unpackortable.unpacklocaltexiowrite_{n}l = texio.write_{n}llocaltexiowrite = texio.writelocalwhatsit_{t} = nodetype”whatsit”localuser_{d}efined_{t} = nodesubtype”user_{d}efined”localunassociated = ”_{_{u}nassociated”localuser_{w}hatsits=_{unassociated=}localwhatsit_{i}ds=localanonymous_{w}hatsits=0localanonymous_{p}refix=”anon”localnew_{u}ser_{w}hatsit_{i}d=function(name,package)ifnamethenifnotpackagethenpackage=unassociatedendelseanonymous_{w}hatsits=anonymous_{w}hatsits+1warning(”defininganonymoususerwhatsitno.%d”,anonymous_{w}hatsits)package=unassociatedname=anonymous_{p}refix..tostring(anonymous_{w}hatsits)end}

local whatsitdata = user_{w}hatsits[package]ifnotwhatsitdatathenwhatsitdata = user_{w}hatsits[package] = whatsitdataend

local id = whatsitdata[name] if id then warning(”replacing whatsit %s:%s (%d)”, package, name, id) else id=luatexbase.new_{w}hatsit(name)whatsitdata[name] = idwhatsit_{i}ds[id] = name, packageendreturnidendluatexbase.new_{u}ser_{w}hatsit_{i}d = new_{u}ser_{w}hatsit_{i}dlocalnew_{u}ser_{w}hatsit = function(req, package)localid, whatsitiftype(req) == ”string”thenid = new_{u}ser_{w}hatsit_{i}d(req, package)whatsit = newnode(whatsit_{t}, user_{d}efined_{t})whatsit.user_{i}d = idelseifreq.id == whatsit_{t}andreq.subtype == user_{d}efined_{t}thenid = req.user_{i}dwhatsit = copynode(req)ifnotwhatsit_{i}ds[id]thenwarning(”whatsitid%dunregistered; ”..”inconsistenciesmayarise”, id)endendreturnfunction()returncopynode(whatsit)end, idendluatexbase.new_{u}ser_{w}hatsit = new_{u}ser_{w}hatsitlocalget_{u}ser_{w}hatsit_{i}d = function(name, package)ifnotpackagethenpackage = unassociatedendreturnuser_{w}hatsits[package][name]endluatexbase.get_{u}ser_{w}hatsit_{i}d = get_{u}ser_{w}hatsit_{i}dlocalget_{u}ser_{w}hatsit_{n}ame = function(asked)localidiftype(asked) == ”number”thenid = askedelseiftype(asked) == ”function”thenlocaln = asked()id = n.user_{i}delseid = asked.user_{i}dendlocalmetadata = whatsit_{i}ds[id]ifnotmetadatathenwarning(”whatsitid%dunregistered; inconsistenciesmayarise”, id)return””, ””endreturntableunpack(metadata)endluatexbase.get_{u}ser_{w}hatsit_{n}ame = get_{u}ser_{w}hatsit_{n}amelocaldump_{r}egistered_{w}hatsits = function(asked_{p}ackage)localwhatsit_{l}ist = ifasked_{p}ackagethenlocalwhatsitdata = user_{w}hatsits[asked_{p}ackage]ifnotwhatsitdatathenerror(”(nouserwhatsitsregisteredforpackage%s)”, asked_{p}ackage)returnendtexiowrite_{n}l(”(userwhatsitallocationstatsfor”..asked_{p}ackage)forname, idinnext, whatsitdatadowhatsit_{l}ist[#whatsit_{l}ist+ 1] = stringformat(”(%s : %s%d)”, asked_{p}ackage, name, id)endelsetexiowrite_{n}l(”(userwhatsitallocationstats”)texiowrite_{n}l(stringformat(”((total%d)\n(anonymous%d))”, current_{w}hatsit, anonymous_{w}hatsits))forpackage, whatsitdatainnext, user_{w}hatsitsdoforname, idinnext, whatsitdatadowhatsit_{l}ist[#whatsit_{l}ist+ 1] = stringformat(”(%s : %s%d)”, package, name, id)endendendtexiowrite_{n}l”(”localfirst = truefori = 1, #whatsit_{l}istdoiffirstthenfirst = falseelsetexiowrite_{n}l””endtexiowrite(whatsit_{l}ist[i])endtexiowrite”))\n”endluatexbase.dump_{r}egistered_{w}hatsits = dump_{r}egistered_{w}hatsitsluatexbase.newattribute = new_{a}ttributeluatexbase.newuserwhatsit = new_{u}ser_{w}hatsitluatexbase.newuserwhatsitid = new_{u}ser_{w}hatsit_{i}dluatexbase.getuserwhatsitid = get_{u}ser_{w}hatsit_{i}dluatexbase.getuserwhatsitname = get_{u}ser_{w}hatsit_{n}ameluatexbase.dumpregisteredwhatsits = dump_{r}egistered_{w}hatsitsrequire(”lualatex − math”)

Weakly nonlinear responses at low intrinsic noise levels in two types of electrosensory primary afferents

Alexandra Barayeu^{1}, Maria Schlungbaum^{2,3}, Benjamin Lindner^{2,3}, Jan Benda^{1, 4} Jan Grewe^{1, †}

1 Institute for Neurobiology, Eberhard Karls Universität Tübingen, Germany 2 Bernstein Center for Computational Neuroscience Berlin, Berlin, Germany 3 Department of Physics, Humboldt University Berlin, Berlin, Germany 4 Bernstein Center for Computational Neuroscience Tübingen, Germany

                      † corresponding author: jan.grewe@uni-tuebingen.de

Keywords: population coding | conduction delay | heterogeneity | electric fish | mutual information

Abstract

Neuronal processing is inherently nonlinear — spiking thresholds or rectification in synapses are central to neuronal computations. Nevertheless, linear response theory has been instrumental to understand, for example, the impact of noise or syncrhonous spikes on signal transmission, or the emergence of oscillatory activity. At higher signal-to-noise ratios, however, the third term in the Volterra series becomes relevant. This second-order susceptibility captures nonlinear interactions between pairs of stimulus frequencies. Theoretical results for leaky integrate-and-fire neurons suggest strong responses at the sum of two input frequencies only when these frequencies or their sum match the neuron’s baseline firing rate. We here analyse second-order susceptibilities in two types of primary electroreceptor afferents, P-units of the active and ampullary cells of the passive electrosensory system of the wave-type electric fish Apteronotus leptorhynchus. In our combined experimental and modelling approach we find the predicted weakly nonlinear responses in some P-units with very low baseline interspike-interval variability and much stronger in all ampullary cells, that are less noisy than P-units. Such nonlinear responses boost responses to weak sinusoidal stimuli and are therefore of immediate relevance for wave-type electric fish that are exposed to superpositions of many frequencies in social contexts.

Introduction

Nonlinear processes are key to neuronal information processing. Decision making is a fundamentally nonlinear process on the systemic level. On the cellular level, spiking neurons are inherently nonlinear: whether an action potential is elicited depends on the membrane potential to exceed a threshold (??). Because of such nonlinearities, understanding and predicting neuronal responses to sensory stimuli is in general a difficult task.

At the heart of nonlinear system identification is the Volterra series (?). Second-order kernels have been used to predict firing rate responses of catfish retinal ganglion cells (?). In the frequency domain second-order kernels are known as second-order response functions or susceptibilities. They quantify the amplitude of the response at the sum and difference of two stimulus frequencies. Adding also third-order kernels, spike trains of a spider mechanorecptors have beend predicted from sensory stimuli (?). The nonlinear nature of Y cells in contrast to the more linear responses of X cells in cat retinal ganglion cells has been demonstrated by means of second-order kernels (?). Interactions between different frequencies in the response of neurons in visual cortices of cats and monkeys have been studied using bispectra, the crucial constituent of the second-order susceptibliity (?). Locking of chinchilla auditory nerve fibres to pure tone stimuli is captured by second-order kernels (?). In paddlefish ampullary afferents, bursting in response to strong, natural sensory stimuli boost nonlinear responses in the bicoherence, the bispectrum normalized by stimulus and response spectra (?).

Noise linearizes nonlinear systems (?Chialvo et al., 1997) and therefore noisy neural systems can be well described by linear response theory in the limit of small stimulus amplitudes (Roddey et al., 2000; ?; ?; ?; ?). When increasing stimulus amplitude, at first the contribution of the second-order kernel of the Volterra series becomes relevant in addition to the linear one. For these weakly nonlinear responses of leaky-integrate-and fire (LIF) neurons an analytical expression for the second-order susceptibility has been derived (Voronenko and Lindner, 2017) in addition to its linear response function (?). In the superthreshold regime, where the LIF generates a baseline firing rate in the absense of an external stimulus, the linear response function has a peak at the baseline firing rate and its harmonics (fig. 1 A) and the second-order susceptibility shows very distinct ridges of elevated nonlinear responses, exactly where two stimulus frequencies equal or add up to the neuron’s baseline firing rate (fig. 1 B). In experimental data such structures in the second-order susceptibility have not been reported yet.

Here we study weakly nonlinear repsonses in two electrosensory systems in the wave-type electric fish Apteronotus leptorhynchus. These fish generate a quasi-sinusoidal dipolar electric field (electric organ discharge, EOD). In communication contexts (Walz et al., 2014; Henninger et al., 2018) the EODs of close-by fish superimpose and lead to amplitude modulations (AMs), called beats (two-fish interaction), and modulations of beats, called envelopes (multiple-fish interaction) (?Fotowat et al., 2013). Therefore, stimuli with multiple distinct frequencies are part of the everyday life of wave-type electric fish (Benda, 2020) and interactions of these frequencies in the electrosensory periphery are to be expected. P-type electroreceptor afferents of the tuberous electrosensory system, the P-units, use nonlinearities to extract and encode these AMs in their time-dependent firing rates (Bastian, 1981; Walz et al., 2014; Middleton et al., 2006; Stamper et al., 2012; Savard et al., 2011; Barayeu et al., 2023). P-units are heterogeneous in their baseline firing rates as well as in their intrinsic noise levels, as quantified by the coefficient of variation (CV) of the interspike intervals (ISI) (Grewe et al., 2017; Hladnik and Grewe, 2023). Low-CV P-units have a less noisy firing pattern that is closer to pacemaker firing, whereas high-CV P-units show a more irregular firing pattern that is closer to a Poisson process. On the other hand, ampullary cells of the passive electrosensory system are homogeneous in ther response properties and have very low CVs (Grewe et al., 2017).

Field observations have shown that courting males were able to react to distant intruder males despite the strong EOD of the nearby female (Henninger et al., 2018). Weakly nonlinear responses are of direct relevance in this setting since they could boost responses to the faint signal of the distant intruder and thus improve detection (?).

[JB: in Voronenko they talk about second-order response functions and not of susceptibilities][SR: Ja das ist wahr, aber so wie ich das verstehe sind das synonyme, oder etwa nicht?]

Results

Theoretical work on leaky integrate-and-fire and conductance-based models suggests a distinct structure of the second-order response function for neurons with low levels of intrinsic noise driven in the super-threshold regime with low stimulus amplitudes (fig. 1, Voronenko and Lindner, 2017). Here, we re-analyze a large set of recordings of P-units and ampullary cells of the active and passive electrosensory systems of the brown ghost knifefish Apteronotus leptorhynchus together with simulations of LIF-based models of P-unit spiking in order to search for such weakly nonlinear responses in real neurons. We start out with a few example P-units to demonstrate the basic concepts.

Nonlinear responses in P-units stimulated with two beat frequencies

Without any external stimulation, a P-unit fires action potentials at a spontaneous baseline rate f_{base} to the fish’s own EOD of frequency f_{EOD}. Accordingly, a peak at f_{base} is present in the power spectrum of this baseline activity (fig. 2 A). Superposition of the receiver’s EOD with an EOD of another fish with frequency f_{1} results in a beat, a periodic amplitude modulation of the receiver’s EOD. The frequency of the beat is given by the difference frequency Δf_{1} = f_{1} − f_{EOD} between the two fish. P-units encode this beat in their firing rate (Bastian, 1981; Barayeu et al., 2023) and consequently a peak at this beat frequency appears the the power spectrum of the response (fig. 2 B). A second peak at the first harmonic indicates a nonlinear response that here is easily identified by the clipping of the P-unit’s firing rate at zero. Pairing the fish with another fish with a higher beat frequency Δf_{2} = f_{2} − f_{EOD} results in a weaker response with a single peak in the response power spectrum (fig. 2 C). Note that Δf_{2} has been choosen to match the P-unit’s baseline firing rate.

When stimulating the fish with both frequencies, additional peaks appear in the response power spectrum at the sum |Δf_{1}|+|Δf_{2}| and the difference frequency ||Δf_{1}|−|Δf_{2}|| (fig. 2 D). Thus, the response is not equal to sum of the responses to the two beats presented separately. These peaks at the sum and the difference of the two stimulus frequencies are a hallmark of nonlinear interactions that by definition are absent in linear systems.

For this example we have chosen two specific stimulus (beat) frequencies. However, for a full characterization of nonlinear repsonses we would need to measure the response of the P-units to many different combinations of stimulus frequencies. In addition, the beat stimuli in the example were strong and partially revealed saturating nonlinearities of the P-units. For weakly nonlinear responses we need to use stimuli of much lower amplitudes.

Nonlinear signal transmission in low-CV P-units

Weakly nonlinear responses are expected in cells with sufficiently low intrinsic noise levels, i.e. low baseline CVs (Voronenko and Lindner, 2017). P-units fire action potentials probabilistically phase-locked to the self-generated EOD (Bastian, 1981). Skipping of EOD cycles leads to the characteristic multimodal ISI distribution with maxima at integer multiples of the EOD period (fig. 4 A). In this example the baseline ISI distribution has a CV_{base} of 0.2, which is at the lower end of the P-unit population (Hladnik and Grewe, 2023). Spectral analysis of the baseline activity shows two major peaks: the first is located at the baseline firing rate f_{base}, the second is located at the discharge frequency f_{EOD} of the electric organ and is flanked by two smaller peaks at f_{EOD} ± f_{base} (fig. 4 B).

Noise stimuli, here random amplitude modulations (RAM) of the EOD (fig. 4 C, top trace, red line), are commonly used to characterize stimulus driven responses of sensory neurons by means of transfer functions (first-order susceptibility), spike-triggered averages, or stimulus-response coherences. Here, we additionally estimate the second-order susceptibility to quantify nonlinear encoding. P-unit spikes align more or less clearly to fluctuations in the RAM stimulus. A higher stimulus intensity, here a higher contrast of the RAM relative to the EOD amplitude (see methods), entrains the P-unit response more clearly (light and dark purple for low and high contrast stimuli, fig. 4 C). Linear encoding, quantified by the transfer function Eq (7), is similar for the two RAM contrasts in this low-CV P-unit (fig. 4 D), as expected for a linear system. The first-order susceptibility is low for low frequencies, peaks in the range below 100 Hz and then falls off again [JB: Cite Moe paper?].

The second-order susceptibility, Eq (9), quantifies amplitude and phase of the stimulus-evoked response at the sum f_{1} + f_{2} for each combination of two stimulus frequencies f_{1} and f_{2}. Large values of the second-order susceptibility indicate stimulus-evoked peaks in the response spectrum at the summed frequency that cannot be explained by linear response theory. Similar to the first-order susceptibility, the second-order susceptibility can be estimated directly from the response evoked by a RAM stimulus that simulates the neuron with a whole range of frequencies simultaneously (figs. 4 E, F). For a LIF driven in the super-threshold regime, theory predicts nonlinear interactions between the two stimulus frequencies, when the two frequencies f_{1} and f_{2} or their sum f_{1} + f_{2} excatly match the neuron’s baseline firing rate f_{base} (Voronenko and Lindner, 2017). Only then, additional stimulus-evoked peaks appear in the spectrum of the spiking response that would show up in the second-order susceptibility as a horizontal, a vertical, and an anti-diagonal line (fig. 1 B, pink triangle in figs. 4 E, F).

For the low-CV P-unit we observe a band of slightly elevated second-order susceptibility for the low RAM contrast at f_{1} + f_{2} = f_{base} (yellowish anti-diagonal between pink edges, fig. 4 E). This structure vanishes for the stronger stimulus (fig. 4 F). Further, the overall level of the second-order susceptibility is reduced with increasing stimulus strength. To quantify the structural changes in the susceptibility matrices we projected susceptibility values onto the diagonal by taking the mean over all anti-diagonals (fig. 4 G). For the low RAM contrast this projected second-order susceptibility indeed has a small peak at f_{base} (fig. 4 G, dot on top line). For the higher RAM contrast, however, this peak vanishes and the overall level of the second-order susceptibility is reduced (fig. 4 G). The reason behind this reduction is that a RAM with a higher contrast is not only a stimulus with an increased amplitude, but also increases the total noise in the system. Increased noise is known to linearize signal transmission (Longtin, 1993; Chialvo et al., 1997; Roddey et al., 2000; Voronenko and Lindner, 2017) and thus the second-order susceptibility is expected to decrease.

In contrast, a high-CV P-unit (CV_{base} = 0.4) does not exhibit pronounced nonlinearities even at low stimulus contrasts (fig. 11).

Ampullary afferents exhibit strong nonlinear interactions

Irrespective of the CV, neither of the two example P-units shows the complete expected structure of nonlinear interactions. Electric fish posses an additional electrosensory system, the passive or ampullary electrosensory system, that responds to low-frequency exogeneous electric stimuli. The population of ampullary afferents is much less heterogeneous, and known for the much lower CVs of their baseline ISIs (CV_{base} = 0.06–0.22) (Grewe et al., 2017). Ampullary cells do not phase-lock to the EOD and the ISIs are unimodally distributed (fig. 5 A). As a consequence of the high regularity of their baseline spiking activity, the corresponding power spectrum shows distinct peaks at the baseline firing rate f_{base} and harmonics of it. Since the cells do not fire phase locked to the EOD, there is no peak at f_{EOD} (fig. 5 B). When driven by a low-contrast noise stimulus (note: this is not an AM but a stimulus that is added to the self-generated EOD, fig. 5 C), ampullary cells exhibit very pronounced bands in the second-order susceptibility, where f_{1} + f_{2} is equal to f_{base} or its harmonic (yellow diagonals in fig. 5 E), implying strong nonlinear response components at these frequency combinations (fig. 5 G, top). With higher stimulus contrasts these bands disappear (fig. 5 F), the projection onto the diagonal looses its distinct peak at f_{1} + f_{2} and its overal level is reduced (fig. 5 G, bottom).

Model-based estimation of the nonlinear structure

In the example recordings shown above (figs. 4 and 5), we only observe nonlinear responses on the antidiagnal of the second-order susceptibility, where the sum of the two stimulus frequencies matches the neuron’s baseline firing rate, which is in line with theoretical expectations (Voronenko and Lindner, 2017). However, a pronounced nonlinear response at frequencies f_{1} = f_{base} or f_{2} = f_{base}, although predicted by theory, cannot be observed. Here we investigate how these discrepancies can be understood.

One reason could be simply too little data for a good estimate of the second-order susceptibility. Electrophysiological recordings are limited in time, and therefore responses to only a limited number of trials, i.e. repetitions of the same RAM stimulus, are available. As a consequence, the cross-spectra, Eq (8), are insufficiently averaged and the full structure of the second-order susceptibility might be hidden in finite-data noise. This experimental limitation can be overcome by using a computational model for the P-unit, a stochastic leaky integrate-and-fire model with adaptation current and dendritic preprocessing, and parameters fitted to the experimentally recorded P-unit (fig. 10) (Barayeu et al., 2023). The model faithfully reproduces the second-order susceptibility of a low-CV cell estimated from the same low number of trials as in the experiment (N = 11, compare A and B_{ii} in fig. 6).

In simulations of the model we can increase the number of trials beyond what would be experimentally possible, here to one million (fig. 6 B_{iii}). The estimate of the second-order susceptibility indeed improves. It gets less noisy and the diagonal at f_{1} + f_{2} is emphasized. However, the expected vertical and horizontal lines at f_{1} = f_{base} and f_{2} = f_{base} are still missing.

Using a broadband stimulus increases the effective input-noise level and this may linearize signal transmission and suppress potential nonlinear responses (Longtin, 1993; Chialvo et al., 1997; Roddey et al., 2000; Voronenko and Lindner, 2017). Assuming that the intrinsic noise level in this P-unit is small enough, the full expected structure of the second-order susceptibility should appear in the limit of weak AMs. Again, this cannot be done experimentally, because the problem of insufficient averaging becomes even more severe for weak AMs (low contrast). In the model, however, we know the time course of the intrinsic noise and can use this knowledge to determine the susceptibilities by input-output correlations via the Furutsu-Novikov theorem (Furutsu, 1963; Novikov, 1965). This theorem, in its simplest form, states that the cross-spectrum S_{xη}(ω) of a Gaussian noise η(t) driving a nonlinear system and the system’s output x(t) is proportional to the linear susceptibility according to S_{xη}(ω) = χ(ω)S_{ηη}(ω). Here χ(ω) characterizes the linear response to an infinitely weak signal s(t) in the presence of the background noise η(t). Likewise, the nonlinear susceptibility can be determined in an analogous fashion from higher-order input-output cross-spectra (see methods, equations (8) and (9)) (Egerland, 2021). In line with an alternative derivation of the Furutsu-Novikov theorem (Lindner, 2022), we can split the total noise and consider a fraction of it as stimulus. This allows to calculate the susceptibility from the cross-spectrum between the output and this stimulus fraction of the noise. Adapting this approach to our P-unit model (see methods), we replace the intrinsic noise by an approximately equivalent RAM stimulus s_{ξ}(t) and a weak remaining intrinsic noise \sqrt{2D c_{noise}} · ξ(t) with c_{noise} = 0.1 (see methods, equations (19), (21), (20), fig. 6 C_{i}). We tune the amplitude of the RAM stimulus s_{ξ}(t) such that the output firing rate and variability (CV) are the same as in the baseline activity (i.e. full intrinsic noise \sqrt{2D}ξ(t) in the voltage equation but no RAM) and compute the cross-spectra between the RAM part of the noise s_{ξ}(t) and the output spike train. This procedure has two consequences: (i) by means of the cross-spectrum between the output and s_{ξ}(t), which is a large fraction of the noise, the signal-to-noise ratio of the measured susceptibilities is drastically improved; (ii) the total noise in the system has been reduced (by what was before the external RAM stimulus s(t)), which makes the system more nonlinear. For both reasons we now see the expected nonlinear features in the second-order susceptibility for a sufficient number of trials (fig. 6 C_{iii}), but not for a number of trials comparable to the experiment (fig. 6 C_{ii}). In addition to the strong response for f_{1} + f_{2} = f_{base}, we now also observe pronounced nonlinear responses at f_{1} = f_{base} and f_{2} = f_{base} (vertical and horizontal lines, fig. 6 C_{iii}).

Note, that the increased number of trials goes along with a substantial reduction of second-order susceptibility values (fig. 6 C_{iii}), that saturate in its peak values for N > 10^{5} (fig. 12). This demonstrates the limited reliability of an estimate of the second-order susceptibility that is based on 11 trials only. However, we would like to point out that already the limited number of trials as used in the experiments reveals key features of the nonlinear response.

With high levels of intrinsic noise, we would not expect the nonlinear response features to survive. Indeed, we do not find these features in a high-CV P-unit and its corresponding model (not shown).

Second-order susceptibility can explain nonlinear peaks in pure sinewave stimulation

We estimated the second-order susceptibility of P-unit responses using RAM stimuli. In particular, we found pronounced nonlinear responses in the limit of weak stimulus amplitudes. How do these findings relate to the situation of two pure sinewave stimuli with finite amplitudes that approximates the interference of EODs of real animals? For the P-units the relevant signals are the beat frequencies Δf_{1} and Δf_{2} that arise from the interference of either of the two foreign EODs with the receiving fish’s own EOD (fig. 2). In the introductory example, the response power spectrum showed peaks from nonlinear interactions at the sum of the two beat frequencies (orange marker, fig. 2 D) and at the difference between the two beat frequencies (red marker, fig. 2 D). In this example, Δf_{2} was similar to f_{base}, corresponding to the horizontal line of the second-order susceptibility estimated for a vanishing external RAM stimulus (fig. 6 C_{iii}). In the three-fish example, there was a second nonlinearity at the difference between the two beat frequencies (red dot, fig. 2 D), that is not covered by the so-far shown part of the second-order susceptibility (fig. 6 C_{iii}), in which only the response at the sum of the two stimulus frequencies is addressed.

However, the second-order susceptibility Eq (9) is a spectral measure that is based on Fourier transforms and thus is also defined for negative stimulus frequencies. The full |χ_{2}|(f_{1}, f_{2}) matrix is symmetric with respect to the origin. In the upper-right and lower-left quadrants of |χ_{2}|(f_{1}, f_{2}), stimulus-evoked responses at f_{1} + f_{2} are shown, whereas in the lower-right and upper-left quadrants nonlinear responses at the difference |f_{1} −f_{2}| are shown (fig. 7). The vertical and horizontal lines at f_{1} = f_{base} and f_{2} = f_{base} are very pronounced in the upper-right quadrant of fig. 7 A for nonlinear responses at f_{1}+f_{2} and extend into the upper-left quadrant (representing |f_{1} − f_{2}|) where they fade out towards more negative f_{1} frequencies. The peak in the response power-spectrum at |f_{1} − f_{2}| evoked by pure sine-wave stimulation (fig. 2 D) is predicted by the horizontal line in the upper-left quadrant (fig. 7 A, (Schlungbaum and Lindner, 2023)). Is it possible based on the second-order susceptibility estimated by means of RAM stimuli (fig. 7 A) to predict nonlinear responses in a three-fish setting? We can test this by stimulating the same model with two beats with weak amplitudes (fig. 7 C–F). If we choose a frequency combination where the sum of the two beat frequencies is equal to the model’s baseline firing rate f_{base}, a peak at the sum of the two beat frequencies appears in the power spectrum of the response (fig. 7 C), as expected from |χ_{2}|. If instead we choose two beat frequencies that differ by f_{base}, a peak is present at the difference frequency (fig. 7 D). If only one beat frequency is equal to f_{base}, both a peak at the sum and at the difference frequency is present in the P-unit response (fig. 7 E). And if none of these conditions are met, neither a peak at the sum nor at the difference of the two beat frequencies appears (fig. 7 F).

Low CVs and weak stimuli are associated with strong nonlinearity

All the statements about nonlinear encoding in p-type and ampullary electroreceptor afferents based on single cell examples shown above are supported by the analysis of our pool of 221 P-units and 47 ampullary afferents recorded in 71 specimen. For a comparison across cells we summarize the structure of the second-order susceptibilities in a single number, the peakedness of the nonlinearity PNL(f_{base}) Eq (10), that characterizes the size of the expected peak of the projections of a |χ_{2}| matrix onto its diagonal at the baseline firing rate (e.g. fig. 4 G). PNL(f_{base}) assumes high values when the peak at f_{base} is pronounced relative to the median of projections onto the diagonal and is small when there is no distinct peak. The PNL(f_{base}) values of the P-unit population depend weakly on the CV of the baseline ISI distribution. Cells with lower baseline CVs tend to have more pronounced peaks in their projections than those that have high baseline CVs (fig. 8 A). This negative correlation is more pronounced against the CV measured during stimulation (fig. 8 C).

The effective stimulus strength also plays an important role. We quantify the effect a stimulus has on a cell’s response by the response modulation — the standard deviation of a cell’s firing rate in response to a RAM stimulus. P-units are heterogeneous in their sensitivity, their response modulations to the same stimulus contrast vary a lot (Grewe et al., 2017). Cells with weak responses to a stimulus, be it an insensitive cell or a weak stimulus, have higher PNL(f_{base}) values and thus a more pronounced ridge in the second-order susceptibility at f_{1} + f_{2} = f_{base} in comparison to strongly responding cells that basically have flat secondorder susceptibilities (fig. 8 E). How pronounced nonlinear response components are in P-units thus depends on the baseline CV (a proxy for the internal noise level), and both the CV and response strength during stimulation (effective output noise).

The population of ampullary cells is generally more homogeneous, with lower baseline CVs than P-units. Accordingly, PNL(f_{base}) values of ampullary cells are indeed much higher than in P-units by about a factor of ten. Ampullary cells also show a negative correlation with baseline CV. Again, sensitive cells with strong response modulations are at the bottom of the distribution and have PNL(f_{base}) values close to one (fig. 8 B, D). The weaker the response modulation, because of less sensitive cells or weaker stimulus amplitudes, the stronger the nonlinear component of a cell’s response (fig. 8 F).

Discussion

[JB: Even though the extraction of the AM itself requires a [JB: nonlinearity] (Middleton et al., 2006; Stamper et al., 2012; Savard et al., 2011; Barayeu et al., 2023) encoding the timecourse of the AM is linear over a wide range of AM amplitudes and frequencies (Xu et al., 1996; Benda et al., 2005; Gussin et al., 2007; Grewe et al., 2017; Savard et al., 2011). In the context of social signalling among three fish we observe an AM of the AM, also referred to as second-order envelope or just social envelope (Middleton et al., 2006; Savard et al., 2011; Stamper et al., 2012). Encoding this again requires nonlinearities (Middleton et al., 2006) and it was shown that a subpopulation of P-units are sensitive to envelopes (Savard et al., 2011) and exhibit nonlinearities e.g. when driven by strong stimuli (Nelson et al., 1997; Chacron et al., 2004).]

[JB: Leftovers from introduction] Phase-locking to the own field also leads to a representation of f_{EOD} in the P-unit firing rate (see fig. 4B) (Sinz et al., 2020).

The appearing difference peak is known as the social envelope (Stamper et al., 2012; Savard et al., 2011). The neuron shown here, clearly encodes the envelope. Whether P-units in general encode envelopes has been subject of controversy, some works do not consider P-units as envelope encoders (Middleton et al., 2006), while others identify some P-units as envelope encoders (Savard et al., 2011).

[JB: Weakly nonlinear responses versus saturation regime]

[JB: Estimating the infinite Volterra series from limited experimental data is usually limited to the first two or three kernels, that then might not be sufficient for a proper prediction of the neuronal response (?). Making assumptions about the nonlinearities in a system reduces the amount of data needed for parameter estimation. In particular, models combining linear filtering with static nonlinearities (?), have been successful in capturing functionally relevant neuronal computations in visual (?) as well as auditory systems (?). On the other hand, linear methods based on backward models for estimating the stimulus from neuronal responses, have been extensively used to quantify information transmission in neural systems (?Borst and Theunissen, 1999; ?; ?), because backward models do not need to generate action potentials (?).]

[JB: Note in the discussion that |χ_{2}| predicts stimulus evoked responses whereas in the power spectrum we see peaks even if they are unrelated to the stimulus. Like the baseline firing rate.]

Theory applies to systems with and without carrier

Theoretical work (Voronenko and Lindner, 2017) explained analytically the occurrence of nonlinear products when a LIF model neuron is stimulated with pure sine-waves. To investigate whether the same mechanisms occur in electroreceptor afferents which are driven by AMs of a carrier and not by pure sine-waves, we followed the previous approach and quantified the second-order susceptibility from responses to white-noise stimuli (Voronenko and Lindner, 2017; Egerland, 2021; Neiman and Russell, 2011; Nikias and Petropulu, 1993). We expected to see elevated second-order susceptibility where either of the foreign signals matches the baseline firing rate (f_{1} = f_{base} or f_{2} = f_{base}) or when the sum equals the baseline firing rate of the neuron (f_{1} + f_{2} = f_{base}) creating a triangular pattern of elevated |χ_{2}| e.g. fig. 6 C_{iii}. Indeed, we find traces of the same nonlinearities in the neuronal responses of p-type electroreceptor afferents. The nonlinear pattern observed in the experimental data, however, matches to the expectations only partially and only in a subset of neurons (figs. 4 and 5). Nevertheless, the theory holds also for systems that are driven by AMs of a carrier and is thus more widely applicable.

Intrinsic noise limits nonlinear responses

Only those P-units that exhibit low coefficients of variation (CV) of the interspike-interval distribution (fig. 4 A) in their unperturbed baseline response show the expected nonlinerities (fig. 8 A). Such low-CV cells are rare among the 221 P-units that we used in this study. The afferents of the passive electrosensory system, the ampullary cells, however have generally lower CVs and show a much clearer nonlinearity pattern than the low-CV P-unit exemplified here (compare figs. 4 and 5). The single ampullary cell featured in fig. 5 is a representative of the majority of ampullary cells analyzed here. All ampullary cells have CVs below 0.4 with a median around 0.12 and the observed PNL(f_{base})s are 10-fold higher than in P-units.

The CV serves as a proxy for the intrinsic noise in the cells. In both cell types, we observe a negative correlation between PNL(f_{base}) and the CV, indicating that it is the level of intrinsic noise that plays a role here. These findings are in line with previous studies that propose that noise linearizes the system (Roddey et al., 2000; Chialvo et al., 1997; Voronenko and Lindner, 2017). More intrinsic noise has been demonstrated to increase the CV and reduce nonlinear phase-locking in vestibular afferents (Schneider et al., 2011). Reduced noise, on the other hand, has been associated with stronger nonlinearity in pyramidal cells of the ELL (Chacron, 2006). Further support for the notion of noise limiting the nonlinearity comes from our P-unit LIF model that faithfully reproduces P-unit activity (Barayeu et al., 2023). We can use this model and apply a noise-split (Lindner, 2022) based on the to the Furutsu-Novikov theorem (Novikov, 1965; Furutsu, 1963), to increase the signal-to-noise ratio in the cell while keeping the overall response variability constant (see methods). Treating 90 % of the total noise as signal and simulating large numbers of trial uncovers the full nonlinear structure (fig. 6) seen in LIF neurons and the analytical derivations when driven with sine-wave stimuli (Voronenko and Lindner, 2017).

Noise stimulation approximates the real three-fish interaction

Our analysis is based on the neuronal responses to white noise stimulus sequences. For the P-units, the stimulus was a random amplitude modulation (RAM) while it was a direct noise stimulus for the ampullary cells. These broad-band stimuli have the advantage that all behaviorally relevant frequencies can be measured with a single stimulus presentation and it is a widely used approach to characterize sensory coding (French and Butz, 1973; Marmarelis et al., 1999; Borst and Theunissen, 1999; Chacron et al., 2005; Grewe et al., 2017). However, these stimuli also increase the total level of noise in the system and may have a linearizing effect on signal transmission. In a our P-unit models, we were able to make use of the Furutsu-Novikov theorem to estimate nonlinear signal transmission for zero-amplitude stimulation. Only with this procedure and many trials, we find for low-CV P-units all the pronounced ridges in the second-order susceptibility that we would expect according to theory (Voronenko and Lindner, 2017).

In the natural situation, the stimuli are periodic signals defined by the difference frequencies. How well can we extrapolate from the white noise analysis to the pure sinewave situation? [JG: Predictions from the X2 matrix and the equations in Voronekov]

In contrast to the situation with individual frequencies (direct sine-waves or sinusoidal AMs) during noise stimulation the total power of the stimulus is equally distributed on all frequencies leading to a weaker signalto-noise ratio. This explains that the nonlinearity pattern in the electroreceptor recordings only partially matches the expectation (figs. 4, 5) while the single-frequency stimulation shows nonlinear interference when the individual stimulus frequencies (f_{1}, f_{2}, Δf_{1}, Δf_{2}) match the baseline firing rate (fig. 2, fig. 7 B–E). With the noise-splitting trick, we could show that in low-CV cells, that have a low-CV and are not subject to strong stimulation, the full nonlinearity pattern is present but covered by the intrinsic noise. We thus conclude that the presence of the anti-diagonal pattern in the |χ_{2}| matrix is sufficient to conclude that the same nonlinear interactions happen here. This also validates the application of the white noise approach to characterize the full |χ_{2}| matrix instead of using all combinations of individual frequencies.

Selective readout versus integration of heterogeneous populations

The observed nonlinear effects might facilitate the detectability of faint signals during a three fish setting, the electrosensory cocktail party. These nonlinear effects are, however, very specific with respect to the relation of stimulus frequencies and the P-unit baseline frequency. The EOD frequencies of the interacting fish would be drawn from the distributions of EOD frequencies found in male and female fish (Hopkins, 1974; Meyer et al., 1987; Henninger et al., 2018, 2020). To be behaviorally relevant the faint signal detection would require reliable neuronal signaling irrespective of the individual EOD frequencies. P-units, however are very heterogeneous in their baseline firing properties (Grewe et al., 2017; Hladnik and Grewe, 2023). The baseline firing rates vary in wide ranges (50–450 Hz). This range covers substantial parts of the beat frequencies that may occur during animal interactions which is limited to frequencies below the Nyquist frequency (0 – f_{EOD}/2) (Barayeu et al., 2023). It is thus likely that there are P-units which match approximately to the specificities of the different encounters.

On the other hand, the nonlinearity was found only in low-CV P-units (with white noise stimulation). The CVs are also very heterogeneous (0.1–1.4, fig. 8A) in our sample. Only a small fraction of the P-units has a sufficiently low level of intrinsic noise and will exhibit nonlinear responses. The P-units project to the ELL (Krahe and Maler, 2014) and the integrating pyramidal cells in the different segments receive inputs in the range of 10s to 1000s of neurons (Maler, 2009). Since the receptive fields of the pyramidal neurons are patches of adjacent receptors on the fish’s body surface (Bastian et al., 2002; Maler, 2009; Haggard and Chacron, 2023) and the input heterogeneity does not depend on the location of the receptor on the fish body (Hladnik and Grewe, 2023) the pyramidal cell input population will be heterogeneous. Heterogeneity was shown to be generally advantageous for the encoding in this (Hladnik and Grewe, 2023) and other systems (Padmanabhan and Urban, 2010; Beiran et al., 2018). At the same time it contradicts the apparent need for a selective readout of low-CV cells to maintain information arising through nonlinear interactions. A possible readout mechanism should be the topic of future studies that need to take into account that the nonlinearities are stronger in pure sine-wave stimulation and the fraction of cells that show it under naturalistic stimulation might be larger than expected from the distribution of CVs.

Behavioral relevance of nonlinear interactions

The behavioral relevance of the weak signal detection in P-units is evident from the courtship context observed in freely interacting animals (Henninger et al., 2018). Outside courtship behavior, the encoding of secondary or social envelopes is a common need (Stamper et al., 2012). In a previous study it was demonstrated that information about low-frequency secondary envelopes would not be present in P-units’ responses but would arise thorough nonlinear processing downstream in the ELL (Middleton et al., 2006, 2007). Based on our work we would predict that only a small subset of cells, with low CVs, should encode the social envelopes under white noise stimulation. An absence of low-CVs cells in the population analyzed in the previous studies could explain their conclusions. On the other hand, another study showed that P-units with strong nonlinearities, low firing rates and high CVs could indeed encode social envelopes (Savard et al., 2011). These findings are in contrast to the previously mentioned work (Middleton et al., 2007) and, at first glance, also to our results. The missing link, that has not been considered in this work, might be the bursting of P-units, the repeated firing of spikes after one EOD period interleaved with longer intervals of quietness (Chacron et al., 2004). Bursting was not explicitly addressed in the previous work, still the reported high CVs of the envelope encoding P-units indicate a higher rate of bursting (Savard et al., 2011). How bursts influence the second-order susceptibility of P-units will be addressed in following works (in preparation). Note that in this work we operated in a regime of weak stimuli and that the envelope encoding addressed in (Savard et al., 2011; Middleton et al., 2007) operates in a regime of strong stimuli, where the firing rate is saturated. The exact transition from the nonlinearities in a regime of weak stimuli to a regime of strong stimuli could be addressed in further P-unit studies.

Sinusoidal AMs are relevant in interactions with a few fish. We can understand the noise as the presence of many animals with individual EOD frequencies at the same time. Under noise stimulation, nonlinearities were demonstrated to be strong for weak stimuli but were shown to decrease for stronger noise stimuli (fig. 4). As long as the noise signal is weak, those fish are distant and the nonlinearity is maintained. An increasing stimulus amplitude would indicate that many fish are close to the receiver and a decrease of nonlinear effects can be observed. These findings imply that the nonlinear effects arising in the presence of three fish decline the more fish join. A. leptorhynchus usually prefers small groups of fish (Stamper et al., 2010). Thus, the described second-order susceptibility might still be behaviorally relevant under natural conditions. The decline of nonlinear effects when several fish are present might be an adaptive process reducing the number of frequencies represented in its primary sensory afferents to a minimum. Such representation would still leave room to create nonlinear effects at later processing steps in higher-order neurons.

The afferents of the passive electrosensory system, the ampullary cells, were found to exhibit much stronger nonlinearities than P-units (fig. 8). The adequate stimulus for this system is a direct stimulation not an amplitude modulation. In this sense the ampullary cells are closer to the LIF models used by Voroneko and colleagues (Voronenko and Lindner, 2017) and we can thus expect that the same nonlinear mechanisms are at work here. For the ampullary system, the sinewave stimulation is not as relevant as for the P-unit system. Ampullary cells encode low-frequency exogenous electric signals such as muscle potentials induced by prey movement (Kalmijn, 1974; Engelmann et al., 2010; Neiman and Russell, 2011). The simultaneous muscle activity of a swarm of prey (such as Daphnia) resembles Gaussian white noise (Neiman and Russell, 2011), similar to the stimuli used here. Our results show some similarities with the analyses by Neiman and Russel (Neiman and Russell, 2011) who study the encoding in ampullary afferents in the paddlefish. There, the power spectrum of the spontaneous activity also shows a peak at the baseline frequency (internal oscillator) but also at the oscillation frequency measured at the epithelium and interactions of both. Most of the latter disappear in the case of external stimulation, though. Here we find only peaks at the baseline frequency of the neuron and its harmonics. There are interesting similarities and dissimilarities; stimulus encoding in the paddlefish as well as in the brown ghost is very linear for low frequencies and there are nonlinearities in both systems. Linear encoding in the paddlefish shows a gap in the spectrum at the frequency of the epitheliar oscillation, instead the nonlinear response is very pronounced there. In A. leptorhynchus, the dominating frequency under baseline conditions is the baseline firing rate, and we do see increased nonlinearity in this frequency range. The baseline frequency, however, is outside the linear coding range (Grewe et al., 2017) while it is within the linear coding range in paddlefish (Neiman and Russell, 2011). Interestingly, the nonlinear response in the paddlefish ampullaries increases with stimulus intensity while it disappears in our case (fig. 8 F). The population of ampullary cells is much more homogeneous with respect to the baseline rate (131±29 Hz) and stimulus encoding properties than the P-units (Grewe et al., 2017). This implies that, if the stimulus contains the appropriate frequency components that sum up to the baseline rate, there should be a nonlinear response at a frequency that is similar for the full population of ampullary cells (the baseline frequency) that is outside the linear coding range. Postsynaptic cells integrating ampullary input might be able to extract this nonlinear response from the input population. How such nonlinear effects in ampullary cells might influence prey detection should be addressed in further studies.

Conclusion

We have demonstrated that there are pronounced nonlinear responses in the primary electrosensory afferences of the weakly electric fish A. leptorhynchus, systems that are very often characterized using linear methods. The observed nonlinearities match the expectations from previous theoretical studies (Voronenko and Lindner, 2017). We can confirm that the theory applies also to systems that are encoding amplitude modulations of a carrier signal. Comparisons of P-units and ampullary cells showed that it is the level of intrinsic noise that determines how strongly nonlinear the system acts. Using the second-oder susceptibility estimated from the responses to white noise stimuli provides an easy way to determine the nonlinearity of the system under study. P-units share several features with mammalian auditory nerve fibers and such nonlinear effects might also be expected in the auditory system during the encoding of amplitude modulations (Joris et al., 2004).

Methods

Experimental subjects and procedures

Within this project we re-evaluated datasets that were recorded between 2010 and 2023 at the Ludwig Maximilian University (LMU) München and the Eberhard-Karls University Tübingen. All experimental protocols complied with national and European law and were approved by the respective Ethics Committees of the Ludwig-Maximilians Universität München (permit no. 55.2-1-54-2531-135-09) and the Eberhard-Karls Unversität Tübingen (permit no. ZP 1/13 and ZP 1/16). The final sample consisted of 221 P-units and 47 ampullary electroreceptor afferents recorded in 71 weakly electric fish of the species A. leptorhynchus. The original electrophysiological recordings were performed on male and female weakly electric fish of the species A. leptorhynchus that were obtained from a commercial supplier for tropical fish (Aquarium Glaser GmbH, Rodgau, Germany). The fish were kept in tanks with a water temperature of 25 ± 1^{∘}C and a conductivity of around 270 μS/cm under a 12 h:12 h light-dark cycle.

Before surgery, the animals were deeply anesthetized via bath application with a solution of MS222 (120 mg/l, PharmaQ, Fordingbridge, UK) buffered with Sodium Bicarbonate (120 mg/l). The posterior anterior lateral line nerve (pALLN) was exposed by making a small cut into the skin covering the nerve. The cut was placed dorsal of the operculum just before the nerve descends towards the anterior lateral line ganglion (ALLNG). Those parts of the skin that were to be cut were locally anesthetized by cutaneous application of liquid lidocaine hydrochloride (20 mg/ml, bela-pharm GmbH). During the surgery water supply was ensured by a mouthpiece to maintain anesthesia with a solution of MS222 (100 mg/l) buffered with Sodium Bicarbonate (100 mg/l). After surgery fish were immobilized by intramuscular injection of from 25 μl to 50 μl of tubocurarine (5 mg/ml dissolved in fish saline; Sigma-Aldrich). Respiration was then switched to normal tank water and the fish was transferred to the experimental tank.

Experimental setup

For the recordings fish were positioned centrally in the experimental tank, with the major parts of their body submerged into the water. Those body parts that were above the water surface were covered with paper tissue to avoid drying of the skin. Local analgesia was refreshed in intervals of two hours by cutaneous reapplication of Lidocaine (2 %; bela-pharm, Vechta, Germany) around the surgical wounds. Electrodes (borosilicate; 1.5 mm outer diameter; GB150F-8P; Science Products, Hofheim, Germany) were pulled to a resistance of 50–100 MΩ (model P-97; Sutter Instrument, Novato, CA) and filled with 1 M KCl solution. Electrodes were fixed in a microdrive (Luigs-Neumann, Ratingen, Germany) and lowered into the nerve (fig. 9, blue triangle). Recordings of electroreceptor afferents were amplified and lowpass filtered at 10 kHz (SEC-05, npi-electronics, Tamm, Germany, operated in bridge mode). All signals, neuronal recordings, recorded EOD and the generated stimulus, were digitized with sampling rates of 20 or 40 kHz (PCI-6229, National Instruments, Austin, TX). RELACS (www.relacs.net) running on a Linux computer was used for online spike and EOD detection, stimulus generation, and calibration. Recorded data was then stored on the hard drive for offline analysis.

Identification of P-units and ampullary cells

The neurons were classified into cell types during the recording by the experimenter. P-units were classified based on baseline firing rates of 50–450 Hz and a clear phase-locking to the EOD and their responses to amplitude modulations of their own EOD (Grewe et al., 2017; Hladnik and Grewe, 2023). Ampullary cells were classified based on firing rates of 80–200 Hz absent phase-locking to the EOD and responses to lowfrequency sinusoidal stimuli (Grewe et al., 2017). We here selected only those cells of which the neuron’s baseline activity as well as the responses to frozen noise stimuli were recorded.

Electric field recordings

The electric field of the fish was recorded in two ways: 1. we measured the so-called global EOD with two vertical carbon rods (11 cm long, 8 mm diameter) in a head-tail configuration (fig. 9, green bars). The electrodes were placed isopotential to the stimulus. This signal was differentially amplified with a factor between 100 and 500 (depending on the recorded animal) and band-pass filtered (3 to 1500 Hz pass-band, DPA2-FX; npi electronics, Tamm, Germany). 2. The so-called local EOD was measured with 1 cm-spaced silver wires located next to the left gill of the fish and orthogonal to the fish’s longitudinal body axis (amplification 100 to 500 times, band-pass filtered with 3 to 1 500 Hz pass-band, DPA2-FX; npi-electronics, Tamm, Germany, fig. 9, red markers). This local measurement recorded the combination of the fish’s own field and the applied stimulus and thus serves as a proxy of the transdermal potential that drives the electroreceptors.

Stimulation

The stimulus was isolated from the ground (ISO-02V, npi-electronics, Tamm, Germany) and delivered via two horizontal carbon rods (30 cm length, 8 mm diameter) located 15 cm laterally to the fish (fig. 9, gray bars). The stimulus was calibrated with respect to the local EOD.

White noise stimulation

The fish were stimulated with band-limited white noise stimuli with a cut-off frequency of 150, 300 or 400 Hz. The stimulus intensity is given as the contrast, i.e. the standard deviation of the white noise stimulus in relation to the fish’s EOD amplitude. The contrast varied between 1 and 20 %. Only cell recordings with at least 10 s of white noise stimulation were included for the analysis. When ampullary cells were recorded, the white noise was directly applied as the stimulus. To create random amplitude modulations (RAM) for P-unit recordings, the EOD of the fish was multiplied with the desired random amplitude modulation profile (MXS-01M; npi electronics).

Data analysis

Data analysis was performed with Python 3 using the packages matplotlib (Hunter, 2007), numpy (Walt et al., 2011), scipy (Virtanen et al., 2020), pandas (McKinney et al., 2010), nixio (Stoewer et al., 2014), and

thunderfish (https://github.com/bendalab/thunderfish).

Baseline analysis The baseline firing rate f_{base} was calculated as the number of spikes divided by the duration of the baseline recording (on average 18 s). The coefficient of variation (CV) was calculated as the standard deviation of the interspike intervals (ISI) divided by the average ISI: CV = \sqrt{⟨(ISI − ⟨ISI⟩)^{2}⟩}/⟨ISI⟩. If the baseline was recorded several times in a recording, the average f_{base} and CV were calculated.

White noise analysis In the stimulus driven case, the neuronal activity of the recorded cell is modulated around the average firing rate that is similar to f_{base} and in that way encodes the time-course of the stimulus. The time-dependent response of the neuron was estimated from the spiking activity

x_{k}(t) = ∑_{i} δ(t − t_{k,i})  (1)

recorded for each stimulus presentation, k, by kernel convolution with a Gaussian kernel

K(t) =\frac{1}{σ\sqrt{2π}} e^{− \frac{t^{2}}{2σ^{2}}}  (2)

with σ the standard deviation of the Gaussian which was set to 2.5 ms if not stated otherwise. For each trial k the x_{k}(t) is convolved with the kernel K(t)

r_{k}(t) = x_{k}(t) ∗ K(t) = ∫_{−∞}^{+∞} x_{k}(t′)K(t − t′) dt′ ,  (3)

where ∗ denotes the convolution. r(t) is then calculated as the across-trial average

r(t) = ⟨r_{k}(t)⟩_{k} .  (4)

To quantify how strongly the neuron is driven by the stimulus we quantified the response modulation as the standard deviation σ_{M} = \sqrt{⟨(r(t) − ⟨r(t)⟩_{t})^{2}⟩_{t}}, where ⟨ · ⟩_{t} indicates averaging over time.

Spectral analysis The neuron is driven by the stimulus and thus the spiking response x(t), Eq (1), depends on the stimulus s(t). To investigate the relation between stimulus and response we calculated the first- and second-order susceptibility of the neuron to the stimulus in the frequency domain. The Fourier transforms of s(t) and x(t) are denoted as s̃(ω) and x̃(ω) and were calculated according to x̃(ω) = ∫_{0}^{T} x(t) · e^{−iωt} dt, with T being the signal duration. Stimuli had a duration of 10 s and spectra of stimulus and response were calculated in separate segments of 0.5 s with no overlap resulting in a spectral resolution of 2 Hz.

The power spectrum of the stimulus s(t) was calculated as

S_{ss}(ω) = \frac{⟨s̃(ω)s̃^{∗}(ω)⟩}{T}  (5)

with s̃^{∗} being the complex conjugate and ⟨...⟩ denoting averaging over the segments. The power spectrum of the spike trains S_{xx}(ω) was calculated accordingly. The cross-spectrum S_{xs}(ω) between stimulus and evoked spike trains was calculated according to

S_{xs}(ω) = \frac{⟨x̃(ω)s̃^{∗}(ω)⟩}{T}  (6)

From S_{xs}(ω) and S_{ss}(ω) we calculated the linear susceptibility (transfer function) as

χ_{1}(ω) = \frac{S_{xs}(ω)}{S_{ss}(ω)}  (7)

The second-order cross-spectrum that depends on the two frequencies ω_{1} and ω_{2} was calculated according to

S_{xss}(ω_{1}, ω_{2}) = \frac{⟨x̃(ω_{1} + ω_{2})s̃^{∗}(ω_{1})s̃^{∗}(ω_{2})⟩}{T}  (8)

The second-order susceptibility was calculated by dividing the higher-order cross-spectrum by the spectral power at the respective frequencies.

χ_{2}(ω_{1}, ω_{2}) = \frac{S_{xss}(ω_{1}, ω_{2})}{2S_{ss}(ω_{1})S_{ss}(ω_{2})}  (9)

The absolute value of a second-order susceptibility matrix is visualized in fig. 7. There the upper right and the lower left quadrants characterize the nonlinearity in the response x(t) at the sum frequency of the two input frequencies. The lower right and upper left quadrants characterize the nonlinearity in the response x(t) at the difference of the input frequencies.

Nonlinearity index We expect to see nonlinear susceptibility when ω_{1} + ω_{2} = f_{base}. To characterize this we calculated the peakedness of the nonlinearity (PNL) as

P NL(f_{base}) = \frac{max D(f_{base} − 5 Hz ≤ f ≤ f_{base} + 5 Hz)}{med(D(f))}  (10)

For this index, the second-order susceptibility matrix was projected onto the diagonal D(f), by taking the mean of the anti-diagonals. The peakedness at the frequency f_{base} in D(f) was quantified by finding the maximum of D(f) in the range f_{base} ± 5 Hz (fig. 4 G) and dividing it by the median of D(f).

If the same frozen noise was recorded several times in a cell, each noise repetition resulted in a separate second-order susceptibility matrix. The mean of the corresponding PNL(f_{base}) values was used for the population statistics in fig. 8.

Leaky integrate-and-fire models

Leaky integrate-and-fire (LIF) models with a carrier were constructed to reproduce the specific firing properties of P-units (Chacron et al., 2001; Sinz et al., 2020). The sole driving input into the P-unit model during baseline, i.e. when no external stimulus was given, is the fish’s own EOD modeled as a cosine wave

y(t) = y_{EOD}(t) = cos(2πf_{EOD}t)  (11)

with the EOD frequency f_{EOD} and an amplitude normalized to one.

In the model, the input y(t) was then first thresholded to model the synapse between the primary receptor cells and the afferent.

⌊y(t)⌋_{0} = \{ \begin{matrix}y(t) & ; & y(t) ≥ 0 \\ 0 & ; & y(t) < 0 \end{matrix}  (12)

⌊y(t)⌋_{0} denotes the threshold operation that sets negative values to zero (fig. 10 A).

The resulting receptor signal was then low-pass filtered to approximate passive signal conduction in the afferent’s dendrite (fig. 10 B)

τ_{d} \frac{dV_{d}}{dt} = −V_{d} + ⌊y(t)⌋_{0}  (13)

with τ_{d} as the dendritic time constant. Dendritic low-pass filtering was necessary to reproduce the loose coupling of P-unit spikes to the EOD while maintaining high sensitivity at small amplitude modulations. Because the input was dimensionless, the dendritic voltage was dimensionless, too. The combination of threshold and low-pass filtering extracts the amplitude modulation of the input y(t).

The dendritic voltage V_{d}(t) was the input to a leaky integrate-and-fire (LIF) model

τ_{m} \frac{dV_{m}}{dt} = −V_{m} + μ + αV_{d} − A + \sqrt{2D}ξ(t)  (14)

where τ_{m} is the membrane time-constant, μ is a fixed bias current, α is a scaling factor for V_{d}, A is an inhibiting adaptation current, and \sqrt{2D}ξ(t) is a white noise with strength D. All state variables except τ_{m} are dimensionless.

The adaptation current A followed

τ_{A} \frac{dA}{dt} = −A  (15)

with adaptation time constant τ_{A}.

Whenever the membrane voltage V_{m}(t) crossed the spiking threshold θ = 1 a spike was generated, V_{m}(t) was reset to 0, the adaptation current was incremented by ΔA, and integration of V_{m}(t) was paused for the duration of a refractory period t_{ref} (fig. 10 D).

V_{m}(t) ≥ θ : \{ \begin{matrix}V_{m} & ↦ & 0 \\ A & ↦ & A + ΔA/τ_{A} \end{matrix}  (16)

Numerical implementation

The model’s ODEs were integrated by the Euler forward method with a time-step of Δt = 0.05 ms. The intrinsic noise ξ(t) (Eq (14), fig. 10 C) was added by drawing a random number from a normal distribution N (0, 1) with zero mean and standard deviation of one in each time step i. This number was multiplied with \sqrt{2D} and divided by \sqrt{Δt}:

V_{m_{i+1}} = V_{m_{i}} + (−V_{m_{i}} + μ + αV_{d_{i}} − A_{i} + \sqrt{\frac{2D}{Δt}} N (0, 1)_{i}) \frac{Δt}{τ_{m}}  (17)

Model parameters

The eight free parameters of the P-unit model β, τ_{m}, μ, D, τ_{A}, Δ_{A}, τ_{d}, and t_{ref}, were fitted to both the baseline activity (baseline firing rate, CV of ISIs, serial correlation of ISIs at lag one, and vector strength of spike coupling to EOD) and the responses to step-like increases and decreases in EOD amplitude (onset-state and steady-state responses, effective adaptation time constant). For each simulation, the start parameters A, V_{d} and V_{m} were drawn from a random starting value distribution, estimated from a 100 s baseline simulation after an initial 100 s of simulation that was discarded as a transient.

Stimuli for the model

The model neurons were driven with similar stimuli as the real neurons in the original experiments. To mimic the interaction with one or two foreign animals the receiving fish’s EOD (Eq (11)) was normalized to an amplitude of one and the respective EODs of a second or third fish were added.

The random amplitude modulation (RAM) input to the model was created by drawing random amplitude and phases from Gaussian distributions for each frequency component in the range 0–300 Hz. An inverse Fourier transform was applied to get the final amplitude RAM time-course. The input to the model was then

y(t) = (1 + s(t)) · cos(2πf_{EOD}t)  (18)

From each simulation run, the first second was discarded and the analysis was based on the last second of the data. The resulting spectra thus have a spectral resolution of 1 Hz.

Model noise split into a noise and a stimulus component

According to previous works (Lindner, 2022) the total noise of a LIF model (ξ) can be split up into several independent noise processes. Here we split the internal noise into two parts: (i) One part is treated as a driving input signal s_{ξ}(t), a RAM stimulus where frequencies above 300 Hz are discarded (Eq (19)), and used to calculate the cross-spectra in Eq (8) and (ii) the remaining noise \sqrt{2D c_{noise}} · ξ(t) that is treated as pure noise (Eq (21)). In this way the effective signal-to-noise ratio can be increased while maintaining the total noise in the system.

y(t) = (1 + s_{ξ}(t)) · cos(2πf_{EOD}t)  (19)

τ_{d} \frac{dV_{d}}{dt} = −V_{d} + ⌊y(t)⌋_{0}  (20)

τ_{m} \frac{dV_{m}}{dt} = −V_{m} + μ + αV_{d} − A + \sqrt{2D c_{noise}} · ξ(t)  (21)

In the here used model a small portion of the original noise was assigned to the noise component (c_{noise} = 0.1, fig. 10 C_{iii}) and a big portion used as the signal component (c_{signal} = 0.9, fig. 10 A_{iii}). For the noise split to be valid (Lindner, 2022) it is critical that both components add up to the initial 100 % of the total noise and the baseline properties as the firing rate and the CV of the model are maintained. This is easily achieved in a model without a carrier if the condition c_{signal} + c_{noise} = 1 is satisfied. The situation here is more complicated. After the original noise was split into a signal component with c_{signal}, the frequencies above 300 Hz were discarded and the signal strength was reduced after the dendritic low pass filtering. To compensate for these transformations the initial signal component was multiplying with the factor ρ, keeping the baseline CV (only carrier) and the CV during the noise split comparable, and resulting in s_{ξ}(t). ρ was found by bisecting the plane of possible factors and minimizing the error between the CV during baseline and stimulation.

Table 1: Model parameters of LIF models, fitted to 2 electrophysiologically recorded P-units (Ott, 2020).

cell  β τ_{m}/ms  μ D/ms τ_{A}/ms Δ_{A} τ_{d}/ms t_{ref}/ms
2012-07-03-ak 10.6  1.38 −1.32 0.001 96.05 0.01  1.18  0.12
2013-01-08-aa  4.5  1.20  0.59 0.001 37.52 0.01  1.18  0.38
2018-05-08-ae 139.6  1.49 −21.09 0.214 123.69 0.16  3.93  1.31

[JB: to methods: “Note that the signal component s_{ξ}(t) is added as an amplitude modulation and is thus limited with respect to its spectral content by the Nyquist frequency of the carrier, half the EOD frequency. It thus has a reduced high frequency content as compared to the intrinsic noise. Adding this discarded high frequency components to the intrinsic noise does not affect the results here (not shown).”]

References

Adelson, E. H. and Bergen, J. R. (1985). Spatiotemporal energy models for the perception of motion. Journal

of the Optical Society of America, 2(2):284–299. Barayeu, A., Schäfer, R., Grewe, J., and Benda, J. (2023). Beat encoding at mistuned octaves within single

electrosensory neurons. iScience, 26(7):106840. Bastian, J. (1981). Electrolocation I. How electroreceptors of Apteronotus albifrons code for moving objects

and other electrical stimuli. Journal of Comparative Physiology, 144:465–479. Bastian, J., Chacron, M. J., and Maler, L. (2002). Receptive field organization determines pyramidal cell

stimulus-encoding capability and spatial stimulus selectivity. Journal of Neuroscience, 22(11):4577–4590. Beiran, M., Kruscha, A., Benda, J., and Lindner, B. (2018). Coding of time-dependent stimuli in homogeneous

and heterogeneous neural populations. Journal of Computational Neuroscience, 44:189–202. Benda, J. (2020). The physics of electrosensory worlds. In Fritsch, B. and Bleckmann, H., editors, The

senses: a comprehensive reference, volume 7, pages 228–254. Elsevier, Academic Press. Benda, J., Grewe, J., and Krahe, R. (2013). Neural noise in electrocommunication: From burden to benefits.

In Brumm, H., editor, Animal Communication and Noise, volume 2 of Animal Signals and Communication, pages 331–372. Springer Berlin Heidelberg.

Benda, J., Longtin, A., and Maler, L. (2005). Spike-frequency adaptation separates transient communication

signals from background oscillations. Journal of Neuroscience, 25(9):2312–2321. Borst, A. and Theunissen, F. (1999). Information theory and neural coding. Nature Neurosci., 2(11):947–957. Brincat, S. L. and Connor, C. E. (2004). Underlying principles of visual shape selectivity in posterior

inferotemporal cortex. Nature Neuroscience, 7(8):880–886. Carr, C. E., Maler, L., and Sas, E. (1982). Peripheral organization and central projections of the electrosensory

nerves in gymnotiform fish. Journal of Comparative Neurology, 211:139–153. Chacron, M. J. (2006). Nonlinear information processing in a model sensory system. Journal of Neurophys-

iology, 95(5):2933–2946. Chacron, M. J., Longtin, A., and Maler, L. (2001). Negative interspike interval correlations increase the

neuronal capacity for encoding time-dependent stimuli. Journal of Neuroscience, 21(14):5328–5343. Chacron, M. J., Longtin, A., and Maler, L. (2004). To burst or not to burst? Journal of Computational

Neuroscience, 17:127–136. Chacron, M. J., Longtin, A., St-Hilaire, M., and Maler, L. (2000). Suprathreshold stochastic firing dynamics

with memory in P-type electroreceptors. Physical Review Letters, 85(7):1576.

Chacron, M. J., Maler, L., and Bastian, J. (2005). Electroreceptor neuron dynamics shape information

transmission. Nature Neuroscience, 8(5):673–678. Chialvo, D. R., Longtin, A., and Müller-Gerking, J. (1997). Stochastic resonance in models of neuronal

ensembles. Physical Review E, 55(2):1798. Egerland, C. H. (2021). Estimation and approximation of the nonlinear response of stochastic neuron models

with adaptation. Unpublished master thesis, Humboldt-Universität zu Berlin. Engelmann, J., Gertz, S., Goulet, J., Schuh, A., and von der Emde, G. (2010). Coding of stimuli by ampullary

afferents in Gnathonemus petersii. Journal of Neurophysiology, 104(4):1955–1968. Engler, G. and Zupanc, G. K. (2001). Differential production of chirping behavior evoked by electrical

stimulation of the weakly electric fish, Apteronotus leptorhynchus. Journal of Comparative Physiology A, 187(9):747–756.

Fotowat, H., Harrison, R., and Krahe, R. (2013). Statistics of the electrosensory input in the freely swimming

weakly electric fish Apteronotus leptorhynchus. Journal of Neuroscience, 33(34):13758–13772. French, A. and Butz, E. (1973). Measuring the wiener kernels of a non-linear system using the fast Fourier

transform algorithm. International Journal of Control, 17(3):529–539. Furutsu, K. (1963). On the statistical theory of electromagnetic waves in a fluctuating medium. Journal of

Research of the National Bureau of Standards, 67:303–323. Gabbiani, F., Metzner, W., Wessel, R., and Koch, C. (1996). From stimulus encoding to feature extraction

in weakly electric fish. Nature, 384(6609):564–567. Grahn, J. A. (2012). Neural mechanisms of rhythm perception: current findings and future perspectives.

Topics in Cognitive Science, 4(4):585–606. Grewe, J., Kruscha, A., Lindner, B., and Benda, J. (2017). Synchronous spikes are necessary but not sufficient

for a synchrony code in populations of spiking neurons. Proceedings of the National Academy of Sciences, 114(10):E1977–E1985.

Gussin, D., Benda, J., and Maler, L. (2007). Limits of linear rate coding of dynamic stimuli by electroreceptor

afferents. Journal of Neurophysiology, 97(4):2917–2929. Haggard, M. and Chacron, M. J. (2023). Coding of object location by heterogeneous neural populations with

spatially dependent correlations in weakly electric fish. PLOS Computational Biology, 19(3):e1010938. Henninger, J., Krahe, R., Kirschbaum, F., Grewe, J., and Benda, J. (2018). Statistics of natural communi-

cation signals observed in the wild identify important yet neglected stimulus regimes in weakly electric fish. Journal of Neuroscience, 38:5456–5465.

Henninger, J., Krahe, R., Sinz, F., and Benda, J. (2020). Tracking activity patterns of a multispecies community of gymnotiform weakly electric fish in their neotropical habitat without tagging. Journal of Experimental Biology, 223:jeb206342.

Hladnik, T. C. and Grewe, J. (2023). Receptive field sizes and neuronal encoding bandwidth are constrained

by axonal conduction delays. PLoS Computational Biology, 8(19). Hopkins, C. D. (1974). Electric communication: functions in the social behavior of Eigenmannia virescens.

Behavior, 50:270–304. Hopkins, C. D. (1976). Stimulus filtering and electroreception: tuberous electroreceptors in three species of

gymnotoid fish. Journal of Comparative Physiology, 111:171–207. Hunter, J. D. (2007). Matplotlib: A 2d graphics environment. Computing in science & engineering, 9(3):90–

95. Hupé, G. and Lewis, J. (2008). Electrocommunication signals in free swimming brown ghost knifefish,

Apteronotus leptorhynchus. Journal of Experimental Biology, 211:1657–67. Joris, P., Schreiner, C., and Rees, A. (2004). Neural processing of amplitude-modulated sounds. Physiological

Reviews, 84(2):541–577. Kalmijn, A. J. (1974). The detection of electric fields from inanimate and animate sources other than electric

organs. In Fessard, A., editor, Electroreceptors and other specialized receptors in lower vertrebrates, pages 148–194. Springer, Heidelberg.

Krahe, R. and Maler, L. (2014). Neural maps in the electrosensory system of weakly elcectric fish. Current

Opinion in Neurobiology, 24:13–21. Lindner, B. (2022). Fluctuation-dissipation relations for spiking neurons. Physical Review Letters,

129(19):198101. Longtin, A. (1993). Stochastic resonance in neuron models. Journal of statistical physics, 70:309–327.

Longtin, A., Middleton, J. W., Cieniak, J., and Maler, L. (2008). Neural dynamics of envelope coding.

Mathematical Biosciences, 214(1-2):87–99. Maler, L. (2009). Receptive field organization across multiple electrosensory maps. I. columnar organization

and estimation of receptive field size. Journal of Comparative Neurology, 516:376–393. Marmarelis, V. Z., Juusola, M., and French, A. S. (1999). Principal dynamic mode analysis of nonlinear

transduction in a spider mechanoreceptor. Annals of biomedical engineering, 27:391–402. McKinney, W. et al. (2010). Data structures for statistical computing in python. In Proceedings of the 9th

Python in Science Conference, volume 445, pages 51–56. Austin, TX. Meyer, J. H., Leong, M., and Keller, C. H. (1987). Hormone-induced and maturational changes in electric

organ discharges and electroreceptor tuning in the weakly electric fishapteronotus. JCompPhysiolA, 160(3):385–394.

Middleton, J. W., Harvey-Girard, E., Maler, L., and Longtin, A. (2007). Envelope gating and noise shaping

in populations of noisy neurons. Physical Review E, 75:021918. Middleton, J. W., Longtin, A., Benda, J., and Maler, L. (2006). The cellular basis for parallel neural

transmission of a high-frequency stimulus and its low-frequency envelope. Proceedings of the National Academy of Sciences, 103:14596–14601.

Neiman, A. B. and Russell, D. F. (2011). Sensory coding in oscillatory electroreceptors of paddlefish. Chaos:

An Interdisciplinary Journal of Nonlinear Science, 21(4). Nelson, M. E. and MacIver, M. A. (1999). Prey capture in the weakly electric fish Apteronotus alb-

ifrons: sensory acquisition strategies and electrosensory consequences. Journal of Experimental Biology, 202(10):1195–1203.

Nelson, M. E., Xu, Z., and Payne, J. R. (1997). Characterization and modeling of P-type electrosensory afferent responses to amplitude modulations in a wave-type electric fish. Journal of Comparative Physiology A, 181(5):532–544.

Nikias, N. L. and Petropulu, A. P. (1993). Higher-order spectra analysis: a nonlinear signal processing

framework. IEEE Signal Processing Magazine, 10(3):10–37. Novikov, E. A. (1965). Functionals and the random-force method in turbulence theory. Journal of Experi-

mental Theoretical Physics, 20(5):1290–1294. Ott, A. (2020). Modeling the heterogeneity of electrosensory afferents in electric fish. Unpublished master

thesis, Eberhard Karls Universität Tübingen. Padmanabhan, K. and Urban, N. N. (2010). Intrinsic biophysical diversity decorrelates neuronal firing while

increasing information content. Nat Neurosci, 13(10):1276–1282. Peterson, A. J. and Heil, P. (2019). Phase locking of auditory-nerve fibers reveals stereotyped distortions and

an exponential transfer function with a level-dependent slope. Journal of Neuroscience, 39(21):4077–4099. Plomp, R. (1967). Beats of mistuned consonances. The Journal of the Acoustical Society of America,

42(2):462–474. Roddey, J. C., Girish, B., and Miller, J. P. (2000). Assessing the performance of neural encoding models in

the presence of noise. Journal of Computational Neuroscience, 8:95–112. Roeber, A. (1834). Untersuchungen des Hrn. Scheibler in Crefeld über die sogenannten Schläge, Schwebungen

oder Stösse. Annalen der Physik, 108(31-33):492–520. Salazar, V. L., Krahe, R., and Lewis, J. E. (2013). The energetics of electric organ discharge generation in

gymnotiform weakly electric fish. Journal of Experimental Biology, 216(13):2459–2468. Savard, M., Krahe, R., and Chacron, M. (2011). Neural heterogeneities influence envelope and temporal

coding at the sensory periphery. Neuroscience, 172:270–284. Schlungbaum, M. and Lindner, B. (2023). Detecting a periodic signal by a population of spiking neurons in

the weakly nonlinear response regime. The European Physical Journal E, 46(11):108. Schneider, A. D., Cullen, K. E., and Chacron, M. J. (2011). In vivo conditions induce faithful encoding of

stimuli by reducing nonlinear synchronization in vestibular sensory neurons. PLoS Computational Biology, 7(7):e1002120.

Sinz, F. H., Sachgau, C., Henninger, J., Benda, J., and Grewe, J. (2020). Simultaneous spike-time locking to

multiple frequencies. Journal of Neurophysiology, 123(6):2355–2372. Stamper, S. A., Carrera-G, E., Tan, E. W., Fugère, V., Krahe, R., and Fortune, E. S. (2010). Species differ-

ences in group size and electrosensory interference in weakly electric fishes: Implications for electrosensory processing. Behavioural Brain Research, 207(2):368 – 376.

Stamper, S. A., Madhav, M. S., Cowan, N. J., and Fortune, E. S. (2012). Beyond the Jamming Avoidance Response: weakly electric fish respond to the envelope of social electrosensory signals. Journal of Experimental Biology, 215:4196–4207.

Stocks, N. G. (2000). Suprathreshold stochastic resonance in multilevel threshold systems. Physical Review

Letters, 84(11):2310. Stoewer, A., Kellner, C. J., Benda, J., Wachtler, T., and Grewe, J. (2014). File format and library for

neuroscience data and metadata. Frontiers of Neuroinformatics, 8(27):10–3389. Szabo, T. (1965). Sense organs of the lateral line system in some electric fish of the Gymnotidae, Mormyridae

and Gymnarchidae. Journal of Morphology, 117(2):229–249. Viancour, T. A. (1979). Electroreceptors of a weakly electric fish. Journal of Comparative Physiology,

133(4):327–338. Virtanen, P., Gommers, R., Oliphant, T. E., Haberland, M., Reddy, T., Cournapeau, D., Burovski, E.,

Peterson, P., Weckesser, W., Bright, J., van der Walt, S. J., Brett, M., Wilson, J., Millman, K. J., Mayorov, N., Nelson, A. R. J., Jones, E., Kern, R., Larson, E., Carey, C. J., Polat, İ., Feng, Y., Moore, E. W., VanderPlas, J., Laxalde, D., Perktold, J., Cimrman, R., Henriksen, I., Quintero, E. A., Harris, C. R., Archibald, A. M., Ribeiro, A. H., Pedregosa, F., van Mulbregt, P., and SciPy 1.0 Contributors (2020). SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python. Nature Methods, 17:261– 272.

Voronenko, S. O. and Lindner, B. (2017). Weakly nonlinear response of noisy neurons. New Journal of

Physics, 19(3):033038. Wachtel, A. W. and Szamier, R. B. (1966). Special cutaneous receptor organs of fish: the tuberous organs of

Eigenmannia. Journal of Morphology, 119:51–80. Walt, S. v. d., Colbert, S. C., and Varoquaux, G. (2011). The NumPy array: a structure for efficient numerical

computation. Computing in science & engineering, 13(2):22–30. Walz, H., Grewe, J., and Benda, J. (2014). Static frequency tuning accounts for changes in neural synchrony

evoked by transient communication signals. Journal of Neurophysiology, 112:752–765. Wiesenfeld, K. and Moss, F. (1995). Stochastic resonance and the benefits of noise: from ice ages to crayfish

and squids. Nature, 373:33–36. Xu, Z., Payne, J. R., and Nelson, M. E. (1996). Logarithmic time course of sensory adaptation in electrosen-

sory afferent nerve fibers in a weakly electric fish. Journal of Neurophysiology, 76(3):2020–2032.

Supporting information

S1 Second-order susceptibility of high-CV P-unit

CVs in P-units can range up to 1.5 (Grewe et al., 2017; Hladnik and Grewe, 2023). We show the same analysis as in fig. 4 for an example higher-CV P-unit. Similar to the low-CV cell, high-CV P-units fire at multiples of the EOD period (fig. 11 A). In contrast to low-CV P-units, however, the higher CV characterizes the noisier baseline firing pattern and the peak at f_{base} is less pronounced in the power spectrum of the baseline activity (fig. 11 B). High-CV P-units do not exhibit a clear nonlinear structure related to f_{base} neither in the second-order susceptibility matrices (fig. 11 E–F), nor in the projected diagonals (fig. 11 G). The overall level of nonlinearity, however shows the same dependence on the stimulus contrast. It is much reduced for high-contrast stimuli that drive the neuron much stronger (fig. 11 F).

Figure 1: First- (linear) and second-order response functions of the leaky integrate-and-fire model. A Magnitude of the first-order response function |χ_{1}(f_{1})|, also known as “gain” quantifies the response amplitude relative to the stimulus amplitude, both measured at the stimulus frequency. B Magnitude of the second-order response function |χ_{2}(f_{1}, f_{2})| quantifies the response at the sum of two stimulus frequencies. For linear systems, the second-order response functions is zero, because linear systems do not create new frequencies and thus there is no response at the summed frequencies. The plots show the analytical solutions from (?) and (Voronenko and Lindner, 2017) with μ = 1.1 and D = 0.001.

Figure 2: Nonlinearity in an electrophysiologically recorded P-unit of A. leptorhynchus in a three-fish setting (cell identifier “2021-08-03-ac”). Receiver with EOD frequency f_{EOD} = 664 Hz encounters fish with EOD frequencies f_{1} = 631 Hz and f_{2} = 797 Hz. Both encountered fish lead to a beat contrast of 10 %. Top: Sheme of a nonlinear system. Second row: Interference of the receiver EOD with the EODs of other fish. Third row: Spike trains of the P-unit. Forth row: Firing rate, retrieved as the convolution of the spike trains with a Gaussian kernel (σ = 1 ms). Bottom row: Power spectrum of the firing rate. A Baseline condition: Only the receiver is present. The baseline firing rate f_{base} dominates the power spectrum of the firing rate. B The receiver and the fish with EOD frequency f_{1} = 631 Hz are present. C The receiver and the fish with EOD frequency f_{2} = 797 Hz are present. D All three fish with the EOD frequencies f_{EOD}, f_{1} and f_{2} are present. Nonlinear peaks occur at the sum and difference of the two beat frequencies in the power spectrum of the firing rate.

Figure 3: The model used has the identifier 2013-01-08-aa.f_{1} is 30 Hz and f_{2} is 130 Hz, that is eqaul to f_{base}. Both contrasts increase equally in strength.

Figure 4: Linear and nonlinear stimulus encoding in a low-CV P-unit (cell identifier “2010-06-21-ai”). A Interspike interval (ISI) distribution of the cell’s baseline activity, i.e. the cell is driven only by the unperturbed own electric field. The low CV of the ISIs indicates quite regular firing. B Power spectral density of the baseline response with peaks at the cell’s baseline firing rate f_{base} and the fish’s EOD frequency f_{EOD}. C Random amplitude modulation stimulus (top, with cutoff frequency of 300 Hz) and evoked responses (spike raster, bottom) of the same P-unit. The stimulus contrast (right) measures the strength of the AM. D Gain of the transfer function (first-order susceptibility), Eq (7), computed from the responses to 10 % (light purple) and 20 % contrast (dark purple) RAM stimulation of 10 s duration. E, F Absolute value of the second-order susceptibility, Eq (9), for both the low and high stimulus contrast. Pink triangles mark vertical, horizontal, and diagonal lines where f_{1}, f_{2} or f_{1} + f_{2} are equal to f_{base}. G Second-order susceptibilities projected onto the diagonal (means of all anti-diagonals of the matrices shown in E, F). Dots mark f_{base}, horizontal dashed lines mark medians of the projected susceptibilities.

Figure 5: Linear and nonlinear stimulus encoding in an ampullary afferent (cell identifier “2012-04-26-ae”). A Interspike interval (ISI) distribution of the cell’s baseline activity. The very low CV of the ISIs indicates almost perfect periodic spiking. B Power spectral density of baseline activity with peaks at the cell’s baseline firing rate and its harmonics. C Bad-limited white noise stimulus (top, with cutoff frequency of 150 Hz) added to the fish’s self-generated electric field and spike raster of the evoked responses (bottom) for two stimulus contrasts as indicated (right). D Gain of the transfer function, Eq (7), of the responses to stimulation with 2 % (light green) and 20 % contrast (dark green) of 10 s duration. E, F Absolute value of the second-order susceptibility, Eq (9), for both stimulus contrasts as indicated. Pink triangles indicate baseline firing rate. G Projections of the second-order susceptibilities in E, F onto the diagonal.

Figure 6: Estimation of second-order susceptibilities in the limit of weak stimuli. A |χ_{2}| estimated from N = 11 0.5 slong trials of an electrophysiological recording of another low-CV P-unit (cell 2012-07-03-ak, f_{base} = 120 Hz, CV=0.20) driven with a weak RAM stimulus with contrast 2.5 %. Pink edges mark baseline firing rate where enhanced nonlinear responses are expected. B_{i} Standard condition of model simulations with intrinsic noise (bottom) and a RAM stimulus (top). [JB: Since the model overestimated the sensitivity of the real P-unit, we adjusted the RAM contrast to 0.9 %, such that the resulting spike trains had the same CV as the electrophysiolgical recorded P-unit during the 2.5 % contrast stimulation (see table 1 for model parameters).] [JB: chi2 scale is higher than in real cell] B_{ii} |χ_{2}| estimated from simulations of the cell’s LIF model counterpart (cell 2012-07-03-ak, table 1) based on the same number of trials as in the electrophysiological recording. B_{iii} Same as B_{ii} but using 10^{6} stimulus repetitions. C_{i−iii} Same as in B_{i−iii} but in the noise split condition: there is no external RAM signal driving the model. Instead, a large part (90 %) of the total intrinsic noise is treated as signal and is presented as an equivalent amplitude modulation (s_{ξ}(t), center), while the intrinsic noise is reduced to 10 % of its original strength (see methods for details). In addition to one million trials, this reveals the full expected structure of the second-order susceptibility.

Figure 7: Using second-order susceptibility to predict responses to sine-wave stimuli. A Absolute value of the second-order susceptibility, Eq (9), for both positive and negative frequencies. |χ_{2}|(f_{1}, f_{2}) was estimated from N = 10^{6} trials of model simulations in the noise-split condition (cell 2013-01-08-aa, see table 1 for model parameters). White lines indicate zero frequencies. Nonlinear responses at f_{1} + f_{2} are quantified in the upper right and lower left quadrants. Nonlinear responses at |f_{1} − f_{2}| are quantified in the upper left and lower right quadrants. Baseline firing rate of this cell was at f_{base} = 120 Hz. The position of the orange/red letters correspond to the beat frequencies used for the stimulation with pure sine-waves in the subsequent panels and indicate the sum/difference of those beat frequencies. B Absolute value of the first-order susceptibility. C–F Black line – power spectral density of model simulations in response to stimulation with two pure sine waves, f_{1} and f_{2}, in addition to the receiving fish’s own EOD (three fish scenario). The contrasts of beat beats is 0.0065. Colored circles highlight the height of selected peaks in the power spectrum. Black circles highlight the peak height that can be predicted from A, B. Grey line – power spectral density of model in the baseline condition. B The sum of the two beat frequencies match f_{base}. C The difference of f_{1} and f_{2} match f_{base}. D Only the first beat frequency matches f_{base}. C None of the two beat frequencies matches f_{base}.

Figure 8: Nonlinear responses in P-units and ampullary cells. The second-order susceptibility is condensed into the peakedness of the nonlinearity, PNL(f_{base}) Eq (10), that relates the amplitude of the projected susceptibility at a cell’s baseline firing rate to its median (see fig. 4 G). Each of the recorded neurons contributes at maximum with two stimulus contrasts. Black squares and circles highlight recordings conducted in a single cell. Squares in A, C, E correspond to the cell in fig. 4 and circles to the cell in fig. 11. Squares in B, D, F correspond to the cell in fig. 5. A, B There is a negative correlation between the CV during baseline and PNL(f_{base}). C, D There is a negative correlation between the CV during stimulation and PNL(f_{base}). E, F PNL(f_{base}) is plotted against the response modulation, (see methods), an indicator of the subjective stimulus strength for a cell. There is a negative correlation between response modulation and PNL(f_{base}). Restricting the analysis to the weakest stimulus that was presented to each unique neuron, does not change the results. The number of unique neurons is 221 for P-units and 45 for ampullary cells.

Figure 9: Electrophysiolocical recording setup. The fish, depicted as a black scheme and surrounded by isopotential lines, was positioned in the center of the tank. Blue triangle – electrophysiological recordings were conducted in the posterior anterior lateral line nerve (pALLN). Gray horizontal bars – electrodes for the stimulation. Green vertical bars – electrodes to measure the global EOD placed isopotential to the stimulus, i.e. recording fish’s unperturbed EOD. Red dots – electrodes to measure the local EOD picking up the combination of fish’s EOD and the stimulus. The local EOD was measured with a distance of 1 cm between the electrodes. All measured signals were amplified, filtered, and stored for offline analysis.

Figure 10: Components of the P-unit model. The main steps of the model are illustrated in the left column. The three other columns show the corresponding signals in three different settings: (i) the baseline situation, no external stimulus, only the fish’s self-generated EOD (i.e. the carrier) is present. (ii) RAM stimulation, the carrier is amplitude modulated with a weak (2 % contrast) nad-limited white-noise stimulus. (iii) Noise split condition in which 90 % of the internal noise is used as a driving RAM stimulus scaled with the correction factor ρ (see text). Note that the mean firing rate and the CV of the ISI distribution is the same in this and the baseline condition. As an example, simulations of the model for cell “2012-07-03-ak” are shown (see table 1 for model parameters). A Thresholding: a simple linear threshold was applied to the EOD carrier, Eq (11). B Subsequent dendritic low-pass filtering attenuates the carrier and carves out the AM signal. C Gaussian white-noise is added to the signal in B. Note the reduced internal noise amplitude in the noise split (iii) condition. D Spiking output of the LIF model in response to the sum of B and C. E Power spectra of the LIF neuron’s spiking activity. Under the baseline condition (E_{i}) there are several peaks, from left to right, at the baseline firing rate f_{base}, f_{EOD} − f_{base}, f_{EOD}, and f_{EOD} + f_{base}. In the stimulus driven regime (E_{ii}), there is only a peak at f_{EOD}, while under the noise split condition (E_{iii}) the same peaks as in the baseline condition are present.

Figure 11: Response of experimentally measured noisy P-units (cell identifier “2018-08-24-af”) with a relatively high CV of 0.34 to RAM stimuli with two different contrasts. A Interspike intervals (ISI) distribution during baseline. B Baseline power spectrum. C Top: EOD carrier (gray) with RAM (red). Center: Spike trains in response to the 5 % RAM contrast. Bottom: Spike trains in response to the 10 % RAM contrast. D First-order susceptibility (Eq (7)). E Absolute value |χ_{2}(f_{1}, f_{2})| of the second-order susceptibility, Eq (9), for the 5 % RAM contrast. Pink lines – edges of the structure when f_{1}, f_{2} or f_{1} + f_{2} are equal to f_{base}. F |χ_{2}(f_{1}, f_{2})| for the 10 % RAM contrast. G Projected diagonals, calculated as the mean of the anti-diagonals of the matrices in E–F. Gray dots: f_{base}. Dashed lines: Medians of the projected diagonals.

Figure 12: Dependence of the estimate of the second-order susceptibility on the number of trials N. While the estimate of the noise floor (10th and 90th percentile) of the |χ_{2}(f_{1}, f_{2})| matrix does not saturate yet, the estimates of the high values in the matrix that make up the characteristic ridges saturate for N > 10^{6}. The model used has the identifier 2013-01-08-aa.