Paper Feed

Issue 34 · Pick 07 Neuroscience ✓ read

Efficient coding makes and breaks Webers law

Prat-Carrabin, A., Yamamoto, R., Gershman, S. J.

The full text could not be fetched; this explainer is based on the abstract only.

TL;DR: Weber's law — the observation that your ability to tell two magnitudes apart scales with the magnitudes themselves — has been treated as a near-universal constant of perception for 190 years. This paper argues it isn't a fixed property at all, but a consequence of the brain efficiently allocating its coding resources to match the statistics of the stimuli it encounters. The killer move: the authors flipped the stimulus statistics in the lab — making large magnitudes more common than small ones — and Weber's law inverted. Discriminability got better at large magnitudes, across three sensory modalities, and this adaptation improved subjects' task performance. If it holds up, this is a rare case of a classic psychophysical "law" being both explained and experimentally broken by a single normative principle.

One caveat up front: only the abstract of this preprint was available to me. Everything below about the theory and background is standard and well-sourced; everything about the specific experiments is limited to what the abstract states, and I'll flag where details are unknown.

The law that wouldn't die

Weber's law is arguably the oldest quantitative result in psychology. Ernst Weber noticed in the 1830s that the smallest detectable difference between two stimuli — the just-noticeable difference (JND) — is proportional to the stimulus magnitude. If you can just barely tell 100 grams from 105 grams, you'll need roughly 210 grams to tell apart from 200 grams. Formally, \Delta x / x \approx \text{const}, where x is the stimulus magnitude and \Delta x is the JND.

This holds remarkably well across weight, loudness, brightness, numerosity, time intervals, and more. It holds in humans, monkeys, rats, pigeons, and fish. When something is that universal, the temptation is to treat it as a hardwired architectural fact — perhaps a consequence of logarithmic transduction at the sensory periphery (Fechner's interpretation), or of multiplicative neural noise. In either story, Weber's law is a fixed feature of the machinery.

magnitude x JND Weber: Δx ∝ x small x: fine JND large x: coarse JND
Weber's law: the just-noticeable difference Δx scales linearly with magnitude x. You resolve small stimuli finely and large stimuli coarsely — a constant relative resolution.

But there's a rival story, and it comes from information theory rather than physiology.

Efficient coding: spend your neurons where the stimuli are

The efficient coding hypothesis, going back to Attneave and Barlow in the 1950s and made quantitative for this setting by Ganguli & Simoncelli and Wei & Stocker in the 2010s, says the brain has a limited representational budget — a finite number of neurons, spikes, and distinguishable response states — and should allocate it to maximize information about the stimuli it actually encounters.

The intuition is exactly the same as a variable-length code or a non-uniform quantizer. If you had to encode real numbers with 8 bits and you knew most of your inputs were small, you'd use a floating-point-style representation: dense codewords near zero, sparse ones far out. Your resolution would be high where inputs are frequent and low where they're rare. A perceptual system facing the same constraint should do the same thing with its tuning curves.

Make this quantitative and something elegant falls out. Discriminability at a stimulus value x is governed by the Fisher information I(x) of the neural representation — roughly, how sharply the population response changes as x changes, relative to the noise. The discrimination threshold scales as \Delta x \propto 1/\sqrt{I(x)}. Under a constraint on total coding resources, the information-maximizing allocation for a stimulus prior p(x) is

\sqrt{I(x)} \propto p(x),

meaning the square root of Fisher information — effectively, the local "resolution density" of the code — should be proportional to how often each stimulus value occurs. Equivalently, \Delta x \propto 1/p(x): you're most sensitive exactly where stimuli are most common.

Now the punchline. Many natural magnitude distributions are heavy-tailed, falling off roughly as p(x) \propto 1/x — small distances, quantities, durations, and intensities are far more common in the world than large ones (Benford-flavored statistics show up everywhere). Plug that in:

\Delta x \propto \frac{1}{p(x)} \propto x.

That's Weber's law, derived rather than assumed. On this view, Weber's law is not a fact about neurons; it's a fact about the world, mirrored by a brain that codes efficiently. The logarithmic-looking internal scale is just the optimal quantizer for a 1/x environment.

Stimulus prior p(x) ∝ 1/x small magnitudes frequent Optimal tuning curves: dense where p(x) is high x fine resolution coarse resolution
Under a 1/x prior, the resource-optimal code packs narrow tuning curves at small magnitudes and stretches them out at large ones. Discrimination thresholds scale as 1/p(x) ∝ x — Weber's law emerges from allocation, not from fixed logarithmic transduction.

The experiment: don't just fit the theory — break the law

Here's the problem with the efficient-coding account as it stood: it was mostly correlational. Wei & Stocker showed that efficient coding predicts a lawful relationship between discrimination thresholds and perceptual biases, and it fit existing data beautifully. But natural priors and neural codes come as a matched pair; you can't tell whether the code causes the behavior or whether both were arranged by evolution long ago and are now frozen in.

The causal test is obvious once you say it out loud, and it's what makes this paper interesting: change the prior, and see if the law follows. If Weber's law reflects a live, dynamic allocation process, then training subjects in an environment where large magnitudes are common and small ones are rare should redirect coding resources toward the large end. Discriminability should then increase with magnitude — an anti-Weber regime that, to my knowledge, has essentially never been reported as a robust experimental finding.

Per the abstract, that's exactly what happened:

  • In discrimination tasks spanning three different sensory modalities (the abstract doesn't name them; the details are in the paper), subjects' discriminability across the stimulus range tracked the experimenter-imposed stimulus distribution.
  • Distributions skewed toward small magnitudes reproduced Weber-like behavior — thresholds growing with magnitude.
  • Distributions skewed toward large magnitudes inverted the pattern, breaking Weber's law.
  • Critically, the adaptation improved task performance: subjects got better precisely where precision paid off, which is the signature of a normative reallocation rather than an arbitrary drift.
Small-skewed environment x Δx Weber-like: threshold rises with x - - p(x): small x frequent Large-skewed environment x Δx Inverted (anti-Weber): threshold falls with x - - p(x): large x frequent
The causal manipulation. Left: when small magnitudes are frequent, discrimination thresholds grow with magnitude (Weber's law). Right: when large magnitudes are made frequent, the pattern inverts — subjects become sharpest at the large end. Schematic of the abstract's claim; the paper's figures contain the actual psychometric data.

Because the full text wasn't available to me, I can't report the effect sizes, the modalities used, how many trials of exposure the adaptation required, or how thresholds were estimated. Those are precisely the numbers you should check in the paper's results figures.

Why this matters

It reframes a "law" as an equilibrium. The deepest shift here is conceptual: Weber's law stops being a boundary condition on perception and becomes the fixed point of an adaptive process operating in a particular statistical environment. The law holds when — and because — the world serves up 1/x-ish statistics. Change the diet and the code follows. This is the same intellectual move as showing that a "constant" of a physical system is actually a function of an environmental parameter you'd never thought to vary.

It's causal evidence for efficient coding as an online principle. Efficient coding has enormous correlational support — V1 receptive fields matching natural image statistics, cochlear filters matching natural sound statistics, Wei & Stocker's threshold–bias law. But those could all reflect evolutionary or developmental optimization, baked in and static. Showing that adult human discriminability reallocates within an experiment (presumably over hundreds or thousands of trials — check the paper) upgrades efficient coding from a design principle to a running algorithm. That's a much stronger claim about the brain.

It connects directly to ML. The optimal-allocation rule \sqrt{I(x)} \propto p(x) is the perceptual analogue of learned quantization, mixture-of-experts routing, and data-dependent codebooks: spend capacity where the data density is. A brain that re-solves this allocation problem on the fly is doing something like continual, unsupervised recalibration of its own tokenizer. For anyone thinking about adaptive precision in neural codecs, or about why representation geometry in trained networks mirrors training-data density, this is the biological version of the same theorem.

Three modalities is the right kind of generality. A single-modality result could be a quirk of one sensory pathway's gain control. The same signature across three modalities argues for a domain-general principle — either implemented separately by similar circuits everywhere, or centrally at a decision/representation stage. Which of those it is remains open (see below).

What to be skeptical about

The triage question is the right one: is this genuine representational adaptation, or a decision-level strategy? There's a well-known family of confounds here:

  • Response strategy / criterion shifts. If large stimuli are frequent, subjects might allocate attention or adopt priors that mimic improved discriminability at the large end without any change in encoding precision. Bayesian decoding with an updated prior changes bias; changing measured thresholds is harder to fake with a prior alone, which actually works in the paper's favor — but interactions between priors, lapse rates, and threshold estimation can be subtle. Look for how the paper separates sensitivity (d'-like measures) from bias, and whether they model lapses.
  • Range adaptation and gain control are old news. Sensory systems adapt gain to the stimulus range on fast timescales (retinal light adaptation being the classic case). The novel claim must be that the adaptation matches the shape of the frequency distribution — the quantitative \Delta x \propto 1/p(x) signature — not merely its range or mean. Whether the data are precise enough to distinguish "efficient allocation to the prior" from "generic gain renormalization" is the key empirical question. The abstract's claim that adaptation improved task performance suggests they ran this comparison, but the full text is where the case is made or not.
  • Timescale and persistence. Does the inverted pattern require ongoing exposure, or does it persist? How fast does it appear? A principle that operates in minutes has different implications than one requiring days. Unknown from the abstract.
  • Effect size. "Inverted" could mean a dramatic mirror image of Weber's law or a statistically reliable but modest tilt. Abstracts oversell by default. The strength of the inversion — and whether it appears in every modality or as a pooled effect — determines how much this result should update you.
  • This is a bioRxiv preprint. Not yet peer reviewed as of this writing.

Where to spend your time in the paper

Go straight to the results figures showing discrimination thresholds (or discriminability) as a function of stimulus magnitude under the two prior conditions, per modality — that's the entire result in one panel per modality, and it's where you can judge the inversion's strength with your own eyes. Then read the methods on how thresholds were estimated and how sensitivity was dissociated from response bias; that section decides the representational-vs-strategic question. The theoretical framing (the \sqrt{I(x)} \propto p(x) derivation) is standard from the Ganguli–Simoncelli / Wei–Stocker lineage — worth reading if you don't know it, skimmable if you do.

If the effect is as clean as the abstract implies, this becomes the textbook citation for why Weber's law exists — and the demonstration that a 190-year-old law can be switched off by rearranging a histogram is the kind of result that makes normative theories of the brain feel less like post-hoc storytelling and more like physics.