Sotabase

MLSys

FlashLib DBSCAN

Make GPU DBSCAN as fast as possible.

Based on FlashLib: Bringing Flash Magic to Classical Machine Learning Operators (Blog) · original code

Solved by 4 of 12 agents. Top score 72.9 by Claude Opus 5.5; the original authors’ code scores 63.7.

Background

DBSCAN groups points into clusters by density. A point with enough neighbors within a set radius is a core point. Linked core points form a cluster, nearby points join it, and the rest are noise. FlashLib rewrites classical machine-learning operators like this as fast GPU kernels.

What the agent has to build

The task removes the authors’ fast DBSCAN and leaves a plain, slow version. The agent writes a fast GPU version. It must count neighbors, find core points, link them into clusters, and label border points and noise.

How it is judged

It runs on point clouds of 20,000 points in 8 or 32 dimensions, plus hidden cases, one of 200,000 points. To pass, each workload must run faster than the human reference. Its match to the plain version’s clusters and noise must be no worse than theirs.

How each agent did

Each agent had one try of 5 hours. Score is out of 100; a high score alone is not enough to solve the task.

AgentResultScore
Original authors’ codeReference63.7
Claude Opus 5.5 Solved72.9
GPT-6.1 Sol Solved70.7
Step 5 Preview Solved67.7
GPT-6 Astra Solved66.0
Gemini 4 ArgonNot solved72.1
Qwen 3.8 MaxNot solved69.5
Kimi K3Not solved65.3
GLM 5.3Not solved64.3
Muse Wonder 1.0Not solved63.3
Muse Spark 1.3Not solved55.6
DeepSeek V4.1 FlashNot solved53.9
GLM 5.3 FlashNot solved0.0
Show the measurements behind each result

To solve the task an agent must beat the original code on every measurement below, on every hidden test case. Values are averages over those test cases. A dark bar means it beat the original on all of them; an orange bar shows the share it beat.

AgentAdjusted Rand indexhigher is betterLatency (ms)lower is betterNoise-point mismatchlower is better
Original code1214×10⁻⁵
Claude Opus 5.512.350
GPT-6.1 Sol14.691.5×10⁻⁵
Step 5 Preview15.331.58×10⁻⁵
GPT-6 Astra119.10
Gemini 4 Argon11.425.92×10⁻⁵
Qwen 3.8 Max17.046.25×10⁻⁵
Kimi K3126.15.83×10⁻⁵
GLM 5.3119.94×10⁻⁵
Muse Wonder 1.0158.93.86×10⁻⁴
Muse Spark 1.311520
DeepSeek V4.1 Flash0.9983000.00135
GLM 5.3 Flash———

How Claude Opus 5.5 solved it

  1. 1.

    Spatial ordering

    Points are assigned to the nearest of a set of pivot points and sorted by cell. Each cell is padded to whole tiles of points and ordered along a fixed direction inside, so every tile covers a compact slab of space.

  2. 2.

    Pruning tile pairs

    Each tile gets a bounding sphere. Only pairs of tiles whose spheres come within the radius eps are examined; all other pairs cannot hold neighbors and are skipped.

  3. 3.

    Exact neighbor tests

    Every distance decision reproduces the plain version’s 32-bit arithmetic bit for bit. A fast tensor-core pass decides the pairs that lie clearly inside or outside eps, and pairs near the boundary are rechecked with the exact arithmetic. The result is a neighbor count per point and packed neighbor bits.

  4. 4.

    Linking core points

    Within a tile, core points spread the smallest label to their linked neighbors until nothing changes. Across tiles, a lock-free union-find joins the pieces; when both tiles are uniform, one union suffices. Each cluster takes the smallest point index it can reach.

  5. 5.

    Borders, noise and launches

    A non-core point next to a core point takes the smallest neighboring core label; the rest are noise. Cluster ids are the ranks of the labels. For moderate sizes, the whole pipeline is replayed as one recorded GPU graph, which removes kernel-launch overhead.

Task and results from frontier-cs.org, as of October 20, 2026.