Bayesian Efficient Coding
Abstract
The efficient coding hypothesis, which proposes that neurons are optimized to maximize information about the environment, has provided a guiding theoretical framework for sensory and systems neuroscience. More recently, a theory known as the Bayesian Brain hypothesis has focused on the brain's ability to integrate sensory and prior sources of information in order to perform Bayesian inference. Although pieces of a connection between these two hypotheses have appeared in prior work, a general formulation that treats the optimality criterion as an arbitrary functional of the posterior distribution -- and thereby admits both information-based and other objectives within a single framework -- has remained largely implicit. Here we make this formulation explicit, developing a Bayesian theory of efficient coding that defines Bayesian efficient codes in terms of four basic ingredients: (1) a stimulus prior distribution; (2) an encoding model; (3) a capacity constraint, specifying a neural resource limit; and (4) a loss functional, quantifying the desirability or undesirability of various posterior distributions. Classic efficient codes arise as the special case in which the loss functional is the posterior entropy, leading to a code that maximizes mutual information, but alternate loss functionals give solutions that differ dramatically from information-maximizing codes. Within this framework we introduce {\it covtropy}, a novel family of losses defined on posterior distributions and parameterized by a single exponent, and use it to show that decorrelation of sensory inputs -- optimal under classic efficient codes in low-noise settings -- can be disadvantageous for objectives that penalize large errors. We then reanalyze Laughlin's seminal data on contrast coding in the blowfly large monopolar cell, and find that the measured response nonlinearity is better explained by minimizing $L_p$ reconstruction error with $p = 1/2$ than by information maximization, overturning a forty-year-old interpretation. Bayesian efficient coding thus enlarges the family of codes that are optimal under different objectives and provides a more general framework for understanding the design principles of sensory systems.
02 /Specification & Classification
Click any tag to browse matching papersIn-depth summary
Claude Opus 5.5 · max effort · 8 Nov 2026 · from the full text of version 6 (21 Sept 2026)
Letting sensory codes optimize any posterior-based loss makes information maximization (infomax) one special case; blowfly large monopolar cell responses match p = 1/2 Lp reconstruction-error codes better than infomax.
Efficient coding judges sensory codes by transmitted information, while the Bayesian brain view centers on posterior inference; the authors say a formulation admitting both information-theoretic and other optimality criteria had stayed largely implicit. Here the loss is any functional of the posterior rather than, as typically in decision theory and in recent Lp-based unifications, the expected cost of a point estimate, so posterior entropy or average posterior standard deviation also qualify.
Key results
ShownBarlow's classical efficient coding is the special case of a Bayesian efficient code whose loss is posterior entropy; other losses on the posterior can select different optimal encoders for the same stimuli.
Minimizing expected posterior entropy maximizes mutual information. In a 2D Gaussian toy with posterior standard deviations (SDs) of (1, 10), (2, 7) and (5, 5), entropy picks the first, summed SD the second (9 vs 11, 10) and summed variance the third (50 vs 101, 53). In a four-option toy, the 1-bit encoder (vs 0.96 bits) is right only 50% of the time (vs 80%) under maximum a posteriori decoding. · Bayesian efficient coding; Bayesian vs. classical efficient codes; Continuous example: 2D Gaussian; Discrete example: multiple choice exam
SuggestedReanalyzed blowfly large monopolar cell (LMC) contrast responses from Laughlin's 1981 experiment match the code minimizing Lp reconstruction error with p = 1/2 more closely than the infomax, histogram-equalizing code.
Root-mean-square error (RMSE) against ten digitized response points falls from 0.051 for infomax to 0.015 for p = 1/2 (about 70% lower), the lowest on the tested p grid, and rises monotonically for larger p. Response distributions predicted for p = 1/2 and implied by the measured LMC nonlinearity both peak at intermediate levels, whereas infomax predicts a flat one. · Noiseless response; Blowfly LMC data from [30]; Figure legends
ShownFor linear Gaussian encoding with a power constraint, optimal receptive fields have closed forms for infomax and for covtropy (summed p-th powers of posterior standard deviations); even at high signal-to-noise ratio, larger p whitens less than infomax and can make responses more correlated than stimuli.
Assumes stimulus, noise and weight matrices share an eigenbasis; the covtropy closed form holds while all modes stay active, and at lower power the constrained optimum drives some gains to zero. In Fig. 3 (infinitesimal noise proportional to stimulus covariance), infomax whitens responses, p = 2 keeps stimulus correlations and p = 4 strengthens them; infomax's p = 4 covtropy is nearly 4 times the optimum. · Linear receptive fields; Minimum covtropy encoding; Linear receptive fields; Figure legends
SuggestedFor a blowfly H1 neuron modeled as linear-nonlinear-Poisson (LNP) with a mean-rate constraint, the measured nonlinearity is closer to large-p Lp codes than to infomax, but the selected exponent depends on the assumed stimulus prior.
Nonlinearity estimated by Gaussian-process-Poisson regression on 50 ms windows. Under a standard Gaussian prior matching the laboratory stimulus, the best match was p = 5.75, still overpredicting firing at large positive projections; Student-t priors (ν = 1 and 1.5) gave best matches at p = 8.5 with less mismatch. The two selected codes predict response marginals differing by at most 0.008. · Linear-nonlinear-Poisson spiking; Blowfly H1 data from [63]; Numerical optimization and evaluation for the…; Figure legends
ShownFor a log-logistic prior (the Naka-Rushton fit to the contrast distribution), the Lp-optimal nonlinearity in the limit of many response levels is a beta cumulative distribution function (CDF) warp of the prior CDF, with infomax as its p = 0 member and solutions only for p below the prior's tail index.
Two beta parameters, Ap and Bp, carry all dependence on p and both equal 1 at p = 0, recovering histogram equalization. No bounded-range code has finite Lp error once p reaches the fitted Naka-Rushton exponent b. For p > 0, response distributions peak at the level encoding the prior's mode. The closed form agrees with independently optimized finite-level Lloyd-Max quantizers (Fig. S2). · Closed-form optimal nonlinearity for the LMC…; Closed-form optimal nonlinearity for a…; Figure legends
Methods, data and reproducibility
Defines an optimal code as encoder parameters minimizing the expected value of a loss functional of the posterior, given a stimulus prior, an encoding model and a resource constraint; derives closed-form optima for linear Gaussian receptive fields and for a log-logistic-prior nonlinearity, and numerically optimizes nonlinearities to compare candidate losses against blowfly LMC and H1 data.
- Blowfly large monopolar cell (LMC) contrast-response nonlinearity and natural-scene contrast distribution, digitized from figures in Laughlin's 1981 paper · blowfly · n = ten digitized response points
- Blowfly H1 neuron spiking during white-Gaussian-noise horizontal motion (from a cited study), with stimulus projected onto the spike-triggered average (STA) and counts in 50 ms windows · blowfly · n = one H1 neuron (a single recording)
- Synthetic Gaussian stimuli for the theory examples: a 2D independent prior (SD 10), a strongly correlated Gaussian prior (ρ = 0.9, Fig. 3), and 100-dimensional stimuli with a 1/f^2 power spectrum · n = 100 model neurons in the 1/f^2 example
- Methods & tools
- MATLAB, Python, Naka-Rushton function (log-logistic) fits, Gaussian-process-Poisson regression with Laplace approximation, Linear-nonlinear-Poisson (LNP) model, Spike-triggered average (STA), Lloyd-Max quantizer
- Reagents & environment
- Replication code is provided in both MATLAB and Python; no software versions, containers or requirement files are stated.
- Reproducibility gaps
- Data and replication code are deposited at Zenodo (DOI:10.5281/zenodo.3970841) with no URL printed; the DOI points to the newest version of the record, so the version used here is unspecified. LMC inputs are points digitized from figures in Laughlin's original paper.
Limitations (6)
- The framework cannot by itself say which loss the nervous system optimizes; it has many degrees of freedom that current neural and behavioral observations probably leave under-constrained, and several constraint and loss pairings can fit one encoder. · stated by the authors
- Priors, encoding models, constraints and losses were chosen mainly for tractability rather than biological plausibility; the linear receptive field solutions also require stimulus, noise and weight matrices to share an eigenbasis and population size to equal stimulus dimension. · stated by the authors
- The theory assumes the brain can compute the posterior, or the statistics a loss needs, so computational limits and approximate inference are not modeled; the analyses also treat coding as a single stimulus-response-posterior step rather than in continuous time, which the theory does not preclude. · stated by the authors
- The H1 exponents are a phenomenological fit to one recording; they shift with the assumed prior and comparison criterion, heavy-tailed solutions rely on restricting the stimulus range to the data, and they do not establish adaptation to heavy-tailed natural motion. · stated by the authors
- Entropy, Lp loss and covtropy are not invariant to stimulus transformations, so conclusions depend on the scale chosen; the LMC analysis used Weber contrast, and the authors note results would differ on a linear scale. · stated by the authors
- The LMC comparison rests on ten points digitized from a 1981 figure, with p chosen by lowest RMSE on those same points; no held-out data or uncertainty on the chosen exponent is reported. · noted in this summary
Who should read:Read this if you build normative models of sensory coding and want to test losses other than mutual information against neural data, or want Laughlin's blowfly contrast-coding result reexamined.
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- Bayesian Encoding and Decoding as Distinct Perspectives on Neural Coding
Richard D. Lange, Sabyasachi Shivkumar, … Ralf M. Haefner·Nature NeurosciencePeer-reviewed·Nov 23, 2023
- Neural codes in early sensory areas maximize fitness
Jonathan Schaffner, Philippe N. Tobler, … Rafael Hernán Polanía·bioRxiv·May 10, 2021
- Jointly efficient encoding and decoding in neural populations
Simone Blanco Malerba, Aurora Micheli, … Rava Azeredo da Silveira·PLoS Computational BiologyPeer-reviewed·Jul 10, 2024
- Revealing nonlinear neural decoding by analyzing choices
Qianli Yang, Edgar Y. Walker, … Xaq Pitkow·Nature CommunicationsPeer-reviewed·Nov 16, 2021
- Efficient population coding depends on stimulus convergence and source of noise
Kai Röth, Shuai Shao, Julijana Gjorgjieva·PLoS Computational BiologyPeer-reviewed·Apr 26, 2021
- Multi-stage efficient coding of perception and value in goal-directed behavior
Saurabh Bedi, Gilles de Hollander, … Christian Carl Ruff·bioRxiv·Jun 11, 2026