# Columbia and MIT Paper: Claude-Discovered Algorithm Breaks Long-Standing Speed Limits for 3SUM and APSP

> The algorithm was autonomously discovered by Claude in a single session and formally verified in Lean 4, overturning the 3SUM and APSP conjectures

- **Canonical URL**: https://aipress.im/en/article/claude-algorithm-3sum-apsp-breakthrough-5150c7e416c0
- **Markdown URL**: https://aipress.im/en/article/claude-algorithm-3sum-apsp-breakthrough-5150c7e416c0.md
- **Language**: English (en)
- **Published**: 2026-11-21T18:47:26.000Z
- **Updated**: 2026-11-23T16:19:02.372Z
- **Category**: Research Papers
- **Editorial Score**: 77/100
- **Primary Source**: X：Rohan Paul (@rohanpaul_ai) (https://x.com/rohanpaul_ai/status/2124213113583174076)
- **Topics**: AI for Science & Math, Benchmarks & Evals, Reasoning & RL
- **Entities**: Anthropic / Claude

## Executive Summary

A Columbia and MIT paper shows that an algorithm autonomously discovered by Claude reduces 3SUM complexity to O(n^1.9992) and all-pairs shortest paths to O(n^2.9995), overturning two long-standing conjectures. The proof was formally verified in Lean 4.

## Key Takeaways (TL;DR)

- In a single session with no human input, Claude used 16 million output tokens to find a faster algorithm for multiplying long, thin matrices.
- Via known reductions, the algorithm brings 3SUM to O(n^1.9992) and APSP to O(n^2.9995)—small gains, but enough to overturn two conjectures.
- The paper formally verifies the AI-discovered proof in Lean 4, offering a checkable path for AI-driven algorithm search.

## Starting from Long, Thin Matrix Multiplication: The Core of Claude's Algorithm

A new paper from Columbia and MIT reveals that Claude discovered a faster method for computing selected elements of the product of two long, thin matrices, skipping some of the operations that classical methods must perform. The improvement itself is modest, but through an existing chain of reductions in computational complexity theory, it translates into speedups for 3SUM, all-pairs shortest paths (APSP), and a family of related problems. The paper credits the discovery to Claude's autonomous search in a single session, with no human input.

The 3SUM problem asks whether a list of numbers contains three elements that sum to zero, while APSP requires the distance between every pair of nodes in a graph. For decades, the textbook quadratic and cubic time bounds had been improved only marginally, and many researchers assumed such limits were hard to surpass. The path Claude found does not change the basic structure of the problems; instead, it cuts work in the intermediate step of matrix multiplication and then propagates the gains to downstream problems via reductions.

- The new complexity is O(n^1.9992) for 3SUM and O(n^2.9995) for APSP, both only slightly below the previous integer-exponent thresholds.
- Claude completed the discovery in a single session, consuming 16 million output tokens with no human intervention.
- The paper uses Lean 4 to formally verify the AI-discovered proof.

> The gains are small, yet enough to overturn two long-standing conjectures for 3SUM and APSP—a verifiable hit for AI search on classical algorithm bounds.

### How the Reduction Chain Amplifies a Small Improvement

In complexity theory, a reduction is a standard technique for transforming one problem into another. The known reductions the paper relies on show that if selected elements of a long, thin matrix product can be computed faster, then problems such as 3SUM and shortest paths can be accelerated accordingly. This means Claude's discovery was not an algorithm designed directly for 3SUM, but a breakthrough at a more fundamental computational level, whose impact is then spread to multiple problem families by theoretical tools.

## Lean 4 Formal Verification: A Check on AI-Discovered Proofs

A key step in the paper is the use of Lean 4 to formally verify the AI-discovered proof. Lean 4 is an interactive theorem prover that requires proofs to be written step by step in a machine-checkable form. For AI-generated mathematical results, formal verification provides a checking path independent of natural-language arguments, so the conclusion does not rest on trust in the model's output.

This approach addresses a common concern about AI discoveries: models may produce plausible-sounding but invalid derivations. The paper does not claim that Claude's discovery surpasses all known methods; rather, it points out that the complexity improvement, though small, is enough to constitute a counterexample to existing conjectures. The role of formal verification here is to turn "what the AI said" into "what a machine can check."

- Lean 4 verifies the AI-discovered proof in the paper, not the model itself.
- Formal verification makes the conclusion independently reviewable, reducing reliance on trust in model output.

> One lesson from the paper: hand AI-found proofs to Lean 4 for checking rather than accepting results based on the model's narrative alone.

### Should "Known-Hard" Problems Be Treated as Open Targets for AI Search?

The paper's discussion suggests that algorithmic problems long regarded as hard limits might be reconsidered as open targets for AI search. This view does not argue that existing theoretical frameworks are invalid; rather, it hints that when AI can generate many candidate paths in a single session, some directions assumed closed may still harbor small but verifiable room for improvement. The cases of 3SUM and APSP fall into this category.

## Practical Implications for Algorithm Research and AI-Assisted Proofs

From a research-workflow perspective, this case demonstrates a division of labor: AI proposes candidate algorithms in a vast search space, formal tools verify them, and human researchers judge the theoretical significance of the results. The improvements for 3SUM and APSP are measured in decimal places of the exponent, so their practical engineering impact is limited; their methodological significance lies in proving that this pipeline can work.

For algorithm and theoretical computer science research in the Asia-Pacific region, the takeaway is the configuration of the verification step. If research teams adopt AI-assisted search, formal tools such as Lean 4 can serve as a threshold for screening results, preventing unchecked model output from being treated as conclusions. The paper itself does not assess the method's success rate on other problems, and more cases are needed before such judgments can be made.

- AI proposes candidates, formal tools verify, and humans judge significance—this three-stage process defines the case.
- The improvements are measured in decimal places of the exponent, so engineering impact is limited while methodological value draws more attention.

> 16 million output tokens, a single session, no human input—these numbers sketch a complete attempt at AI-driven algorithm search.

## Industry Impact & Outlook

The paper provides a verifiable sample of AI-assisted theoretical computer science: AI proposes candidate algorithms, and Lean 4 formally verifies them. For global algorithm research, it suggests that complexity bounds long considered closed may still be pried open by small improvements; for Asia-Pacific research teams, the lesson is to incorporate formal verification into AI-assisted research workflows rather than directly trusting model output. Its practical engineering impact is currently limited.

## Frequently Asked Questions

#### What exactly does the algorithm discovered by Claude improve?

It computes selected elements of the product of two long, thin matrices faster, skipping some operations required by classical methods; after known reductions, 3SUM drops to O(n^1.9992) and all-pairs shortest paths to O(n^2.9995).

#### Why does this overturn the 3SUM and APSP conjectures?

These conjectures hold that the problems cannot be solved in time below a specific exponent. The new algorithm, though only a small improvement, constitutes a counterexample, so the conjectures do not hold.

#### What role does Lean 4 play in the paper?

Lean 4 is an interactive theorem prover; the paper uses it to formalize the AI-discovered proof, making the conclusion independently machine-checkable without relying on trust in model output.
