OSDI '26 · Training Reliability & Silent Errors

Determinism Makes
Silent Errors Observable

AEGIS · SDCHunter · OpGuard

从真实事故、技术机制到分布式系统方法论

45–60 min technical sharingOpening
What is a pre-training task?

一个长期运行、同步推进、每一步都依赖上一步状态的
distributed optimization process

global batch→ distributed forward→ loss→ distributed backward→ gradient collectives→ optimizer state

Long-lived

持续数周;checkpoint 只离散保存部分状态。

Large-scale

成百上千设备共同决定一个 logical step 的结果。

Path-dependent

一个错误 update 会污染后续 parameter、optimizer 和 checkpoint。

one logical trajectory, executed by a changing physical systemProblem background
The setup behind one training step
Application statesamples · model / optimizer · RNG · loss scaling · checkpoint / dataloader cursor
Parallel semanticsDP / TP / PP / CP / EP · microbatch order · recomputation · sharding
Runtimemultiple streams · overlap · allocator · graph capture · async collectives
Compiler & kernelsfusion · autotuning · atomics · reduction trees · precision policy
Fleetaccelerators · HBM · links · topology · host processes · aging · intermittent failure

训练轨迹是一个跨模型、软件、通信与硬件的分布式状态机。

weeks × thousands of devices × evolving softwareProblem background
Many ways for a training run to be wrong

Model / data / config

bad sample · wrong mask · optimizer / routing policy

OpGuard Bug 14: MoE routing drift ← histogram-bin mismatch

Numerics

overflow · precision change · reduction associativity

OpGuard Bug 10: different NCCL topology ← different FP reduction tree

Software correctness

race · stale buffer · missing barrier · bad fusion

OpGuard Bug 1 / 18: embedding race / Triton missing barrier

Distributed runtime

collective order · rank mapping · async dependency

OpGuard Bug 4 / 17: stream race / activation-offload stream misuse

Hardware

DUE · HBM / compute corruption · defective GPU

AEGIS: matrix-unit fault + HBM bit flip without ECC signal

Orchestration / restart

mixed version · data cursor · missing durable state

OpGuard Bug 20: resume divergence ← optimizer step variable overwrite

同一个 loss spike 可以来自其中任何一层。

“training anomaly” is a symptom class, not a root-cause classProblem background
What exactly is SDC?

Silent Data Corruption
数据被非预期改变,但改变发生时没有 error signal。

“silent”描述的是 corruption point,不是说运行永远没有后续症状。

TermAt fault timePossible outcome
DUEhardware / software detects unrecoverable errorabort, reset, explicit failure
SDCbad value escapes without signalwrong update, later NaN, shape error, crash
Software bugmay be detected or silentcan look identical to SDC
Numerical variationoften expectedmay be benign or amplify a real fault
SDC is a failure mechanism; visible symptoms may arrive much laterProblem background
Three incidents · no clean “hardware error” signature

Software race

Seen: grad-norm alert after >3,000 steps, at different steps across reruns.

Origin: a race in fused embedding backward changed only a few rows.

OpGuard Bug 1 · manual 5 days → reported 15 min

Compute-unit SDC

Seen: periodic wrong positions in a GEMM output.

Origin: matrix-core MMA on one execution unit; vector-core execution stayed correct.

AEGIS Case 1 · workload-specific hardware fault

HBM SDC

Seen: forward activation and backward read no longer matched.

Origin: one bit in a saved fp32 intermediate changed; ECC did not fire.

AEGIS Case 2 · caught by deterministic recomputation

可见症状、corruption point、root-cause class 是三件不同的事。

Paper-reported cases: OpGuard §6.2 / Table 2; AEGIS §7.6.

classification requires evidence beyond the final symptomProblem background
What the algorithm user sees
loss spike / drift grad-norm anomaly NaN / Inf shape / CUDA error quality regression resume divergence
↕ many-to-many ↕
data / algorithm numerics software race compiler / kernel distributed runtime hardware SDC

Paper cases: grad-norm alert after 3,000+ steps ← embedding-backward race (OpGuard Bug 1);shape mismatch about 30 ops later ← one-bit scatter SDC (OpGuard Bug 12);resume divergence ← optimizer-step state overwrite (OpGuard Bug 20)。

loss 和 gradient norm 适合报警,不适合归因。

the same symptom has many causes; the same cause has many symptomsProblem background
Why pre-training correctness bugs are hard to debug

Delayed

坏值数十个 op 或数千 step 后才可见。

Bug 1: backward race,后续 forward 才出现症状

Diluted

少数 float 被 aggregation 与低精度 metric 掩盖。

Bug 1 / 16: only a few gradient entries changed

Nondeterministic

健康重跑也可能因 reduction / schedule 不同而变化。

Bug 10: NCCL topology changed accumulation order

Expensive

一次 rerun 占用大规模集群,可尝试实验很少。

OpGuard cases report 3–14 day manual investigations

Intermittent

fault 依赖 input、unit、placement 和 pressure。

SDCHunter: observed replay rate 100% → 10⁻⁶%

Observer-sensitive

同步、dump、缩模型、换卡可能让 bug 消失。

OpGuard: heavy tensor dump made stream races harder to reproduce
late signal + expensive replay + unstable baselineProblem background
The operational contract with algorithm teams

“机器看起来没问题”
不是可消费的结论。

系统团队不能证明一个无限的 negative;能做的是缩小 claim,并交付可审计证据。

ReproduceSDCHunter: 保存 checkpoint、input window、placement、communication order
CompareAEGIS / OpGuard: 对 intended-equivalent execution 做 exact comparison
LocalizeOpGuard certified prefix;SDCHunter group → tensor → physical GPU
ExcludeSDCHunter: workload replay on healthy reference + isolated suspect hardware
ReportAEGIS: warning 与 confirmed incident 分开;明确 coverage boundary
replace reassurance with evidence and a scoped exclusion claimProblem background
A concrete trap · the exception is not the origin

报错行可能完全正确。
坏状态早已在上游产生。

  • token count 被静默破坏,最后表现为 shape mismatch;
  • 取模结果被破坏,最后表现为 embedding 越界;
  • 如果只沿 exception stack 排查,会系统性地追错方向。
SDCHunter paper figures showing first observed errors and delayed shape or bounds failures
SDCs in the Wild, Figures 1–3 · official paper
observable symptom ≠ corruption originProblem background
Core thesis

Determinism is an observability substrate.

模糊症状→ 定义“同一计算”→ 精确比较→ 第一个不一致

它把“感觉训练不对”变成 oracle violation;
但还没有自动回答 hardware or software?

exact mismatch is evidence, not a root-cause classifierShared foundation
Determinism is not one contract
local

Operator determinism

Fix: input + implementation + launch
Expect: bitwise-identical output
Use: AEGIS local replay

trajectory

Run-to-run determinism

Fix: checkpoint + data + RNG + layout + communication
Expect: same training trajectory
Use: SDCHunter exact replay

recovery

Restart determinism

Fix: durable state + post-restart execution plan
Expect: resumed step = uninterrupted step

token semantics

Batch invariance

同一 token 的结果不依赖 batch position / composition。
Example: DeepSeek-V4 kernel design.

implementation independent

Cross-stack comparability

不同 kernel、fusion、framework 在共享 semantic boundary 产生相同 tensor。
Example: OpGuard.

MAI-Thinking-1 展示的是更完整的 data、checkpoint、kernel、collective 和 restart contract。先说清 scope,才有资格讨论 exactness。

先说清 scope,才能讨论 exactnessShared foundation
The reusable primitive

Reference

algebraic identity
self-equivalence
peer majority
known-good run

Fingerprint

把 tensor dump 压成可在线记录的 compact evidence。

Boundary

从 operator、recompute chain、PP tensor 到 model-level op。

Budget

sample、coarse-to-fine、pipeline bubble、offline replay。

observable correctness = reference × fingerprint × boundary × cost budget
三篇论文共享的 design vocabularyShared foundation
One problem, different operational questions
during the live job

AEGIS

Trigger
continuous, sampled sensing
Question
受保护计算刚才是否被 corruption?
Output
confirmed corruption report + device context
after a symptom or alert

SDCHunter

Trigger
loss / NaN / shape error / detector alert
Question
是不是 defective hardware?是哪张 GPU?
Output
suspicious group → physical device
when two runs can be compared

OpGuard

Trigger
correctness escalation; separate online mode
Question
两次执行第一次在哪里语义分叉?
Output
first divergent boundary + trace context

Our synthesis. These are overlapping operating modes, not three mutually exclusive pipeline stages.

overlap is expected; outputs and assumptions differShared foundation
Paper 1 · Safeguarding LLM Training at Scale

AEGIS

当前正在运行的 job,某个受保护计算是否发生了 silent corruption?

cheap sensing on-path · definitive verification off-path

always-on, sampled, operator-awareAEGIS
AEGIS · architecture
AEGIS cSensor vTask cVerifier architecture
Safeguarding LLM Training at Scale, Figure 3 · official paper
cSensor→vTask→cVerifier
  • sense: inline、便宜、允许可疑;
  • vTask: checksum / fingerprint + 最小 replay context;
  • verify: replay 或 self-equivalence 后才上报 confirmed SDC;
  • 多种 sensor 共用 queue、scheduler 和 report path。
weak signal and confirmed incident are deliberately separatedAEGIS
AEGIS · sensor family 1
AEGIS higher precision algorithmic checksum figures
Safeguarding LLM Training at Scale, Figures 5–6 · official paper

Mixed-precision-aware algebraic checks

Δmatmul = ‖(AB)1 − A(B1)‖
  • 直接从 bf16 output 求 checksum,round-off noise 会淹没小 corruption;
  • 从 MMA 的 fp32 accumulator 累积 checksum,再与代数等价路径比较;
  • FlashAttention 使用结构化 invariant:1ᵀdV = 1ᵀdO;
  • 只保留可疑 row / column 和 verification 所需上下文。

方法论:checker 必须理解数值路径;“加一个 checksum”并不自动可靠。

an independent arithmetic path reduces common-mode riskAEGIS
AEGIS · sensor family 2 + verifier
AEGIS recomputation fingerprint and vTask scheduling figures
Safeguarding LLM Training at Scale, Figures 9–11 · official paper

Natural redundancy

forward activation 与 backward recomputation 本就执行同一逻辑;比较 XOR fingerprint。

Selective boundary

deterministic chain 只在末端观察,仍覆盖链内 corruption,减少 vTask。

Lazy verification

优先使用 PP bubble;step 尾部只留固定小 time slice,并动态调整 sampling。

exploit redundancy already paid for by trainingAEGIS
AEGIS · what 35M GPU-hours teach us
35M
monitored GPU-hours
18
confirmed incidents / 13 GPUs
3
surfaced as visible training failures
0.86%
reported production overhead

Bug story

AEGIS 也抓到过 framework 越界写造成的 SDC-like mismatch:exact mismatch 不是硬件分类器。

Coverage story

一个已知 faulty GPU 的 corruption 落在 Transformer backbone 外;轻量 elementwise / 未保护区域仍可能漏。

Paper-reported deployment results; not independently reproduced.

always-on observability is useful precisely because most faults stay quietAEGIS
Paper 2 · SDCs in the Wild

SDCHunter

loss spike、NaN、shape error 或 fail-stop,究竟是不是坏卡?是哪张物理 GPU?

exact-workload replay · group first · device later

reactive hardware diagnosisSDCHunter
SDCHunter · field characterization
SDCHunter loss spikes vary across replays from the same checkpoint
SDCs in the Wild, Figure 4 · official paper

23 张 confirmed defective GPUs 带来的三个结论

  1. 生命周期:不只 burn-in;aging 后也会出现。
  2. 条件性:hardware unit、kernel sequence 和 input data 共同决定是否触发。
  3. 保护缺口:ECC、thermal sensor、generic stress test 会漏 logic-level fault。
observed replay rate: 100% → 10⁻⁶%

同一 checkpoint 的 spike 可以出现在完全不同 step;“这次没复现”几乎不构成反证。

rarity and input sensitivity defeat generic screeningSDCHunter
SDCHunter · methodology

不要先做 minimal reproducer。
先保存 the workload that made the fault observable.

Preserve semantics

model · checkpoint · data window · RNG · operator sequence

Preserve placement

parallel layout · rank mapping · physical device · topology

Preserve pressure

memory footprint · overlap · communication order · timing-sensitive behavior

缩模型、换卡、加同步、dump 全 tensor,都可能“修好”这个 bug。

instrumentation can change the faultSDCHunter
SDCHunter · system-wide replay contract
Inputssame checkpoint, shards, microbatch order, RNG
Computedisable autotuning, pin kernels, deterministic reductions / MoE dispatch
Communicationpin collective algorithm, channel count, topology-sensitive order
Executionsame parallel config and recorded message ordering

健康系统应产生
bitwise-aligned trace

  • 这些约束在正常训练时也开启,不只在 replay 临时开启;
  • 否则 diagnosis 运行的已不是触发异常的 execution regime;
  • 论文报告 fixed layout 下 step time 差异 < 0.01%。
diagnosability must be designed before the incidentSDCHunter
SDCHunter · phase 1

Lightweight grouping

  1. 沿 DP 维度构造 replay replicas,喂相同 batch;
  2. 在 PP communication boundary 记录 associative tensor signature;
  3. 跨 replica 比较,把 fault 缩到一个 DP / PP group;
  4. 移走 suspicious group,job 从 verified checkpoint 恢复。

关键系统选择:先恢复昂贵 job,再离线完成 device-level diagnosis。

SDCHunter phase one replica grouping at pipeline parallel boundaries
SDCs in the Wild, Figure 15 · official paper
coarse evidence on the critical pathSDCHunter
SDCHunter · phase 2 + confirmation
suspicious group→ healthy reference→ layer signatures→ first bad tensor→ rank ownership→ physical GPU

Reference

至少一个 replica 健康;两副本无 majority 时,引入第三个 spare healthy replica。

Localization

只在缩小后的 group 做 fine-grained replay;framework 知道 tensor ownership 与 rank placement。

Confirmation

vendor diagnostics + 反复重放 alert-triggering trace,给出 hardware-actionable evidence。

Pathological limit: identical correlated corruption across all replicas cannot be resolved by consensus.

group → tensor → rank → deviceSDCHunter
SDCHunter · operational lessons
<100
Phase-1 replay steps in production cases
<4%
evaluated replay overhead
<1h
reported job recovery
>60%
generic test miss rate in authors' experience

现实边界

  • 它是 symptom / alert-triggered diagnosis,不是当前版本的 always-on detector;
  • fused MoE kernel 会隐藏 EP 内部 tensor boundary;
  • 罕见坏卡可能需要大量重复 replay;
  • 论文 abstract 写“40 incidents”,production section 写“40 defective GPUs”——不能混为同一指标。

方法论:恢复服务与完成根因诊断,是两个不同 SLO。

react fast, diagnose deeply off the critical pathSDCHunter
Paper 3 · Bitwise Alignment

OpGuard

suspect 与 reference execution,第一次不再实现相同语义计算的位置在哪里?

semantic boundaries · schedule-tolerant alignment · certified prefix

general correctness debugging; SDC is one causeOpGuard
OpGuard · bugs from a real training stack
Bug 1 · 5 days → 15 min

Loss diverges after ~3,080

Root cause: racy embedding backward.

Fault 在前一步 backward;症状在后续 forward。

Bug 10 · 3 days → 10 min

Reduce-scatter mismatch

Root cause: different NCCL topology.

Reduction tree 是 numerical contract 的一部分。

Bug 12 · 14 days → 30 min

Shape mismatch on one XPU pool

Root cause: one-bit scatter SDC.

Forward token misroute,约 30 ops 后才报错。

Bug 20 · 3 days → 5 min

Divergence after resume

Root cause: optimizer-step variable overwrite.

Checkpoint / restart state 属于 correctness contract。

Representative cases from OpGuard Table 2; debugging times are engineer estimates reported by the paper.

the failure surface spans model, runtime, kernel, collective, checkpoint and hardwareOpGuard
OpGuard · semantic boundary
OpGuard preflight guarded execution and alignment workflow
OpGuard, Figure 3 · official paper

比较的是 model-level materialized tensors,不是 kernel identity。

  • Preflight: 短 eager run 发现两边共有的稳定 Python-level operator boundaries;
  • Guarded execution: 在 boundary 前后插 fingerprint wrapper,运行真实 full job;
  • Alignment: 离线对齐两个 partial-order trace,再认证最长相同前缀。

编译、fusion、kernel schedule 可以不同;只要 boundary-to-boundary transformation 遵守同一 numerical contract。

same computation is a boundary-value contractOpGuard
OpGuard · guarded execution

XOR fingerprint

对 input / output tensor 做 scale-independent XOR hash;不复制完整 tensor。

Async placement

probe 放在 operator 自己的 stream 和 dependency graph 上,不增加 global synchronization。

Rich context

operator · rank · stream · callsite · shape · dtype · local timestamp。

Controlled nondeterminism

固定 data / RNG / kernel choice / numeric mode / collective order,消除 comparison noise。

Residual nondeterminism

不强制全局 deterministic scheduler;race、missing sync、未初始化内存如果改变输出,就是待测系统的 evidence。

remove benign noise without hiding schedule-sensitive bugsOpGuard
OpGuard · alignment & certified prefix
OpGuard instrumentation schedule tolerant alignment and certified prefix localization
OpGuard, Figure 4 · official paper

Anchors: 先用高置信事件切窗口。

Banded DP: 容忍 overlap、fusion、local reorder。

Pivot p*: first mismatching aligned boundary。

first difference is a debugging pivot, not automatic causal proofOpGuard
OpGuard · one primitive, three cost envelopes
ModeWhenBoundary coverageReported overhead
Online SDCcontinuoussparse communication boundaries1.00–1.01×
Trustedreactive defaultskip small allowlist of trusted primitives1.25–1.45×
Fulldifficult casesevery available operator boundary1.78–1.94×
20
production correctness failures localized
21
SDC machines in separate online population
8/10
open-source issues with precise first diff
instrumentation depth is an operational policy, not a fixed system propertyOpGuard
Synthesis · same primitives, different systems
live SDC detection

AEGIS

Boundary
compute + recompute chain
Reference
algebra · self-equivalence · replay
Output
confirmed corruption + device context
Cost
sample sensing; defer verification
hardware diagnosis

SDCHunter

Boundary
PP signature → layer tensor
Reference
peer majority + healthy group
Output
first bad tensor → physical GPU
Cost
hierarchical incident replay
correctness localization

OpGuard

Boundary
semantic model-level operator
Reference
self · known-good · cross-stack
Output
first divergent op + trace context
Cost
online / trusted / full modes

区别不只在“能抓什么错”,而在 boundary × reference × output × budget。

the right abstraction is not “which tool wins?”Synthesis
Detection paths converge; investigation goals branch
state

Normal production training

↓
always-on

AEGIS

compute / recompute boundaries
cheap sensing → deferred confirmation

always-on mode

OpGuard online

sparse communication boundaries
fingerprint inconsistency → suspect machine

user-visible

External symptom

loss spike · NaN · shape error · crash
or another detector's alert

↓   evidence enters incident handling   ↓

Anomaly evidence — root-cause class still open

↓   choose the investigation question   ↓
Is a physical device defective?

SDCHunter

Phase 1: incident-triggered deterministic replay at PP communication signatures → suspicious group.
Phase 2: layer-wise signatures → first bad tensor → physical GPU.

Where did semantics first diverge?

OpGuard trusted / full

Compare suspect and reference runs at model-level semantic boundaries → certified identical prefix → first divergent operator.

Our synthesis: compatible branches, not a mandatory sequence. SDCHunter Phase 1 and OpGuard online both observe communication boundaries, but at different times and for different outputs.

overlap in boundary; diversity in trigger, reference, granularity, and outputSynthesis
When redundant checks fail together

Shared assumptions create shared blind spots.

False alarm

healthy ≠ healthy

两个健康执行其实没有遵守同一 comparison contract:

  • data / RNG state 不同;
  • kernel choice 或 numerical policy 不同;
  • collective topology / reduction tree 不同。

Result: exact mismatch 是真的,但不能归因于 software bug 或 hardware SDC。

False confidence

wrong == wrong

Reference
replicas 共享同一个 software bug,错误结果仍然相等
Coverage
多个工具都看不到 preprocessing、elementwise 或 opaque fused region
Observer
sync、tensor dump、缩小 replay 改变 schedule,让 race / intermittent fault 消失

Result: clean replay 只覆盖当前 observation setup,不是全局“系统无错”证明。

independent references diverse boundaries fault-preserving observation

Useful redundancy requires different failure modes—not merely more copies of the same comparison.

the comparison contract and reference are part of the trusted computing baseSynthesis
Methodology · debug the distributed state machine

1 · Define equivalence

明确 fixed state、allowed variation、numerical policy;不要笼统说 deterministic。

2 · Preserve evidence

checkpoint 之外,还保存 input window、placement、comm plan、kernel choices 和 alert context。

3 · Search coarse-to-fine

先 group / boundary,再 tensor / kernel;把昂贵观察移出 critical path。

4 · Separate hypotheses

mismatch、software bug、hardware defect、repair decision 是四层结论。

5 · Distrust clean reruns

复现失败可能是 rate 太低,也可能是诊断改变了 workload。

6 · Keep independent oracles

algebraic、self-equivalent、cross-device、known-good、vendor diagnostic 交叉佐证。

observability is a system property, not an incident-time add-onSynthesis
People and systems · facts vs inference

Author overlap

All threeYun Zhang, Shuguang Wang
SDCHunter ↔ AEGIS6 shared authors
SDCHunter ↔ OpGuard5 shared authors
AEGIS ↔ OpGuard3 shared authors

Bounded interpretation

  • Fact: SDCHunter 论文说它与 online detection tools 和 OpGuard 协作。
  • Fact: OpGuard Aug–Oct 2025 pilot,Nov 2025 wider rollout。
  • Inference: 三者反映同一组织内逐渐成熟的 deterministic comparison 能力。
  • Unsupported: 不能仅凭 author / citation order 断言项目严格先后。
shared people suggest knowledge flow, not a proven development timelineLineage
Implications for LTP / Megatron
01

Contract

fixed-layout bitwise
restart / reshard
versioned numerical policy

02

State

data cursor + RNG + FP8
optimizer causal state
comm plan + rank map

03

Boundaries

PP / TP / CP / EP signatures
semantic taps in fused MoE
async fingerprinting

04

Operations

CI / always-on / replay policy
alert-triggering evidence bundle
independent confirmation

deterministic contract → comparable evidence → faster ownership decision
design for replay before the first production incidentLTP / Megatron
Takeaways

Determinism defines
what “same computation” means.

Fingerprints make comparison affordable → References make mismatch interpretable → Different boundaries provide useful redundancy

预训练可靠性不是“模型训练 + 一些监控”,
而是分布式系统的 correctness engineering。

Questions?Closing
Appendix · claim hygiene

可以说

  • AEGIS 是 always-on sampled sensing + deferred verification
  • SDCHunter 当前是 reactive diagnosis
  • OpGuard 主模式是 general correctness debugging
  • 三者共享 deterministic comparison 等基础

不要说

  • 每个 loss spike 都是 SDC
  • exact mismatch 自动证明 hardware fault
  • 三者是一个公开声明的统一产品
  • author overlap 证明严格项目先后
  • batch invariance 等于 whole-run determinism
scope every number and every causal claimAppendix
Appendix · sources & navigation

Primary papers

Controls

Next / previous→ ← · Space · PgUp/PgDn
OverviewO
Speaker notesN
FullscreenF
First / lastHome / End
Print to PDFbrowser print, landscape, no margins