AnyLearn
All lessons
AIadvanced

Planted Problems and the High-Dimensional Limit

Why statistical physics has anything to say about algorithms: planted models with known ground truth, the large-system limit where randomness stops fluctuating, and the Bayes-optimal benchmark that makes hardness measurable.

Updated · AI-authored, review-gated · how lessons are made

Not signed in: your progress and quiz score won't be saved.
Progress1 / 8

A question about data that has an answer

Here is a question practitioners ask constantly and rarely answer precisely: is there enough signal in this data to recover what I want?

Usually the question gets answered empirically. Run some algorithms. If they all fail, conclude the signal is not there and move on.

That inference is wrong, and the reason is the subject of this path. A problem can contain more than enough information to determine the answer uniquely, while every algorithm that runs in reasonable time fails to find it. Information and tractability are different resources, and the gap between them is not a gap in our cleverness. In several well-studied problems it appears to be a structural feature of the problem itself.

The field that mapped this most precisely came from an unexpected direction: statistical physics. Lenka Zdeborova, who holds professorships in both physics and computer science at EPFL and leads the Statistical Physics of Computation Laboratory, works on exactly this boundary, using tools built for studying how water freezes to predict when algorithms fail.

Full lesson text

All 8 steps on one page, for reading, reference, and search.

Show

1. A question about data that has an answer

Here is a question practitioners ask constantly and rarely answer precisely: is there enough signal in this data to recover what I want?

Usually the question gets answered empirically. Run some algorithms. If they all fail, conclude the signal is not there and move on.

That inference is wrong, and the reason is the subject of this path. A problem can contain more than enough information to determine the answer uniquely, while every algorithm that runs in reasonable time fails to find it. Information and tractability are different resources, and the gap between them is not a gap in our cleverness. In several well-studied problems it appears to be a structural feature of the problem itself.

The field that mapped this most precisely came from an unexpected direction: statistical physics. Lenka Zdeborova, who holds professorships in both physics and computer science at EPFL and leads the Statistical Physics of Computation Laboratory, works on exactly this boundary, using tools built for studying how water freezes to predict when algorithms fail.

2. Why physics is the right tool

The connection is not a loose analogy. It is a structural correspondence.

Statistical physics studies systems with an enormous number of interacting components, where you cannot track individuals but the aggregate behaves predictably. A litre of water contains far too many molecules to simulate, yet it freezes at a sharp, reproducible temperature.

That sharpness is the key phenomenon. A phase transition is a point where a small change in a parameter, one degree of temperature, produces a qualitative change in the system's global state. Not gradual thickening: liquid, then solid.

High-dimensional inference has the same structure. A problem with many variables and many constraints is a system of interacting components. Tune a parameter, how much data you have, and something similar happens: below a threshold no algorithm recovers the signal, above it recovery is easy, and the transition can be sharp rather than gradual.

The mathematics developed over a century to handle magnets and glasses transfers, because the underlying object, a probability distribution over many coupled variables, is the same.

3. Planted models

To study when recovery is possible you need problems where you know the right answer. That is what a planted model provides.

The recipe has two steps. First, generate a ground truth signal from a known distribution. Second, generate observed data from that signal through a known noisy channel.

Three canonical examples recur throughout this path.

The stochastic block model. Assign each of n nodes a hidden group label. Then connect nodes with probability that depends on whether they share a label: higher within groups, lower across. Observe only the graph. Recover the labels.

Planted clique. Take a random graph where every edge appears with probability one half. Choose k vertices and make them fully connected. Observe the graph. Find the clique.

Sparse PCA. Generate a sparse hidden direction, observe noisy samples correlated with it, recover the direction.

The artificiality is deliberate and productive. Because you generated the truth, you can measure exactly how well any algorithm recovered it, and ask what the best possible performance would be.

4. The high-dimensional limit

The second ingredient is a specific way of taking limits, and it is what makes sharp thresholds appear at all.

Classical statistics fixes the number of parameters and lets the sample size grow. Modern problems do not look like that: as you collect more data you also track more variables.

So the high-dimensional limit sends both to infinity together, holding their ratio fixed. Write n for the number of variables and m for the number of observations, and let both grow with α=m/n\alpha = m/n constant. That ratio, the amount of data per unit of unknown, becomes the control parameter, and it plays the role temperature plays in physics.

Two things happen in this limit, and both are essential.

Quantities that fluctuate at finite size concentrate: the error achieved on a random instance stops varying and converges to a deterministic value depending only on α\alpha. That is why a statement like "recovery is impossible below this threshold" can be exact rather than probabilistic.

And transitions become sharp. At finite n the change is smooth; as n grows it steepens, and in the limit it is a genuine discontinuity.

5. The Bayes-optimal benchmark

The final ingredient is a reference point that no algorithm can beat.

In a planted model you know the distribution that generated the signal and the channel that produced the data. So the posterior distribution over the signal given the data is fully specified, and the best possible estimator is the one derived from it. No procedure, however clever or however slow, does better.

This matters because it separates two questions that are usually tangled together.

Is the information present? Answered by whether the Bayes-optimal estimator succeeds. This is a property of the problem, not of any algorithm.

Can it be extracted efficiently? Answered by whether some polynomial-time procedure achieves the same thing.

When a practitioner's algorithms all fail, they conflate these. The planted-model framework keeps them apart, and the whole subject exists because the answers can differ.

Computing the Bayes-optimal error requires an integral over an exponentially large space, which is where the physics tooling enters: the replica method and the cavity method were built to evaluate exactly this kind of object.

6. The framework assembled

Each ingredient is doing specific work. The planted model supplies ground truth, the high-dimensional limit makes quantities deterministic and thresholds sharp, and the Bayes-optimal benchmark separates what is knowable from what is computable.

flowchart TD
  A["Planted model: generate signal, then data"] --> B["Ground truth is known by construction"]
  B --> C["Take n and m to infinity at fixed ratio"]
  C --> D["Errors concentrate on deterministic values"]
  C --> E["Transitions become sharp thresholds"]
  D --> F["Compute the Bayes-optimal error"]
  F --> G["Is the information present?"]
  F --> H["Compare against efficient algorithms"]
  H --> I["Can it be extracted in polynomial time?"]

7. A worked intuition: two ways to fail

Consider the stochastic block model with two equal groups, and let the within-group and across-group connection probabilities differ by an amount controlled by a parameter.

Strong signal:  within-group edges much more likely
  -> the graph visibly splits into two dense blobs
  -> simple methods recover the labels

Weak signal:  probabilities nearly equal
  -> each node's neighbours look like a random sample
  -> no procedure can do better than guessing

The interesting question is what happens in between, and the answer is not "gradually worse".

There is a threshold. Above it, the group structure is detectable and efficient algorithms find it. Below it, the observed graph is statistically indistinguishable from one with no group structure at all, so failure is not a limitation of your method: the information is genuinely absent.

That much is already a strong statement, and it was proven for this model. But the two-group case is the easy one, because the two thresholds coincide.

Add more groups and they separate, opening a region where the information is present and no efficient algorithm finds it. That region is the subject of the next lesson.

8. What this framework can and cannot tell you

Being precise about scope matters, because results in this area are both stronger and narrower than casual summaries suggest.

The framework deliversIt does not deliver
SettingRandom data from a known modelWorst-case or adversarial instances
RegimeLarge n, fixed ratioSmall-sample behaviour
StatementsSharp thresholds in the limitGuarantees at your actual n
HardnessStrong evidence, mostly conjecturalUnconditional complexity proofs
ScopeSpecific structured problemsArbitrary real datasets

Two caveats deserve emphasis. First, average-case is not worst-case. These results describe typical instances drawn from a distribution. Classical complexity theory asks about the hardest instance, and the two notions genuinely differ.

Second, much of the hardness is conjectural. Physics methods produce exact predictions that have repeatedly been confirmed by later rigorous proofs, which is a strong track record, but a predicted hard phase is generally not a theorem that no algorithm exists.

What you get in return is precision unavailable elsewhere: not "this seems difficult" but "below this exact threshold, recovery is impossible; between these two thresholds, it is possible but apparently intractable".

Check your understanding

The lesson ends with a 5-question quiz. Take it in the player above to see your score.

  1. What is a planted model, and why is it used to study algorithmic hardness?
    • A model trained on synthetic data to avoid privacy issues
    • A model where the ground truth signal is generated first and data derived from it, so recovery can be measured exactly
    • A worst-case instance constructed to defeat a specific algorithm
    • A benchmark dataset collected from real networks
  2. What defines the high-dimensional limit used in this framework?
    • The number of parameters is fixed while sample size grows without bound
    • Both dimensions grow but the number of observations grows faster
    • The number of variables and observations both go to infinity with their ratio held fixed
    • The dimension grows while the number of observations stays constant
  3. Why is the Bayes-optimal estimator the right benchmark in a planted model?
    • It is the fastest estimator available for these problems
    • It requires no knowledge of the noise channel
    • It is the only estimator that can be computed in polynomial time
    • The generating distribution and channel are known, so the posterior defines performance no procedure can beat
  4. What makes a phase transition in inference different from gradual degradation?
    • A small change in the control parameter produces a qualitative change in what is achievable
    • Performance declines linearly as data is removed
    • It only occurs when the algorithm is poorly tuned
    • It happens only at finite sample sizes and vanishes in the limit
  5. Which limitation of this framework is most important to keep in mind?
    • It applies only to problems with fewer than a thousand variables
    • Results are average-case over a known distribution, and predicted hard phases are largely conjectural rather than proven
    • It cannot handle problems where the ground truth is known
    • It requires the data to be Gaussian in every case

Related lessons

AI
advanced

Grammars, Stacks, and Making It Free

Recursive formats need a machine with a stack, and a stack breaks the precomputed index because the mask now depends on context. This lesson covers context-free grammars and pushdown automata, XGrammar's split between context-independent and context-dependent tokens, why overlapping grammar work with the GPU makes overhead near zero, and how this interacts with batching and speculative decoding.

10 steps·~15 min
AI
advanced

From Schema to Mask: The Automaton Index

The naive mask costs 64 million validity checks per response. The trick that made constrained decoding practical is to notice that the answer depends only on the automaton's current state, so it can be computed once per state and looked up thereafter. This lesson builds that idea: regex to DFA, why the state is a sufficient summary, how JSON Schema compiles down, and what the index costs.

10 steps·~15 min
AI
advanced

Why Asking Nicely Does Not Guarantee JSON

Prompting for a format gives a high success rate, and a high success rate is not a guarantee. This lesson locates the one place in the decoding loop where a guarantee is possible, shows what masking logits does to the probability distribution, works through why a 5 percent failure rate destroys tail latency rather than average latency, and separates the three families of structured output.

10 steps·~15 min
AI
advanced

Measuring the Damage, and Shipping It

Quantization damage does not show up where people look for it. Perplexity barely moves while hard tasks degrade, and long reasoning suffers most because error compounds. This lesson covers building an evaluation that detects real loss, where the published cliffs are, KV cache quantization as a separate lever, end-to-end memory sizing, and the rollout that catches what evals miss.

10 steps·~15 min