Source-linked AI summary
The Temporal Tug-of-War: Visualizing and Detecting RAG Conflicts in Diffusion Models via Trajectory Variance
Sravan Karthick T, Pranav Darshan, Pranav A, Minal Moharir, Ivan P. Yamshchikov
TL;DR
When retrieved context contradicts a diffusion model’s parametric knowledge, conflict resolution can unfold across the denoising trajectory, a setting existing methods do not adequately address. The paper introduces TVS, which measures semantic divergence across stochastic runs, and finds that conflict-related dynamics and simple-classifier properties transfer across LLaDA and Dream 7B. TVS has inference and scope constraints, including architecture-dependent accuracy and unresolved generalization beyond the evaluated architectures.
Problem
Existing methods do not address RAG-induced knowledge friction in diffusion models or establish that its signal can be classified without complex sequential modeling.
Source: §2.3 · p. 3Method
TVS computes mean pairwise cosine distance between sentence embeddings across parallel stochastic denoising trajectories at each timestep to measure semantic divergence.
Source: §1 · p. 1, §4.2 · p. 4Results
Across LLaDA and Dream 7B, three-phase temporal dynamics, linear-classifier sufficiency, and dataset difficulty ordering transfer, while seed sensitivity depends on architecture.
Source: §1 · p. 2Takeaways & Limitations
A simple Logistic Regression classifier over flattened TVS vectors achieves competitive conflict-detection accuracy, matching recurrent architectures.
Source: §1 · p. 2TVS requires multiple parallel denoising runs, its accuracy varies by architecture, and generalization to substantially different architectures or training regimes remains open.
Source: §10 · p. 8
Abstract
from arXiv · showhide
Retrieval-Augmented Generation (RAG) introduces a specific failure mode in discrete diffusion language models: when retrieved context contradicts parametric knowledge, the iterative denoising process becomes a visible battleground between competing knowledge sources. We identify temporal semantic divergence as an observable for detecting these conflicts and introduce the Trajectory Variance Score (TVS), a simple and interpretable measure of this divergence. TVS computes the mean pairwise cosine distance of answer embeddings across independent stochastic denoising trajectories, capturing the temporal tug of war between parametric and contextual attractors. Requiring as few as two parallel inference runs, TVS is computationally lightweight. Across four diverse datasets (Synthetic, SciQ, PopQA, and CounterFact), a simple Logistic Regression classifier using TVS achieves $70.10\%$ accuracy and $0.7647$ AUROC on LLaDA. On Dream 7B, increasing the number of trajectories from two to five improves accuracy from $63.91\%$ to $69.62\%$. More complex sequential models provide only marginal improvements over the linear classifier. Evaluation across LLaDA and Dream 7B demonstrates that conflict-induced trajectory dynamics and their key properties transfer across distinct diffusion architectures.
1 Introduction
RAG conflicts in discrete diffusion models unfold across iterative denoising, where parametric and retrieved knowledge compete. The paper introduces TVS to measure semantic divergence across stochastic trajectories and reports that a simple linear classifier detects conflicts, with key dynamics transferring across LLaDA and Dream 7B.
1 Introduction
- In discrete diffusion models, contradictory retrieved context creates a conflict with facts learned during training that must be resolved between internal knowledge and external evidence.Source: §1 · p. 1
- Unlike autoregressive decoding, where friction is localized, diffusion distributes conflict resolution across the full denoising trajectory.Source: §1 · p. 1
- TVS builds on the view that contradictory memory sources create measurable instability, estimated through independent stochastic denoising runs and pairwise cosine distances at each timestep.Source: §1 · p. 1
- TVS measures mean pairwise cosine distance between sentence embeddings across parallel seeds at each denoising timestep, producing an interpretable trajectory feature without relying on logits.The paper describes the measure as capturing semantic divergence over the stochastic trajectory.Source: §1 · pp. 1–2
- A simple Logistic Regression classifier over flattened TVS vectors achieves competitive conflict-detection accuracy, matching recurrent architectures.Source: §1 · p. 2
- Across LLaDA and Dream 7B, three-phase temporal dynamics, linear-classifier sufficiency, and dataset difficulty ordering transfer, while seed sensitivity depends on architecture.Source: §1 · p. 2
2 Related Work
Prior conflict-detection methods largely target autoregressive decoding or diffusion-model internals, leaving RAG knowledge friction during iterative refinement underexplored. The paper positions TVS as an output-based trajectory measure that avoids dependence on hidden states or detailed attention patterns.
2.1 Hallucination and Conflict Detection in AR-LLMs
- Autoregressive hallucination and conflict methods use output confidence or latent states, but their left-to-right assumptions do not capture diffusion models’ multiple refinement steps.Source: §2.1 · p. 2
2.2 Discrete Diffusion Language Models
- Diffusion RAG work includes query-relevance-guided denoising and adaptive logit guidance, while mechanisms for detecting conflicts between parametric and external knowledge remain underexplored.Source: §2.2 · p. 2
2.3 Trajectory Analysis in Diffusion Models
- TraceDet analyzes hidden states throughout the trajectory, whereas TVS uses decoded text outputs from parallel runs and requires no architectural changes.Source: §2.3 · p. 2
- TDGNet relies on token-level attention patterns and is computationally expensive, while TVS operates in sentence-embedding space.Source: §2.3 · pp. 2–3
- OSCAR measures token-level entropy within a pass, while TVS tracks semantic divergence across runs over the denoising schedule as a complementary signal.Source: §2.3 · p. 3
- Existing trajectory-analysis methods do not address RAG-caused knowledge friction or show that its signal can be classified without complex sequential modeling.Source: §2.3 · p. 3
3 Background: Diffusion Language Models
Diffusion language models refine text through forward noising and reverse denoising over multiple steps. Under conflicting context, competing knowledge sources can destabilize the denoising trajectory, a phenomenon the paper calls Knowledge Friction.
3.1 Formal Formulation of Diffusion Language Models
- A diffusion response is refined through forward noising and backward denoising, unlike autoregressive next-token prediction.Source: §3.1 · p. 3
- The forward process gradually corrupts a sequence by replacing tokens with [MASK] states, using stepwise transition distributions over T steps.Source: §3.1 · p. 3
- In reverse denoising, a neural network predicts masked tokens simultaneously, then a discrete remasking strategy forms the next intermediate state.Source: §3.1 · p. 3
3.2 Knowledge Friction in the Denoising Trajectory
- Under clean context, the trajectory converges toward one semantic attractor; conflicting parametric knowledge and injected context instead create sustained instability called Knowledge Friction.Source: §3.2 · p. 3
- With contradictory answers, the trajectory can oscillate between competing responses before crystallizing, spreading friction across the schedule rather than one token emission.Source: §3.2 · p. 3
4 Methodology: Trajectory Variance Score
The method filters for facts the model already knows, measures answer-semantic divergence across stochastic denoising runs over time, and uses the resulting TVS vector for conflict classification.
4 Methodology: Trajectory Variance Score
- The pipeline computes temporal semantic divergence across independent denoising runs to detect knowledge friction.In the absence of friction, runs converge on similar semantic structures; under conflict, trajectories diverge before crystallizing.Source: §4 · p. 3, §4.2 · p. 4
4.1 Parametric Memory Filtering and Trajectory Generation
- Only facts answered correctly by the base model in at least 4 of 5 seeds are retained, helping isolate friction associated with injected RAG context.The filter leaves 2,947 facts for LLaDA, yielding 5,894 balanced clean-or-conflicting sample pairs.Source: §4.1 · p. 3
- For each retained fact, 2–5 stochastic runs produce answer-entity embeddings at each of 50 timesteps.Entity extraction uses fuzzy matching, followed by the frozen all-mpnet-base-v2 sentence encoder.Source: §4.1 · p. 4
4.2 TVS Formulation
- TVS measures mean pairwise cosine distance among seed embeddings at each timestep, yielding a 50-value vector that tracks semantic divergence over denoising.The embedding-space measure is interpretable and independent of the model’s internal logits.Source: §4.2 · p. 4
4.3 Classification using Logistic Regression
- A Logistic Regression classifier uses the flattened TVS trajectory vector to detect conflict, with the signal distributed across the dispersion curve.The linear model is described as achieving competitive accuracy.Source: §4.3 · p. 4
5 Visualizing the Tug of War
TVS visualizations show sustained semantic divergence during conflicting denoising, with a similar but narrower separation on Dream 7B; the mid-trajectory contains diagnostic signal beyond the final output.
5 Visualizing the Tug of War
- On LLaDA, conflict TVS remains elevated through the early and mid trajectory, and a residual gap persists after both curves collapse.Figure 2 describes a mid-step gap of about 0.15 and a residual gap of about 0.07.Source: §5 · p. 4, Figure 2 · p. 5
- Dream 7B shows the same three-phase trajectory pattern as LLaDA, but with a narrower clean–conflict gap.The narrower separation is associated with Dream’s smoother entropy-based remasking dynamics.Source: §5 · pp. 4–5, Figure 3 · p. 5
5.1 The Value of the Temporal Trajectory
- 60.14% ± 0.57% accuracy using only TVS50 is about 10 percentage points below the full TVS vector’s 70.10%.The comparison supports the value of intermediate denoising dynamics over evaluating only the final crystallized output.Source: §5.1 · p. 5
6 Experimental Setup
The evaluation tests TVS on LLaDA and Dream across four factual datasets, retaining only cases where each model demonstrates parametric recall and applying a shared evaluation pipeline.
6.1 Models and Datasets
- The study evaluates LLaDA-8B-Instruct and Dream-v0-Instruct-7B, which use low-confidence and entropy-based remasking, respectively.The two models allow evaluation across distinct denoising strategies.Source: §6.1 · p. 5
- The testbed includes Synthetic, SciQ, PopQA, and CounterFact, with facts retained only when the base model answers correctly in at least 4 of 5 seeds.After filtering, 2,947 facts remained for LLaDA and 2,370 for Dream; the resulting paired samples were pooled by model.Source: §6.1 · pp. 5–6
6.2 Implementation Details
- Both models use 2–5 seeds across 50 timesteps, frozen all-mpnet-base-v2 embeddings, and Logistic Regression on flattened TVS vectors.Results are means and standard deviations over five independent train/test random splits.Source: §6.2 · p. 6
7 Results
TVS-based Logistic Regression detects conflict on both diffusion models, while dataset difficulty patterns and conflict-associated semantic flips recur across architectures with different remasking strategies.
7.2 Dynamics Specific to Datasets
- Both models perform best on Synthetic and worst on CounterFact, preserving the same dataset difficulty ordering across architectures.The authors suggest templated Synthetic conflicts produce a cleaner signal, while extreme CounterFact contradictions can collapse divergence early.Source: §7.2 · p. 6, Table 3 · p. 7
7.1 Overall Detection Performance
- LLaDA TVS-LR achieves 70.10%±1.27% accuracy, while Dream 7B achieves 63.29% ± 1.21%, showing transfer with reduced performance on Dream.The reported TraceDet comparison is an unverified best-effort replication.Source: Table 1 · p. 6, §7.1 · p. 6
7.3 Architectural Dynamics: Entropy vs. Confidence
- Under conflict, LLaDA averages 22.46 semantic flips (±0.42 SEM), compared with 3.71 (±0.30 SEM) for Dream.The authors associate LLaDA’s argmax-based remasking with greater oscillation, while Dream’s entropy-based remasking delays commitment.Source: §7.3 · pp. 6–7
- Conflict increases semantic flips by +4.62 for LLaDA and +1.05 for Dream, with statistically significant elevation in both architectures.The authors interpret this as evidence of conflict-associated trajectory dynamics across architectures.Source: Table 4 · p. 7, §7.3 · p. 7
8 Ablation Studies
The ablations find little benefit from recurrent modeling, while the useful number of denoising seeds depends on the diffusion architecture. Two runs suffice for LLaDA, whereas Dream benefits from five.
8.1 Architecture Comparison: Is Sequential Modeling Required?
- The LR–Bidirectional LSTM gap is 0.88% on LLaDA and 1.27% on Dream, with substantially overlapping confidence intervals.The comparison covers five random splits.Source: Table 5 · p. 7, §8.1 · p. 7
- Shuffling the 50 timestep features left LSTM accuracy at ∼70.6%, indicating neither it nor Logistic Regression exploited sequence order.Logistic Regression is invariant to feature permutation; the LSTM also showed no accuracy drop.Source: §8.1 · p. 7
8.2 Seed Count Ablation: How Many Runs Are Needed?
- LLaDA accuracy changed only +0.47% from N = 2 to N = 5, while Dream accuracy rose from 63.91% to 69.62% (+5.71%).The seed-count comparison uses the Logistic Regression classifier over five random splits.Source: Table 6 · p. 7, §8.2 · p. 7
- With N = 2, TVS uses one pairwise comparison; N = 5 yields 10 comparisons, improving estimate robustness and amplifying Dream’s conflict signal.Dream’s entropy-based remasking produces smoother trajectories with less variance per run.Source: §8.2 · pp. 7–8
9 Conclusion
The conclusion presents TVS as an interpretable way to detect RAG knowledge conflicts in discrete diffusion models. Its trajectory signal and linear-classifier sufficiency transfer across LLaDA and Dream 7B, while seed needs vary by architecture.
9 Conclusion
- TVS measures mean pairwise cosine distance across N = 2 stochastic denoising trajectories at each timestep, yielding a feature vector for the trajectory.The TVS curve visualizes a three-phase temporal tug of war between parametric and contextual attractors.Source: §9 · p. 8
- A Logistic Regression classifier over the TVS vector achieves competitive detection accuracy, suggesting complex sequential modeling is unnecessary.The conclusion reports generalization of the signal, three-phase dynamics, and linear-classifier sufficiency across LLaDA and Dream 7B.Source: §9 · p. 8
- Dream benefits substantially from N > 2, whereas LLaDA does not; the conclusion recommends calibrating seed count per architecture.TVS is described as computationally lightweight and interpretable with as few as two parallel inference runs.Source: §9 · p. 8
10 Limitations
The limitations are inference overhead, possible answer-extraction errors, reliance on a five-run parametric-memory filter, and uncertain generalization beyond the two evaluated architectures.
10 Limitations
- TVS requires multiple parallel denoising runs, and its parametric-memory filter requires N = 5 generation runs at evaluation time.The authors identify lighter filtering strategies as future work to reduce this overhead.Source: §10 · p. 8
- Fuzzy matching may fail on complex paraphrases, leaving a small but unquantified answer-extraction failure rate.The method uses this heuristic to isolate answer entities.Source: §10 · p. 8
- Generality has been demonstrated across LLaDA and Dream 7B, but transfer to substantially different diffusion architectures or training regimes remains open.At N = 2, Dream 7B achieves ∼63% accuracy versus LLaDA’s ∼70%; smoother dynamics may require more runs.Source: §10 · p. 8
11 Future Work
Future work targets lighter parametric-memory filtering, broader tests of TVS’s generality, and active mitigation; the ethics statement frames TVS as a complement to fact checking, not a standalone safeguard.
11 Future Work
- Future directions include lighter filtering, testing substantially different diffusion architectures, and integrating TVS into active mitigation frameworks.Proposed monitoring could dynamically halt generation or adjust context weight when knowledge friction is detected.Source: §11 · p. 8
Ethics Statement
- TVS is intended to complement, not replace, standard fact-checking pipelines as a diagnostic for knowledge conflicts.The ethics statement cautions against treating it as a standalone safeguard.Source: Ethics Statement · p. 8