In the escalating arms race between fraudsters and detection systems, recent advances in Graph-Enhanced LLMs hold enormous promise. But they face a chronic problem: too much information.

Take graph-based fraud detection. It’s common to represent users and their actions as nodes and edges on a heterogeneous graph, where each node may contain rich textual data (like reviews) and structured features (like ratings). To classify whether a node (e.g., a user review) is fraudulent, models like GraphGPT or HiGPT transform local neighborhoods into long textual prompts. But here’s the catch: real-world graphs are dense. Even two hops away, the neighborhood can balloon to millions of tokens.

This isn’t just inconvenient — it’s counterproductive. The LLM, flooded with benign neighbor content, starts to ignore the very fraud signals it’s supposed to detect. The authors of DGP (Dual Granularity Prompting) propose a smart fix: don’t choose between detail and brevity — combine both, strategically.


🔍 The Core Idea: Fine-Grained Focus Meets Coarse-Grained Context

DGP divides the prompt into two parts:

Component Strategy Purpose
Target node Full original textual input Preserve key fraud cues
Neighbors Summarized by metapath Avoid prompt bloat, reduce noise

The innovation lies in:

  • Bi-level textual summarization:

    • Each neighbor’s text is condensed into a 10-token summary.
    • Then, all summaries along a given metapath (e.g., same product + same rating) are merged and summarized again.
  • Diffusion-based trimming:

    • Only the most structurally and semantically relevant neighbors are retained — determined via the Markov Diffusion Kernel, a spectral method that measures how similarly nodes diffuse information.
  • Numerical summarization:

    • Aggregates structured features (e.g., average star ratings) along each metapath to preserve statistical patterns.

The final prompt is short, dense, and domain-informed — giving the LLM exactly what it needs, without the semantic clutter.


🧠 Attention Dilution is Real — And DGP Fixes It

The authors also provide a rare theoretical analysis of what they call “attention dilution.” As the number of benign tokens in the prompt increases, the attention weight assigned to fraud-relevant tokens drops. This isn’t just intuitive — it’s measurable.

They show that:

$r = p + \frac{L(1 - p)}{mn_K}$

Where $p$ is the global fraud ratio (typically small), $L$ is the length of target node content, and $mn_K$ is the total number of neighbor tokens. As $mn_K$ grows, $r$ — the share of attention fraud content receives — plummets.

By controlling neighbor selection $n_K$ and summary length $m$, DGP ensures the LLM doesn’t lose the signal in the noise.


📊 Real-World Payoff: Up to +6.8% AUPRC Gains

The authors benchmark DGP on four datasets:

  • YelpReviews (spam detection)
  • AmazonVideo (review quality detection)
  • E-Commerce and LifeService (proprietary fraud graphs from ByteDance)

Compared to both GNNs (e.g., HGT, ConsisGAD) and Graph-LLMs (e.g., GraphGPT, InstructGLM), DGP delivers:

  • +6.8% AUPRC improvement over best prior methods
  • Shorter prompts — without sacrificing semantic depth
  • Better generalization, even with limited labeled data

Interestingly, task-aware summaries (e.g., “Summarize fraud-relevant parts”) underperform generic ones. This suggests that letting the model decide what matters yields better results than preemptively biasing it.


🧩 Broader Implications for Business AI

At Cognaptus, we believe this paper showcases a broader principle:

Compression isn’t just about saving space. It’s about protecting the signal.

The DGP approach — preserving fidelity for the target while abstracting noisy surroundings — is applicable far beyond fraud. Think of:

  • Customer support: summarize chatter around an issue while keeping user complaint intact.
  • Sales intelligence: condense interaction history but preserve salesperson notes.
  • HR screening: compress peer feedback but retain the candidate’s own portfolio.

Dual-granularity prompting could become a design pattern for prompt engineering in structured-but-messy enterprise datasets.


✍️ Final Thought

In a world where bigger models often mean bigger prompts, DGP reminds us that what you trim is just as important as what you keep. Graph-enhanced LLMs can be powerful detectors — but only if they can see the signal through the flood.


Cognaptus: Automate the Present, Incubate the Future.