AlphaDev

A reinforcement learning agent searches x86 assembly instructions inside Monte Carlo Tree Search to discover faster verified sorting routines.

Read the paper

The loop

  1. Proposes

    x86 assembly instructions appended one step at a time by a representation and policy-value network

  2. Judged by

    Correctness checked over exhaustive test permutations, plus latency measured on real CPUs or estimated by a learned latency model

  3. Steers

    Monte Carlo Tree Search expands high-value assembly prefixes and updates network weights from verified fast routines

Headline result

In Nature (2023), AlphaDev discovered new x86 assembly sorting routines for small fixed and variable sequence lengths, cutting one instruction from sort3 (17 vs 18 instructions) and speeding up sort3 through sort5 by up to 70% and 250,000-element sorting by about 1.7%. The routines were merged into the LLVM libc++ standard sorting library.

What this does not prove

AlphaDev optimizes short branchless assembly blocks (such as 3-to-5-element base cases called inside larger sorts) rather than inventing a new asymptotic sorting complexity class. Search cost grows rapidly with program length.

How it generalizes the harness

Monte Carlo Tree Search and correctness and latency evaluation drive the search offline, and the resulting assembly routines ship inside LLVM libc++ with no neural network at runtime.

Classification

Classification of AlphaDev
What it proposesProgram
Generative modelAlphaZero-style transformer and MLP policy-value network trained via reinforcement learning (not an LLM)
Algorithmic authorityexhaustive permutation verifier for correctness, and latency measured on real CPUs or estimated by a learned latency model, inside Monte Carlo Tree Search
FeedbackReward signal
What gets updatedSearch tree and model weights
When it runsOffline, at design time
ValidityFormal (machine-checked)
EvidenceReported in deployment
LineageOriginal system