Dream2Discern: Learning multi-agent system runtime failure prediction from hard latent variantsDream2Discern: Learning from Hard Latent Variants for Runtime Failure Prediction in Multi-Agent Systems
Dream2Discern trains the auditor with loss-guided variants; Qwen3-8B achieves wACC of 91.47% on AFTraj-2K.
- A runtime auditor must predict eventual failure from limited, outcome-verified multi-agent trajectories. Collecting new trajectories requires rollout and verification, editing may invalidate the original labels, and broader coverage does not identify hard examples for the current auditor.
- Dream2Discern alternates Dream and Discern: the former perturbs the query/value projections to raise batch BCE, and the latter learns these hard latent-variable variants using the original labels. Perturbations are not used at runtime, and a step-wise calibrated threshold is applied.
- In Table 1, Qwen3-8B on AFTraj-2K has wACC 91.47%, and Qwen3-4B on StepShield has 90.28%. The authors state that relative to SAFE, Hide-and-Seek, and TRACES, all four metrics are higher after averaging over three seeds.
- The authors limit evaluation to text history and binary outcomes; future directions are visual observations, finer outcome categories, and closed-loop evaluation of replanning, tool restrictions, or human assistance. The experiments use four backbones in total, Qwen3 and Llama, with AFTraj-2K and StepShield; closed-source judges are single runs.
- Evaluated models
- Qwen3-4BQwen3-8BLlama-3.2-3B-InstructLlama-3.1-8B-Instruct
- Benchmarks
- AFTraj-2KStepShield
- Metrics
- AUROCFPR95wACCTWA
Dream2Discern trains a runtime auditor for multi-agent systems through self-guided hard latent variants, achieving trajectory-level weighted accuracy above 90% on both AFTraj-2K and StepShield, without additional trajectory collection or outcome verification. The Dream stage perturbs the auditor's representation operators to increase the prediction loss on recorded prefixes, the Discern stage learns execution outcomes using original labels, and variants are regenerated as training proceeds, balancing accuracy and timeliness.
Paper analysis
What problem does this paper attempt to solve?
Without adding labeled trajectories, use prediction loss to construct hard examples to train a runtime failure auditor.
How can a runtime auditor learn the prefixes it currently finds hard to discriminate, without collecting new labeled trajectories.
- Setting: The authors consider that LLM multi-agent systems in tasks ranging from software development to open web interaction are prone to reasoning and tool-use errors, and may make unnecessary tool calls or unexpectedly modify external systems. An auditor is therefore needed to predict eventual failure from the observed execution history, so that intervention can occur before execution ends.
- Existing shortcomings: Learned auditors such as TRACES and AgentForesight typically use only limited, outcome-verified trajectories. The authors argue that collection requires rollout and outcome verification, that editing may change subsequent steps and invalidate the original labels, and that broader failure coverage does not standardly identify hard examples for the current auditor. The authors obtained 326 verified continuations on AFTraj-2K; among continuations of failure-source trajectories, 85.7% turned into successes (Figure 1(b)).
- Observation: Use the auditor's own prediction loss on recorded prefixes to select representation-operator perturbations and construct hard latent variants, keeping inputs and outcome labels unchanged, without adding trajectories or re-verifying.
- Method: Propose Dream2Discern. Training alternates between Dream and Discern; at runtime the perturbations are removed, a failure score is output for each non-terminal prefix, and it is compared with a step-calibrated threshold.
- Visible scope: Non-terminal steps contain only the task context and interactions that have occurred. Future interactions, trajectory length, and terminal outcome are unavailable at prediction time; in labels, 1 is failure and 0 is success.
What related research exists?
The authors place this paper on the runtime prediction side, targeting current difficulties rather than expanding the trajectory corpus.
The introduction and Section 5 divide related work into trajectory expansion, multi-agent systems, failure analysis, and runtime prediction. Only the differences the paper names are retained below.
Trajectory expansion
- Collection: Xu et al. (2025) and Xie et al. (2026) are used in the introduction to show that new trajectories depend on rollout and outcome verification. The authors argue that average collection time reaches tens of seconds per trajectory, making repeated corpus expansion hard to sustain.
- Editing: Kong et al. (2026) and Bonagiri et al. (2026) correspond to resuming execution after editing and re-verifying. The authors argue that after changing actions or tool returns, the original outcome labels cannot be reused directly.
Multi-agent systems
- Frameworks: AutoGen (Wu et al., 2024), MetaGPT (Hong et al., 2023), and CAMEL (Li et al., 2023a) organize reasoning, action, and tool use through specialized roles and inter-agent communication.
- Coordination: GPTSwarm (Zhuge et al., 2024) optimizes prompts and connections; Magentic-One (Fourney et al., 2024) coordinates web, file, and code execution.
- Memory and lifetime: Sun et al. (2026b) discuss retaining information across interactions, and Zhu et al. (2026) discuss reliability over deployment lifetime. The authors use this to shift the question to whether an in-progress execution will fail.
Failure analysis
- Taxonomy and attribution: MAST (Cemri et al., 2026) organizes failures around system design, inter-agent misalignment, and task verification. Who&When (Zhang et al., 2025c) evaluates the responsible agent and the critical error step; AgenTracer (Zhang et al., 2025b) uses counterfactual replay and fault injection to construct tracer supervision.
- Diagnosis: AgentDebug (Zhu et al., 2025) diagnoses across components and generates corrective feedback; OAT (Yeh et al., 2026) locates error steps from dynamic deviations in successful executions. Qian et al. (2026) study how interaction history drives actions.
- Relation: The authors argue that these works support diagnosis and improvement; runtime prediction is complementary, assessing the terminal outcome before execution ends.
Runtime failure prediction
- VLA monitoring: SAFE (Gu et al., 2026) predicts failure from internal features; Hide-and-Seek (Park et al., 2026) uses trajectory-level labels for contrastive learning to find failure signals with temporal structure.
- LLM auditing: AgentForesight (Zhang et al., 2026) trains an online auditor with critical-error annotations; TRACES (Li et al., 2026) models temporal changes in latent risk features from trajectory-level supervision. PrefixGuard (Huang et al., 2026) learns prefix risk monitoring; Baidya et al. (2026) combine sparse failure evidence with a stopping policy.
- Guardrails: AgentDoG (Liu et al., 2026) performs contextual risk diagnosis; StepGuard (Zheng et al., 2026) assesses risk before tool actions execute. The authors state that this paper asks a different question: targeting the auditor's current prediction difficulties without expanding the trajectory corpus.
Baselines and benchmarks: The experimental baselines are open-source LLM judges, closed-source LLM judges, token uncertainty, and the failure auditors AgentDebug, AgentForesight, SAFE, Hide-and-Seek, TRACES. The benchmarks are AFTraj-2K and StepShield.
The authors position Dream2Discern as: constructing hard latent-variable variants of recorded prefixes using the prediction loss, and learning with the original outcome labels, without additional trajectory collection or verification.
How does the paper address this problem?
Alternately construct hard representations with low-rank operator perturbations that raise the loss, then learn with the original labels.
Dream2Discern performs implicit augmentation inside the auditor: Dream uses the batch prediction loss to select representation-operator perturbations, yielding hard latent variants; Discern reduces loss on these variants using the original labels. Variants are regenerated as the auditor updates. At runtime the perturbation is zero.
Problem setting and parameterization
- A trajectory is written as τ_i=(c_i, u_{i,1}, …, u_{i,T_i}). Each record carries a source (agent, user, tool, or environment) plus a message, action, or observation. The terminal outcome is Y_i∈{0,1}.
- The auditor f_Θ outputs a failure score s_{i,t}∈[0,1] for prefix input X_{i,t}. The learning objective is the mean BCE over indexed batches.
- The backbone (e.g., Qwen3-8B) is frozen. LoRA is added to the query and value projections after a fixed intermediate block; the hidden state of the last token in the last layer passes through a two-layer classification head and sigmoid to produce the failure score. During Dream search the prediction head is fixed, so difficulty comes from the prefix representation rather than the classification head.
- Each batch has m of each of the two classes, sampled with replacement by parent-task group, trajectory, and prefix. The endpoint of a failure prefix is taken from the annotated key step K_i to the end of the trajectory; the start of a success prefix is sampled from the empirical distribution of training failure annotations. Annotations are used only to select samples and do not enter the input. AFTraj-2K inputs also drop the stored thought field.
Dream: constructing hard latent variants
- Perturbations are added only to the effective weights of the adapted query/value projections, and the same set of perturbations applies to the whole batch. Inputs and labels are unchanged. The relative norm is scaled by the Frobenius norm of the frozen projections, the total does not exceed γ, and each projection has rank at most r. The scale does not change with LoRA updates.
- The ideal perturbation is the V that maximizes the batch loss under this constraint. The main text linearizes at the unperturbed point and keeps the top r singular components of each projection's scaled gradient. Proposition 1 gives a maximizing direction for this linearized objective, with step size proportional to radius γ.
- The implementation is not exactly the same as Proposition 1: it first normalizes by the full scaled gradient norm, then performs SVD truncation, so the candidate radius can be smaller than the nominal linear solution. It then tries at most six points starting from that direction (1, 1/2, down to 1/32), accepting the first point that makes the nonlinear batch loss strictly higher than the zero perturbation; if none satisfies this, it returns zero. Each batch restarts the search from zero and does not carry the perturbation to the next batch.
- The ideal objective is V⋆B(Θ)∈argmaxV∈ Uγ,r LB(Θ,V). The meaning is: within relative radius γ and rank limit r, find the shared operator perturbation that maximizes the current batch prediction loss.
Discern: learning with original labels
- Fix the perturbation returned by Dream and take one update step on the perturbed batch loss only; gradients are truncated at the search point. LoRA and the classification head are updated, and the backbone remains frozen. When zero is returned, this step is just the ordinary unperturbed batch loss.
- Proposition 2, under the assumption that the first-order remainder is bounded, writes the difference between the Discern loss and the unperturbed loss as the returned radius times the retained gradient norm, plus a remainder controlled by the square of the radius. The main text interprets the first-order extra term as the current auditor's sensitivity to allowed low-rank operator changes.
- The optimizer is AdamW, learning rate 10^{-4}, weight decay 0, global gradient norm clipped to 1. LoRA rank 8, α_LoRA=16. The classification head has hidden width 256, GELU, and default last-token readout. The input budget is 2048 tokens; for overlong inputs, the first 256 and last 1792 are kept. Logical batch size 32. First 100 supervised warmup steps, then 1057 steps on AFTraj-2K or 979 steps on StepShield. The experimental rank limit is r=8. Each backbone has a fixed γ, chosen as the one whose Dream step most reduces the training batch signed margin: 3×10^{-4} for Qwen3-4B and Llama-3.1-8B-Instruct, and 3×10^{-3} for Qwen3-8B and Llama-3.2-3B-Instruct (Table 6).
Runtime decision
- The saved auditor performs one forward pass under V=0 for each non-terminal prefix to obtain a failure score. The decision is Ŷi,t=1{si,t≥ζt}. The meaning is: if the failure score at that step is not below the threshold, eventual failure is predicted.
- Thresholds are fitted offline only on successful trajectories in the training split and fixed at runtime. Scores are first converted to empirical quantiles for the corresponding step, each trajectory is summarized by the maximum quantile over its non-terminal steps, and a high quantile of these maxima is mapped back to a score; the procedure is similar to max-rank. The nominal α for main results is 0.05. Appendix A.2 samples 40% of parent groups from the training index with seed 0; when a step has fewer than 20 calibration scores, subsequent steps reuse the last reference distribution satisfying that condition.
What experiments did the paper conduct?
Qwen3-4B has wACC of 90.96% and 90.28% on the two benchmarks; StepShield's AUROC is not the highest in the full table.
Experimental setup
- Benchmarks: AFTraj-2K covers mathematical reasoning, coding, and tool use; the test set has 332 trajectories (163 failures, 169 successes), from the same corpus as training. By source-task stem, 19 parent groups are shared across splits, covering 26 test trajectories (Appendix C.1). StepShield uses paired clean/violation trajectories, with violations recorded as failures; the test set has 216 trajectories (108 each), from event templates not used in training. The training index prefixes are 8454 and 7828, respectively (Table 4). The two benchmarks are trained separately.
- Backbones: Qwen3-4B, Qwen3-8B, Llama-3.2-3B-Instruct, Llama-3.1-8B-Instruct. Backbones are frozen; LoRA and the classification head are trained.
- Baselines: Open-source judges are Qwen3-4B/8B/32B, two Llama instruction models, and LlamaGuard3-8B; closed-source are GPT-5.4, Claude-Sonnet-4.6, Grok-4.3, and Kimi-K2.7-Code; token uncertainty computes entropy or negative log-likelihood on a Qwen3-8B proxy, because the logs do not contain the executing agent's own token probabilities; failure auditors are AgentDebug, the released AgentForesight-7B not retrained in this paper, and SAFE, Hide-and-Seek, and TRACES attached to the same frozen encoder.
- Metrics: Every non-terminal prefix is evaluated, then aggregated to the trajectory. AUROC and FPR95 use the highest prefix score; FPR95 is the false-positive rate on successful trajectories when failure recall is at least 95%. Under empirical class proportions, wACC equals trajectory classification accuracy. TWA rewards earlier failure detection, and undetected failures contribute 0. Higher AUROC, wACC, and TWA are better; lower FPR95 is better.
- Thresholds and closed-source decisions: Score methods use per-step thresholds on successful trajectories in the training set, nominal α=0.05. For closed-source, wACC and TWA use their returned failure labels, while continuous risk scores are still used for AUROC and FPR95. Unparseable replies are recorded as no alarm.
- Repetition: Dream2Discern, SAFE, Hide-and-Seek, and TRACES report the mean and sample standard deviation over seeds 0, 1, 2 on the four backbones, and share the seed-0 warmup checkpoint for that setting. Closed-source results are each a single recorded run. Appendix C.4 states that GPT-5.4 also participated in fault-injection planning during AFTraj-2K construction.
Main results
The table below gives the means from Table 1; values with ± are sample standard deviations over three training seeds. The remaining open-source judges, Grok-4.3, Kimi-K2.7-Code, the remaining uncertainty rows, and SAFE and some H&S and TRACES rows are omitted. On AFTraj-2K the lowest wACC is GPT-5.4, and on StepShield the lowest wACC is Max Entropy-8B; both rows are retained.
Swipe horizontally to read the table
Method AFTraj-2K wACC AFTraj-2K AUROC StepShield wACC StepShield AUROC Dream2Discern-Qwen3-8B 91.47±0.17 95.82±0.43 87.50±0.93 93.95±0.63 Dream2Discern-Qwen3-4B 90.96±0.60 95.45±0.16 90.28±0.46 93.62±0.68 H&S-Qwen3-4B 88.76±1.14 90.84±1.26 70.99±2.83 85.02±0.96 AgentForesight-7B 77.11 83.75 79.17 83.37 TRACES-Qwen3-8B 87.05±1.04 92.63±0.64 70.83±2.12 79.25±1.86 Claude-Sonnet-4.6 63.86 70.90 87.04 95.58 GPT-5.4 45.48 50.53 65.74 88.30 Max Entropy-8B 49.10 53.58 49.54 53.70 - The authors state that Dream2Discern leads on all four metrics on AFTraj-2K, and leads on wACC and TWA on StepShield. On StepShield FPR95, Claude-Sonnet-4.6 is 38.89, lower than the two Dream2Discern versions' 42.28±2.33 and 53.09±8.40 (Table 1).
- The authors state that LLM judges are more competitive on StepShield, and that token uncertainty has limited outcome discrimination on the two benchmarks. The authors state an improvement of up to 11.11% wACC over the strongest auditor baseline; that sentence does not specify the backbone or benchmark.
- The abstract states that trajectory-level wACC exceeds 90% on both benchmarks. In the table, the Qwen3-8B StepShield cell is not so. The authors state that the 4B auditor exceeds Claude-Sonnet-4.6 on StepShield wACC and TWA; Qwen3-8B's StepShield TWA is 55.69±1.10, lower than Claude's 56.79.
Llama backbones
- Table 2 compares Dream2Discern, SAFE, Hide-and-Seek, and TRACES on Llama-3.2-3B-Instruct and Llama-3.1-8B-Instruct, reporting three seeds. The authors state that wACC is highest at both scales on both benchmarks, and that AUROC, wACC, and TWA are all highest on AFTraj-2K.
- On AFTraj-2K, the 3B version is AUROC 95.62±0.61, wACC 91.27±0.30, TWA 73.38±0.18; the 8B version is 95.91±0.35, 91.16±0.63, 72.30±0.54.
- On StepShield with Llama-3.1-8B-Instruct, Dream2Discern's AUROC is 86.78±1.92, lower than H&S's 87.54±1.81 and TRACES's 89.59±2.65; TWA is 49.06±2.67, lower than SAFE's 53.61±0.24, H&S's 52.61±1.33, and TRACES's 56.01±0.72. The wACC in that row is 79.48±2.94, still higher than TRACES's 77.78±3.24.
Perturbation strategy and timeliness trade-off
- Table 3 uses training seed 0 to compare no perturbation, random low-rank perturbation, and Dream perturbation. The authors state that Dream has the highest AUROC in all four settings, and that relative to random perturbation, wACC and TWA are higher in most settings.
- Not every cell is higher. On AFTraj-2K with Qwen3-4B, no perturbation has wACC 90.96 and Dream has 90.36. On StepShield with Qwen3-8B, Dream has wACC 88.43 and TWA 56.42, lower than random perturbation's 89.81 and 57.72.
- Figure 4 sweeps nominal α from 0.01 to 1.00 on Qwen3-8B; the horizontal axis is the mean normalized detection time on failure trajectories, with undetected recorded as 1, and the marker corresponds to α=0.05. The authors state that on AFTraj-2K wACC is still higher when earlier alarms are prioritized; on StepShield the gain covers a wider range of operating points. The paper text does not list the remaining coordinate values in the figure.
Mechanism and case study
- Fixing the Qwen3-8B already trained with Dream2Discern, 50 batches of 32 trajectories each are drawn from the AFTraj-2K training index. Dream increases BCE on all 50 batches, while random changes are near 0. The median loss increments are 0.0307 and 6.20×10^{-6}, respectively (Appendix D.2.1). The relative norm of the returned Dream perturbations ranges from 0.00261 to 0.00280, and random perturbations sit at the nominal boundary 0.003.
- In another set using Qwen3-4B trained without perturbation, Dream perturbations are constructed from 8 training batches, and the mean absolute change in failure score is taken over 2820 held-out prefixes. These are split into five equal-sensitivity groups of 564 each. Figure 5b's error rates are 4.4%, 10.1%, 21.9%, 27.7%, 51.1%; Appendix D.2.2 confirms the weighted error rate goes from 4.4% in the lowest group to 51.1% in the highest group. The authors interpret this as loss-guided perturbations corresponding to discriminative weaknesses on held-out prefixes.
- Figure 6 is a held-out coding trajectory: the authors state that the environment reports a test failure at step 9, and the annotated error step is step 7; the unperturbed auditor predicts failure only at step 9, while with a temporary Dream perturbation the sensitivity peaks at step 7. After training on hard variants, Dream2Discern predicts eventual failure at that error step.
Other ablations and analyses
- Figure 2: the shared PCA axes for 97 original/edited prefix pairs are PC1 (55.9%) and PC2 (9.1%); the authors state the two groups overlap. Held-out class-balanced BCE is Original 0.520, +Edited 0.578, and +Dream with a fixed Original head 0.704.
- Figure 1(b): mean collection times are Math 87.3 seconds, Coding 58.6 seconds, HotpotQA 72.9 seconds, GAIA 107.4 seconds. Success-source continuations are 203 (94.9%) still successful and 11 (5.1%) turning to failure; failure-source are 96 (85.7%) turning to success and 16 (14.3%) still failing.
- Table 7 (seed 0): last-token readout has higher AUROC in all four comparisons. On Qwen3-8B, mean pooling has AFTraj-2K wACC 92.17, higher than last-token's 91.57; mean pooling also has higher TWA on both benchmarks.
- Table 8 (seed 0): a larger γ is not consistently better. At γ=10^{-2}, both backbones decrease in AFTraj-2K TWA and in StepShield wACC; Qwen3-8B's StepShield wACC is 62.04, versus 88.43 at the main experimental radius.
What are some points that can be further explored?
The authors list visual observations, finer-grained outcomes, and closed-loop intervention as future work.
Limitations and future directions noted by the authors
- Evaluation focuses on text execution history and binary terminal outcomes; extending to visual observations or finer outcome categories is listed by the authors as future work (Appendix E).
- Prediction quality is evaluated only on recorded trajectories; downstream intervention is left to the deployed system (Appendix E).
- How auditor-guided replanning, tool restrictions, or human assistance would affect task success and execution cost requires closed-loop experiments, according to the authors (Appendix E).
Scope of experimental coverage
- The benchmarks are AFTraj-2K and StepShield. The former has 332 test trajectories, with the test split and training from the same corpus; the latter has 216 test trajectories, with test trajectories from event templates not used in training (Section 4.1, Table 4).
- Dream2Discern's backbones are Qwen3-4B, Qwen3-8B, Llama-3.2-3B-Instruct, and Llama-3.1-8B-Instruct, with the two benchmarks trained separately (Section 4.1).
- Comparisons include open-source and closed-source LLM judges, token entropy and negative log-likelihood on a Qwen3-8B proxy, and AgentDebug, AgentForesight, SAFE, Hide-and-Seek, and TRACES (Section 4.1).
- The four trainable auditors above report the mean and sample standard deviation over seeds 0, 1, 2 on the four backbones; closed-source judges are each a single recorded run (Section 4.1, Appendix C.4). Table 3, Table 7, and Table 8 use training seed 0.
- The nominal level for main-result thresholds is α=0.05, fitted offline on successful trajectories in the training split; closed-source judges' wACC and TWA use their returned labels (Section 3.4, Appendix C.4). The mechanism analysis and the editing diagnostic in Figure 2 are done on AFTraj-2K (Section 4.4, Appendix D).
Summarize the main content of the paper
Train the auditor with hard latent-variable variants; Qwen3-4B has wACC 90.96% and 90.28% on the two benchmarks.
Dream2Discern is a runtime failure auditor: it looks only at the prefix of an LLM multi-agent trajectory that has already occurred, predicts whether that trajectory will ultimately fail, and collects no new labeled trajectories during training.
- Problem: Available outcome labels are limited. New trajectories require rollout and verification; editing the continuation may then replace the original label. The authors argue that expanding failure categories more fully still cannot mark the prefixes that the current auditor finds hard to judge.
- Method: Dream, under a frozen prediction head, applies bounded, low-rank perturbations to the query/value projections, selected by rising batch BCE, to obtain hard latent-variable variants. Discern does not change inputs or labels, and updates LoRA and the classification head. Perturbations are removed at runtime, and decisions use a step-wise threshold fitted on successful trajectories in the training set.
- Main results: In Table 1, the Qwen3-8B version on AFTraj-2K has wACC 91.47±0.17%, AUROC 95.82±0.43%, FPR95 31.95±3.07%, TWA 73.45±0.71%. The Qwen3-4B version on StepShield has wACC 90.28±0.46%, TWA 57.67±0.35%. The authors state that both Qwen3 backbones are higher than SAFE, Hide-and-Seek, and TRACES on all four metrics after averaging over three seeds.
- Cells that do not lead together: On StepShield, Claude-Sonnet-4.6 has AUROC 95.58 and FPR95 38.89. The Qwen3-8B version has wACC 87.50±0.93 on that benchmark. Llama-3.1-8B-Instruct still has the highest wACC on StepShield, but its AUROC and TWA are lower than TRACES in the same table (Table 2).
- Authors' conclusion: The authors argue that targeting the auditor's current prediction difficulties on a fixed corpus can improve runtime failure prediction; the variants update with training and require no additional trajectory collection or verification.