NeurIPS 2026QuestionsPapersAreasAboutMarkdown

nnTrace: Detecting and Localizing Silent Bugs in Distributed Training

Haitian Jiang, Shaowei Zhu, Zhen Zhang, Zhenyu Song, Xinwei Fu, Zhen Jia, Yida Wang, Jinyang Li

NeurIPS page · OpenReview · alphaXiv · Open on the map

Category: LLM Agents, Evals & Benchmarks › Software Engineering Benchmarks · Type: new method · Keywords: distributed training debugging, silent bugs detection, differential testing, tensor alignment, numerical tolerance analysis, Megatron-LM

Areas: Evaluation & Benchmarks › Language Model and Agent Benchmarks › Software Engineering Benchmarks

Summary

nnTrace is a differential testing system that detects and localizes silent bugs in distributed training by aligning intermediate tensors with a trusted reference and using a novel tolerance guideline to distinguish bug-induced errors from numerical noise.

Explained to a 5-year-old

When many computers work together to teach a big AI, sometimes they make mistakes that are hard to see. These mistakes are called silent bugs because they don't show up as clear errors. The researchers created a tool that compares the work of the computers with a trusted copy to find where the mistakes happen. It uses a special rule to tell if the differences are real bugs or just normal small differences in numbers. This helps keep the AI training correct and faster.

Explained to a 5-year-old, longer

When many computers work together to train a big AI, they follow complicated instructions. Sometimes the computers make mistakes that don't cause an obvious error message. These hidden mistakes are called silent bugs because they are hard to see. The researchers built a system that compares the results from the computers with a trusted copy of the same work. By matching the numbers from both sides, the system can spot where the computers went wrong. It also uses a simple rule to decide if a small difference is just normal rounding error or a real bug. The rule helps avoid false alarms, so only true problems are reported. The system was tested on a popular training framework and found many bugs that were previously unnoticed. It also worked well with different training tricks, like using less precise numbers to speed things up. Because the system can find bugs early, developers can fix them before the AI finishes training. This makes the training process more reliable and saves time and resources.

For a technical reader

The system compares intermediate tensors from a distributed training run with a trusted reference to detect discrepancies. It uses a mathematically derived tolerance to separate genuine bugs from numerical noise. The approach was validated on the Megatron-LM framework, uncovering 14 bugs across various training recipes. Integration into existing pipelines can catch silent bugs early, improving training reliability.

Problem

Distributed training for large models is prone to silent bugs that cause incorrect outcomes without obvious error signals, and existing debugging methods based on loss or gradient curves are slow and cannot locate the bugs.

Method

The approach aligns intermediate tensors from a distributed training run with those from a trusted reference implementation and uses a novel mathematical analysis to set appropriate tolerances for floating-point comparisons, enabling detection of bug-induced discrepancies while accounting for numerical noise.

Results

The approach detected 11 known bugs and 3 new bugs in the Megatron-LM framework and proved effective across low-precision training recipes such as BF16 and FP8.

Contributions

A systematic differential testing framework that aligns tensors from distributed training with a trusted reference and provides a mathematical tolerance guideline to differentiate bugs from numerical errors, along with a demonstration of its efficacy on the Megatron-LM framework.

Practical relevance

The approach can be integrated into existing distributed training pipelines to catch silent bugs early, improving training reliability and reducing wasted compute.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction