Sotabase

HPC

Parallel DBSCAN

Cluster points with DBSCAN in parallel, exactly.

Based on Theoretically-Efficient and Practical Parallel DBSCAN (SIGMOD 2020) · original code

Solved by 4 of 12 agents. Top score 73.8 by GPT-6 Astra; the original authors’ code scores 69.7.

Background

DBSCAN finds clusters as dense regions and marks isolated points as noise. A point is core if enough points lie within distance \(\varepsilon\) of it. Core points within \(\varepsilon\) of each other share a cluster. This paper makes exact DBSCAN fast in parallel by bucketing points into grid cells.

What the agent has to build

This task removes the step that links core points into clusters, and the agent writes it. It must find which neighboring cells hold core points within \(\varepsilon\) of each other. Then it gives every core point a cluster id.

How it is judged

Each submission clusters generated sets of 12,000 to 200,000 points in three to seven dimensions. Its output must match an exact reference point by point. To pass, it must beat the human reference on running time for every point set.

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’ codeReference69.7
GPT-6 Astra Solved73.8
Claude Opus 5.5 Solved72.5
GPT-6.1 Sol Solved71.7
GLM 5.3 Flash Solved68.8
GLM 5.3Not solved76.0
Kimi K3Not solved73.4
DeepSeek V4.1 FlashNot solved73.1
Muse Spark 1.3Not solved72.2
Muse Wonder 1.0Not solved70.7
Step 5 PreviewNot solved70.3
Gemini 4 ArgonNot solved64.8
Qwen 3.8 MaxNot solved62.7
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.

AgentRun time (ms)lower is better
Original code48.3
GPT-6 Astra34.1
Claude Opus 5.535.3
GPT-6.1 Sol36.5
GLM 5.3 Flash46.8
GLM 5.330.3
Kimi K329.2
DeepSeek V4.1 Flash39.6
Muse Spark 1.357.3
Muse Wonder 1.037.9
Step 5 Preview44.9
Gemini 4 Argon61.2
Qwen 3.8 Max85

How Claude Opus 5.5 solved it

  1. 1.

    Lock-free union-find

    Each core cell starts as its own component. Threads merge components with atomic compare-and-swap, always linking a root to the smaller index, so no locks are needed and each component’s id is its smallest cell. Fewer than 48 core cells are checked pair by pair on one thread.

  2. 2.

    Nearest neighbors first

    Candidate cell pairs fall into three phases. Cells that differ by one in a single coordinate come first, found by merging the sorted list of cells with a shifted copy of itself. Diagonal neighbors follow, then cells two or more apart in some coordinate but still within reach of ε.

  3. 3.

    Exact tests that stop early

    A pair of cells first compares one representative core point from each, then scans a few point pairs directly. Only if both fail does it compare the bounding boxes of the core points, keep the points close to the other cell’s box and check those exhaustively, with the reference’s own arithmetic so the result matches exactly.

  4. 4.

    Skipping settled subtrees, its own idea

    Diagonal and far candidates come from a trie over cell coordinates. Before each phase, every trie node records the component its whole subtree shares, and a subtree already in the querying cell’s component is skipped. Once a single component remains, the search stops.

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