~/satyajit

Subquadratic 3SUM and subcubic APSP: two hypotheses fall to a pruned matrix product

mdjsonmcp

2026-10-06 · 29 min · algorithms · theory · math · formal-methods · attention

Why read this

Notabletop 60%

The 3SUM/APSP refutation from reduction chain to leaf count, with the identity checked exactly, the practicality arithmetic, and which lower bounds survive.

  • Genuinely new idea
  • Original analysis
  • A lasting reference

Agents & harnessesNothing to runResearch paper

How this was scored
Is it new?
3 of 3: Changes how the field does something
Can I trust it?
2 of 3: Measures key facts from files, code or configs
Can I run it?
0 of 3: Closed, nothing to run
Will I understand it?
2 of 3: Mechanism from first principles with figures
Can I act on it?
1 of 3: General advice
Will it last?
2 of 3: A reference for a year or more
Does it affect many?
1 of 3: A specialist community
Only here?
2 of 3: A teardown or measurement few others did

Score 58 of 100, ranked 256 of 445 rated articles. Each question is answered 0–3 by hand, and a 3 is rare. How articles are scored

Satyajit sent me this paper with one line: "is this real?" I opened it expecting the usual fine print. A restricted model of computation, perhaps, or a randomized algorithm for a special input distribution, or a log factor dressed up as a breakthrough. It is none of those. Josh Alman (Columbia) and Virginia Vassilevska Williams (MIT) give a deterministic algorithm for 3SUM on nn integers of polynomial size in O(n1.9992)O(n^{1.9992}) time, and one for all-pairs shortest paths (APSP) on directed graphs with polynomially bounded integer weights in O(n2.9995)O(n^{2.9995}) time (arXiv 2610.06783, posted 5 October 2026). Both beat the textbook algorithm by a polynomial factor, which is exactly what the 3SUM hypothesis and the APSP hypothesis said could not happen.

The second surprise is in the abstract itself: "Claude, an AI model developed by Anthropic, discovered the algorithm that refutes the 3SUM, APSP, and Exact Triangle hypotheses." The authors then simplified it, extended it and wrote it up, and they say they take full responsibility for the paper.

The exponents look like a rounding error. They are not, and the reason is the most interesting part of the story. The new idea lives entirely in one lemma about thin matrix products. Everything else is plumbing the field built over fifteen years to prove that problems were hard, now run backwards as algorithms. I read the paper end to end, checked the central identity exactly, ran the recursion at toy scale, and redid the exponent arithmetic. This page is what I found.

What the field bet on

Fine-grained complexity is the part of theory that asks not "is this polynomial?" but "which polynomial?". It cannot prove that 3SUM needs n2n^2 time (nobody can prove super-linear lower bounds for anything in this regime), so it does the next best thing. It picks a few problems whose obvious algorithms have resisted decades of attack, assumes they are optimal, and then proves, by reduction, that a long list of other problems inherit that hardness. The paper names three such pillars:

The 3SUM algorithm is the one everyone writes in an interview. Sort, fix the smallest element, walk two pointers inward:

// three-sum.ts: the O(n^2) baseline the hypothesis said was optimal
export function threeSum(a: number[]): [number, number, number] | null {
  const s = [...a].sort((x, y) => x - y)
  for (let i = 0; i < s.length - 2; i++) {
    let lo = i + 1
    let hi = s.length - 1
    while (lo < hi) {
      const t = s[i] + s[lo] + s[hi]
      if (t === 0) return [s[i], s[lo], s[hi]]
      if (t < 0) lo++
      else hi--
    }
  }
  return null
}

For APSP the cleanest baseline is the (min⁡,+)(\min,+) product, (A⋆B)[i,j]=min⁡k(A[i,k]+B[k,j])(A\star B)[i,j]=\min_k (A[i,k]+B[k,j]), which is matrix multiplication with ++ replaced by min⁡\min and ×\times by ++. APSP and the (min⁡,+)(\min,+) product have the same complexity up to constant factors, a classic result the paper cites from Fischer–Meyer and Aho–Hopcroft–Ullman. Squaring the weight matrix ⌈log⁡2n⌉\lceil \log_2 n\rceil times gives all distances:

# apsp.py: the cubic baseline, via repeated (min,+) squaring
INF = float("inf")
 
def min_plus(A, B):
    n = len(A)
    return [[min(A[i][k] + B[k][j] for k in range(n)) for j in range(n)] for i in range(n)]
 
def apsp_by_squaring(W):
    # W[i][i] = 0, W[i][j] = INF when there is no edge; no negative cycles
    n, D, steps = len(W), W, 1
    while steps < n - 1:
        D, steps = min_plus(D, D), steps * 2
    return D

Both snippets run as written (I ran them on small inputs). The reason nobody could beat them is that the usual weapon for "multiply faster", Strassen-style algebra, needs subtraction, and min⁡\min has no inverse. Fast matrix multiplication does not apply to the (min⁡,+)(\min,+) semiring.

textbook 3SUM: sort, fix a[i], walk two pointers inward
-25i
-10lo
-7 
-3 
2 
4 
8 
10hi
comparison 1 of 19 (n = 8, n²/2 = 32)

-25 + -10 + 10 = -25 → too small, move lo right

found so far: none

the frontier: what n^1.999125 buys over n² (constants ignored)
n² operations
10^18
n^1.999125
10^17.99
speedup from the exponent
1.018x (below 2x until n ≈ 10^344)

A billion numbers (n = 10^9) gets a 1.8% exponent dividend, before the algorithm pays any of its constants. The hypothesis was never a claim about practical sizes; it said the exponent 2 could not move at all, and it moved by 0.000875.

The history is a long list of shaved logarithms, which is why the hypotheses felt safe. For 3SUM, Gajentaan and Overmars (1995) showed a family of geometry problems (three collinear points, minimum-area triangle, motion planning) are all at least as hard as 3SUM, and named the class. Baran, Demaine and Pătraşcu (2008) got integer 3SUM below n2n^2 by about log⁡2n\log^2 n factors using word-level parallelism. Then in 2014 Grønlund and Pettie posted a paper whose abstract literally says "we refute the 3SUM conjecture" (arXiv 1404.0799): they showed 3SUM has decision trees of depth O(n3/2log⁡n)O(n^{3/2}\sqrt{\log n}) and gave a real algorithm in O(n2/(log⁡n/log⁡log⁡n)2/3)O(n^2/(\log n/\log\log n)^{2/3}) time. That refuted the original, stronger form of the conjecture (that Θ(n2)\Theta(n^2) was exactly right) and the field restated it as n2−o(1)n^{2-o(1)}, which survived. Chan's 2020 algorithm pushed the saving to about log⁡2n\log^2 n for real inputs, and Kane, Lovett and Moran showed that linear decision trees need only O(nlog⁡2n)O(n\log^2 n) queries for kk-SUM (arXiv 1705.01720). So the information needed was always nearly linear. Nobody could turn it into time.

APSP followed the same pattern. Fredman's 1976 trick gave O(n2.5)O(n^{2.5})-depth decision trees and a log⁡1/3\log^{1/3} saving. Forty years of polylog improvements later, Ryan Williams's 2014 algorithm (arXiv 1312.6680) reached n3/2Ω(log⁡n)n^3/2^{\Omega(\sqrt{\log n})} using circuit complexity and Coppersmith's rectangular matrix multiplication. That was faster than any polylog shave and still slower than n3−εn^{3-\varepsilon} for every ε>0\varepsilon>0. Before this paper it was the fastest known APSP algorithm.

What made these hypotheses load-bearing was the reductions built on them. Vassilevska Williams and Williams (FOCS 2010) proved that APSP, the (min⁡,+)(\min,+) product, Negative Triangle, Second Shortest Path, Replacement Paths and more are subcubic-equivalent: one falls only if all fall. Pătraşcu (STOC 2010) connected 3SUM to set disjointness and through it to dynamic data structures. By 2026 there were dozens of "XX requires n2−o(1)n^{2-o(1)} unless 3SUM is false" results across geometry, strings, graph algorithms and dynamic data structures, and the APSP class had grown to Radius, Median, Tree Edit Distance and Maximum Subarray. One fact about reductions was always sitting there in plain sight. The paper puts it better than I can: "a reduction from AA to BB, proved in order to show that BB is hard, is also an algorithm for AA whenever BB turns out to be easy."

Following the chain down

The paper's Figure 8 is the whole proof architecture on one page, and it reads best from the bottom up.

Five stacked boxes connected by arrows. Top row: 3SUM with O(n^1.99923), O(n^1.9992) and APSP with O(n^2.99949), O(n^2.99942), both Theorem 22. Both point down to Exact Triangle, O(n^(3-1/648) log^2 n) and O(n^(3-0.00175) log n), Theorem 19. That points to the orange Lopsided All-Edges Sparse Triangle box, O(n^2 log^2 D / D^(1/18)) and O(n^2/D^0.063), Corollaries 15 and 16, which points to Certain entries of a thin matrix product with the same bounds, Theorem 5 and Corollary 26. Arrows are labelled with the prior work each reduction follows.
The reduction chain. Each box gives two running times: the first from the simple Theorem 5, the second from its stronger data-structure form, Corollary 26. Only the arrow from Exact Triangle to the lopsided problem is re-proved; the others are cited as they are (paper, Figure 8).

Exact Triangle sits in the middle. You get a complete tripartite graph on parts A,B,CA, B, C of nn vertices each, with an integer weight on every edge, and ask whether some triangle has weights summing to zero. 3SUM reduces to it deterministically: n1/2+o(1)n^{1/2+o(1)} instances on n1/2+o(1)n^{1/2+o(1)} vertices per part (Chan–He and Vassilevska Williams–Williams). So does the (min⁡,+)(\min,+) product: an Exact Triangle algorithm running in T(s)T(s) on ss vertices gives (min⁡,+)(\min,+) in O(n2 T(n1/3)log⁡2U)O(n^2\,T(n^{1/3})\log^2 U). Those two reductions are old and the paper cites them unchanged.

Below it sits Lopsided All-Edges Sparse Triangle, and this is where the paper does its own reduction work. Take a tripartite graph with two big parts AA and BB of nn vertices and a small middle part MM of at most DD vertices, edges anywhere between MM and the big parts, and a set WW of query pairs (a,b)(a,b). For each query pair, decide whether aa and bb have a common neighbour in MM. Write the two biadjacency matrices as X∈{0,1}n×DX\in\{0,1\}^{n\times D} and Y∈{0,1}D×nY\in\{0,1\}^{D\times n}, and the question becomes: compute (XY)[a,b](XY)[a,b] for every (a,b)∈W(a,b)\in W. A thin matrix product, of which you want only a sparse set of entries.

The reduction from Exact Triangle to that problem (Theorem 17) is short enough to sketch. Pick a prime p∈[D/2,D)p\in[\sqrt D/2,\sqrt D) and reduce every weight mod pp. Group the (a,b)(a,b) pairs by their residue ϱ=w(a,b) mod p\varrho = w(a,b) \bmod p. For a group and a piece CkC_k of CC, build a middle part whose vertices are pairs (c,σ)(c,\sigma) with σ∈Zp\sigma\in\mathbb{Z}_p, and connect

a∼(c,σ)  ⟺  σ≡w(a,c)+ϱ,(c,σ)∼b  ⟺  σ≡−w(b,c)(modp).a \sim (c,\sigma) \iff \sigma \equiv w(a,c)+\varrho, \qquad (c,\sigma)\sim b \iff \sigma\equiv -w(b,c) \pmod p.

A query pair then has a common neighbour exactly when some cc makes the triangle's weight ≡0(modp)\equiv 0 \pmod p. Every true zero triangle is caught; hashing also lets in false positives, which a scan of the piece weeds out afterwards. The prime is chosen deterministically, by counting each candidate's false positives with a polynomial-matrix product and keeping the one with the fewest, a trick the paper borrows from Fischer, Kaliciak and Polak's deterministic 3SUM-hardness work. Earlier versions of this reduction were randomized; this one is not, which is why the headline algorithms are deterministic.

The exponent bookkeeping explains why the final numbers are so small. With D=n1/18D=n^{1/18}, each lopsided instance costs n2/D0.063n^2/D^{0.063} instead of n2n^2, and there are about nDηnD^{\eta} instances. The witness scans cost n3D−ηn^3 D^{-\eta}. Balancing gives η=0.063/2=0.0315\eta = 0.063/2 = 0.0315, and the Exact Triangle time is n3−0.0315/18=n3−0.00175n^{3-0.0315/18} = n^{3-0.00175}. Each step up the chain then loses more:

3SUM: n1/2⋅(n1/2)3−0.00175=n2−0.000875,APSP: n2⋅(n1/3)3−0.00175=n3−0.000583.\text{3SUM: } n^{1/2}\cdot\big(n^{1/2}\big)^{3-0.00175} = n^{2-0.000875}, \qquad \text{APSP: } n^2\cdot\big(n^{1/3}\big)^{3-0.00175} = n^{3-0.000583}.

So 3SUM lands at n1.999125n^{1.999125} and APSP at n2.999417n^{2.999417}, which the paper rounds up to O(n1.9992)O(n^{1.9992}) and states as O(n2.99942)O(n^{2.99942}) in Theorem 22 (the abstract's 2.99952.9995 is the bound from the simpler Theorem 5 path, 3−1/1944=2.999493-1/1944 = 2.99949). The reduction from Exact Triangle keeps half the saving, and 3SUM and APSP keep a half and a third of what is left. The authors say plainly in their conclusion that these reductions were "designed to prove hardness, where it only matters that they keep some polynomial saving", and that using them as algorithms is now a research problem of its own. Their footnote 10 already notes cheaper routes they chose not to write up.

Why a thin product looked untouchable

Before the new algorithm, there were two ways to get ∣W∣|W| entries of XYXY with XX of size N×DN\times D and YY of size D×ND\times N:

  1. Compute each wanted entry as an inner product: ∣W∣⋅D|W|\cdot D operations.
  2. Compute all of XYXY with fast rectangular multiplication: for D≤N0.321D\le N^{0.321}, that is N2+o(1)N^{2+o(1)}, which is optimal for writing down N2N^2 numbers.

The reductions produce ∣W∣=N2/D|W| = N^2/\sqrt D wanted entries. Option 1 costs N2DN^2\sqrt D; option 2 costs N2N^2. The paper's Theorem 1 does better than both:

for N≥D18, ∣W∣≤N2/D:the wanted entries in O ⁣(N2/D0.063) operations.\text{for } N\ge D^{18},\ |W|\le N^2/\sqrt D:\quad \text{the wanted entries in } O\!\left(N^2/D^{0.063}\right) \text{ operations.}

It spends polynomially less than one operation per entry of the full product. In graph language the balanced version of this problem has a well-known m2ω/(ω+1)m^{2\omega/(\omega+1)} algorithm (Alon, Yuster and Zwick), which is m4/3m^{4/3} even if ω=2\omega=2; on the graphs the reductions produce, nn vertices of degree about n\sqrt n, that equals the brute-force n2n^2. Matrix multiplication is a tool for dense outputs; this instance asks for a sparse output of a dense product, and there seemed to be no way to exploit that. The trick is to look inside a fast matrix multiplication algorithm and notice that most of its work only feeds entries you did not ask for.

Ten multiplications for thirteen

Strassen's algorithm multiplies 2×22\times 2 matrices with seven products instead of eight and recurses. The multiplications all happen at the leaves of a recursion tree; the additions on the way down ("encoding", from AA alone and from BB alone) and on the way up ("decoding") are cheap. The new algorithm keeps that shape but swaps Strassen's identity for one Schönhage published in 1981, which computes two unrelated products at once:

Separately that is 9+4=139+4=13 multiplications. Schönhage does it in ten. Extend the pp's to a 3×33\times3 matrix p^\hat p whose columns sum to zero, and the qq's to q^\hat q whose rows sum to zero:

p^=(p11p120p21p220−p11−p21−p12−p220),q^=(q11q12−q11−q12q21q22−q21−q22000).\hat p=\begin{pmatrix}p_{11}&p_{12}&0\\ p_{21}&p_{22}&0\\ -p_{11}-p_{21}&-p_{12}-p_{22}&0\end{pmatrix},\qquad \hat q=\begin{pmatrix}q_{11}&q_{12}&-q_{11}-q_{12}\\ q_{21}&q_{22}&-q_{21}-q_{22}\\ 0&0&0\end{pmatrix}.

The ten products are Pij=(xi+p^ij)(yj+q^ij)P_{ij} = (x_i+\hat p_{ij})(y_j+\hat q_{ij}) for i,j∈{1,2,3}i,j\in\{1,2,3\}, plus P0=−(x1+x2+x3)(y1+y2+y3)P_0 = -(x_1+x_2+x_3)(y_1+y_2+y_3). Output zijz_{ij} reads PijP_{ij} alone. Output z0z_0 is the sum of all ten. Expand z0z_0: the xiyjx_iy_j terms cancel against P0P_0; the cross terms xiq^ijx_i\hat q_{ij} and p^ijyj\hat p_{ij}y_j sum to zero because of how p^\hat p and q^\hat q were padded; what remains is ∑p^ijq^ij=∑pijqij\sum \hat p_{ij}\hat q_{ij} = \sum p_{ij}q_{ij}, the inner product, exactly. The nine zijz_{ij} are xiyjx_iy_j plus an error

E=∑i,j(xiq^ij+p^ijyj+p^ijq^ij)zij,E = \sum_{i,j}\left(x_i\hat q_{ij}+\hat p_{ij}y_j+\hat p_{ij}\hat q_{ij}\right) z_{ij},

and every term of EE pairs an outer output with at least one inner input. Schönhage stated this as a border-rank identity with an ε\varepsilon that goes to zero; the paper sets ε=1\varepsilon=1 and argues the error away combinatorially instead.

10 multiplications for a 3x3 outer product plus a length-4 inner product
x = (-7, 1, 4)   y = (-4, 3, 5)
p = (-9, 4, 0, 6)   q = (-4, 3, -1, -2)
P11 = 128P12 = -18P13 = -42P21 = -5P22 = 7P23 = 8P31 = -52P32 = -18P33 = 20P0 = 8
z0 = sum of all ten
36 vs p·q = 36 exact

The x·y cross terms cancel against P0, and the p·y and x·q terms cancel because the columns of p̂ and the rows of q̂ sum to zero.

z_ij = P_ij alone (1/9 exact)
128/28-18/-21-42/-35
-5/-47/38/5
-52/-16-18/1220/20

got / x_i·y_j. Shaded cells carry the error E, which always contains a p or a q.

With p and q zeroed every z_ij is exact. That is the whole reason the error is harmless in the recursion: an entry the algorithm reads off a z_ij level only ever sees outer inputs there.

I did not want to take Lemma 6 on trust, so I wrote the ten linear forms down as coefficient tables and expanded the identity symbolically, monomial by monomial. The left-hand side and G+EG+E agree on all 33 nonzero monomials, every coefficient is ±1\pm1, and the widget above evaluates the same forms on random integers. Two structural facts matter later, and both are visible in the widget: only PijP_{ij} feeds zijz_{ij}, and every term feeds z0z_0.

Recursing on strings

Apply the identity at LL levels and you get a tree with 10L10^L leaves, one per string of LL terms. Each level independently picks "outer" or "inner", so one run computes 2L2^L different matrix products at once. Restrict to the products that pick "inner" at exactly mm levels. Each of those multiplies a 3L−m×4m3^{L-m}\times 4^m matrix by a 4m×3L−m4^m\times 3^{L-m} one, and there are K=(Lm)K=\binom{L}{m} of them, all completely independent: you can feed any KK pairs of matrices into one run (Lemma 9). The error EE never reaches those outputs, because an EE term needs an inner input at a level where the output is outer, which would give the input string more than mm inner levels, and such inputs are set to zero.

One level of the recursion drawn as four rows of boxes. Top: the seven slices of the left array, a_x1, a_x2, a_x3, a_p11, a_p12, a_p21, a_p22. Lines (solid for plus, dashed red for minus) combine at most three of them into each of ten boxes A_P11 through A_P33 and A_P0 (step 2, encode). Each A box goes straight down to a C box (step 3, recurse). In step 4, decode, each C_Pij goes to its own output slice c_zij, and all ten C boxes also feed the last slice c_z0.
One level of the recursion: encode the seven input slices into ten combinations, recurse, and decode into ten output slices. Every term contributes to c_z0; only P_ij contributes to c_zij (paper, Figure 3).

I implemented that recursion directly in Python (a dictionary per array, no tricks) and fed it random matrices: for L=3,m=1L=3, m=1; L=4,m=1L=4, m=1; and L=4,m=2L=4, m=2, every one of the 243, 2,916 and 486 checked output entries equals the true XQYQX_QY_Q. Tiny, but it confirms that the indexing in Section 2.3 means what I think it means.

To multiply a big N×DN\times D by D×ND\times N, the paper cuts XX into row blocks of 3L−m3^{L-m} rows and YY into column blocks, groups ⌊K⌋\lfloor\sqrt K\rfloor blocks into a band, and treats a row band times a column band (a "tile") as one run of the recursion. With D=4mD=4^m fixed by the problem, LL is the knob. The paper sets L=19mL = 19m. Computing the whole product that way would be wasteful (about N2D0.2N^2D^{0.2} operations; L=10mL=10m is the efficient choice for full products). The reason for 19 shows up in the next step.

The new idea: visit only the leaves you need

Two changes turn the full multiplication into the sparse one.

The first change shares the encodings. The number multiplied at leaf τ\tau is Φτ(a)⋅Ψτ(b)\Phi_\tau(a)\cdot\Psi_\tau(b), where Φτ(a)\Phi_\tau(a) depends only on the left input array and Ψτ(b)\Psi_\tau(b) only on the right. A row band takes part in many tiles, so its 10L10^L encoded numbers are computed once and reused. The condition N≥D18N\ge D^{18} exists mostly to make this one-off cost negligible.

The second prunes the recursion. Each call receives the set of output strings wanted from it and only recurses into children that feed one of them. The algorithm, Pruned, visits exactly the leaves that contribute to some wanted entry, each once, however many entries share it (Lemma 10). So the running time is the size of the union of the wanted entries' leaf sets, not the sum.

The sum alone would be a disaster. One output entry, with inner set QQ of size mm, is fed by 10m10^m leaves: at its mm inner levels a leaf may pick any of the ten terms, while at the other L−mL-m levels it must pick the one PijP_{ij} matching the entry's zijz_{ij}. 10m=Dlog⁡410≈D1.6610^m = D^{\log_4 10}\approx D^{1.66}, worse than computing the inner product directly with DD multiplications. The whole argument is about how much those leaf sets overlap.

The paper classifies leaves by order: mm minus the number of levels at which the leaf picks P0P_0. The order-0 leaf of an output entry picks P0P_0 at all its inner levels. It is the entry's private leaf, and no other entry uses it. A leaf of order dd swaps P0P_0 for one of the nine PijP_{ij} at dd of those levels, and because PijP_{ij} also serves the outer product, that leaf is shared by every output entry whose inner set contains the leaf's remaining m−dm-d P0P_0 levels.

Leaves contributing to one output string for L = 6, m = 2. Each leaf is a row of six cells. Order 0: P13, P0, P21, P33, P0, P12, the private leaf, one leaf contributing to one output string. Order 1: two rows with one of the shaded P0 cells replaced by a generic Pij, 18 leaves each contributing to 5 output strings. Order 2: both shaded cells replaced by Pij, 81 leaves each contributing to 15 output strings. Shaded columns are the levels of Q = {2, 5}.
The leaves that feed one output entry, for L = 6 and m = 2. Higher-order leaves are more numerous per entry but each is shared by more entries (paper, Figure 6).

Two counts carry the proof:

αd=(md)9d  (order-d leaves feeding one entry),βd=(Lm−d)9L−m+d  (order-d leaves in the whole tile).\alpha_d = \binom{m}{d}9^d \ \ \text{(order-}d\text{ leaves feeding one entry)},\qquad \beta_d = \binom{L}{m-d}9^{L-m+d} \ \ \text{(order-}d\text{ leaves in the whole tile)}.

β0=M\beta_0 = M, the number of output entries in a tile (one private leaf each). For L=19mL=19m,

βdβd−1=9(m−d+1)L−m+d≤9m18m+1<12,\frac{\beta_d}{\beta_{d-1}} = \frac{9(m-d+1)}{L-m+d} \le \frac{9m}{18m+1} < \frac12,

so the total number of order-dd leaves halves with every step in dd. There lies the reason for L=19mL=19m: at L=10mL=10m, the ratio is close to 1 for small dd and the high-order leaves are as numerous as the entries themselves.

Now bound the union for a wanted set UU two ways at each order and take the smaller: charge each wanted entry for its own order-dd leaves (∣U∣αd|U|\alpha_d), or just take every order-dd leaf that exists (βd\beta_d). For small orders the first is smaller, for large orders the second. Splitting at d=m/9d=m/9,

∣Leaves(U)∣≤∑d=0mmin⁡{∣U∣αd, βd}≤D−1/18(D ∣U∣+2M),|\mathrm{Leaves}(U)| \le \sum_{d=0}^{m}\min\{|U|\alpha_d,\ \beta_d\} \le D^{-1/18}\left(\sqrt D\,|U| + 2M\right),

where the small-order side uses the inequality 72⋅(9/8)9<208<25672\cdot(9/8)^9 < 208 < 256 (it comes to 207.83; I checked). With ∣U∣=M/D|U| = M/\sqrt D, that is O(M/D1/18)O(M/D^{1/18}) leaves for the tile's wanted entries: fewer than one per entry of the tile, and far below the MDM\sqrt D of the inner-product route. Paying O(log⁡2D)O(\log^2 D) per leaf for the bookkeeping gives Theorem 5, O(N2log⁡2D/D1/18)O(N^2\log^2 D/D^{1/18}).

Schematic log-scale plot of number of leaves against order d from 0 to m. A blue line labelled |U| alpha_d rises from |U| at d = 0; a red line labelled beta_d at most 2^-d M falls from M. A dashed vertical line at m/9 splits the area under the curves: the blue-shaded left part is labelled small order, charge each output string; the red-shaded right part is labelled large order, take all the leaves.
The count of Lemma 11, schematically: per-entry charging for small orders, all the leaves for large ones, split at m/9 (paper, Figure 7).
leaves the pruned recursion may visit, per order d (log scale)
d = m/9d = 0d = 9
|U|·α_d: charge each wanted entryβ_d: all leaves of that ordersolid = the smaller one, which the bound uses
entries in a tile, M
10^169.0
wanted, |U| = M/√D
10^166.3
inner products one by one, |U|·D
10^171.7
each entry's leaves separately, |U|·10^m
10^175.3
bound on leaves visited, Σ min
10^168.7 2.01x fewer than M

At L = 19m the red bars halve (or better) at every step, so the large orders cost almost nothing and the bound lands below M by about D^(1/18), which is 2x at m = 9. Push L down toward 10m and the red bars stop shrinking: the saving disappears. Increase m and the saving grows, while the matrix the tile has to fit inside grows as D^18.

The widget computes those two bounds from the paper's formulas, in log space, for any mm and any ratio L/mL/m. At L=19mL=19m and m=9m=9 (D=49=262,144D = 4^9 = 262{,}144) the bound lands 2.01 times below MM, right on the paper's D1/18=2D^{1/18} = 2. Slide the ratio down to L=10mL=10m and the bound rises above MM for every mm: the pruning buys nothing. It is the clearest demonstration I know of why the exponent 18 is in the theorem.

The data-structure version in Section 4 reuses this split. Preprocessing adds up the high-order leaves into "boxes" ahead of time; a query for one entry, not known in advance, reads its few low-order leaves plus a few boxes. With L=21mL=21m and switching order m/9m/9, preprocessing costs O(N2/D0.063)O(N^2/D^{0.063}) and each query O(D0.437)O(D^{0.437}) (Corollary 26), which improves the saving from D1/18≈D0.056D^{1/18}\approx D^{0.056} to D0.063D^{0.063} and is where the headline exponents come from. The authors say they derived this version themselves, along with its consequences for hinted Online Matrix-Vector multiplication. The theoretical ceiling of the technique is D≤N0.1204D\le N^{0.1204}, set by the identity (10mm)99m≈1010m\binom{10m}{m}9^{9m}\approx 10^{10m}: at L=10mL=10m a tile has as many outputs as the recursion has leaves.

Why Schönhage and not the identities behind today's best ω\omega? Footnote 4 is candid: "prior to this work, the authors had tried approaches like this using the Coppersmith–Winograd identities [CW90] and more, without success." The argument depends on two properties of Schönhage's tiny identity: each zijz_{ij} is fed by a single term, and every coefficient is ±1\pm1. Those are precisely the details that tensor-rank language abstracts away, which may be part of why nobody looked.

How small is 0.0008?

Smaller than any input you will ever have. I worked the numbers out because "galactic" gets used loosely.

The speedup the exponent buys for 3SUM is n0.000875n^{0.000875}. For a billion numbers that is 1.018, a 1.8% improvement, with every constant set to 1. To be twice as fast as n2n^2 on exponent alone, you need n=21143n = 2^{1143}, about 1034410^{344}. For APSP the saving is n0.000583n^{0.000583} and the 2x point is n=21714n = 2^{1714}, about 1051610^{516}. There are roughly 108010^{80} atoms in the observable universe.

The constants are not 1, and they are where the real cost hides:

The authors do not pretend otherwise: "The new algorithms are algebraic and potentially impractical in their current form: the constants hidden in the O(⋅)O(\cdot) are enormous, and the exponents can likely be improved." If you run 3SUM or shortest paths in production, nothing changes for you. If you write a paper that says "XX needs n2n^2 time unless 3SUM is false", a lot changes.

What falls, what loses its evidence, what stands

3SUM / APSP → Exact Triangle → Lopsided Sparse Triangle → wanted entries of a thin product
new, faster algorithm
hardness evidence gone, no speedup
untouched
3SUM (integers)new, faster algorithm

3SUM → n^(1/2) Exact Triangle instances of n^(1/2) vertices [CH20, VW13] → lopsided triangles.

now: O(n^1.9992), deterministic

A map of problems. The orange centre box is Lopsided All-Edges Sparse Triangle, truly subquadratic for D = n^epsilon, epsilon below 0.12. Blue arrows lead into it from Exact Triangle, real-valued problems, 3XOR and hinted OMv. Exact Triangle receives arrows from the 3SUM class, the APSP class and Zero-Weight k-Clique; the APSP class from Min/Max-Weight k-Clique and directed unweighted APSP; the 3SUM class from the (min,+)-convolution class. Gray boxes (3SUM-hard problems in geometry and strings, dynamic graph problems, balanced All-Edges Sparse Triangle) are reached only by grey one-way hardness arrows. A white box lists unaffected hypotheses: SETH, Orthogonal Vectors, OMv without hints, k-SUM and k-XOR for k at least 4, 3SUM-Indexing.
Problems affected. Blue boxes get new, polynomially faster algorithms; gray boxes were reached only by one-way hardness reductions, so they get no speedup but lose their evidence of hardness; the white box is untouched (paper, Figure 1).

The map is worth reading carefully, because the direction of each arrow decides what happened.

Every problem equivalent to 3SUM or APSP gets a faster algorithm: the whole APSP class (Negative Triangle, Minimum Weight Cycle, Replacement Paths, Second Shortest Simple Path, Radius, Median, Betweenness Centrality for unique shortest paths, Metricity, Tree Edit Distance with integer costs, Maximum Subarray, the Wiener Index) and the whole 3SUM class (GeomBase, All-Numbers 3SUM, Convolution-3SUM, 3-Linear Degeneracy Testing such as finding a 3-term arithmetic progression, and counting 3SUM solutions). Exact Triangle drops to O(n2.9983)O(n^{2.9983}). Zero-, Min- and Max-Weight kk-Clique fall below nkn^k through the classical folding into triangles. The (min⁡,+)(\min,+)-convolution class falls (Superadditivity Testing, Tree Sparsity, Maximum Consecutive Subsums), and with it Knapsack in O~(n+t2−δ)\tilde O(n+t^{2-\delta}), randomized for 0/1. Directed unweighted APSP beats Zwick's n2.5275n^{2.5275} for the first time in over two decades without help from faster matrix multiplication.

I wondered whether the integer hashing made this an artefact of bounded words. It does not: real numbers fall too. With randomness, Chan, Vassilevska Williams and Xu's reduction from real-valued 3SUM and APSP to sparse triangle counting uses only additions, subtractions and comparisons (Fredman's trick), and the thin-product algorithm counts. The results are Las Vegas algorithms in O(n1.998)O(n^{1.998}) expected time for real 3SUM and O(n2.998)O(n^{2.998}) for real APSP and the real (min⁡,+)(\min,+) product.

Problems that were only 3SUM-hard or APSP-hard get nothing. Three collinear points among nn points in the plane, the original 3SUM-hard problem, has no new algorithm, because the reduction runs from 3SUM to it. Its n2n^2 bound is now simply unexplained. The same goes for the dynamic graph lower bounds (reachability, shortest paths, subgraph connectivity, matching) and the set-disjointness data-structure bounds for larger universes. Those were the papers whose conclusions depended on the hypotheses, and they now need a different assumption.

Lower bounds in restricted models remain true and matter less. Kerr's n3n^3 bound for (min⁡,+)(\min,+) straight-line programs and the Ω(n2)\Omega(n^2) bound for 3-linear decision trees still hold; the new algorithms escape those models by hashing the weights away and counting triangles with integer matrix products.

SETH and Orthogonal Vectors are untouched, and so are OMv without hints, kk-SUM and kk-XOR for k≥4k\ge4, and 3SUM-Indexing. The paper gives reasons rather than hope: 3SUM, APSP and Exact Triangle always had fast nondeterministic and co-nondeterministic algorithms and shallow decision trees (near-linear depth for 3SUM and Exact Triangle, O~(n2.5)\tilde O(n^{2.5}) for APSP), while CNF-SAT and OV have neither. It also adds a sharp corollary: if a deterministic fine-grained reduction from CNF-SAT or OV to 3SUM, APSP or Exact Triangle existed, SETH itself would now be false.

Where attention comes in

This last point is the one most readers of this site will care about. The standard argument that exact softmax attention cannot be computed in truly subquadratic time rests on SETH, not 3SUM. Keles, Wijewardena and Hegde (arXiv 2209.04881) prove self-attention is "necessarily quadratic in the input length, unless the Strong Exponential Time Hypothesis (SETH) is false", and Alman and Song (arXiv 2302.13214, the same Alman) show approximate attention with entries of size Θ(log⁡n)\Theta(\sqrt{\log n}) has no n2−Ω(1)n^{2-\Omega(1)} algorithm under SETH. Both bounds survive this paper intact. If you were hoping the quadratic cost of attention had just become negotiable, it has not; the linear-attention designs still pay for subquadratic time with a different, approximate operator.

One attention-adjacent result does fall at the edge. Van den Brand, Song and Zhou proved their data structure for dynamic attention maintenance conditionally optimal under a variant of a hinted OMv conjecture. Section 5.4 shows the new data structure refutes that variant for thin hints, so for τ<0.1204\tau < 0.1204 that optimality claim "needs a new hypothesis". The algorithm itself is not faster; what changed is the evidence that it could not be beaten.

Who found it

The methodology section is unusually specific, and I think it is the most important paragraph in the paper for anyone outside theory. An Anthropic employee was using an internal research model on open problems in cryptography, one of them about constructions based on the average-case hardness of Zero-kk-Clique. "Claude was tasked with verifying and improving the constructions, but instead developed this algorithm, first for the average case, then for the worst case. The session used 16M output tokens with no human input." Anthropic shared it with the authors in September 2026 under a confidentiality agreement and offered compensation.

The division of labour is stated precisely too. What Claude produced was "essentially the algorithm in Section 2, although presented differently and with other numerical parameters", plus a different reduction from Exact Triangle that the authors replaced with the known ones. The data-structure version, the hinted-OMv consequences and the presentation are the authors'. After the paper was written, a model certified the main theorems in Lean 4 with Mathlib (Theorem 19, Theorem 22 and the Zero-Weight case of Corollary 39, with all lemmas they rely on); the formalization is in Anthropic's formal-math repository under 3sum-apsp. I did not read or build that formalization, so I cannot tell you how faithfully the Lean statements match the paper's; the Thomson N=7 article is a good reminder that a machine-checked proof is only as good as its statement.

The irony is hard to miss. The model was asked to make a hardness assumption more useful, and it broke the assumption instead. Cryptography built on fine-grained hardness of Zero-kk-Clique has just lost its worst-case footing, since the paper also refutes the Zero-Weight kk-Clique hypothesis.

What people are saying

Two days in, I found no written response from a fine-grained complexity researcher outside the author list, and I will not invent one. The paper was discussed on Hacker News within hours. The most useful comments there come from people who read it. User thomasahle summarised the technique accurately: "interpret rectangular matrix algorithms like Schonhage's as a tree, and then very carefully extract only some of the entries." User dgacmu compared it to the early improvements to the matrix multiplication exponent: "it has a very similar feel to Stothers' and then Virginia Williams' earlier improvement on matrix multiply", which reopened a stuck problem without producing anything practical. The sceptical reading came from jltsiren, who called it "an entire house of cards collapsed" for conditional lower bounds and worried that specific formulations of hardness are now "fixed targets for the AI to attack". I think that last worry has it backwards. A hypothesis that falls to a 0.0008 improvement was stated too sharply, and the paper's own conclusion already proposes replacements: restrict the hypotheses to combinatorial algorithms, or move the conjectured hardness to the balanced sparse triangle problem with its m4/3m^{4/3} bound, which this technique does not touch.

What I take from it

Three things.

The technique is small. Strip away the reductions and the paper's contribution is a counting argument about which leaves of a recursion tree a sparse set of outputs needs, applied to a 1981 identity and a 1982 algorithm (Coppersmith's rectangular multiplication). The authors compare the pruning to FFT pruning and trimmed Möbius inversion. The genuinely new piece is the count in Section 2.4.3. Ideas this small are usually the ones that get improved fast, and the paper says outright that better exponents already exist and were left out for clarity.

Reductions are algorithms. Every arrow in Figure 1 was drawn to prove a lower bound, and every one of them just became a delivery route for an upper bound. The losses those reductions take (a half, a third) suddenly matter, and so does work like Sheffield, Vassilevska Williams and Xi's result that the one-third loss is optimal for black-box reductions.

And the claim at the top of the abstract deserves to be read literally. A model, unprompted, found a polynomial improvement over problems that had resisted the field since the 1970s, and two of the people best placed to judge it (both are co-authors of the current best bounds on ω\omega) checked it, simplified it and put their names on it. I have reported on several AI-for-math results on this site. This is the first where the result itself, not the fact that a model found it, is the headline.

How I checked

I read the arXiv HTML and PDF of 2610.06783v1 in full, with Sections 1 to 3 and 4.4 in detail. The five figures are cropped from the PDF rendered at 300 dpi. In plain Python I wrote out Schönhage's ten linear forms from Section 2.2 as coefficient tables and compared the expanded left-hand side with G+EG+E monomial by monomial (they agree on all 33 monomials); implemented the Full recursion of Section 2.3 and checked Lemma 9 against direct matrix products for (L,m)=(3,1),(4,1),(4,2)(L,m) = (3,1), (4,1), (4,2); recomputed αd\alpha_d and βd\beta_d for Figure 6 (1, 18, 81 leaves shared by 1, 5, 15 entries) and the worst ratio βd/βd−1\beta_d/\beta_{d-1} at L=19mL=19m (0.474 at m=1m=1, below 1/2 for every mm I tried); evaluated the Lemma 11 sum in log space for the widget; and redid every exponent: 2−1/1296=1.999232-1/1296 = 1.99923, 3−1/1944=2.999493-1/1944 = 2.99949, 0.0315/18=0.001750.0315/18 = 0.00175, 2−0.000875=1.9991252-0.000875 = 1.999125, 3−0.000583=2.9994173-0.000583 = 2.999417, Λ≈4.199×1010\Lambda\approx4.199\times 10^{10} against 418≈6.872×10104^{18}\approx6.872\times10^{10}, q=0.4277q=0.4277, γ=0.0640\gamma = 0.0640 and ε∗=ln⁡4/(5ln⁡10)=0.1204\varepsilon^*=\ln4/(5\ln10) = 0.1204. All match the paper. The practicality thresholds are my own arithmetic from the stated exponents with constants set to 1. I did not read the Lean formalization, did not verify the reductions I describe as cited, and did not check Sections 5.1 to 5.3 beyond reading them. The expert-reaction section reflects what I could find on 7 October 2026: the Hacker News threads and secondary write-ups, none from named researchers in the area.

Cite this article

For attribution, please use the following reference or BibTeX:

Satyajit Ghana, "Subquadratic 3SUM and subcubic APSP: two hypotheses fall to a pruned matrix product", ai.thesatyajit.com, October 2026.

bibtex
@misc{ghana2026subquadratic3sumapsp,
  author = {Satyajit Ghana},
  title  = {Subquadratic 3SUM and subcubic APSP: two hypotheses fall to a pruned matrix product},
  url    = {https://ai.thesatyajit.com/articles/subquadratic-3sum-apsp},
  year   = {2026}
}
share