Overview

Alman and Vassilevska Williams give polynomial savings for two central algorithmic problems: deciding whether three integers sum to zero, and finding all shortest-path distances in a directed graph with integer edge weights. Their paper obtains these improvements from a matrix algorithm that computes a prescribed sparse set of entries without constructing the whole product. The proof combines Schönhage’s ten-product identity, a restriction that removes its error terms exactly, and a count of the recursion leaves shared by many outputs. (Alman & Vassilevska Williams, 2026)

🏷️ Computational problems and polynomial savings

The 3SUM problem asks whether a list of numbers contains three entries at distinct positions whose sum is zero. A standard equivalent formulation gives three lists and asks for , with one entry from each list. Sorting followed by a two-pointer search gives a quadratic algorithm.

The all-pairs shortest paths problem, APSP, takes a directed graph with edge weights and returns the minimum path weight between every ordered pair of vertices. We assume there are no negative cycles; an unreachable pair has distance . The familiar Floyd–Warshall algorithm uses operations.

The related min-plus product of two matrices is

Here addition combines two path segments and minimization selects the best intermediate vertex. This differs from the ordinary arithmetic product

which will be the algebraic engine of the new algorithms.

A running time is truly subquadratic if it is for a fixed , and truly subcubic if it is . A logarithmic improvement such as does not have this property. The notation suppresses polylogarithmic factors; permits any subpolynomial factor.

The integer results use a word RAM with -bit words. Input numbers have absolute value at most for a fixed constant . Controlling intermediate bit lengths is part of the proof.

Integer consequences

For polynomially bounded integer inputs, the paper gives deterministic algorithms with the following running times:

ProblemRunning time
3SUM
Min-plus product
Directed APSP, without negative cycles

The abstract states the slightly weaker APSP bound . The sharper number above is the explicit bound in the theorem on 3SUM and APSP in Section 3.4. (Alman & Vassilevska Williams, 2026)

The 3SUM and APSP hypotheses asserted that no fixed polynomial saving was possible in these integer models. The exponents above refute those hypotheses. Their significance is asymptotic: the theorem does not provide a practical crossover size or an implementation benchmark.

🏷️ Thin products and lopsided triangle queries

Let

where is a small power of . Such a product is thin because its inner dimension is much smaller than its outer dimensions. Let be a specified set of positions. We want only for . Neither input matrix nor the full product is assumed sparse.

The graph interpretation makes the query set natural. Consider an unweighted, undirected tripartite graph with parts , of sizes . Let and be the adjacency matrices between and . For and ,

If is the set of edges between and , this number counts the triangles containing each edge of . Testing whether the count is positive solves Lopsided All-Edges Sparse Triangle. Equivalently, the neighborhoods are two families of sets over a universe of size , and specifies offline set-intersection queries.

A query edge between the two large parts asks for common neighbors in the small middle part. The algorithm computes exactly these selected entries of the arithmetic product.

Sparse entries of a thin product

Suppose , the entries of have absolute value , and

The wanted entries can be computed deterministically in

operations on -bit integers. The positions in may be arbitrary. (Alman & Vassilevska Williams, 2026 s 2 and 4)

At the largest allowed query-set size, computing each entry separately costs . Computing all entries incurs an output cost. The new algorithm beats both because its output has only entries. There is no conflict with an output-size lower bound.

Two qualifications are useful. A polynomial saving in follows when for a fixed ; constant gives only a constant factor. Also, this is sparsity of the requested output positions. An arbitrary dense product is permitted.

We first develop the simpler bound

for a power of four. This already gives truly subquadratic 3SUM and truly subcubic APSP. The data structure refinement will explain the exponent .

🏷️ Schönhage’s identity and its error structure

Fast matrix multiplication begins with a small bilinear identity and applies it recursively. The additions preparing the scalar multiplications are called encoding; the additions assembling the outputs are decoding. For a sparse-output algorithm, both must be counted.

The starting identity is due to Schönhage, and its recursive use follows the rectangular multiplication approach of Coppersmith. (Schönhage, 1981; Coppersmith, 1982)

Consider two independent tasks:

  • the nine entries of a by outer product;
  • the inner product of two four-entry vectors.

Separate evaluation takes thirteen multiplications. Introduce output labels and , and encode the desired answers as the coefficients of

Extend the and arrays to

Every column of and every row of sums to zero. Form ten products, indexed by labels and :

The identity is

where

The coefficient of is exactly the desired inner product. Indeed, cancels all terms, and the zero row and column sums cancel the cross terms. The remaining sum equals .

The outer coefficients still contain errors. Recovering the nine outer-product entries and the inner-product sum exactly therefore requires eliminating . Two features of the identity make this possible:

  • Every error monomial has an outer output label and at least one inner input variable or .
  • Each outer output uses only the term , whereas the inner output uses all ten terms.

The first feature will remove the errors after restriction. The second will control which recursion leaves a wanted output needs.

🏷️ An exact layer of independent matrix products

Apply the ten-term identity through recursive levels. A left input is indexed by a length- string over the seven symbols . Right inputs use the corresponding symbols, and outputs use the ten symbols.

The inner set of a string is the set of levels using an inner symbol: on the left, on the right, or at the output. Fix an integer and retain only input strings whose inner sets have exactly elements. Set every other input to zero.

For each -element set , the retained inputs describe an independent matrix product of shape

The outer levels specify row and column indices in base three; the inner levels specify the summation index using four choices per level. There are

such products.

Exactness of the fixed layer

After zeroing all input strings outside the layer with exactly inner levels, every output string with inner set , , equals the corresponding entry of .

To prove this, consider a monomial contributing to such an output. At every level in , its output symbol is . The one-level identity forces both input symbols there to be a matching pair . Thus both input strings already have inner symbols.

Since only inputs with exactly inner symbols remain, all other levels must use outer inputs. Every error monomial requires an inner input at an outer output level, so none can survive. At an outer level with output , the only remaining monomial is . Summing over the four choices at each of the inner levels gives exactly the desired matrix entry.

This argument also prevents interference between different sets . Exactness comes from the restriction and the structure of the error monomials; no limiting parameter or floating-point approximation is used.

The recursion therefore provides independent products at once. Each output entry is the sum of products at certain leaves of the ten-ary recursion tree. A leaf is a string

If an output string has at level , its contributing leaves must choose . If it has , any of the ten choices is allowed. Consequently, one output depends on leaves.

That number exceeds the multiplications in a direct inner product. The gain will come from sharing leaves across outputs.

🏷️ Private leaves and the union bound

Fix an output with inner set . Its private leaf chooses at every level of and the required elsewhere. No other output in the fixed layer uses this leaf.

For any contributing leaf, define its order

Its order counts the inner levels where the leaf uses a shared term instead of . An output uses

leaves of order : choose the levels and one of nine shared terms at each.

Across the whole recursion, the number of leaves of order is

Write

for the total number of output entries in the products. Then . A leaf of order is used by

outputs: their inner sets must contain its zero positions, and one chooses the other inner positions among the remaining levels. This gives the exact incidence identity

Now let be an arbitrary set of wanted outputs within this batch, and let be the union of their contributing leaves.

Leaf-count bound

For , this implies

At a fixed order, we may charge every output for all its leaves, giving , or count all leaves of that order in the entire batch, giving . Either count is valid for every set , regardless of how its entries are arranged.

The choice makes the second count decay geometrically:

Thus . For , summing this geometric bound costs less than . For , use the per-output estimate and the binomial theorem:

The first inequality uses and in the indicated range. The last follows from the exact inequality . Combining the two ranges proves the claim.

The two leaf-count bounds for , , and , divided by and plotted logarithmically. The lower envelope bounds the required leaves at each order. The proof’s convenient split at need not coincide with the crossing.

Since and , the estimate becomes

For a batch with about wanted entries, only leaves are needed. The estimate is linear in , so the same saving survives even if queries are distributed very unevenly among batches.

🏷️ Encoding, pruning, and the full operation count

To apply the construction to , partition into row blocks of rows and into column blocks of columns. Put

A tile consists of row blocks and column blocks. Assign its block products to distinct -element sets . Every entry of then belongs to one product in one tile.

At a leaf , the multiplied numbers have the form and , linear functions of the left input array and the right input array separately. All tiles using the same row band have the same left encoding, and similarly for column bands. Computing these arrays once per band costs

instead of paying for a complete encoding in every tile.

For , the assumption ensures that a tile fits after constant-factor padding and that this encoding cost is . One sufficient inequality is

It follows by comparing exponential bases:

After encoding, the decoder receives only the wanted output strings. At each recursive vertex, let be the wanted suffixes beginning with symbol . The requests sent to its children are

An empty request set requires no recursive call. The unions are essential: a child used by several outputs is evaluated once.

There is a second counting argument for the decoder’s additions and bookkeeping. At a fixed depth, map each requested suffix to its private completion: retain the existing leaf prefix, then replace by and by in the suffix. The completion is a leaf in and determines both the vertex and suffix. Hence the total size of request sets at each depth is at most .

There are depths, and sorted-list operations on length- strings take time per handled string. The full pruned computation therefore costs

per tile. Summing the leaf bound over tiles, using and , gives

The remaining input and indexing costs fit within this bound. Encoded values are signed sums of at most input entries; decoded values are sums of at most products of two encoded values. These counts are polynomial in , so polynomially bounded inputs produce only -bit intermediate integers.

🏷️ Online queries and the improved exponent

The preceding decoder knows in advance. The stronger result preprocesses before any query positions are supplied.

For an output with inner set , its contributing leaves form a discrete cube: the choices at levels in are free, while all other levels are fixed. Choose an integer switching order . Evaluate leaves of order below individually at query time, and group the higher-order leaves into precomputed partial sums called boxes.

A box is a string over the ten term labels and a wildcard . A wildcard permits all ten labels, including . Require that at most symbols are either or wildcards, and that every wildcard occurs at a lower-numbered level than every .

To assign a contributing leaf of order at least to a box, scan its inner levels from highest to lowest until the -th nonzero label is reached. Keep everything scanned, and replace all remaining lower inner levels by wildcards. This assigns each such leaf to exactly one box for the given output. The number of boxes needed by one output is

For example, with four inner levels and , the string

belongs to the box

Its first two positions range over all possibilities. Boxes are identified by their strings, so the same stored sum can serve several outputs.

Across a tile, there are at most

boxes. To see the count, replace all wildcards of a box by . This gives a leaf of order at least . The original box is recovered by turning some initial segment of that leaf’s positions into wildcards, with at most choices.

The box values are computed by dynamic programming. Replace the highest wildcard by each of the ten term labels and sum the resulting values. Each child is again a valid box with one fewer wildcard. This preserves the ordering condition and gives constant branching.

For general , put

When , we have and . Assume also , so that a tile fits after constant-factor padding. The preprocessing and query bounds are

Choose and . Then , and the two relevant exponents are

The encoding term also fits when . Absorbing logarithmic factors into the strict margins and gives

Consequently, queries take

matching the preprocessing cost. Padding an arbitrary to the next power of four changes the asymptotic constants; the proof handles bounded separately.

General range

Let

For every fixed and , some allows all wanted entries to be computed in time whenever . The exponent depends on the chosen parameters. (Alman & Vassilevska Williams, 2026, sec.4)

The endpoint reflects the encoding cost. As approaches from above, approaches up to polynomial factors. Shared encoding then has scale , which can stay below only when exceeds approximately . Since , this gives the threshold . The strict inequality in the theorem leaves room for a positive saving.

🏷️ Exact Triangle and deterministic modular filtering

Exact Triangle takes a complete tripartite graph with vertices per part and integer edge weights. It asks whether some triple satisfies

Weights have absolute value at most , for fixed . The paper adapts earlier triangle reductions, particularly the deterministic construction of Chan and Xu, to produce lopsided instances. (Chan & Xu, 2024)

Let and . Choose a prime between and . Every zero-weight triangle survives reduction modulo ; some nonzero-weight triangles may also survive.

Write for this false-positive count and for the number of exact zero triangles. The quantity is computable by matrix multiplication over

For example, the coefficient of in the product of matrices with entries and counts intermediate vertices whose two weights sum to modulo . Summing the coefficients indexed by counts modular zero triangles.

Compute this count for every prime in the indicated interval and select the smallest. Since is independent of the prime, this also minimizes . Each nonzero integer has only

prime divisors in this interval. Averaging over its primes gives

Next, split the third vertex part into pieces of size . Group outer pairs by the residue , and split each group into chunks of at most pairs.

For each piece and chunk, use the middle vertices , with edges defined by

A queried pair has a common middle neighbor exactly when some in the piece completes a modular zero triangle. The middle part has at most vertices, and the construction produces lopsided instances.

For each accepted pair, scan its piece for an exact zero triangle. We stop as soon as an exact zero triangle is found, so there is at most one successful scan. A failed scan contains a false positive, and different failed scans can be charged to different false-positive triples. The total scanning cost is therefore

Reduction cost

Exact Triangle reduces deterministically to at most lopsided instances, each with at most queries, plus

additional time. The three terms pay for witness scans, selecting the prime, and constructing the instances. Here is the arithmetic matrix-multiplication exponent. (Alman & Vassilevska Williams, 2026, sec.3.2)

The prime is chosen deterministically, and every candidate is checked against the original weights. Modular collisions affect the running time, not the correctness of the answer.

🏷️ Propagating the exponent savings

Suppose a lopsided instance costs . The oracle calls cost , while witness scans cost . Taking

balances them, leaving a saving .

For and , this becomes

The prime-selection term is smaller: even Strassen’s exponent gives . Constructing the instances is also lower order. Thus Exact Triangle takes

Using the simpler algorithm instead gives .

The 3SUM reduction

Known deterministic reductions convert a 3SUM input of size into Exact Triangle instances, each with vertices per part, with additional work. They combine the 3SUM-to-Convolution-3SUM reduction with the weighted-triangle construction. (Chan & He, 2020; Vassilevska Williams & Williams, 2013)

Substituting a triangle exponent gives

For , the exponent is , hence the stated bound. The small slack absorbs the subpolynomial factors.

The min-plus and APSP reductions

If Exact Triangle on vertices per part takes time , the known reductions give min-plus multiplication in

where matrix entries have magnitude at most , and APSP with polynomially bounded integer weights in

The applicable reduction assumes is nondecreasing, as it is for the bound used here. (Vassilevska Williams & Williams, 2018; Vassilevska Williams & Williams, 2013)

With , both bounds become

Since , this is . The exponent accounting is now explicit: balancing the modular reduction retains half the thin-product saving, the restriction rescales it, and the final reductions retain another half for 3SUM or another third for APSP.

🏷️ Further consequences and the direction of reductions

For real inputs, the paper uses different reductions based on comparison counts and Fredman’s identity

The resulting algorithms are Las Vegas: they always return the correct answer, with randomized running time. They solve real 3SUM in expected time, and real Exact Triangle, min-plus product, and APSP without negative cycles in expected time. Their only operations on real numbers are comparisons, additions, and subtractions. These bounds arise through the real-input reduction framework, rather than by applying integer modular hashing directly to reals. (Chan, Vassilevska Williams & Xu, 2022; Alman & Vassilevska Williams, 2026, sec.5.2)

There are also deterministic improvements for weighted clique problems. For a fixed , partition the chosen vertices into three groups of size , enumerating the remaining one or two vertices if necessary. Group choices become vertices of a triangle instance. Assign its edge weights so that every original edge is counted exactly once. The resulting bound for Zero-Weight -Clique is

The paper obtains the same bound for minimum- and maximum-weight -cliques with polynomially bounded integer weights.

The online data structure also refutes rectangular hinted matrix-vector conjectures in sufficiently thin parameter regimes. Here the candidate vectors are supplied as a matrix before a later query identifies the desired vector or entry. That timing allows preprocessing of both factors. It does not give the same result for ordinary online matrix-vector multiplication, where each new vector is unavailable beforehand.

Finally, reduction direction matters. If reduces to , an algorithm for yields an algorithm for . An algorithm for need not yield one for . Consequently, equivalences and reductions to 3SUM, APSP, or the new matrix problem transmit speedups. A one-way proof that a geometric or dynamic problem is 3SUM-hard can lose its conditional lower-bound premise without producing a faster algorithm for that problem.

The paper’s construction also does not handle the balanced sparse-triangle problem at the same improved scale, and does not itself give algorithms refuting the Orthogonal Vectors or SETH hypotheses. The specific thin matrix shape and sparse query set are essential to the argument.

🏷️ Exact finite checks and formalization

The accompanying verification and figure script checks the ten-term identity coefficient by coefficient over the integers, compares small fixed-layer recursive products with direct multiplication, and exhaustively checks the box partition on small cubes. For , the high-order part has

leaves, partitioned into boxes. These checks verify finite algebra and combinatorics; the asymptotic running-time theorem depends on the general estimates above.

The paper credits an internal Claude model with discovering the initial algorithm, followed by the authors’ work on its analysis, simplification, extensions, and presentation. Its methodology section reports Lean formalizations of the integer Exact Triangle theorem, the integer 3SUM and APSP theorem, and the zero-weight case of the clique corollary, together with their dependencies. It links the 3SUM–APSP formalization. That reported coverage should be distinguished from the additional real-input and online-query results; no independent Lean build is claimed here. (Alman & Vassilevska Williams, 2026)

  • Matrix multiplication exponents develops square and rectangular arithmetic exponents. The present algorithm adds a separate resource: the pattern of dependencies between intermediate products and requested outputs.
  • on subexponential SAT and its consequences discusses a different algorithmic result concerning satisfiability. The comparison clarifies why improvements for 3SUM and APSP do not, through the reductions in this paper, establish corresponding SAT improvements.

📚 References

🐻  Alman, J. & Vassilevska Williams, V. 2026. Truly Subquadratic 3SUM and Truly Subcubic APSP via Triangles in Sparse Lopsided Graphs.
🐻  Chan, T.M. & He, Q. 2020. Reducing 3SUM to Convolution-3SUM. In 2020 Symposium on Simplicity in Algorithms (SOSA), pp. 1–7.
🐻  Chan, T.M. & Xu, Y. 2024. Simpler Reductions from Exact Triangle. In 2024 Symposium on Simplicity in Algorithms (SOSA), pp. 28–38.
🐻  Chan, T.M., Vassilevska Williams, V. & Xu, Y. 2022. Hardness for Triangle Problems under Even More Believable Hypotheses: Reductions from Real APSP, Real 3SUM, and OV. In Proceedings of the 54th Annual ACM SIGACT Symposium on Theory of Computing, pp. 1501–1514. , Association for Computing Machinery.
🐻  Coppersmith, D. 1982. Rapid Multiplication of Rectangular Matrices. SIAM Journal on Computing 11(3), 467–471.
🐻  Schönhage, A. 1981. Partial and Total Matrix Multiplication. SIAM Journal on Computing 10(3), 434–455.
🐻  Vassilevska Williams, V. & Williams, R. 2013. Finding, Minimizing, and Counting Weighted Subgraphs. SIAM Journal on Computing 42(3), 831–854.
🐻  Vassilevska Williams, V. & Williams, R.R. 2018. Subcubic Equivalences Between Path, Matrix, and Triangle Problems. Journal of the ACM 65(5), 27:1-27:38.