Sotabase

MLSys

SVG-EAR

Rebuild sparse attention for a video diffusion model.

Based on SVG-EAR: Parameter-Free Linear Compensation for Sparse Video Generation via Error-aware Routing (ECCV 2026) · original code

Unsolved. None of the 12 agents beat the original code.

Background

Video diffusion models spend much of their time in attention. Sparse VideoGen clusters similar tokens and computes attention only for the cluster pairs that matter. SVG-EAR estimates the skipped pairs from cluster averages and picks pairs by the error skipping would cause.

What the agent has to build

The task removes this attention layer, for both models, and three routines they share, and the agent writes them. One averages each cluster. One picks which cluster pairs to compute. One computes them and estimates the rest.

How it is judged

The models are Wan 2.1 and HunyuanVideo, each making 81-frame 720p clips. Twelve graded clips, eight from Wan and four from HunyuanVideo, are each compared with the clip full attention makes. To pass, every clip must take at least 4% less time than with the human reference. Its PSNR, SSIM and LPIPS image scores must stay within small margins of the human reference’s.

Wenhao Chai discusses this task in the interview.

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’ codeReference33.9
GPT-6 AstraNot solved48.6
GPT-6.1 SolNot solved38.4
Claude Opus 5.5Not solved37.4
Kimi K3Not solved36.9
DeepSeek V4.1 FlashNot solved36.0
Gemini 4 ArgonNot solved35.0
Muse Spark 1.3Not solved34.9
GLM 5.3 FlashNot solved34.4
Muse Wonder 1.0Not solved34.2
Qwen 3.8 MaxNot solved20.9
GLM 5.3Not solved15.3
Step 5 PreviewNot solved7.4
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.

AgentEnd-to-end latency (min)lower is betterLPIPSlower is betterPSNR (dB)higher is betterSSIMhigher is better
Original code14.80.21521.70.766
GPT-6 Astra12.10.18623.80.797
GPT-6.1 Sol15.70.17225.40.808
Claude Opus 5.513.40.22321.50.757
Kimi K312.80.24121.30.749
DeepSeek V4.1 Flash13.80.22921.40.756
Gemini 4 Argon13.90.23421.20.752
Muse Spark 1.314.10.22621.40.759
GLM 5.3 Flash13.30.23920.80.742
Muse Wonder 1.014.20.23221.20.748
Qwen 3.8 Max13.90.318.70.668
GLM 5.318.10.28420.10.714
Step 5 Preview250.34817.10.63

How Claude Opus 5.5 approached it

  1. 1.

    Clusters with warm starts

    Each sparse step groups the queries and the keys with k-means. A layer’s first clustering runs 40 iterations; every later step starts from the previous step’s centroids and runs one. Its k-means stays on the GPU and also returns the sorted order, so each cluster’s tokens end up next to each other. A small kernel then averages each cluster’s values in one pass.

  2. 2.

    Picking pairs by their error

    A skipped key cluster is later replaced by its average, so each pair is scored by the error that replacement would cause. Each query cluster’s centroid stands in for its queries and runs against the real keys of every key cluster, measuring how far each cluster’s true contribution lies from its average’s. Divided by the cluster’s size, this ranks the key clusters, taken until they cover 85% of the row’s total error.

  3. 3.

    Exact pairs plus an estimate

    FlashInfer’s block-sparse kernel computes the chosen pairs exactly and returns their log-sum-exp. A second kernel adds each skipped key cluster as one key, its centroid, with its score raised by the log of the cluster’s size, so that it weighs as much as the keys it replaces. The two parts merge through their log-sum-exp, and each row goes straight back to its place in the video.

  4. 4.

    Full steps and a fallback

    The steps and layers that the task’s settings run with full attention use the same FlashInfer kernel, with one block that covers everything. If the sparse path ever raises an error, the rest of the run uses full attention. It also writes the processor for HunyuanVideo, where the text prompt is always computed exactly.

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