AnyLearn
All lessons
AIadvanced

Easy, Hard, and Impossible: The Three Phases

The central result of the field: problems split into three regimes as data increases, and the middle one contains enough information to solve them while no efficient algorithm can. Community detection and planted clique make it concrete.

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

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

Two thresholds, not one

The previous lesson set up a single control parameter: how much data you have per unknown. The natural expectation is one threshold, below which recovery fails and above which it works.

The central discovery of this field is that there are often two.

The information-theoretic threshold is where the signal becomes recoverable in principle. Below it the data genuinely does not determine the answer; the posterior spreads over many possibilities and no procedure can distinguish them. Above it the Bayes-optimal estimator succeeds.

The algorithmic threshold is where efficient algorithms start working.

When these coincide, the world behaves as intuition expects. When they separate, a third regime opens between them where the information is present, the answer is uniquely determined, and every known polynomial-time algorithm fails.

That middle band is the hard phase. It is the most interesting object in this subject, and the rest of this lesson is about what lives there.

Full lesson text

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

Show

1. Two thresholds, not one

The previous lesson set up a single control parameter: how much data you have per unknown. The natural expectation is one threshold, below which recovery fails and above which it works.

The central discovery of this field is that there are often two.

The information-theoretic threshold is where the signal becomes recoverable in principle. Below it the data genuinely does not determine the answer; the posterior spreads over many possibilities and no procedure can distinguish them. Above it the Bayes-optimal estimator succeeds.

The algorithmic threshold is where efficient algorithms start working.

When these coincide, the world behaves as intuition expects. When they separate, a third regime opens between them where the information is present, the answer is uniquely determined, and every known polynomial-time algorithm fails.

That middle band is the hard phase. It is the most interesting object in this subject, and the rest of this lesson is about what lives there.

2. The three phases

Naming the regimes precisely is worth doing, because the distinctions are easy to blur.

Impossible. Below the information-theoretic threshold. The observed data is statistically consistent with many different ground truths, so no estimator, given unlimited computation, beats chance. Failure here is a property of the data.

Hard. Between the two thresholds. The information is sufficient: an exhaustive search over all candidates would identify the planted signal. But exhaustive search takes exponential time, and every known efficient algorithm fails. Failure here is a property of computation.

Easy. Above the algorithmic threshold. Efficient algorithms recover the signal, often something as simple as a spectral method.

The practical significance is that these three look identical from the outside. In all three your algorithm returns garbage. Only the theory tells you whether collecting more data is the answer, whether a better algorithm might exist, or whether you should abandon the problem.

3. The phase diagram

One axis, two thresholds, three regimes. The diagnosis you need is which regime you are in, because the correct response differs completely: more data, a better algorithm, or nothing.

flowchart LR
  A["Very little data"] --> B["IMPOSSIBLE: information absent"]
  B --> C["Information-theoretic threshold"]
  C --> D["HARD: solvable in principle, not in polynomial time"]
  D --> E["Algorithmic threshold"]
  E --> F["EASY: efficient algorithms succeed"]
  B --> G["Fix: nothing helps"]
  D --> H["Fix: more data, or exponential time"]

4. Community detection and the Kesten-Stigum threshold

The result that opened this field concerns the stochastic block model, and it came from physicists.

Aurelien Decelle, Florent Krzakala, Cristopher Moore, and Lenka Zdeborova published "Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications" in Physical Review E volume 84, article 066106, in 2011.

Using the cavity method from statistical physics, they obtained an asymptotically exact analysis of the model's phase diagram, describing both the detectability transition and the easy-to-hard transition.

Their conjecture became the organising statement of the area. Detecting clusters in the symmetric block model in polynomial time is possible above the Kesten-Stigum threshold. Below that threshold, detection remains possible information-theoretically, though not necessarily efficiently, when the number of communities is at least four.

Read the last clause carefully, because it is the surprising part. With two or three communities the thresholds coincide and there is no hard phase. At four or more, they separate and a genuine information-computation gap opens.

A problem can therefore be easy or hard depending on a parameter that has nothing to do with how much data you have.

5. Planted clique, where the gap is enormous

Community detection has a subtle gap. Planted clique has a spectacular one, which is why it became the field's reference problem.

The setup is minimal. Take a random graph on n vertices where each edge is present independently with probability one half. Choose k vertices and add all edges among them, making them a clique. Given the graph, find the planted clique.

The two thresholds are far apart.

The statistical threshold sits at roughly k=2log2nk = 2\log_2 n. Above that size the planted clique is larger than any clique that would occur by chance, so it is identifiable: enumerate all subsets of that size, check each, and the planted one stands out. That enumeration is astronomically slow, but it establishes that the information is there.

The computational threshold for the best known polynomial-time algorithms sits at roughly kϵnk \geq \epsilon\sqrt{n}.

Compare the scales. For n around a million, the statistical threshold is a clique of about 40 vertices, while efficient algorithms need something on the order of a thousand. The hard phase spans that entire range, and decades of effort have not produced an algorithm that enters it.

6. Why the hard phase is hard

The physics picture explains the mechanism, and it is genuinely illuminating.

Think of the posterior distribution as a landscape over candidate solutions, where height is how well a candidate explains the data. Algorithms are local: they start somewhere and improve.

In the easy phase, the landscape has a single dominant basin containing the true signal, and its pull extends across the space. Any reasonable local method slides into it.

In the hard phase, the true signal still sits at the global optimum, so the information is present. But the landscape around it is fractured into exponentially many spurious local optima, separated by barriers. A local algorithm starting from a random point falls into one of these and stops. The global optimum exists and is correct, but nothing points toward it from where you are.

The transition between these landscapes is what physicists call a discontinuous phase transition. Zdeborova's work highlights precisely this link: discontinuous transitions are associated with algorithmic hardness and shape the behaviour of gradient-based methods.

The correspondence is now a design principle. Look at the landscape geometry, and you can predict whether local algorithms will work.

7. Evidence that the hard phase is real

A sceptic should ask the obvious question: how do we know the hard phase is not just a gap in our imagination, waiting for someone clever?

Nobody has proven it is not, and that should be stated plainly. But the evidence has accumulated from independent directions that agree.

Physics predictions. The cavity and replica methods predict exact threshold locations, and many have since been confirmed by rigorous proofs.

Sum-of-squares lower bounds. Barak and colleagues (2016) proved a tight computational lower bound for planted clique within the sum-of-squares hierarchy, a powerful and general family of algorithms.

The low-degree polynomial framework. This is the most striking convergence. Many state-of-the-art algorithms, including spectral methods and approximate message passing, can be written as low-degree polynomial functions of the data. Analysing what such polynomials can achieve turns out to reproduce the conjectured computational thresholds across planted clique, sparse PCA, community detection, and tensor PCA.

Average-case reductions. Results such as Brennan and Bresler's work on reductions to sparse PCA connect these problems, so hardness of one implies hardness of others.

Four methodologies with different assumptions, drawing the same boundary.

8. Diagnosing your own problem

The framework yields a practical diagnostic, provided you are honest about what transfers.

SymptomLikely phaseCorrect response
Many different algorithms, all at chanceImpossible or hardMore data, or reformulate
Simple spectral method worksEasyNothing to fix
Exhaustive search on a small instance finds it, scaled methods do notHardMore data; better algorithms unlikely
Results improve smoothly with dataProbably no sharp transition hereOrdinary tuning
Small increase in data flips failure to successNear a thresholdPush further past it

The last row is the signature worth recognising. Sharp, sudden improvement from a modest increase in data is the fingerprint of a phase transition, and it means the useful lever is data quantity, not model architecture.

Two honest caveats. Your problem is probably not one of the exactly-solved models, so treat this as a lens rather than a calculation. And the thresholds are asymptotic, so at finite size the transition is smoothed and its location shifts.

What the framework changes is the question you ask when things fail: not "what should I try next?" but "which resource am I short of?"

Check your understanding

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

  1. What characterises the 'hard phase' in high-dimensional inference?
    • The data does not determine the answer, so no estimator can succeed
    • Information is sufficient to identify the signal, but no known polynomial-time algorithm finds it
    • Efficient algorithms succeed but require careful hyperparameter tuning
    • The problem has multiple equally valid ground truths
  2. In the symmetric stochastic block model, when does an information-computation gap open?
    • Whenever the graph is sparse, regardless of community count
    • Only when communities have unequal sizes
    • When the number of communities is at least four
    • When the number of communities is exactly two
  3. Roughly where do the two thresholds sit for planted clique?
    • Both at k on the order of log n
    • Statistical at k around square root of n, computational at k around n
    • Both at k on the order of square root of n
    • Statistical at k around 2 log base 2 of n, computational at k around epsilon times square root of n
  4. What does the landscape picture say happens in the hard phase?
    • The true signal remains the global optimum but is surrounded by exponentially many spurious local optima
    • The true signal ceases to be the global optimum
    • The landscape becomes perfectly flat with no gradient information
    • Multiple ground truths appear, all equally consistent with the data
  5. Why is the low-degree polynomial framework significant evidence for the hard phase?
    • It proves unconditionally that no polynomial-time algorithm can exist
    • Many leading algorithms including spectral methods and AMP are low-degree polynomials, and analysing their limits reproduces the conjectured thresholds
    • It shows that all hard problems reduce to planted clique
    • It replaces the need for statistical physics methods entirely

Related lessons

AI
advanced

What Phase Transitions Mean for Machine Learning

Taking the framework beyond solvable toy models: sharp transitions in real learning, why the loss landscape of a neural network is not the fractured one theory warns about, and what the physics lens genuinely explains.

8 steps·~12 min
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