These notes develop the mathematical properties of Gaussian processes that matter when they are used as models of neural representation. The motivating example is a population code for space. A smooth random field supplies the subthreshold response of each neuron, and a cellular threshold turns its excursions into place fields. This point of view explains much of the field structure seen across species and environments (Mainali, da Silveira & Burak, 2024). It also gives a tractable way to ask what such a code can represent and how accurately it can be read.

The note began as a chalk talk at Janelia on 18 November 2024. We begin with Gaussian variables and processes, pass through the geometry of threshold excursions, and finish with a simple calculation of local and global decoding error.

Background

Probability enters theoretical neuroscience in several distinct ways. It can represent noise in neural recordings, pose a learning problem with stochastic data or plasticity, model random synaptic weights, or provide an analytical route into large statistical systems. Here randomness serves a different purpose. It models a neural representation itself as a random code over a continuous external variable such as position.

Gaussian variables

Definition (Gaussian variables)

A real random variable ξ\xi is Gaussian when, for some mm\in\RR and σ>0\sigma>0, it has density

ϕξ(x)=12πσ2exp ⁣[(xm)22σ2]. \phi_\xi(x) = \frac{1}{\sqrt{2\pi\sigma^2}} \exp\!\left[-\frac{(x-m)^2}{2\sigma^2}\right].

A vector ξ=(ξ1,,ξp)\boldsymbol\xi=(\xi_1,\ldots,\xi_p) is jointly Gaussian when every linear combination a𝖳ξ\mathbf a^{\mathsf T}\boldsymbol\xi is Gaussian. Its mean is m=𝔼[ξ]\mathbf m=\EE[\boldsymbol\xi] and its covariance matrix is

Σ=𝔼 ⁣[(ξm)(ξm)𝖳]. \boldsymbol\Sigma = \EE\!\left[(\boldsymbol\xi-\mathbf m)(\boldsymbol\xi-\mathbf m)^{\mathsf T}\right].

If detΣ>0\det\boldsymbol\Sigma>0, its density is

ϕξ(x)=exp ⁣[12(xm)𝖳Σ1(xm)](2π)p/2detΣ. \phi_{\boldsymbol\xi}(\mathbf x) = \frac{\exp\!\left[-\tfrac12(\mathbf x-\mathbf m)^{\mathsf T} \boldsymbol\Sigma^{-1}(\mathbf x-\mathbf m)\right]} {(2\pi)^{p/2}\sqrt{\det\boldsymbol\Sigma}}.

Conditional Gaussian

The most useful closure property of a multivariate Gaussian is that conditioning one subset of variables on another still gives a Gaussian. Let ξ\boldsymbol\xi and η\boldsymbol\eta be jointly Gaussian, with means mξ\mathbf m_\xi and mη\mathbf m_\eta, and covariance

Σ=(ΣξξΣξηΣηξΣηη). \boldsymbol\Sigma= \begin{pmatrix} \boldsymbol\Sigma_{\xi\xi} & \boldsymbol\Sigma_{\xi\eta}\\ \boldsymbol\Sigma_{\eta\xi} & \boldsymbol\Sigma_{\eta\eta} \end{pmatrix}.

Theorem (Gaussian conditioning)

Given η=y\boldsymbol\eta=\mathbf y, the conditional distribution of ξ\boldsymbol\xi is Gaussian. Its mean is

ξ^(y)=mξΣξηΣηη1(ymη),\widehat{\boldsymbol\xi}(\mathbf y) = \mathbf m_\xi \boldsymbol\Sigma_{\xi\eta}\boldsymbol\Sigma_{\eta\eta}^{-1} (\mathbf y-\mathbf m_\eta),

and its covariance is

Σξξη=ΣξξΣξηΣηη1Σηξ.\boldsymbol\Sigma_{\xi\xi\mid\eta} = \boldsymbol\Sigma_{\xi\xi} - \boldsymbol\Sigma_{\xi\eta}\boldsymbol\Sigma_{\eta\eta}^{-1} \boldsymbol\Sigma_{\eta\xi}.

The covariance does not depend on the observed value y\mathbf y.

Gaussian processes

Definition (Gaussian process)

A stochastic process {f(x):x}\{f(x):x\in\RR\} is a Gaussian process if every finite linear combination

S=kakf(xk) S=\sum_k a_k f(x_k)

is Gaussian. Equivalently, for every finite set x1,,xkx_1,\ldots,x_k, the vector (f(x1),,f(xk))(f(x_1),\ldots,f(x_k)) is multivariate Gaussian.

Moving from a Gaussian variable to a Gaussian vector replaces one value with a finite indexed collection. A Gaussian process continues that move to a continuously indexed random function. It is completely determined by its mean and covariance functions,

m(x)=𝔼[f(x)],r(x,y)=𝔼[(f(x)m(x))(f(y)m(y))]. m(x)=\EE[f(x)], \qquad r(x,y)=\EE[(f(x)-m(x))(f(y)-m(y))].

For a stationary process with constant mean, the covariance depends only on the separation Δx=yx\Delta x=y-x, so we write r(x,y)=r(Δx)r(x,y)=r(\Delta x). In particular, r(0)=r0r(0)=r_0 is the pointwise variance.

Origins of a random code

Consider NN spatially selective neurons presynaptic to a CA1 place cell. Let ui(x)u_i(x) be the bounded response of input neuron ii over an environment x[0,L]x\in[0,L]. For clarity, suppose all inputs share one tuning shape up to translation,

ui(x)=u0(xxi), u_i(x)=u_0(x-x_i),

with preferred positions xix_i that tile the environment densely and uniformly. The subthreshold input to the CA1 cell is a random weighted sum,

f(x)=i=1NWiui(x),f(x)=\sum_{i=1}^{N}W_i u_i(x),

where the independent weights WiW_i have zero mean and finite variance. For any finite set of locations {xk}\{x_k\}, the multidimensional central limit theorem gives a jointly Gaussian vector (f(x1),,f(xk))(f(x_1),\ldots,f(x_k)) as NN grows (van der Vaart, 1998; Lehmann & Casella, 1998). The limiting random function is therefore a Gaussian process. The central limit theorem supplies the Gaussian finite-dimensional distributions. The tuning curves and uniform tiling assumptions supply smoothness and stationarity.

Uniform tiling also makes the covariance translation invariant. With input density ρ=N/L\rho=N/L,

𝔼[f(x)f(y)]=i,j=1N𝔼[WiWj]ui(x)uj(y)=Var(W)i=1Nui(x)ui(y)Var(W)ρu0(s)u0(s+Δx) ⁣ds. \begin{aligned} \EE[f(x)f(y)] &=\sum_{i,j=1}^{N}\EE[W_iW_j]u_i(x)u_j(y)\\ &=\Var(W)\sum_{i=1}^{N}u_i(x)u_i(y)\\ &\approx \Var(W)\rho\int u_0(s)u_0(s+\Delta x)\,\dd s. \end{aligned}

Choosing Var(W)=L/N\Var(W)=L/N leaves a covariance r(Δx)r(\Delta x) that does not grow with population size.

Compare the random weighted sum with the cellular threshold that selects its connected excursions in Plate 1.1.

Plate 1.1 Random input sum and thresholding

translated inputs

Translated presynaptic tuning curvesFive compact tuning curves, denoted u sub i of x, tile position. Independent signed weights W sub i accompany them.ui(x)u_i(x)WiW_iposition x\text{position }x

weighted sum

Weighted tuning curves sum to a Gaussian fieldA smooth irregular field f of x fluctuates around zero after the weighted input curves are added.random fieldf(x)=iWiui(x)f(x)=\sum_i W_i u_i(x)position x\text{position }x

cellular threshold

Thresholding retains connected place fieldsThe same smooth field is compared with the threshold theta times the square root of r sub zero. Three intervals above it remain as place fields.connected excursionsθr0\theta\sqrt{r_0}position x\text{position }x
We sum translated input fields with independent weights to obtain a smooth random field. A cellular threshold keeps its connected excursions.

Example (Gaussian input fields)

Suppose each input has a Gaussian tuning curve,

ui(x)=Rexp ⁣[(xci)22σ2]. u_i(x)=R\exp\!\left[-\frac{(x-c_i)^2}{2\sigma^2}\right].

Then the covariance is the autocorrelation of that curve. Away from finite-boundary effects,

r(Δx)R2exp ⁣[(xc)2+(yc)22σ2] ⁣dc=R2πσ2exp ⁣[Δx24σ2]. \begin{aligned} r(\Delta x) &\approx R^2\int \exp\!\left[-\frac{(x-c)^2+(y-c)^2}{2\sigma^2}\right]\dd c\\ &=R^2\sqrt{\pi\sigma^2} \exp\!\left[-\frac{\Delta x^2}{4\sigma^2}\right]. \end{aligned}

The covariance width is therefore 2\sqrt{2} times the standard deviation of an individual field, or twice its variance parameter.

In this model, position xx is supplied by the environment. The process f(x)f(x) represents subthreshold CA1 activity produced by many synaptic inputs. Cellular thresholding, together with any incident inhibition, reveals firing fields wherever f(x)f(x) rises above a level of order its standard deviation.

Excursion structure

The neural response can be idealized by a rectified threshold,

h(x)=max ⁣(0,f(x)θr0).h(x)=\max\!\left(0,f(x)-\theta\sqrt{r_0}\right).

Its nonzero regions are the excursion sets of ff above θr0\theta\sqrt{r_0}. Their number, length, separation, height, and boundary slopes expose much of the geometry of the code before any further output nonlinearity is chosen. Use the fixed path in Plate 2.1 to see how the threshold changes the crossings and connected excursions.

Plate 2.1 Threshold crossings
uu0.00 5 crossings
Threshold crossings of a smooth Gaussian fieldA smooth sample path f of x crosses a movable level u. Crossing points and the parts of the path above that level are marked directly. uu0.00 f(x)f(x)above u\text{above }uposition x\text{position }x
Move the threshold to compare crossing count with the number and width of connected excursions. The sample path stays fixed.

The Kac-Rice formula

Kac and Rice gave a way to count level crossings of a smooth function, and then of a stochastic process, without locating each root directly (Rice, 1944; Kac & Slepian, 1959).

Theorem (Kac-Rice counting formula)

Let f:[a,b]f:[a,b]\to\RR be continuously differentiable and have no tangential crossings of the level TT. Define

ηε(g)=12ε1{g<ε}. \eta_\varepsilon(g)=\frac{1}{2\varepsilon} \mathbf 1\{\abs{g}<\varepsilon\}.

The number of level crossings is

Nf(T)=limε0abηε(f(x)T)f(x) ⁣dx.N_f(T)=\lim_{\varepsilon\to0} \int_a^b \eta_\varepsilon(f(x)-T)\abs{f'(x)}\,\dd x.

In the distributional limit,

Nf(T)=abδ(f(x)T)f(x) ⁣dx.N_f(T)=\int_a^b\delta(f(x)-T)\abs{f'(x)}\,\dd x.

Proof.

For sufficiently small ε\varepsilon, the set {x:f(x)T<ε}\{x:\abs{f(x)-T}<\varepsilon\} separates into intervals around the crossings. Take one such interval [c,d][c,d]. Since a crossing is not tangential, ff' keeps its sign there, and

12εcdf(x) ⁣dx=12εcdf(x) ⁣dx=f(d)f(c)2ε=1. \begin{aligned} \frac{1}{2\varepsilon}\int_c^d\abs{f'(x)}\,\dd x &=\frac{1}{2\varepsilon}\abs{\int_c^d f'(x)\,\dd x}\\ &=\frac{\abs{f(d)-f(c)}}{2\varepsilon}=1. \end{aligned}

Summing these unit contributions over the disjoint intervals gives the crossing count. The delta form is the ε0\varepsilon\to0 limit.

Compare shallow and steep crossings in Plate 2.2. Each contributes one to the count.

Plate 2.2 Kac-Rice crossing count

finite counting window

A narrow band isolates threshold crossingsA smooth curve enters and leaves the epsilon band around level T at four locations. Short wine marks identify the portions counted by the approximate delta function.TTf(x)T<ε\lvert f(x)-T\rvert<\varepsilonposition x\text{position }x

slope compensation

Shallow and steep crossings each contribute oneA shallow crossing occupies a wide spatial interval inside the epsilon band, while a steep crossing occupies a narrow interval. In each case the integral of eta sub epsilon times absolute slope equals one.different slopes, equal countsshallow f\text{shallow }\lvert f'\rvertwide Δx\text{wide }\Delta xsteep f\text{steep }\lvert f'\rvertnarrow Δx\text{narrow }\Delta xηε(f(x)T)f(x) ⁣dx=1\int \eta_\varepsilon(f(x)-T)\lvert f'(x)\rvert\,\dd x=1
Each simple crossing contributes one. The slope factor compensates for the width of the counting window in position.

Expected crossing count

We now apply the formula to a stationary, mean-zero, differentiable Gaussian process. At a fixed location, f(x)f(x) and f(x)f'(x) are jointly Gaussian. Stationarity gives

𝔼[f(x)f(x)]=12 ⁣d ⁣dx𝔼[f(x)2]=0, \EE[f(x)f'(x)] =\frac12\frac{\dd}{\dd x}\EE[f(x)^2]=0,

and

𝔼[f(x)2]=2xyr(yx)y=x=r(0). \EE[f'(x)^2] =\left.\frac{\partial^2}{\partial x\,\partial y}r(y-x)\right|_{y=x} =-r''(0).

Thus

(f(x)f(x))𝒩 ⁣((00),(r000r0)). \begin{pmatrix}f(x)\\f'(x)\end{pmatrix} \sim\mathcal N\!\left( \begin{pmatrix}0\\0\end{pmatrix}, \begin{pmatrix}r_0&0\\0&-r''_0\end{pmatrix} \right).

The zero covariance makes f(x)f(x) and f(x)f'(x) independent. Taking the expectation of at level T=θr0T=\theta\sqrt{r_0} gives

𝔼[Nf(θr0)]=Lpf(θr0)𝔼[f(x)]=L2πr0eθ2/22r0π=Lπr0r0eθ2/2. \begin{aligned} \EE[N_f(\theta\sqrt{r_0})] &=L\,p_f(\theta\sqrt{r_0})\,\EE[\abs{f'(x)}]\\ &=\frac{L}{\sqrt{2\pi r_0}}e^{-\theta^2/2} \sqrt{-\frac{2r''_0}{\pi}}\\ &=\frac{L}{\pi}\sqrt{-\frac{r''_0}{r_0}}e^{-\theta^2/2}. \end{aligned}

Every bounded excursion has one upcrossing and one downcrossing. Its expected density is therefore half the crossing density,

μ(θr0)=12πr0r0exp ⁣(θ22).\mu(\theta\sqrt{r_0}) =\frac{1}{2\pi}\sqrt{-\frac{r''_0}{r_0}} \exp\!\left(-\frac{\theta^2}{2}\right).

Let Φ\Phi be the standard normal cumulative distribution function. The expected fraction of the domain above the threshold is 1Φ(θ)1-\Phi(\theta). Dividing the total occupied and unoccupied lengths by the expected number of excursions gives the approximate mean excursion length ss and mean gap sˉ\bar s,

s=2π[1Φ(θ)]eθ2/2r0r0,sˉ=2πΦ(θ)eθ2/2r0r0.\begin{aligned} s &=2\pi\,[1-\Phi(\theta)]e^{\theta^2/2} \sqrt{-\frac{r_0}{r''_0}},\\ \bar s &=2\pi\,\Phi(\theta)e^{\theta^2/2} \sqrt{-\frac{r_0}{r''_0}}. \end{aligned}

At high thresholds, the gaps are much longer than the excursions. Consecutive events are then separated by several correlation lengths, and the crossing process approaches a Poisson process with the mean above.

Spectral density

Theorem (Bochner's theorem)

A continuous function r(Δx)r(\Delta x) is non-negative definite, and hence a valid stationary covariance, if and only if it has a spectral representation

r(Δx)=eiωΔx ⁣dρ(ω),r(\Delta x)=\int_{-\infty}^{\infty} e^{i\omega\Delta x}\,\dd\rho(\omega),

for a non-decreasing, right-continuous, bounded spectral measure ρ\rho. If the kkth derivative of the process exists, then

rf(k)(Δx)=(1)krf(2k)(Δx)=ω2keiωΔx ⁣dρ(ω). r_{f^{(k)}}(\Delta x) =(-1)^k r_f^{(2k)}(\Delta x) =\int_{-\infty}^{\infty}\omega^{2k}e^{i\omega\Delta x}\,\dd\rho(\omega).

When the spectrum has a density, differentiation multiplies it by ω2k\omega^{2k}.

Define the even spectral moments

ω2k=ω2k ⁣dρ(ω). \omega_{2k}=\int_{-\infty}^{\infty}\omega^{2k}\,\dd\rho(\omega).

Then ω0=r0\omega_0=r_0 and ω2=r0\omega_2=-r''_0. The excursion density becomes

μ(θr0)=12πeθ2/2ω2ω0.\mu(\theta\sqrt{r_0}) =\frac{1}{2\pi}e^{-\theta^2/2} \sqrt{\frac{\omega_2}{\omega_0}}.

At the mean level, μ(0)=(2π)1ω2/ω0\mu(0)=(2\pi)^{-1}\sqrt{\omega_2/\omega_0}. It has units of inverse length and supplies a geometric correlation scale.

Repeating the argument for the derivative process gives equal densities of local maxima and minima,

μ+=μ=12πω4ω2.\mu_+=\mu_-= \frac{1}{2\pi}\sqrt{\frac{\omega_4}{\omega_2}}.

The ratio between turning points and mean-level crossings defines the scale-invariant irregularity parameter

1α=ω0ω4ω22,0<α1.\frac{1}{\alpha} =\sqrt{\frac{\omega_0\omega_4}{\omega_2^2}}, \qquad 0<\alpha\leq1.

Values near one indicate a regular process with roughly one maximum and one minimum between mean-level upcrossings. Small values indicate additional high-frequency structure.

Compare the normalized densities for ω0\omega_0, ω2\omega_2, and ω4\omega_4 in Plate 2.3. Dividing each weighted spectrum by its own moment gives unit area, so the three shapes share one vertical scale even though their unnormalized moments have different units.

Plate 2.3 Spectral moments

variance, ω0= ⁣dρ\omega_0=\int \dd\rho

Unweighted spectral density determines field varianceFor the smooth example, S of omega is the density d rho over d omega of the spectral measure. Its normalized area is one, while omega zero is the unnormalized moment.S(ω)= ⁣dρ ⁣dωS(\omega)=\frac{\dd\rho}{\dd\omega}S(ω)ω0\frac{S(\omega)}{\omega_0}frequency ω\text{frequency }\omega

crossings, ω2=ω2 ⁣dρ\omega_2=\int \omega^2\,\dd\rho

Frequency squared weighting determines crossing densityThe smooth density S of omega is weighted by omega squared and normalized by omega two, shifting contribution toward higher frequencies.ω2S(ω)ω2\frac{\omega^2S(\omega)}{\omega_2}frequency ω\text{frequency }\omega

extrema, ω4=ω4 ⁣dρ\omega_4=\int \omega^4\,\dd\rho

Frequency to the fourth weighting determines extrema densityThe smooth density S of omega is weighted by omega to the fourth power and normalized by omega four, moving contribution farther from zero.ω4S(ω)ω4\frac{\omega^4S(\omega)}{\omega_4}frequency ω\text{frequency }\omega
Field variance, crossing density, and extrema density depend on successive spectral moments. All panels use the same normalized scale.

Excursion shape

Counting fields is only the first step. To describe a typical field, we condition on the event that the process crosses the threshold from below (Kac & Slepian, 1959). Palm conditioning selects the observation location from the crossings of the process. A location sampled uniformly in space follows a different distribution.

Slope at an upcrossing

Theorem (Upcrossing slope)

At an upcrossing of any level θr0\theta\sqrt{r_0}, the positive derivative v=f(x)v=f'(x) has Rayleigh density

p(v)=vω2exp ⁣(v22ω2),v0,p_{\uparrow}(v)= \frac{v}{\omega_2}\exp\!\left(-\frac{v^2}{2\omega_2}\right), \qquad v\geq0,

and this distribution is independent of the threshold.

Proof.

Restrict the Kac-Rice count to upcrossings whose slope lies between 00 and vv. Since f(x)f(x) and f(x)f'(x) are independent, the factor involving the threshold cancels between the restricted and unrestricted counts:

(f<vupcrossing)=0vsexp[s2/(2ω2)] ⁣ds0sexp[s2/(2ω2)] ⁣ds=0vsω2exp ⁣(s22ω2) ⁣ds. \begin{aligned} \PP(f'<v\mid\text{upcrossing}) &=\frac{\int_0^v s\exp[-s^2/(2\omega_2)]\,\dd s} {\int_0^\infty s\exp[-s^2/(2\omega_2)]\,\dd s}\\ &=\int_0^v\frac{s}{\omega_2} \exp\!\left(-\frac{s^2}{2\omega_2}\right)\dd s. \end{aligned}

Differentiating gives .

Although ff' is Gaussian at a uniformly chosen point, it is not Gaussian at an upcrossing. Steep slopes create more crossings per unit length and are sampled more often. The derivative factor in the Kac-Rice formula expresses exactly this selection bias. From this point onward, θ\theta denotes the threshold itself. Replace it with θr0\theta\sqrt{r_0} to restore the variance scale.

The Slepian process

Definition (Slepian model)

Let ff be stationary and have finitely many upcrossings in every bounded interval. A Slepian process {ξθ(x)}\{\xi_\theta(x)\} describes ff as seen from a typical upcrossing of level θ\theta. For a finite vector of locations,

(ξθ(x)v)=0p(z) ⁣(f(x)vf(0)=θ,f(0)=z) ⁣dz.\PP(\xi_\theta(\mathbf x)\leq\mathbf v) =\int_0^\infty p_{\uparrow}(z) \PP\!\left(f(\mathbf x)\leq\mathbf v \mid f(0)=\theta, f'(0)=z\right)\dd z.

For a Gaussian process, the conditional law inside this integral is Gaussian. Its mean and covariance therefore determine it completely. Take

ξ=(f(y),f(x)),η=(f(0),f(0)). \boldsymbol\xi=(f(y),f(x)), \qquad \boldsymbol\eta=(f(0),f'(0)).

Bochner’s representation gives the remaining cross-covariance,

𝔼[f(x)f(y)]=r(yx). \EE[f'(x)f(y)]=-r'(y-x).

The joint covariance is therefore

Σ=(r(0)r(yx)r(y)r(y)r(xy)r(0)r(x)r(x)r(y)r(x)r(0)0r(y)r(x)0r(0)).\boldsymbol\Sigma= \begin{pmatrix} r(0)&r(y-x)&r(y)&-r'(y)\\ r(x-y)&r(0)&r(x)&-r'(x)\\ r(y)&r(x)&r(0)&0\\ -r'(y)&-r'(x)&0&-r''(0) \end{pmatrix}.

With ω0=r0\omega_0=r_0 and ω2=r(0)\omega_2=-r''(0), Gaussian conditioning gives

𝔼[f(x)f(0)=θ,f(0)=z]=θr(x)ω0zr(x)ω2, \EE[f(x)\mid f(0)=\theta,f'(0)=z] =\frac{\theta r(x)}{\omega_0} -\frac{z r'(x)}{\omega_2},

and residual covariance

rκ(x,y)=r(yx)r(x)r(y)ω0r(x)r(y)ω2.r_\kappa(x,y) =r(y-x)-\frac{r(x)r(y)}{\omega_0} -\frac{r'(x)r'(y)}{\omega_2}.

The last two terms are the reduction in uncertainty caused by fixing the height and slope at the crossing. They vanish far from the origin when the covariance and its derivative decay.

Theorem (Gaussian excursion decomposition)

After a typical upcrossing, a stationary Gaussian process has the representation

ξθ(x)=θr(x)ω0ζr(x)ω2+κ(x),\xi_\theta(x) =\frac{\theta r(x)}{\omega_0} -\frac{\zeta r'(x)}{\omega_2} +\kappa(x),

where ζ\zeta has the Rayleigh density in , and κ\kappa is an independent, mean-zero, nonstationary Gaussian process with covariance .

Compare the conditional mean and residual process with the high-threshold parabolic limit in Plate 2.4.

Plate 2.4 Conditioned excursion

conditioned upcrossing

Slepian decomposition after an upward crossingA process is fixed at threshold theta at zero with positive Rayleigh slope zeta. Direct labels identify the threshold term, slope term, and residual kappa of x.conditioned fielddistance from crossingthreshold θ\text{threshold }\thetaκ(x), residual\kappa(x),\ \text{residual}Rayleigh slope ζ\text{Rayleigh slope }\zeta

high threshold limit

A high excursion approaches a parabolaAbove a high threshold theta, the conditioned excursion narrows to a parabolic cap. Its length scales as zeta over theta and its height as zeta squared over theta.parabolic capheightrescaled distancehigh θ\text{high }\thetalengthζ/θ\text{length}\propto\zeta/\thetaζ2/θ\propto\zeta^2/\theta
Conditioning fixes the height and slope at the origin. At high threshold, the local excursion approaches a parabola.

High excursions

At high threshold, the length and excess height of an excursion are both of order θ1\theta^{-1}. Expand the covariance around the crossing:

r(x/θ)=ω0ω2x22θ2[1+o(1)],r(x/θ)=ω2xθ[1+o(1)]. r(x/\theta) =\omega_0-\frac{\omega_2x^2}{2\theta^2}[1+o(1)], \qquad r'(x/\theta) =-\frac{\omega_2x}{\theta}[1+o(1)].

The conditioned residual satisfies κ(x/θ)=o(x/θ)\kappa(x/\theta)=o(x/\theta). Substituting these terms into the Slepian process yields

θ{ξθ(x/θ)θ}ζxω2x22ω0=ω22ω0(xζω0ω2)2+ζ2ω02ω2.\begin{aligned} \theta\{\xi_\theta(x/\theta)-\theta\} &\approx \zeta x-\frac{\omega_2x^2}{2\omega_0}\\ &=-\frac{\omega_2}{2\omega_0} \left(x-\frac{\zeta\omega_0}{\omega_2}\right)^2 +\frac{\zeta^2\omega_0}{2\omega_2}. \end{aligned}

The excursion is locally parabolic. Its excess height is approximately ζ2ω0/(2θω2)\zeta^2\omega_0/(2\theta\omega_2) and its length is approximately 2ω0ζ/(θω2)2\omega_0\zeta/(\theta\omega_2). The length inherits the Rayleigh law of the crossing slope, while the height inherits its square.

In an isotropic DD-dimensional process, make the simplifying approximation that the DD principal lengths share this Rayleigh scaling. If a normalized linear size SS has density

pS(s)=sω2exp ⁣(s22ω2), p_S(s)=\frac{s}{\omega_2}\exp\!\left(-\frac{s^2}{2\omega_2}\right),

and volume is V=SDV=S^D, then the change of variables s=v1/Ds=v^{1/D} gives

pV(v)=v2/D1Dω2exp ⁣(v2/D2ω2).p_V(v)=\frac{v^{2/D-1}}{D\omega_2} \exp\!\left(-\frac{v^{2/D}}{2\omega_2}\right).

For D=2D=2, this normalized volume, and likewise the squared Rayleigh height variable, is exponentially distributed.

Coding properties

So far the Gaussian process has described the structure of a neural code. We now ask how well a population of these fields can encode position. The calculation follows a simplified random-code model without thresholding (Blanco Malerba et al., 2022).

Let NN neurons independently sample a stationary Gaussian process over a one-dimensional environment of length LL,

f(x)=(f1(x),,fN(x)). \mathbf f(x)=(f_1(x),\ldots,f_N(x)).

Suppose the response at the true position x=0x=0 is corrupted by independent Gaussian noise zi𝒩(0,η2)z_i\sim\mathcal N(0,\eta^2). Under that noise model, maximum-likelihood decoding minimizes squared distance:

x^=arg minxi=1N[fi(x)fi(0)zi]2.\widehat x =\argmin_x\sum_{i=1}^{N} \left[f_i(x)-f_i(0)-z_i\right]^2.

We measure performance by mean squared position error,

=𝔼[(x^x)2].\mathcal L=\EE[(\widehat x-x)^2].

Two mechanisms contribute. A local error moves the single posterior peak away from the true position. A global error makes a distant, weakly correlated codeword appear closer than the true one. Their dependence on field roughness points in opposite directions.

Local error

Suppose the error Δx=x^\Delta x=\widehat x is small. Linearizing each field around zero gives

x^=arg minΔxi=1N[fi(0)Δxzi]2,Δx=ifi(0)ziifi(0)2. \begin{aligned} \widehat x &=\argmin_{\Delta x}\sum_{i=1}^{N} \left[f_i'(0)\Delta x-z_i\right]^2,\\ \Delta x &=\frac{\sum_i f_i'(0)z_i}{\sum_i f_i'(0)^2}. \end{aligned}

Conditioned on the field derivatives, averaging over the readout noise gives

𝔼z[(Δx)2]=η2ifi(0)2=η2ω2ifi(0)2/ω2. \EE_z[(\Delta x)^2] =\frac{\eta^2}{\sum_i f_i'(0)^2} =\frac{\eta^2}{\omega_2 \sum_i f_i'(0)^2/\omega_2}.

The normalized sum is χN2\chi_N^2. Since 𝔼[(χN2)1]=1/(N2)\EE[(\chi_N^2)^{-1}]=1/(N-2) for N>2N>2,

𝔼[local]=η2ω2(N2).\EE[\mathcal L_{\mathrm{local}}] =\frac{\eta^2}{\omega_2(N-2)}.

Rougher fields have larger ω2\omega_2 and steeper local gradients, so they reduce this error.

Global error

Now assume global errors are rare and occur at positions separated by more than one correlation length. Their count is then approximately Poisson. If λ\lambda is the rate per independent segment,

(at least one global error)=1eλLλL. \PP(\text{at least one global error}) =1-e^{-\lambda L}\approx\lambda L.

At a distant position xx, define the vector difference

f~=f(x)f(0). \widetilde{\mathbf f}=\mathbf f(x)-\mathbf f(0).

A global error occurs when the distant noisy code is closer to the observation than the true code. The noise is symmetric, so changing the sign of the cross term leaves the error probability unchanged.

f~+z2<z2, \norm{\widetilde{\mathbf f}+\mathbf z}^2<\norm{\mathbf z}^2,

or equivalently when

=f~2+2f~𝖳z<0.\mathcal I =\norm{\widetilde{\mathbf f}}^2 +2\widetilde{\mathbf f}^{\mathsf T}\mathbf z<0.

Conditioned on f~\widetilde{\mathbf f},

𝒩 ⁣(f~2,4η2f~2). \mathcal I\sim\mathcal N\!\left( \norm{\widetilde{\mathbf f}}^2, 4\eta^2\norm{\widetilde{\mathbf f}}^2 \right).

Dividing by the positive norm gives a Gaussian variable with mean f~\norm{\widetilde{\mathbf f}} and variance 4η24\eta^2. The conditional error probability can be written as

(<0f~)=018πη2exp ⁣[(qf~)28η2] ⁣dq. \PP(\mathcal I<0\mid\widetilde{\mathbf f}) =\int_{-\infty}^{0} \frac{1}{\sqrt{8\pi\eta^2}} \exp\!\left[-\frac{(q-\norm{\widetilde{\mathbf f}})^2}{8\eta^2}\right]\dd q.

For points beyond the correlation length, each component of f~\widetilde{\mathbf f} has variance approximately 2r02r_0. Averaging the exponential over the resulting norm distribution, using the noncentral χ2\chi^2 moment-generating function, gives the approximation used in the talk,

𝔼f ⁣[exp ⁣(r04η2[qf~2r0]2)]=exp ⁣[q22(1+2η2/r0)](1+r02η2)N/2. \begin{aligned} &\EE_{\mathbf f}\!\left[ \exp\!\left(-\frac{r_0}{4\eta^2} \left[q-\frac{\norm{\widetilde{\mathbf f}}}{\sqrt{2r_0}}\right]^2\right) \right]\\ &\qquad= \exp\!\left[-\frac{q^2}{2(1+2\eta^2/r_0)}\right] \left(1+\frac{r_0}{2\eta^2}\right)^{-N/2}. \end{aligned}

Completing the remaining half-Gaussian integral yields

(<0)=12(1+r02η2)(N1)/2.\PP(\mathcal I<0) =\frac12\left(1+\frac{r_0}{2\eta^2}\right)^{-(N-1)/2}.

To turn this single-comparison probability into an error rate, the note uses the simplifying estimate that an environment of length LL contains Lω2L\omega_2 effectively independent comparisons. This is a rough correlation-length approximation rather than an exact identity. It gives

(global error)Lω22(1+r02η2)(N1)/2. \PP(\text{global error}) \approx\frac{L\omega_2}{2} \left(1+\frac{r_0}{2\eta^2}\right)^{-(N-1)/2}.

Finally, approximate the signed displacement by a uniform variable on an interval of length LL centered at zero. Its second moment is L2/12L^2/12, so

𝔼[global]=L3ω224(1+r02η2)(N1)/2.\EE[\mathcal L_{\mathrm{global}}] =\frac{L^3\omega_2}{24} \left(1+\frac{r_0}{2\eta^2}\right)^{-(N-1)/2}.

Adding the local and global contributions gives

𝔼[]=η2ω2(N2)+L3ω224(1+r02η2)(N1)/2.\EE[\mathcal L] =\frac{\eta^2}{\omega_2(N-2)} +\frac{L^3\omega_2}{24} \left(1+\frac{r_0}{2\eta^2}\right)^{-(N-1)/2}.

Compare the two error terms and their minimum in Plate 3.1 as field roughness changes.

Plate 3.1 Coding error and field roughness
NN16 formal minimum at ω2\omega_24.90

decomposition, independent segments

Local, global, and total coding lossFor sixteen neurons, local error falls and the independent-segment approximation to global error rises as omega two increases. Their sum has a minimum near omega two equals 4.90. Both axes are logarithmic.local errorglobal errortotalminimum 4.9010410^{-4}10310^{-3}10210^{-2}10110^{-1}ω2 (log scale)\omega_2\ \text{(log scale)}

total loss across population size

Total coding loss for three population sizesDirectly labelled total-loss curves compare eight, sixteen, and twenty-four neurons. Larger populations move the formal optimum toward higher omega two and rougher fields. Both axes are logarithmic.N=8N=8N=16N=16N=24N=2410101110210^{-2}10410^{-4}ω2 (log scale)\omega_2\ \text{(log scale)}
Local error falls with roughness, while the independent-segment estimate of global error rises. Their sum has an interior minimum.

The two terms assign opposite roles to ω2\omega_2. More roughness improves local resolution but creates more independent opportunities for a distant confusion. Increasing NN, by contrast, suppresses the global term exponentially (Blanco Malerba et al., 2022). The balance gives an optimal roughness within this simplified model.

References

  1. A. W. van der Vaart (). Asymptotic Statistics. Cambridge University Press. doi:10.1017/CBO9780511802256.
  2. E. L. Lehmann and George Casella (). Theory of Point Estimation. Springer, second edition. doi:10.1007/b98854.
  3. Mark Kac and David Slepian (). Large Excursions of Gaussian Processes. The Annals of Mathematical Statistics 30(4), 1215-1228. JSTOR:2237465. ↩1 ↩2
  4. Nischal Mainali, Rava Azeredo da Silveira, and Yoram Burak (). Universal statistics of hippocampal place fields across species and dimensionalities. bioRxiv. doi:10.1101/2024.06.11.597569.
  5. S. O. Rice (). Mathematical Analysis of Random Noise. The Bell System Technical Journal 23(3), 282-332. doi:10.1002/j.1538-7305.1944.tb00874.x.
  6. Simone Blanco Malerba, Mirko Pieropan, Yoram Burak, and Rava Azeredo da Silveira (). Random Compressed Coding with Neurons. bioRxiv. doi:10.1101/2022.01.06.475186. ↩1 ↩2