According to Observatory Beating monitoring, the parent company of the AI programming tool Windsurf, Cognition AI, has partnered with the AI training company Applied Compute to train a model specifically for code bug detection called SWE-Check. This model analyzes the user's current code changes (diff), automatically highlights potential bugs, and provides suggestions for fixes.
In an evaluation aligned with the training data distribution, SWE-Check has matched the F1 score of Claude Opus 4.6 (reducing the gap from 0.09 to 0); in a cross-distribution evaluation, the gap has narrowed from 0.49 to 0.29, still lagging behind state-of-the-art models but showing significant progress. The key advantages lie in speed and cost: SWE-Check runs an order of magnitude faster than state-of-the-art models, with significantly reduced inference costs, enabling real-time, free bug detection within an IDE, which is something that cannot be achieved by directly calling large models like Opus 4.6.
There are two notable design aspects in the training method:
1. Reward Linearization: The team aimed to optimize the global F-beta metric, which cannot be directly decomposed on a per-sample basis. They used a first-order approximation to transform the global metric into a reward function that can be computed sample-wise, facilitating effective improvement of the global metric. In earlier versions, the false positive rate was high, prompting the team to adjust beta from 1 to 0.5 to emphasize precision.
2. Two-Stage Post-Training: The first stage focused solely on maximizing bug detection capability without penalizing latency; in the second stage, a latency penalty was introduced based on the statistical distribution of how long real users wait after triggering a detection before moving on. This staged approach outperformed simultaneously optimizing two objectives, as the latter easily falls into local optima, such as learning to be very fast but with shallow analysis.
A preview version of SWE-Check has been launched in Windsurf Next (keyboard shortcut cmd+U) and will subsequently be integrated into the Windsurf official release.
