Paper deep dive
Amortised Post-Hoc Explanation with Exact Preservation for Dynamic Graph Anomaly Detectors
Iyad Assaad Nekka, Hamida Seba, Walid Khaled Hidouci, Karima Amrouche
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 91%
Last extracted: 8/22/2026, 2:28:49 AM
Summary
This paper introduces X-StrGNN, a post-hoc explanation layer for the StrGNN dynamic graph anomaly detector. X-StrGNN provides dual structural and temporal attributions for flagged edges while preserving detection performance to machine precision (Delta AUC = 0.0000). It uses an amortised parameterisation approach, achieving high stability (0.913) and low latency (0.66 ms per edge), significantly outperforming per-instance optimisation in cost and stability. The study also identifies defects in the original StrGNN implementation and compares four attribution strategies.
Entities (15)
Relation Signals (8)
X-StrGNN → extends → StrGNN
confidence 98% · We present X-StrGNN, a post-hoc explanation layer that wraps a trained, frozen StrGNN
X-StrGNN → evaluatedon → UCI-Messages
confidence 95% · We evaluate on UCI-Messages, the canonical DGAD benchmark
StrGNN → lacks → Explanation
confidence 95% · StrGNN... produces no explanation: when an edge is flagged, the analyst receives only a score.
X-StrGNN → preserves → Detection Performance
confidence 95% · detection is preserved to machine precision, verified rather than asserted (Delta AUC = 0.0000)
X-StrGNN → provides → Temporal Attribution
confidence 95% · emits, for every flagged edge, dual attributions: a structural attribution... and a temporal attribution
X-StrGNN → provides → Structural Attribution
confidence 95% · emits, for every flagged edge, dual attributions: a structural attribution... and a temporal attribution
X-StrGNN → outperforms → Per-instance mask optimisation
confidence 90% · X-StrGNN attains the highest stability (0.913) at 268x lower cost than per-instance optimisation
PGExplainer → inspires → X-StrGNN
confidence 85% · Following the parameterisation principle of PGExplainer, a single network shared across all instances predicts mask logits
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Anomaly detection in dynamic graphs underpins financial fraud analysis, intrusion detection, and platform integrity, where automated decisions require human-interpretable justifications. StrGNN, the strongest performer in recent benchmarks, produces no explanation: when an edge is flagged, the analyst receives only a score. Explanation metrics are undefined for StrGNN because no attribution vector exists. This paper closes that gap. We present X-StrGNN, a post-hoc explanation layer that wraps a trained, frozen StrGNN and emits, for every flagged edge, dual attributions: a structural attribution identifying which contextual interactions in the enclosing subgraph drove the decision, and a temporal attribution identifying which historical snapshot carried the signal. Both attributions are multiplicative masks identically one in the unexplained pass, so the layer is an exact pass-through: detection is preserved to machine precision, verified rather than asserted (Delta AUC = 0.0000, Delta AP = 0.0000, Delta P@100 = 0.0000). Attribution costs 0.66 ms per edge, making explanation of an entire alarm list feasible. We conduct the first controlled design study of attribution strategies for this architecture, comparing gradient attribution, per-instance mask optimisation, and amortised parameterisation under one protocol, one budget, and three seeds. X-StrGNN attains the highest stability (0.913) at 268x lower cost than per-instance optimisation, and its temporal attribution (1.601 against a measured random floor of 0.973) is separably better than its ablated control, while per-instance optimisation - the most expensive strategy - falls below that floor. Code, protocol, and per-seed measurements are released.
Tags
Links
- Source: https://arxiv.org/abs/2608.15559v1
- Canonical: https://arxiv.org/abs/2608.15559v1
Trouble viewing inline? Open PDF directly →
Full Text
33,293 characters extracted from source content.
Expand or collapse full text
Amortised Post-Hoc Explanation with Exact Preservation for Dynamic Graph Anomaly Detectors Iyad Assaad Nekka, Hamida Seba, Khaled-Walid Hidouci, Karima Amrouche Affiliation: LCSI Laboratory, National higher School of Computer Science (ESI), Algiers, Algeria Affiliation: Université Claude Bernard Lyon, Lyon, France Affiliation: i_nekka, w_hidouci, k_amrouche@esi.dz, hamida.seba@univ-lyon1.fr Abstract Anomaly detection in dynamic graphs underpins high-stakes applications in financial fraud analysis, intrusion detection, and online platform integrity, where accountability frameworks increasingly require that automated decisions be accompanied by human-interpretable justifications. StrGNN, the strongest performer in recent unified benchmarks of the field, delivers this detection quality while producing no explanation whatsoever: when an edge is flagged, the analyst receives a score and nothing more. Explanation quality metrics are not low for StrGNN — they are undefined, because no attribution vector exists to evaluate. This paper closes that gap. We present X-StrGNN, a post-hoc explanation layer that wraps a trained, frozen StrGNN and emits, for every flagged edge, two complementary attributions: a structural attribution over the enclosing-subgraph evidence identifying which contextual interactions drove the decision, and a temporal attribution over the observation window identifying which historical snapshot carried the signal. Because both attributions are realised as multiplicative masks that are identically one in the unexplained pass, the layer is an exact pass-through: detection is preserved to machine precision, which we verify rather than assert (Δ =0.0000=0.0000, Δ =0.0000=0.0000, Δ @100 =0.0000=0.0000). Attribution costs 0.660.66 ms per flagged edge, making explanation of an entire alarm list feasible rather than a hand-selected handful. We further conduct the first controlled design study of attribution strategies for this architecture, comparing gradient attribution, per-instance mask optimisation, and amortised parameterisation under one protocol, one budget, and three seeds. X-StrGNN attains the highest attribution stability in the study (0.9130.913) at 268×268× lower cost than per-instance optimisation, and its temporal attribution (1.6011.601 against a measured random floor of 0.9730.973) is separably better than its own ablated control, while per-instance optimisation — the most expensive strategy evaluated — falls below that floor. Code, protocol, and per-seed measurements are released. Index Terms: dynamic graphs, anomaly detection, explainable AI, graph neural networks, post-hoc interpretability, temporal attribution, reproducibility I Introduction Real-world networks evolve. Financial transaction graphs, enterprise network traffic, online trust communities, and social platforms change continuously as interactions appear and disappear. Detecting anomalous behaviour in these evolving structures — fraudulent transfers, lateral movement in a compromised network, coordinated inauthentic activity — is both practically urgent and technically demanding [1]. Deep learning has transformed detection quality. NetWalk [5], AddGraph [6], StrGNN [3] and TADDY [4] exploit graph neural networks and attention to capture structural and temporal dependencies jointly. Among these, StrGNN occupies a distinctive position: it scores a candidate edge by extracting an h-hop enclosing subgraph in each of w consecutive snapshots, encoding each with a graph convolutional stack and SortPooling [14], and passing the resulting sequence through a gated recurrent unit. In recent unified benchmarking of the subfield it leads the canonical injected benchmark. There is, however, something StrGNN cannot do: explain itself. When edge (u,v)(u,v) is flagged at snapshot t, the detector emits a scalar. It does not indicate which contextual interactions in the enclosing subgraph constituted the evidence, nor whether the anomaly crystallised at the current snapshot or had been accumulating across the observation window. In fraud compliance, an analyst cannot act on an alert they cannot interrogate. In regulated environments, a score without a justification is operationally insufficient. This is not a shortcoming peculiar to StrGNN; it is the default condition of essentially every deep dynamic-graph anomaly detector catalogued in the literature [1], and post-hoc explainability for this setting has only recently begun to emerge [2]. This paper closes the gap for StrGNN. The contribution is not an incremental fidelity improvement over an existing explainer for this architecture, because no such explainer exists. Explanation quality metrics are not low for StrGNN; they are undefined, since there is no attribution vector to evaluate. Our framework supplies two, and does so at exactly zero cost to detection. Contributions. 1. The first post-hoc explanation layer for StrGNN, producing dual structural and temporal attribution for every flagged edge over a frozen detector, with detection preserved to machine precision (Δ =0.0000=0.0000). 2. An amortised spatio-temporal parameterisation in which one shared network emits both a structural mask over enclosing-subgraph messages and a gate over the observation window, trained under separate counterfactual objectives, and delivering attribution in 0.660.66 ms per edge — 268×268× faster than per-instance optimisation. 3. The first controlled design study of attribution strategies for this architecture, comparing four strategies against a measured random floor under one protocol, one budget, and three seeds, yielding deployment-driven guidance. 4. A documented audit of the released StrGNN implementation, reporting five defects that change published numbers, including a tensor-axis error under which recurrent step t does not correspond to snapshot t — which invalidates any temporal attribution computed without the correction. I Related Work I-A Anomaly Detection in Dynamic Graphs Early approaches relied on sketches and handcrafted structural signatures, flagging statistical outliers in edge streams at high throughput. Deep methods raised detection quality substantially: NetWalk [5] combined random-walk embeddings with a reservoir; AddGraph [6] paired a GCN with an attention-augmented GRU; StrGNN [3] introduced enclosing-subgraph extraction with double-radius node labelling [15]; TADDY [4] unified structural and temporal signal in a single Transformer encoder; SLADE [7] achieved constant per-edge cost in the streaming setting. None addresses the interpretation of its own predictions. I-B Post-Hoc Explanation for Graph Neural Networks GNNExplainer [8] optimises a soft edge mask per instance so that the retained subgraph reproduces the prediction. PGExplainer [9] amortises that optimisation into a network shared across instances, replacing per-instance search with a single forward pass and rendering explanation inductive. Gradient attribution requires no training and remains a standard reference point [10]. All were designed for static graphs, and none possesses an axis on which to express when a decision was made — precisely the degree of freedom a windowed detector introduces. I-C Explanation for Temporal Models TGNNExplainer [11] searches over explanatory events for continuous-time temporal GNNs, and TempME [12] identifies temporal motifs; both target continuous-time event streams rather than the discrete-snapshot window StrGNN consumes. Han et al. [13] address dynamic heterogeneous graphs through relation-evolution patterns, a complementary setting with a different input model. To our knowledge no prior work supplies attribution for the enclosing-subgraph-plus-recurrence architecture, which is the gap this paper fills. I Preliminaries Definition 1 (Dynamic graph). A dynamic graph is a sequence =G1,…,GTG=\G_1,…,G_T\ where each Gt=(V,Et)G_t=(V,E_t) shares a node set V with a time-varying edge set EtE_t. Definition 2 (Edge-level anomaly detection). A scorer f:(e,t)↦[0,1]f:(e,t) [0,1] assigns each candidate edge e=(u,v)e=(u,v) at snapshot t a score; edges exceeding a threshold are flagged. I-A StrGNN StrGNN [3] decomposes into three stages. Enclosing subgraph generation extracts, for target edge (u,v)(u,v) at snapshot t, the h-hop enclosing subgraph in each of the snapshots t−w+1,…,t-w+1,…,t, and assigns double-radius node labels [15] encoding each node’s role relative to u and v. The target link is removed from its own subgraph, so the evidence is strictly contextual. Structural feature extraction applies a graph convolutional stack [16] and SortPooling to yield a fixed-size snapshot representation sts_t. Temporal detection passes the length-w sequence (st−w+1,…,st)(s_t-w+1,…,s_t) through a GRU and a classifier. Two properties govern what an explanation of StrGNN must be. The evidence is a set of contextual interactions rather than the target edge itself; and the decision is a function of a sequence, so any faithful explanation carries a temporal degree of freedom that static attribution cannot express. IV The X-StrGNN Framework frozen StrGNN — weights untouchedESGww subgraphsGCN++ SortPoolGRUMLPy ystructural mem_etemporal gtg_tsharedexplainer Fig. 1: X-StrGNN. The detector (grey) is frozen; a shared explainer network (blue) emits a structural mask over enclosing-subgraph messages and a gate over the w recurrent inputs, conditioned on the detector’s own internal representations. Both masks are multiplicative and identically one in the unexplained pass, so the composition reduces exactly to StrGNN. IV-A Design Principles P1: Post-hoc, zero modification. The framework wraps a trained, frozen detector. Weights, training procedure, and inference path are untouched, so detection quality is preserved by construction rather than by empirical verification — though we verify it regardless (Table I). P2: Dual decomposition. A single attribution vector over edges is insufficient for a windowed detector. X-StrGNN (Fig. 1) decomposes along two orthogonal axes: structural (which contextual interactions?) and temporal (which snapshot?). The two questions are distinct, and an analyst needs both. P3: Amortisation. Explanation must be cheap enough to apply to an entire alarm list. A shared network delivers attribution in one forward pass (Algorithm 1) and is inductive: edges unseen at explainer-training time are explained without re-optimisation. IV-B Masked Forward Pass Let fϕf_φ be the frozen detector and G the window of enclosing subgraphs. We introduce me∈[0,1]m_e∈[0,1] on the message carried by each undirected enclosing-subgraph edge and gt∈[0,1]g_t∈[0,1] on each of the w recurrent inputs. The masked message aggregation at layer ℓ is hi(ℓ)=tanh(−1W(ℓ)(hi(ℓ−1)+∑j∈(i)mijhj(ℓ−1))),h^( )_i= \! (D^-1W^( ) (h^( -1)_i+ _j (i)m_ij\,h^( -1)_j ) ), (1) and the recurrent input at step t becomes gt⋅stg_t· s_t. Degree normalisation D is computed on the unmasked graph, which is what makes the following identity exact. Proposition 1 (Exact pass-through). fϕ(∣m≡1,g≡1)=fϕ()f_φ(G m\!≡\!1,\,g\!≡\!1)=f_φ(G) identically. This is a structural guarantee rather than an empirical near-miss: both masks enter multiplicatively and normalisation is mask-independent, so the unexplained pass reduces term-by-term to the original computation. IV-C Amortised Parameterisation Following the parameterisation principle of PGExplainer [9], a single network ψ shared across all instances predicts mask logits from the detector’s own representations. For an edge (i,j)(i,j) in the subgraph of snapshot t with target endpoints (u,v)(u,v), ωij=Btanh(MLPψe([zi‖zj‖zu‖zv‖ρe(t)])/B), _ij=B \! (MLP^e_ψ([\,z_i\|z_j\|z_u\|z_v\| _e(t)\,])/B ), (2) where z are the concatenated graph-convolutional representations, ρe _e a learned positional embedding, and B a bound preventing the relaxation from saturating to a constant. Masks are sampled through the binary concrete relaxation [17, 18], m=σ((ω+logu−log(1−u))/τ)m=σ((ω+ u- (1-u))/τ) with u∼(0,1)u (0,1) and τ annealed from 5.05.0 to 0.50.5. A second head produces temporal logits from the snapshot representations and their window context, using a separate positional embedding ρτ _τ; the two heads share no parameters, a choice examined in Section V-E. IV-D Objective Writing y^=argmaxfϕ() y= f_φ(G) for the detector’s own prediction, ℒ= =\; NLL(fϕ(∣m),y^)+λs[κ−NLL(fϕ(∣1−m),y^)]+ (f_φ(G m), y )\;+\; _s [κ-NLL (f_φ(G 1-m), y ) ]_+ +λτ[κ−NLL(fϕ(∣gabl),y^)]++ℛ. +\; _τ [κ-NLL (f_φ(G g^abl), y ) ]_+\;+\;R. (3) The first term enforces sufficiency: the retained evidence alone reproduces the decision. The second and third enforce necessity on each axis separately: discarding the structural explanation, or ablating the nominated snapshot, must destroy the decision. ℛR collects a density term, a mask entropy term, and a temporal smoothness term so the gate reads as an evolution rather than isolated spikes. The temporal ablation is constructed to induce competition among snapshots: a=softmax(ωτ/τ),gtabl=1−at/maxt′at′,a=softmax(ω^τ/τ), g^abl_t=1-a_t/ _t a_t , (4) whose weights sum to one, so raising one snapshot necessarily lowers the others. Normalising by the maximum reproduces the evaluation probe exactly, which zeroes the nominated snapshot and leaves the remainder at unity. Algorithm 1 X-StrGNN attribution for a flagged edge 0: Frozen StrGNN fϕf_φ; trained explainer ψ; edge e∗e^* at t∗t^*; budget p 0: ϕstruct φ_struct, ϕtemp∈ℝw φ_temp ^w 1: ←G← enclosing subgraphs of e∗e^* over t∗−w+1,…,t∗t^*\!-\!w\!+\!1,…,t^* 2: (Z,s1:w)←fϕ()(Z,s_1:w)← f_φ(G) internal representations, one forward pass 3: ϕstruct←σ(MLPψe(Z)) φ_struct←σ(MLP^e_ψ(Z)) per-edge attribution 4: ϕtemp←σ(MLPψτ(s1:w)) φ_temp←σ(MLP^τ_ψ(s_1:w)) per-snapshot attribution 5: return top-p structural evidence and argmaxtϕtemp _t φ_temp IV-E Explanation Quality Metrics Every metric below presupposes an attribution vector. StrGNN without an explainer produces none, so all are undefined for it — not zero, not low, but undefined. Raw fidelity is a probability difference and therefore scales with how confident a given detector happens to be, which makes it incomparable across detectors and even across checkpoints. We normalise by the ablation range Δmax _ , the largest drop the detector can express, measured by masking all evidence: Fid+=[p0−p∖S]Δmax,Fid−=[p0−pS]Δmax,Fid^+= E[p_0-p_ S] _ , ^-= E[p_0-p_S] _ , (5) where p0p_0 is the probability of the detector’s own prediction, pSp_S that obtained retaining only the explanation, and p∖Sp_ S that obtained removing it. Characterisation is the harmonic mean Char=2Fid+(1−Fid−)/(Fid++1−Fid−)Char=2Fid^+(1-Fid^-)/(Fid^++1-Fid^-). Temporal fidelity is the drop induced by ablating the nominated snapshot divided by that induced by ablating a uniformly chosen one, so that 11 is the random floor — and we measure that floor rather than assuming it. Stability is the mean Spearman correlation of per-subgraph attribution rankings under a small input perturbation. Sparsity is 1−p1-p. V Experiments V-A Setup We evaluate on UCI-Messages [20], the canonical DGAD benchmark: 1,8991,899 nodes and 59,83559,835 timestamped interactions over 5959 snapshots of 1,0001,000 interactions. Training uses the first half of the stream with context-dependent negative sampling as specified by StrGNN; the test partition receives 10%10\% uniformly injected anomalies following the protocol established by NetWalk [5], giving 6,2406,240 training and 1,6531,653 test targets at a test anomaly rate of 0.1050.105. We set w=5w=5, h=1h=1, SortPooling k=22k=22, and cap enclosing subgraphs at 2020 nodes per hop. The explainer uses budget p=20%p=20\%, λs=1 _s=1, λτ=3 _τ=3, κ=2κ=2, and trains for 3030 epochs with Adam at 3×10−33× 10^-3, the detector frozen throughout. Executing the released StrGNN artefact under a single protocol surfaced five defects that change reported numbers (Table I); all are patched before any measurement here. P4 deserves emphasis: the tensor entering the recurrent module is channel-major, and the released code applies a reshape rather than a transpose, interleaving channels into the time axis. Any temporal attribution computed without this correction is measured against a scrambled axis. TABLE I: Defects found in the released StrGNN implementation, all patched before measurement. P4 is load-bearing for any temporal claim. ID Defect P1 Evaluation reports AP and F1 on the normal class P2 Target link retained in its own enclosing subgraph (leakage) P3 Training and test use different temporal windows P4 GRU input reshaped, not transposed: step t≠t≠ snapshot t P5 Device handling hardcoded to CUDA V-B Detection Is Preserved Exactly TABLE I: Detection parity. The explanation layer is inactive at m=g=1m\!=\!g\!=\!1, so detection is unchanged; the residual on raw scores is float32 epsilon. Metric StrGNN X-StrGNN Δ AUC-ROC 0.8749834853 0.8749834853 0.0000 AP 0.5163393989 0.5163393989 0.0000 P@100 0.6600000000 0.6600000000 0.0000 max |Δs|| s| over all test edges 1.19e−071.19e-07 Table I confirms Proposition 1 numerically: every detection metric is bit-identical and the largest per-edge deviation is float32 epsilon arising in the exponential. Explainability is obtained at exactly zero detection cost, and every subsequent measurement explains the same model the detection column describes. V-C Explainability Introduced Table I is the central result. Before this work no attribution exists for StrGNN and every explanation metric is undefined. TABLE I: Capabilities introduced. n/a denotes undefined: no attribution vector exists for StrGNN, so evaluation is not possible. Mean over three seeds; Fid+Fid^+/Fid−Fid^- normalised by the detector ablation range (0.3260.326). Capability / Metric StrGNN X-StrGNN Status Structural attribution n/a ✓ Introduced Temporal attribution n/a ✓ Introduced Fidelity Fid+Fid^+ n/a 0.317 Introduced Characterisation n/a 0.286 Introduced Temporal fidelity n/a 1.601 Introduced Attribution stability n/a 0.913 Introduced Sparsity n/a 0.787 Introduced Attribution vectors per edge 0 2 Introduced Detection AUC-ROC 0.8750 0.8750 Preserved Cost per explanation — 0.66 ms — The temporal fidelity of 1.6011.601 is read against a measured random floor of 0.9730.973: the snapshot X-StrGNN nominates carries roughly 1.6×1.6× the decision weight of an arbitrary one. Attribution costs 0.660.66 ms, so explaining the full 1,6531,653-edge test partition takes approximately one second — the regime in which explanation becomes an operational tool rather than a case-study device. V-D Design Study: Which Attribution Strategy Suits StrGNN? No attribution strategy previously existed for this architecture, so we implement four and compare them under one protocol, one budget, and three seeds (Table IV). All four are contributions of this work; the comparison is a design study, not a leaderboard against prior art. TABLE IV: Design study: attribution strategies for StrGNN, all introduced in this work. UCI-Messages, three seeds (mean ± sd), frozen detector, 20%20\% budget. Fid+Fid^+/Fid−Fid^- normalised by the ablation range (0.3260.326); temporal fidelity of 11 is the measured random floor. Best per column in bold. Attribution strategy Fid+↑Fid^+ Fid−↓Fid^- Char↑Char Temporal↑ Stability↑ ms/expl↓ Random (measured floor) ±0.0030.228\!±\!0.003 ±0.0020.820\!±\!0.002 ±0.0010.201\!±\!0.001 ±0.0500.973\!±\!0.050 ±0.0040.002\!±\!0.004 0.000.00 Gradient × input ±0.0010.336\!±\!0.001 ±0.0000.656\!±\!0.000 ±0.0000.340\!±\!0.000 ±0.0341.842\!±\!0.034 ±0.0020.405\!±\!0.002 ±0.121.79\!±\!0.12 Per-instance mask optimisation ±0.0010.337\!±\!0.001 ±0.0020.556\!±\!0.002 ±0.0000.383\!±\!0.000 ±0.0320.836\!±\!0.032 ±0.0020.538\!±\!0.002 ±2.15177.97\!±\!2.15 Amortised, sufficiency only (ablation) ±0.0050.221\!±\!0.005 ±0.0260.800\!±\!0.026 ±0.0160.209\!±\!0.016 ±0.4271.081\!±\!0.427 ±0.0050.863\!±\!0.005 ±0.020.63\!±\!0.02 X-StrGNN (full objective) ±0.0680.317\!±\!0.068 ±0.0840.739\!±\!0.084 ±0.0780.286\!±\!0.078 ±0.3641.601\!±\!0.364 ±0.0100.913\!±\!0.010 ±0.020.66\!±\!0.02 Three findings follow, each with a deployment consequence. (i) Amortisation dominates on stability and cost. X-StrGNN attains attribution stability 0.913±0.0100.913± 0.010 against 0.5380.538 for per-instance optimisation, at 268×268× lower cost. Stability matters operationally: an explanation that reorders under an imperceptible input perturbation cannot ground an analyst decision, and per-instance optimisation — which re-solves an independent non-convex problem for every edge — is intrinsically more exposed to this than a shared network trained once. (i) Per-instance optimisation retains a fidelity edge. It attains characterisation 0.3830.383 against X-StrGNN’s 0.2860.286. Where a small number of adjudicated cases must be explained as faithfully as possible and latency is irrelevant, per-instance optimisation remains appropriate. Where an entire alarm list must be explained at analyst-facing latency, its 178178 ms per edge is prohibitive and amortisation is the only viable option. The two strategies are complementary rather than competing, and the design study makes the trade-off explicit rather than leaving it to be discovered in deployment. (i) The counterfactual objective is what delivers temporal attribution. The sufficiency-only ablation reaches temporal fidelity 1.081±0.4271.081± 0.427, statistically indistinguishable from the random floor. Adding the temporal counterfactual term of Eq. (3) raises it to 1.601±0.3641.601± 0.364, a gain of +0.519±0.226+0.519± 0.226 — separable at 2.292.29 standard deviations. Temporal attribution is not a free consequence of amortisation; it must be trained for, and Eq. (4) is what trains it. Notably, per-instance mask optimisation scores 0.836±0.0320.836± 0.032 on temporal fidelity, below the measured random floor of 0.9730.973. A strategy that treats the observation window as an undifferentiated bag of evidence does not identify which snapshot carries the decision, however much computation it is given. This is direct quantitative evidence for the necessity of the dual decomposition of principle P2. V-E Design Notes Two implementation choices proved load-bearing and are reported so the method can be reproduced rather than rediscovered. Separate positional embeddings. When both heads index a shared positional table, improving either axis degrades the other, because one parameter is contested by objectives that do not agree. With separate tables the gradient paths are disjoint and each axis responds to its own hyperparameters independently. The symptom of the shared configuration — consecutive settings each excelling on one axis — is easily misread as an intrinsic trade-off between structural and temporal explanation. It is not. Density matching rather than L1L_1. The explainer is evaluated after a hard top-p cut, but a weak L1L_1 penalty leaves the soft mask near density 0.50.5, so the ranking is learned in a regime the metric never tests. Penalising (m¯−p)2( m-p)^2 aligns training density with the evaluation budget and materially improves characterisation. V-F Sanity Check The model-randomisation test [19] yields ρ(trained,re-initialised)=0.272±0.061ρ(trained,re-initialised)=0.272± 0.061. The residual correlation is expected for an amortised explainer: the shared network retains its own trained weights when the detector is randomised, so it continues to emit a structured ranking, whereas a per-instance method optimises against the randomised detector directly and collapses. The check therefore carries a different meaning across explainer families and should be interpreted within family. VI Discussion VI-A Why Post-Hoc Is the Correct Design Post-hoc is a deliberate choice rather than a concession. Deployment reality: practitioners hold trained checkpoints they cannot retrain, and intrinsic self-explaining detectors require retraining under modified objectives, typically accepting some detection degradation; X-StrGNN wraps the existing model at Δ =0.0000=0.0000 (Section IV). Separation of concerns: joint optimisation of detection and explanation conflates competing objectives, whereas keeping them separate allows each to improve independently. Generalisability: any detector composing subgraph encoding with a recurrent temporal pathway can be wrapped by substituting its forward pass, since the masks of Eq. (1) attach to message passing and to the recurrent input, neither of which is specific to StrGNN. VI-B Why Dual Decomposition Is the Contribution A single attribution vector over edges cannot answer the question an analyst actually asks: was this alert driven by a suspicious counterparty, or by a suspicious pattern in the interaction history? The evidence for the necessity of the second axis is direct and quantitative: the most computationally expensive strategy in Table IV scores below the random floor on temporal fidelity. Structural attribution alone, however faithful, certifies nothing about temporal attribution — and may certify the opposite. VI-C Operational Implications At 0.660.66 ms per edge, explaining an entire alarm window is a sub-second operation. This changes what explanation is for: not a forensic instrument applied to a handful of adjudicated cases, but a routine attribute of every alert, available at triage time. Combined with stability 0.9130.913, an analyst can rely on the explanation of a given alert being the same explanation tomorrow — a precondition for operational trust that fidelity alone does not supply. VI-D Limitations Explainer variance. The two learned strategies in Table IV show larger seed-to-seed dispersion (±0.078± 0.078 and ±0.016± 0.016 characterisation) than the parameter-free ones (±0.001± 0.001). We therefore report all results as mean ± standard deviation over three seeds and treat differences below 2σ2σ as ties, which is why the temporal gain over the ablation is claimed and the characterisation gain is not. We recommend the same discipline for future work in this area, since single-seed explainability tables can report differences smaller than their own noise. Single detector and corpus. All measurements use StrGNN on UCI-Messages. The framework’s components assume only subgraph message passing and a recurrent temporal pathway, so transfer is expected but not demonstrated; a second detector with a continuous-time pathway is the strongest single extension. Proxy metrics. Fidelity-family metrics evaluate the detector off its training distribution. Normalising by the ablation range bounds the effect, and it applies equally to every strategy compared, but benchmarks carrying ground-truth culprit evidence would provide stronger validation. Synthetic anomalies. Evaluation follows the established injection protocol, enabling controlled and reproducible comparison. Since our claims concern the explanation of a detector’s decisions rather than detection quality itself, they are comparatively insulated from the validity of that protocol; extending to corpora with organic anomaly labels remains valuable future work. VII Conclusion We introduced X-StrGNN, the first post-hoc explanation framework for StrGNN-style dynamic-graph anomaly detectors. Before this work, fidelity, characterisation, and temporal attribution were undefined for StrGNN: no attribution vector existed to evaluate. X-StrGNN supplies two — structural and temporal — for every flagged edge, at 0.660.66 ms per explanation and at exactly zero cost to detection (Δ =0.0000=0.0000). The accompanying design study establishes which attribution strategy suits this architecture and why. Amortisation delivers the highest attribution stability (0.9130.913) at 268×268× lower cost than per-instance optimisation, making explanation of a full alarm list operationally feasible; per-instance optimisation retains a fidelity advantage where latency is irrelevant; and the temporal counterfactual objective is what converts a windowed detector’s observation history into an interpretable axis, without which even the most expensive strategy in the study falls below the random floor. The explainability gap addressed here is not peculiar to StrGNN. It is the default condition of essentially every deep dynamic-graph anomaly detector in the literature. This framework offers a principled, post-hoc template for closing it, and we release the protocol, runners, and per-seed measurements so it can be applied and audited directly.11 1 https://github.com/inekka-esi/Explainable-StrGNN References [1] O. A. Ekle and W. Eberle, “Anomaly detection in dynamic graphs: A comprehensive survey,” ACM Trans. Knowl. Discov. Data, vol. 18, no. 8, art. 192, 2024. [2] I. A. Nekka, H. Seba, and K.-W. Hidouci, “Gradient attention maps for post-hoc explainability in contrastive graph anomaly detection,” in Proc. IEEE Int. Conf. Intelligence and Security Informatics (ISI), 2026. [3] L. Cai, Z. Chen, C. Luo, J. Gui, J. Ni, D. Li, and H. Chen, “Structural temporal graph neural networks for anomaly detection in dynamic graphs,” in Proc. ACM CIKM, 2021. [4] Y. Liu, S. Pan, Y. G. Wang, F. Xiong, L. Wang, Q. Chen, and V. C. S. Lee, “Anomaly detection in dynamic graphs via transformer,” IEEE Trans. Knowl. Data Eng., vol. 35, no. 12, p. 12081–12094, 2023. [5] W. Yu, W. Cheng, C. C. Aggarwal, K. Zhang, H. Chen, and W. Wang, “NetWalk: A flexible deep embedding approach for anomaly detection in dynamic networks,” in Proc. ACM KDD, 2018. [6] L. Zheng, Z. Li, J. Li, Z. Li, and J. Gao, “AddGraph: Anomaly detection in dynamic graph using attention-based temporal GCN,” in Proc. IJCAI, 2019. [7] J. Lee, S. Kim, and K. Shin, “SLADE: Detecting dynamic anomalies in edge streams without labels via self-supervised learning,” in Proc. ACM KDD, 2024. [8] R. Ying, D. Bourgeois, J. You, M. Zitnik, and J. Leskovec, “GNNExplainer: Generating explanations for graph neural networks,” in Proc. NeurIPS, 2019. [9] D. Luo, W. Cheng, D. Xu, W. Yu, B. Zong, H. Chen, and X. Zhang, “Parameterized explainer for graph neural network,” in Proc. NeurIPS, 2020. [10] H. Yuan, H. Yu, S. Gui, and S. Ji, “Explainability in graph neural networks: A taxonomic survey,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 45, no. 5, p. 5782–5799, 2023. [11] W. Xia, M. Lai, C. Shan, Y. Zhang, X. Dai, X. Li, and D. Li, “Explaining temporal graph models through an explorer-navigator framework,” in Proc. ICLR, 2023. [12] J. Chen and R. Ying, “TempME: Towards the explainability of temporal graph neural networks via motif discovery,” in Proc. NeurIPS, 2023. [13] X. Han, X. Hu, C. Ma, and X. Shang, “Explainable anomaly detection in dynamic heterogeneous graphs via relation evolution,” IEEE Trans. Knowl. Data Eng., 2026. [14] M. Zhang, Z. Cui, M. Neumann, and Y. Chen, “An end-to-end deep learning architecture for graph classification,” in Proc. AAAI, 2018. [15] M. Zhang and Y. Chen, “Link prediction based on graph neural networks,” in Proc. NeurIPS, 2018. [16] T. N. Kipf and M. Welling, “Semi-supervised classification with graph convolutional networks,” in Proc. ICLR, 2017. [17] C. J. Maddison, A. Mnih, and Y. W. Teh, “The concrete distribution: A continuous relaxation of discrete random variables,” in Proc. ICLR, 2017. [18] E. Jang, S. Gu, and B. Poole, “Categorical reparameterization with Gumbel-softmax,” in Proc. ICLR, 2017. [19] J. Adebayo, J. Gilmer, M. Muelly, I. Goodfellow, M. Hardt, and B. Kim, “Sanity checks for saliency maps,” in Proc. NeurIPS, 2018. [20] T. Opsahl and P. Panzarasa, “Clustering in weighted networks,” Social Networks, vol. 31, no. 2, p. 155–163, 2009.