Developer Tools

New LLM method localizes bugs with single token per file

A novel approach finds bugs at line level using just one generated token.

Deep Dive

Researchers have developed a new method to make bug localization in code dramatically faster and more precise. The approach, called MLC (Multi-task LLM for Bug Classification), uses a lightweight LLM with auxiliary decoding heads to identify bugs at the line level using just a single generated token per file. This is a major leap over existing agentic methods that require thousands of tokens and minutes of reasoning per file.

The method introduces three key innovations: a token alignment algorithm to handle tokenization mismatches, a multi-task training recipe optimized for multi-line predictions, and a model architecture that classifies tokens as buggy or clean directly during decoding. On Defects4J and PypiBugs benchmarks, MLC achieves accuracy comparable to heavyweight agentic systems but with orders of magnitude lower latency. The method also generalizes to out-of-domain Python datasets. The author plans to open source the code, models, and datasets upon paper acceptance.

Key Points
  • MLC requires only one generated token per file for line-level bug localization
  • Matches agentic approaches in accuracy but reduces inference latency by orders of magnitude
  • Introduces a token alignment algorithm to overcome previous tokenization challenges

Why It Matters

Faster bug detection means developers can catch errors during development without expensive agentic loops.

📬 Get the top 10 AI stories daily