3SUM below n², shortest paths below n³?
Josh Alman (Columbia) and Virginia Vassilevska Williams (MIT) claim the first polynomial speedups for 3SUM and all-pairs shortest paths, refuting two central hypotheses of fine-grained complexity. Their paper says Claude discovered the algorithm; Anthropic’s Lean proof of the main claims passes its own checks. The gain in the exponent is tiny, and the paper is not yet peer reviewed.
11:20. English captions available. The video loads from YouTube when you press play.
Disclosure. Anthropic makes Claude, which helps make this series. Claude is credited with this discovery and the Lean proof is Anthropic’s: we hold them to the same standards as any lab’s, using only public sources. AI Proved What? is independent and not affiliated with Anthropic beyond using its product Claude, and not affiliated with Columbia University or MIT.
Chapters
The question
This is AN09. Before we start: Anthropic makes Claude, which helps make this series. Claude is credited with this discovery, and the Lean proof is Anthropic’s, so we hold them to the same standards as any lab’s, using only public sources. AI Proved What? is not affiliated with Columbia or MIT. On October 5, 2026, two computer scientists, Josh Alman of Columbia and Virginia Vassilevska Williams of MIT, posted a 76-page paper to arXiv. It claims the first polynomial speedups for two classic problems, 3SUM and all-pairs shortest paths, and it says: Claude, an AI model developed by Anthropic, discovered the algorithm. The authors then worked to understand, simplify, strengthen and extend it, and they take full responsibility for the paper. Per its acknowledgments, Claude found it in an internal Anthropic session that was meant to work on a cryptography problem, using 16 million output tokens with no human input. Anthropic shared it with the authors in September, under a confidentiality agreement and with an offer of compensation. Within hours, Anthropic published a Lean proof of the main results. So what are these problems?
3SUM: given n numbers, do three of them add up to zero? Here are eight. Checking every triple takes 56 checks, and the number of triples grows like n³. The method taught in algorithms classes sorts the numbers, then, for each one, walks two pointers inward from the ends. On our eight numbers that takes 21 steps, and finds the one triple: −4, 1 and 3. That is about n² steps. For a thousand random numbers, by our count: 166 million triples, against under half a million pointer steps. For decades, the paper says, the quadratic method was sped up only by polylogarithmic factors, by Baran, Demaine and Pătraşcu, by Grønlund and Pettie, and by Chan. Fine-grained complexity made this a hypothesis: no algorithm beats n² by any fixed power of n. Many problems, especially in computational geometry, were then shown to be at least as hard.
All-pairs shortest paths: given a network with weighted one-way edges and no negative cycles, find the shortest distance between every pair of points. In our four-point example, the shortest way from one to four goes through three and two, for a total of four. Floyd and Warshall’s algorithm from 1962 does it in n³ steps: 64 updates here. In matrix form, APSP becomes the (min,+) product: like multiplying matrices, but with minimum in place of sum and plus in place of times. Squaring the weight matrix this way twice gives every distance in our example. Before this paper, the fastest known algorithm, by Ryan Williams, shaved off only a factor of about 2^√(log n), less than any fixed power. The APSP hypothesis says n³ is essentially optimal. Both problems reduce to a third: Exact Triangle. Take three groups of points with integer weights on the edges between groups: is there a triangle whose three weights sum to zero? Here, −2, −1 and 3. If Exact Triangle beats n³ by a fixed power of n, then 3SUM beats n², and APSP n³, by a fixed power too.
The claim, in plain words
The claim. Theorem 22: deterministic algorithms solve 3SUM on n integers of polynomial size in time big O of n^1.9992, and APSP and the (min,+) product, with polynomially bounded integer weights, in n^2.99942. Theorem 19: Exact Triangle in n^(3 − 0.0017). The model is the standard word RAM, with words of order log n bits. The paper says this refutes the 3SUM and APSP hypotheses, and, through known reductions, the Exact Triangle and zero-weight k-Clique hypotheses and three conjectures about hinted matrix-vector products. For inputs that are real numbers, it gives randomized algorithms that are always correct, in n^1.998 and n^2.998 expected time.
In the paper’s words (Theorem 2, p. 7): on a word RAM with O(log n)-bit words, deterministic algorithms solve, for integer inputs of absolute value n^O(1), Exact Triangle in O(n^2.9983), APSP and the (min,+)-product in O(n^2.9995) and 3SUM in O(n^1.9992); Theorem 22 (p. 36) sharpens the APSP and (min,+) bound to O(n^2.99942). Behind all of them is one matrix theorem (Theorem 1, p. 5): for N ≥ D^18 and any set W of at most N²/√D positions, the entries (XY)[I, J], (I, J) ∈ W, of an N × D by D × N integer product take O(N²/D^0.063) operations.
How big the gain is, and what is not claimed
How big is the gain? Tiny. The paper says its constants are enormous, and its algorithms potentially impractical in their current form. In our chart, ignoring those constants, n² / n^1.9992 is n^0.0008. At a million numbers, that saves about one percent. It reaches a factor of two only when n is 2^1250, a number with 377 digits; for APSP, 520 digits. The point is the exponent: it is not two, and not three. What is not claimed: nothing about the Strong Exponential Time Hypothesis or orthogonal vectors, nothing for k-SUM with k at least four, and no faster algorithm for problems known only to be 3SUM-hard, such as finding three points on a line, which the paper says is now open.
How it works
How it works, following the paper. Everything rests on one new algorithm. Take a tall, thin matrix X, n rows by D columns, and a wide one, Y, D by n, where D is tiny: at most n^(1/18). You do not want all of X times Y, only a scattered set of entries, at most n²/√D of them. Computing them one by one costs n²·√D; writing down the whole product costs n². The new algorithm needs about n²/D^0.063: less than either. In graph terms: two big groups of points, a tiny middle group, and edges through it. Entry a b of the product counts the triangles through the pair a b. That is the lopsided sparse triangle problem of the title. The method starts from Strassen’s idea: apply a small multiplication identity over and over, as a tree, with the multiplications at the leaves. The paper uses an identity of Schönhage with ten multiplications, inside a variant of Coppersmith’s rectangular algorithm from 1982. Then the new step: prune the tree, and visit only the leaves that some wanted entry needs.
Then come reductions, almost all of them known, by Vassilevska Williams and Ryan Williams, by Vassilevska Williams and Xu, by Chan and Xu, and others. The paper’s own step makes the reduction from Exact Triangle to the lopsided problem deterministic, by reducing the weights modulo a carefully chosen prime. Each step keeps only part of the saving. The matrix step saves D^0.063. The reduction keeps half. With D equal to n^(1/18), Exact Triangle saves about n^0.0017. 3SUM keeps half of that, and APSP a third: that is where 1.9992 and 2.99942 come from. The authors write that, with Claude, they also generated slightly better but much more complicated algorithms, which they left out on purpose. Per the acknowledgments, what Claude shared is essentially the Section 2 algorithm, which already breaks both hypotheses; the stronger Section 4 version behind these exponents, the authors derived.
Per the paper’s acknowledgments (p. 63), the algorithm Anthropic shared is “essentially the algorithm in Section 2”, presented differently and with other parameters; a different reduction from Exact Triangle was also shared, which the authors replaced by known reductions; the authors derived the data-structure version (Section 4) and its connection with hinted matrix-vector products.
The Lean formalization, and what we compared
Then the Lean. Anthropic added a Lean 4 development to its formal-math repository on October 6, at 4 a.m. UTC, about ten hours after the paper was submitted. Per the acknowledgments, an internal research model wrote it after the paper was completely written. The five headline claims sit in one file, EndStatement.lean: 139 lines that import nothing, not even Mathlib. It defines a tiny machine: memory cells that hold words of W bits, and nine instructions. Write one, add, subtract, multiply, load, store, jump if negative, accept, reject. No division, and no constant other than one. 3SUM is written as: three different positions whose numbers sum to zero. And the claim reads: for every bound n^κ on the size of the numbers, one program solves every instance, with words of order log n bits, within big O of n^1.9992 steps. We compared the five claims with the paper by reading. They match Theorems 19 and 22, and the zero-weight case of Corollary 39, with the paper’s sharper exponents, from its second route. Anthropic’s automated check on that commit passed: a full build, then the comparator, which matched the five claims, and 132 further statements, to their challenge files, with Lean’s kernel and the independent kernel nanoda both accepting. The README lists what is not proved, including the real-number results, and the two reduction theorems in their printed form, though versions of them are proved. Our text count: 434 files, about 102,000 lines, with sorry only in the two challenge files. We read the log; we did not build or run anything.
Our reading of EndStatement.lean against the paper (not a machine check): Problem.SolvedInTime asks, for every bound n^κ on the input numbers, for one program, a constant b and a bound T(n) = O(n^r) such that on every instance and at every word size of at least b(⌊log₂ n⌋ + 1) bits the program halts within T(n) steps with the right answer, which renders Theorem 2’s “word RAM with O(log n)-bit words” and inputs of size n^O(1). ThreeSum asks for three different positions summing to zero; ExactTriangle is the complete tripartite version of Section 3.2; MinPlusProduct and APSP (no negative cycles, missing edges allowed) match the paper’s definitions; the exponents are 1.9992, 2.99942 and 3 − 0.0017, the smaller numerals of the paper’s second route, and k − 0.0017⌊k/3⌋ for Zero-Weight k-Clique. The README lists where the machine is generous (none of it, it says, changes an exponent) and what is not proved: the real-input results, Theorems 33 and 34, the reductions of Theorems 17 and 21 in their printed form, exponents of matrix multiplication, and the hypotheses themselves, which are not defined. We did not read the 102,310 lines of proof.
Where it stands
- Public
- On arXiv as 2610.06783, version 1, October 5, 2026, 17:44 UTC (76 pages; cs.DS, cs.CC); still the only version.
- Peer reviewed
- No reviewed version found.
- Human check: the two authors
- The paper (p. 1): Claude discovered the algorithm; “The authors then worked to understand, simplify, strengthen, and extend the algorithm”, derived further consequences and wrote the presentation, and “take full responsibility for this paper”. They also used Claude for “checking mathematical details throughout this project” (p. 63). Josh Alman presented the work at a Cornell theory seminar on October 26, 2026 (abstract: “That algorithm was found by Anthropic using an internal model of Claude.”).
- Lean, by Anthropic
- anthropics/formal-math, folder 3sum-apsp, added by pull request #28 (merged October 6, 2026, 04:00 UTC; commit e1a4e65; no later change to the folder). Per the paper, an internal research model wrote it after the paper was completely written. The CI run on that commit passed: a build, sorry warnings only from the Challenge files, then Comparator on both configurations (the 5 claims of EndStatement.lean, and 132 further statements), with “nanoda kernel accepts the solution”, “Lean default kernel accepts the solution” and “All 2 comparator configuration(s) accepted.” (04:39 UTC). We read the log; we did not build or run anything.
- Follow-up preprints by others
- Not peer reviewed; each states its own use of AI. Karingula and Lovett (October 11): “a simplified proof of these qualitative improvements, with weaker exponents”. Majdoddin (October 12): the matrix theorem up to D ≤ N^0.172 and reductions that keep the whole saving, giving deterministic 3SUM in n^(1.9945+o(1)) and APSP in n^(2.9945+o(1)) (written with Claude models, per the paper). Chan, Itakura, Ma and Yu (October 30; v2 November 14): a different randomized 3SUM algorithm that avoids matrix multiplication (“about 5 pages”), the k-SUM hypothesis refuted for odd k, and deterministic algorithms for real 3SUM and real APSP (results obtained using ChatGPT Sol 6.1; manuscript human-written and verified by the authors, per their disclosure). Fischer (October 23) treats the 3SUM hypothesis as refuted and proposes the k-AP hypothesis in its place.
- Under expert review
- None published that we found. Bill Gasarch, on the Computational Complexity blog (November 1, 2026), assumes the results correct for his post and writes: “All of these results are being looked at by experts.” No announcement on anthropic.com found. Searched November 29, 2026 (Aaronson’s and the Computational Complexity blogs, Quanta, Hacker News, the Lean Zulip archive, Anthropic’s news page).
Last checked November 29, 2026, about 08:30 PT. Not built or run by us.
This is a Specials episode. AN03 covered Anthropic’s claim from the same Lean repository that the Exponential Time Hypothesis is false, and episode 378 covered OpenAI’s claim of the same. If it holds, two cornerstone hypotheses of fine-grained complexity fall: 3SUM is not quadratic, and all-pairs shortest paths are not cubic, by an algorithm found by Claude, simplified, strengthened and written up by two human experts who take full responsibility, with its main claims checked in Lean by Anthropic. Once more: Anthropic makes Claude, which helps make this series. See AN03 and 378.
The numbers in the video
- Ours: the eight numbers -7, -4, -2, 1, 3, 5, 8, 10 contain exactly one zero triple, −4 + 1 + 3; checking every triple takes 56 checks, sorting and walking two pointers 21 steps. For 1,000 random integers: 166,167,000 triples against 498,440 pointer steps.
- Ours: a 4-point directed graph (edges 1→2 (4), 1→3 (1), 2→3 (-1), 2→4 (1), 3→2 (2), 3→4 (6), 4→3 (3)); no negative cycle; the shortest path from 1 to 4 is 1→3→2→4, length 4; Floyd–Warshall makes 64 updates; squaring the weight matrix twice in the (min,+) product gives the same distances; (W⋆W)[1,2] = min(4, 4, 3, ∞) = 3.
- Ours: an Exact Triangle instance with two points per group and exactly one zero triangle, a1–b2–c2 with weights −2, −1 and 3.
- Ours: a lopsided graph with 5 + 2 + 5 points; the entry (XY)[a2, b2] of the product of the two 0/1 matrices is 2, the number of triangles through the pair (a2, b2).
- The paper’s exponent arithmetic: the matrix step saves D^0.063 (Corollary 26); the reduction keeps half (Remark 20: 0.0315); with D = n^(1/18), Exact Triangle saves n^0.00175 (stated as 0.0017, Theorem 19); 3SUM keeps half (2 − 0.000875 = 1.999125 ≤ 1.9992) and APSP a third (3 − 0.000583 = 2.99941… ≤ 2.99942) (Theorem 22).
- Ours, constants ignored (the paper calls them enormous): n² / n^1.9992 = n^0.0008 is 1.0111 at n = 10^6 and 2 at n = 2^1250, a number with 377 digits; for APSP, n^0.00058 reaches 2 at a number with 520 digits.
- Ours, text only: 434 Lean files, 102,310 lines; sorry only in the two Challenge files; no axiom declarations or native_decide; imports from outside the folder only Mathlib (v4.33.1); EndStatement.lean has 139 lines and imports nothing.
Read the source
- J. Alman and V. Vassilevska Williams, Truly Subquadratic 3SUM and Truly Subcubic APSP via Triangles in Sparse Lopsided Graphs, arXiv:2610.06783v1 (PDF), 76 pages.
- The Lean 4 formalization by Anthropic: github.com/anthropics/formal-math/tree/main/3sum-apsp (Apache License 2.0; README; EndStatement.lean; pull request #28; CI run).
- Follow-ups: arXiv:2610.15663 (Karingula, Lovett); arXiv:2610.17420 (Majdoddin); arXiv:2610.42012 (Chan, Itakura, Ma, Yu); arXiv:2610.32162 (Fischer).
- Background the paper cites: R. W. Floyd (1962) and S. Warshall (1962); I. Baran, E. D. Demaine and M. Pătraşcu, Subquadratic algorithms for 3SUM (Algorithmica 2008); A. Grønlund and S. Pettie, Threesomes, degenerates, and love triangles (J. ACM 2018); R. R. Williams, Faster all-pairs shortest paths via circuit complexity (SIAM J. Comput. 2018); V. Strassen (1969); A. Schönhage, Partial and total matrix multiplication (1981); D. Coppersmith, Rapid multiplication of rectangular matrices (1982).
AI Proved What? is independent and not affiliated with Anthropic beyond using its product Claude, or with Columbia University or MIT.
Transcript
Read the full script
0:00The question
This is AN09. Before we start: Anthropic makes Claude, which helps make this series. Claude is credited with this discovery, and the Lean proof is Anthropic’s, so we hold them to the same standards as any lab’s, using only public sources. AI Proved What? is not affiliated with Columbia or MIT. On October 5, 2026, two computer scientists, Josh Alman of Columbia and Virginia Vassilevska Williams of MIT, posted a 76-page paper to arXiv. It claims the first polynomial speedups for two classic problems, 3SUM and all-pairs shortest paths, and it says: Claude, an AI model developed by Anthropic, discovered the algorithm. The authors then worked to understand, simplify, strengthen and extend it, and they take full responsibility for the paper. Per its acknowledgments, Claude found it in an internal Anthropic session that was meant to work on a cryptography problem, using 16 million output tokens with no human input. Anthropic shared it with the authors in September, under a confidentiality agreement and with an offer of compensation. Within hours, Anthropic published a Lean proof of the main results. So what are these problems? 3SUM: given n numbers, do three of them add up to zero? Here are eight. Checking every triple takes 56 checks, and the number of triples grows like n³. The method taught in algorithms classes sorts the numbers, then, for each one, walks two pointers inward from the ends. On our eight numbers that takes 21 steps, and finds the one triple: −4, 1 and 3. That is about n² steps. For a thousand random numbers, by our count: 166 million triples, against under half a million pointer steps. For decades, the paper says, the quadratic method was sped up only by polylogarithmic factors, by Baran, Demaine and Pătraşcu, by Grønlund and Pettie, and by Chan. Fine-grained complexity made this a hypothesis: no algorithm beats n² by any fixed power of n. Many problems, especially in computational geometry, were then shown to be at least as hard. All-pairs shortest paths: given a network with weighted one-way edges and no negative cycles, find the shortest distance between every pair of points. In our four-point example, the shortest way from one to four goes through three and two, for a total of four. Floyd and Warshall’s algorithm from 1962 does it in n³ steps: 64 updates here. In matrix form, APSP becomes the (min,+) product: like multiplying matrices, but with minimum in place of sum and plus in place of times. Squaring the weight matrix this way twice gives every distance in our example. Before this paper, the fastest known algorithm, by Ryan Williams, shaved off only a factor of about 2^√(log n), less than any fixed power. The APSP hypothesis says n³ is essentially optimal. Both problems reduce to a third: Exact Triangle. Take three groups of points with integer weights on the edges between groups: is there a triangle whose three weights sum to zero? Here, −2, −1 and 3. If Exact Triangle beats n³ by a fixed power of n, then 3SUM beats n², and APSP n³, by a fixed power too.
3:29The claim
The claim. Theorem 22: deterministic algorithms solve 3SUM on n integers of polynomial size in time big O of n^1.9992, and APSP and the (min,+) product, with polynomially bounded integer weights, in n^2.99942. Theorem 19: Exact Triangle in n^(3 − 0.0017). The model is the standard word RAM, with words of order log n bits. The paper says this refutes the 3SUM and APSP hypotheses, and, through known reductions, the Exact Triangle and zero-weight k-Clique hypotheses and three conjectures about hinted matrix-vector products. For inputs that are real numbers, it gives randomized algorithms that are always correct, in n^1.998 and n^2.998 expected time. How big is the gain? Tiny. The paper says its constants are enormous, and its algorithms potentially impractical in their current form. In our chart, ignoring those constants, n² / n^1.9992 is n^0.0008. At a million numbers, that saves about one percent. It reaches a factor of two only when n is 2^1250, a number with 377 digits; for APSP, 520 digits. The point is the exponent: it is not two, and not three. What is not claimed: nothing about the Strong Exponential Time Hypothesis or orthogonal vectors, nothing for k-SUM with k at least four, and no faster algorithm for problems known only to be 3SUM-hard, such as finding three points on a line, which the paper says is now open.
5:22How it works
How it works, following the paper. Everything rests on one new algorithm. Take a tall, thin matrix X, n rows by D columns, and a wide one, Y, D by n, where D is tiny: at most n^(1/18). You do not want all of X times Y, only a scattered set of entries, at most n²/√D of them. Computing them one by one costs n²·√D; writing down the whole product costs n². The new algorithm needs about n²/D^0.063: less than either. In graph terms: two big groups of points, a tiny middle group, and edges through it. Entry a b of the product counts the triangles through the pair a b. That is the lopsided sparse triangle problem of the title. The method starts from Strassen’s idea: apply a small multiplication identity over and over, as a tree, with the multiplications at the leaves. The paper uses an identity of Schönhage with ten multiplications, inside a variant of Coppersmith’s rectangular algorithm from 1982. Then the new step: prune the tree, and visit only the leaves that some wanted entry needs. Then come reductions, almost all of them known, by Vassilevska Williams and Ryan Williams, by Vassilevska Williams and Xu, by Chan and Xu, and others. The paper’s own step makes the reduction from Exact Triangle to the lopsided problem deterministic, by reducing the weights modulo a carefully chosen prime. Each step keeps only part of the saving. The matrix step saves D^0.063. The reduction keeps half. With D equal to n^(1/18), Exact Triangle saves about n^0.0017. 3SUM keeps half of that, and APSP a third: that is where 1.9992 and 2.99942 come from. The authors write that, with Claude, they also generated slightly better but much more complicated algorithms, which they left out on purpose. Per the acknowledgments, what Claude shared is essentially the Section 2 algorithm, which already breaks both hypotheses; the stronger Section 4 version behind these exponents, the authors derived. Then the Lean. Anthropic added a Lean 4 development to its formal-math repository on October 6, at 4 a.m. UTC, about ten hours after the paper was submitted. Per the acknowledgments, an internal research model wrote it after the paper was completely written. The five headline claims sit in one file, EndStatement.lean: 139 lines that import nothing, not even Mathlib. It defines a tiny machine: memory cells that hold words of W bits, and nine instructions. Write one, add, subtract, multiply, load, store, jump if negative, accept, reject. No division, and no constant other than one. 3SUM is written as: three different positions whose numbers sum to zero. And the claim reads: for every bound n^κ on the size of the numbers, one program solves every instance, with words of order log n bits, within big O of n^1.9992 steps. We compared the five claims with the paper by reading. They match Theorems 19 and 22, and the zero-weight case of Corollary 39, with the paper’s sharper exponents, from its second route. Anthropic’s automated check on that commit passed: a full build, then the comparator, which matched the five claims, and 132 further statements, to their challenge files, with Lean’s kernel and the independent kernel nanoda both accepting. The README lists what is not proved, including the real-number results, and the two reduction theorems in their printed form, though versions of them are proved. Our text count: 434 files, about 102,000 lines, with sorry only in the two challenge files. We read the log; we did not build or run anything.
9:26Where it stands
Where it stands, on November 29. The paper is on arXiv, still version one, and we found no peer-reviewed version. Josh Alman presented it at a Cornell seminar on October 26; the abstract says the algorithm was found by Anthropic using an internal model of Claude. The human check is the authors’: they worked to understand, simplify, strengthen and extend the algorithm, and they take full responsibility. They also used Claude to check mathematical details. Anthropic’s Lean check passed; not built or run by us. In October, other researchers posted preprints that build on it. Karingula and Lovett: a simpler proof, with weaker exponents. Majdoddin: better exponents, 1.9945 for 3SUM. And Chan, Itakura, Ma and Yu: a different, randomized algorithm for 3SUM that avoids matrix multiplication entirely, in about five pages. Each says it used AI tools, and none is peer reviewed. On the Computational Complexity blog, Bill Gasarch wrote that all of these results are being looked at by experts. We found no announcement on Anthropic’s website. This is a Specials episode. AN03 covered Anthropic’s claim from the same Lean repository that the Exponential Time Hypothesis is false, and episode 378 covered OpenAI’s claim of the same. If it holds, two cornerstone hypotheses of fine-grained complexity fall: 3SUM is not quadratic, and all-pairs shortest paths are not cubic, by an algorithm found by Claude, simplified, strengthened and written up by two human experts who take full responsibility, with its main claims checked in Lean by Anthropic. Once more: Anthropic makes Claude, which helps make this series.
Spot a mistake?
This episode simplifies on purpose, but it shouldn’t be wrong. If something is, open an issue on GitHub or leave a comment on YouTube. Corrections are noted here with a date.