The Temporal Tug-of-War: Visualizing and Detecting RAG Conflicts in Diffusion Models via Trajectory Variance
Authors: Sravan Karthick T, Pranav Darshan, Pranav A, Minal Moharir, Ivan P. Yamshchikov
Organizations: Department of Computer Science and Engineering, R.V. College of Engineering, India · CAIRO, Technical University of Applied Sciences Würzburg-Schweinfurt, Germany
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.
Figures & tables
Figure 1: Complete evaluation pipeline: facts undergo parametric memory filtering, conflict contexts are injected, N=2 independent denoising trajectories are executed, the mean pairwise cosine distance (TVS) is computed at each of T=50 timesteps to produce a feature vector, and the resulting vector is classified by a Logistic Regression detector.
Figure 2: Average TVS across the 50 step denoising trajectory for LLaDA (Clean: blue solid; RAG Conflict: red dashed; shaded = SEM). Three phases are visible: Zone 1 ( t∈[0,15] ): Early Exploration—both conditions exhibit high dispersion. Zone 2 ( t∈[15,28] ): Mid Step Friction—the clean curve decays while the conflict curve remains elevated (gap ≈0.15 ). Zone 3 ( t∈[28,50] ): Delayed Crystallization—both curves collapse, but a residual gap persists ( Δ≈0.07 ).
Figure 3: Average TVS across the 50 step denoising trajectory for Dream 7B ( N=2 seeds; Clean: blue solid; RAG Conflict: red dashed; shaded = SEM). The same three phase structure is observed, but with a narrower clean versus conflict gap, consistent with Dream’s smoother remasking dynamics based on entropy.
Figure 4: Detailed TVS dynamics for LLaDA with ± std shading ( N=2 seeds). The conflict curve (red) starts at ≈0.51 versus clean (green) at ≈0.39 , maintaining a consistent gap through t≈28 before both converge—with conflict retaining a higher residual dispersion ( ≈0.07 versus ≈0.01 ).
Method
LLaDA Acc (%)
LLaDA AUROC
Dream Acc (%)
Dream AUROC
TraceDet*
71.34±0.66
0.7865±0.0078
64.56±0.56
0.6876±0.0056
TVS-LR (Ours)
70.10±1.27
0.7647±0.0125
63.29±1.21
0.6697±0.0071
Table 1: Overall conflict detection performance (mean ± std over 5 random splits). TVS achieves competitive accuracy on both models. The ∼ 7% gap on Dream likely reflects its smoother remasking dynamics based on entropy. *TraceDet codebase is not publicly available; we benchmark against an unverified best effort replication for context.
Metric
LLaDA (%)
Dream (%)
Precision
71.55±1.97
65.19±1.05
Recall
66.86±0.91
56.95±2.80
F1-Score
69.11±0.90
60.77±1.89
Table 2: Classification metrics for Logistic Regression (mean ± std over 5 random splits). Dream’s lower recall ( 56.95% ) indicates that its smoother trajectories make conflict samples harder to distinguish from clean ones.
Model
Synth.
SciQ
PopQA
CounterFact
LLaDA
76.92±5.11
73.74±1.53
70.34±2.41
61.54±4.20
Dream
64.17±5.12
65.71±1.82
58.76±4.37
54.69±3.50
Table 3: Detection accuracy (%) by domain (LR classifier, mean ± std over 5 splits). The ordering of difficulty across datasets (Synth. > SciQ > PopQA > CounterFact) is preserved across both architectures.
Model
Clean Context
RAG Conflict
Δ (Elevation)
LLaDA 8B
17.84
22.46±0.42
+4.62
Dream 7B
2.66
3.71±0.30
+1.05
Table 4: Entity Flip Rate across architectures under clean and conflicting RAG contexts. Both models exhibit a statistically significant elevation in semantic flips when subjected to a conflict. LLaDA’s confidence-based remasking results in significantly higher baseline volatility and conflict oscillation compared to Dream’s smoother entropy-based approach.
Classifier
LLaDA Acc (%)
LLaDA AUROC
Dream Acc (%)
Dream AUROC
Logistic Regression
71.05±0.72
0.7701±0.0098
63.40±1.30
0.6972±0.0072
LSTM (Unidirectional)
71.75±0.54
0.7895±0.0061
62.87±1.14
0.6713±0.0069
Bidirectional LSTM + Attention
71.93±0.71
0.7906±0.0062
64.67±0.70
0.6977±0.0069
Table 5: Architecture comparison over 5 random splits. On both models, all confidence intervals overlap substantially. The gap between LR and the Bidirectional LSTM is 0.88% on LLaDA and 1.27% on Dream, confirming that sequential modeling adds negligible benefit across architectures.
N Seeds
LLaDA Acc (%)
LLaDA AUROC
Dream Acc (%)
Dream AUROC
2
70.76±0.62
0.7725±0.0082
63.91±1.17
0.6893±0.0119
3
71.75±1.06
0.7806±0.0084
67.12±0.95
0.7261±0.0131
5
71.23±1.00
0.7851±0.0074
69.62±0.51
0.7589±0.0134
Table 6: Effect of seed count on detection performance (LR classifier, 5 random splits). LLaDA’s accuracy is stable across seed counts ( Δ=+0.47% ), while Dream benefits substantially from additional seeds ( Δ=+5.71% ), suggesting the optimal seed count is dependent on architecture.
School of Computer and Artificial Intelligence, Zhengzhou University, Zhengzhou, China · College of Environment and Ecology, Taiyuan University of Technology, Taiyuan, China · Zhejiang University, Hangzhou, China
School of Computer Science and Engineering, University of Electronic Science and Technology of China · Institute of Information Engineering, Chinese Academy of Sciences