DASM: Dynamic Autoregressive Subgraph Mining via Two-Stage Policy Alignment

Yuming Huang, Haoran Yin, Nannan WuNeurIPS 2026

TL;DR

Finding a specific cluster of nodes in a massive network—like uncovering a money-laundering ring starting from a single suspicious account—usually requires guessing how big that ring is beforehand. This paper introduces DASM, a framework that treats subgraph discovery like a sequential game: it steps outward node-by-node and uses reinforcement learning (specifically GRPO) to learn an intuitive "STOP" button. By dynamically adapting to each network's unique boundaries instead of relying on rigid rules, it more than doubles the accuracy of existing methods on complex graph benchmarks.

What Problem Does This Paper Address?

Imagine you are an investigator handed a single fraudulent bank account—a "seed node"—inside a massive web of millions of transactions. Your goal is subgraph mining: expanding outward from that seed to capture the entire criminal syndicate, without accidentally dragging innocent everyday shoppers into your net.

Existing tools struggle with two coupled headaches:

  1. The Boundary Identification Challenge: Meaningful subgraphs vary wildly in size and shape. Static heuristics rely on fixed budgets (e.g., "stop after 20 steps"), which inevitably under-explore big networks or over-expand small ones.
  2. The Error Cascade Challenge: Naive sequential models suffer from exposure bias. During training, they only see pristine, ground-truth paths. At test time, if the model makes a single wrong turn—say, adding one legitimate account—it enters uncharted territory, triggering a domino effect of bad decisions. Furthermore, knowing when to stop is a global property of the whole subgraph, something local step-by-step training simply cannot see.
Figure 1: Illustration of the subgraph mining task and the two coupled challenges faced by existing methods, using an anti-money laundering example. Given a suspicious seed account, the goal is to recover the red fraudulent subgraph (Target Subgraph). (a) Boundary Identification Challenge: the natural boundary of a meaningful subgraph (green dashed) varies across instances, so any fixed global rule cannot distinguish the correct boundary from an incorrect over-expansion boundary (orange dashed) that admits extraneous accounts (“Extra”) beyond the true target. (b) Error Cascade Challenge: at a decisive action, exposure bias may drive the policy to pick a legitimate account (“Legit X”) instead of following the correct decision path (green, conceptual); this single mistake propagates along the error path, triggering further misclassifications (“Legit Y”) and ultimately causing the trajectory to deviate from the true criminal network.

Methods

The authors reframe subgraph mining as an autoregressive (step-by-step) decision process equipped with a virtual STOP token. At every step, a Transformer-based policy network looks at the current subgraph and scores all neighboring candidate nodes alongside this learnable pseudo-node. Picking STOP ends the search.

To train this without falling victim to exposure bias or premature stopping, DASM uses a two-stage alignment pipeline:

Stage I: Step-wise Supervised Learning.
  • Stage 1: Step-wise Supervised Learning (Local Intuition). Before a model can run, it needs to walk. Using valid expansion paths generated from ground-truth subgraphs, the model learns which neighbors belong in the target set. Crucially, instead of forcing the model to predict one "next" node (which imposes a fake, arbitrary order on an unordered set), the authors use a multi-label objective with an asymmetric F1 loss—teaching the model that all valid neighbors are good choices simultaneously. They also decouple STOP learning, weighting expansion heavily early on and emphasizing stopping precision only when most of the target is already covered.
Stage II: GRPO Trajectory Optimization.
  • Stage 2: GRPO Trajectory Optimization (Global Alignment). Borrowed from recent LLM reasoning breakthroughs (like DeepSeekMath), Group Relative Policy Optimization (GRPO) aligns the policy with end-to-end subgraph quality. From a seed node, the model samples a group of complete rollouts until each hits STOP, then scores the final subgraphs against the ground truth. By comparing trajectories against the group's average score (eliminating the need for a bulky, separate value network) and blending in step-level dense rewards, the model learns exactly when further expansion hurts the final F1 score.

Datasets

The authors evaluate DASM on four established synthetic benchmarks popularized by prior subgraph representation learning work (SubGNN, GLASS, SSNP), each testing a distinct topological property:

  • Density (5,000 nodes; 29,521 edges; 250 subgraphs) – tests detection of tightly knit internal connections.
  • Cut-ratio (5,000 nodes; 83,969 edges; 250 subgraphs) – tests boundary separability from the rest of the graph.
  • Coreness (5,000 nodes; 118,785 edges; 221 subgraphs) – tests hierarchical core structure identification.
  • Component (19,555 nodes; 43,701 edges; 250 subgraphs) – tests connected component recovery on a sparser, larger graph.

No new datasets were introduced.

Key Insights and Ideas

  • Even an "Oracle" fixed budget has a mathematical ceiling: The authors prove (Proposition 4.1) that any method with a fixed step budget has a hard upper bound on its F1 score whenever target subgraph sizes vary across instances. Even when sequential baselines are handed privileged "oracle" knowledge of the true average target size (20 nodes on Coreness), DASM without any size hints beats them by over 15 F1 points because it adapts instance-by-instance.
  • Graphs are sets, not sentences: Standard autoregressive models treat generation like text, committing to one token at a time. Treating neighbor selection as multi-label set prediction prevents conflicting gradients during training and mathematically reduces step-wise error propagation.
  • RL shines brightest when boundaries are fuzzy: On the Component dataset—where subgraph boundaries are clean disconnects—Stage 1 supervised learning already hits 99.7% STOP accuracy, so GRPO adds a modest +1.7% F1. On Cut-ratio and Coreness, where boundaries blur into dense surroundings, GRPO delivers massive jumps (+6.0% and +5.8% F1) by calibrating the exact moment to quit.

Key Results

DASM substantially outperforms both subgraph-representation baselines (SubGNN, GLASS, SSNP, GPEN) and sequential imitation-learning baselines (Seq-MLE, DAgger) across every dataset:

  • Coreness: DASM achieves 0.7218 Macro-F1 and 0.6670 IoU, more than doubling the runner-up SSNP (0.3318 F1) and beating oracle-budget Seq-MLE (0.5676 F1).
  • Cut-ratio & Density: Reaches 0.5845 F1 on Cut-ratio (vs. GLASS at 0.2781) and 0.2514 F1 on the notoriously difficult Density task (where baselines collapse to 0.0036–0.0226 F1).
  • Component: Hits 0.6126 F1 with a perfect 1.0000 Precision (vs. SSNP at 0.5285 F1).
  • Balanced exploration: Baselines often achieve decent Precision by being overly conservative, resulting in terrible Recall. DASM maintains high Precision and high Recall (e.g., 0.7568 Precision and 0.6964 Recall on Coreness), proving it explores until the true boundary is met.

Limitations and Future Work

While a dedicated "Limitations" section is not included in the main text, the authors explicitly note a structural constraint in their formulation (Section 2): single-seed frontier expansion strictly produces connected subgraphs. Because the model only expands into immediate neighbors of already-selected nodes, it cannot natively jump across empty space to capture disconnected target subgraphs from a single seed (extensions for disconnected targets, along with computational wall-clock costs, are deferred to the Appendix).

Summary updated

BibTeX
@inproceedings{huang2026dasm,
  author = {Yuming Huang and Haoran Yin and Nannan Wu},
  title = {{DASM: Dynamic Autoregressive Subgraph Mining via Two-Stage Policy Alignment}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=4CA3Tomjpr},
}
Figure