- Rating
- 4
- Clarity
- 4
- Confidence
- 4
- Originality
- 3
- Quality
- 3
- Significance
- 3
Read review
Summary
The paper introduces nnTrace, a systematic differential testing system designed to detect and localize silent bugs in distributed training frameworks. Because distributed training implementations are highly complex, they are prone to silent errors that do not crash the system but quietly degrade model quality. Instead of relying on slow, coarse-grained loss curve monitoring, nnTrace compares a distributed candidate run against a trusted reference implementation for a single training iteration. To handle the non-associative nature of floating-point arithmetic at native low precisions (e.g., BF16, FP8), nnTrace dynamically estimates a per-tensor numerical error tolerance using machine-epsilon-scale perturbations. If a discrepancy exceeds this tolerance, nnTrace employs module-wise input rewriting to isolate the fault and prevent error propagation, successfully localizing the bug. The authors evaluated nnTrace on Megatron-LM, detecting 14 silent bugs, including 3 previously unknown ones.
Strengths and weaknesses
Strength:
- Practical and High-Impact Domain: The paper addresses a critical, time-consuming pain point in modern machine learning: debugging complex distributed training pipelines.
- Novel Error Tolerance Estimation: The use of a perturbation-based proxy to empirically probe local numerical sensitivity and estimate dynamic, per-tensor tolerances at native precisions is a highly novel and theoretically grounded approach.
- Precise Fault Localization: nnTrace's module-wise input rewriting effectively decouples modules, preventing errors from cascading and allowing for fine-grained localization at the PyTorch module level.
- Solid Evaluation Across Architectures: The system was comprehensively evaluated across diverse, state-of-the-art model architectures (GPT, Llama, Mamba, MoE) and multiple parallelization strategies (TP, DP, PP, CP, SP).
Weakness:
- Manual Annotation Overhead: To construct the canonical mapping that aligns distributed shards with the reference tensor, nnTrace requires user-provided annotations. While the authors claim this is lightweight, it still introduces a manual burden and a potential source of human error when mapping complex or novel parallelization strategies.
- Inability to Detect Nondeterministic Bugs: Because the system tests execution traces from a single training iteration, it is structurally unable to detect nondeterministic bugs [1, 2], that do not reliably reproduce within that single snapshot.
- Overhead for Large Reference Models: For massive models where a single-device reference is impossible, nnTrace relies on a pipeline parallelism setup for the reference. This introduces device-to-host memory movement overheads, resulting in extended tracing times (e.g., over 22 minutes for a 671B model) compared to the highly optimized candidate implementations.
[1] Pham, H. V., Qian, S., Wang, J., Lutellier, T., Rosenthal, J., Tan, L., ... & Nagappan, N. (2020, December). Problems and opportunities in training deep learning software systems: An analysis of variance. In Proceedings of the 35th IEEE/ACM international conference on automated software engineering (pp. 771-783).
[2] Qian, S., Pham, V. H., Lutellier, T., Hu, Z., Kim, J., Tan, L., ... & Shah, S. (2021). Are my deep learning systems fair? An empirical study of fixed-seed training. Advances in Neural Information Processing Systems, 34, 30211-30227.
Questions
-
Could you provide more detail on the complexity of the manual annotations required for highly entangled parallelization strategies (e.g., combining Sequence Parallelism with Tensor Parallelism)? How prone is this annotation step to human error?
-
How does nnTrace handle stateful bugs that might not manifest as an immediate tensor anomaly in the first iteration, but rather corrupt the optimizer state (like momentum) subtly over several steps?
-
Are there theoretical or practical scenarios (e.g., highly discontinuous activation functions or heavily unconditioned custom kernels) where the perturbation response completely fails to act as a reliable proxy for internal round-off errors?
-
The module-wise rewrite feature generates consistent logical tensors to decouple modules for fault localization. Does this mechanism introduce significant memory bottlenecks for the test environment when dealing with extremely large hidden dimensions or sequence lengths?
Limitations
Yes
Paper formatting concerns
No
Final justification
Dear Authors, thank you for your rebuttals. I am happy to keep my positive assessment of this work.
Please discuss the limitations on the nondeterminism bugs and related work in the final version. Thanks!
Thanks for the positive feedback and constructive questions.
Comment: [Weakness 1] Manual Annotation Overhead: To construct the canonical mapping that aligns distributed shards with the reference tensor, nnTrace requires user-provided annotations. While the authors claim this is lightweight, it still introduces a manual burden and a potential source of human error when mapping complex or novel parallelization strategies.
Response: Although we do require manual annotations, these annotations are low effort; they are defined at module level and only requires several lines of code per module. Moreover, these annotations can be reused across different models containing the same modules. Thus, the annotation effort is largely reusable rather than repeated for every model or test configuration. Please see the response to Question 1 about the human errors in the annotations.
Comment: [Question 1 and Meta Review Question 1] Could you provide more detail on the complexity of the manual annotations required for highly entangled parallelization strategies (e.g., combining Sequence Parallelism with Tensor Parallelism)? How prone is this annotation step to human error?
Response: Thank you for this question. The annotation scheme is compositional: each parallelism strategy specifies the tensor dimension that it partitions, rather than requiring a separate annotation for every combination of strategies. For example, for modules combining tensor and sequence parallelism, the annotations remain concise:
The paper also provides a combined-parallelism example in Appendix B.1.
We agree that manual annotation can introduce errors and may lead to incorrect mappings. In practice, most annotation errors are easy to identify because reconstructing the logical tensor produces an immediate shape mismatch. Therefore, we can run a quick test to catch potential annotation errors using tensors with distint dimensions to induce shape mismatch.
Comment: [Weakness 2] Inability to Detect Nondeterministic Bugs: Because the system tests execution traces from a single training iteration, it is structurally unable to detect nondeterministic bugs that do not reliably reproduce within that single snapshot.
[Meta Review Question 2] Could the authors clarify the scope boundary more explicitly in the paper and discuss potential extensions for nondeterministic bugs?
Response: We agree that the current design primarily targets bugs that can be deterministicly reproduced, nondeterministic bugs such as race conditions and hardware failures like silent data corruption are out of scope. We will state this scope boundary more explicitly in the revised manuscript.
A possible extension is to repeat the same test under varied execution conditions to increase the probability of triggering nondeterministic failures by collecting many trajectories. Once such bug is triggered, nnTrace's existing localization mechanisms may still help identify the affected component.
Comment: [Weakness 3] Overhead for Large Reference Models: For massive models where a single-device reference is impossible, nnTrace relies on a pipeline parallelism setup for the reference. This introduces device-to-host memory movement overheads, resulting in extended tracing times (e.g., over 22 minutes for a 671B model) compared to the highly optimized candidate implementations.
[Meta Review Question 4] Could the authors discuss potential optimizations or whether this overhead is acceptable in the context of the debugging workflow it replaces?
Response: Typically the code path of the candidate implementation is independent of the tensor sizes in the training framework code, so the correctness of such framework code can be checked with a down-scaled model, avoiding running a large reference model altogether. In the case where a large reference model must be run, nnTrace's tracing time, (22 minutes for 671B model) is still significantly less than the tens of hours in alternative debugging frameworks [1].
[1] Lu, Y., Miao, Y., Tan, C., Huang, P., Zhu, Y., Zhang, X., & Yang, F. (2025, October). Trainverify: Equivalence-based verification for distributed llm training. In Proceedings of the ACM SIGOPS 31st Symposium on Operating Systems Principles (pp. 237-253).
Comment: [Question 2] How does nnTrace handle stateful bugs that might not manifest as an immediate tensor anomaly in the first iteration, but rather corrupt the optimizer state (like momentum) subtly over several steps?
Response: Thank you for this question. nnTrace is not inherently restricted to a single iteration; we use one iteration in our evaluation primarily for efficiency. The same tracing procedure can be applied over multiple consecutive iterations to compare gradient and parameter trajectories, allowing bugs whose effects accumulate over several optimizer steps to be detected. nnTrace also traces the optimizer update itself: it records the main gradients before the update and the parameters after the update. By providing consistent main gradients to the reference and candidate implementations, nnTrace isolates the optimizer behavior, so a corrupted optimizer state that affects the update will manifest as a discrepancy in the post-update parameters. This mechanism has already detected optimizer-update bugs, including Bugs 5 and 9 in Table 1.
Comment: [Question 3] Are there theoretical or practical scenarios (e.g., highly discontinuous activation functions or heavily unconditioned custom kernels) where the perturbation response completely fails to act as a reliable proxy for internal round-off errors?
Response: Theoretically one can construct such cases to break the assumptions. However, in practice, such regimes are largely excluded: operators severely ill-conditioned would destabilize gradient-based optimization itself, while trainable architectures are deliberately well-conditioned (e.g., layer norm, residual connections), and the activation functions are continuous. For operators whose implementation is not numerically stable, the perturbation response is not guaranteed to provide a reliable estimate. In such cases, an unusually large or unstable perturbation response may itself indicate problematic numerical implementation.
Comment: [Question 4] The module-wise rewrite feature generates consistent logical tensors to decouple modules for fault localization. Does this mechanism introduce significant memory bottlenecks for the test environment when dealing with extremely large hidden dimensions or sequence lengths?
Response: No. The module-wise rewrite functionality does not introduce additional memory bottlenecks because the module inputs are rewritten in place.