Refining Heuristic-Based Bitcoin Address Clustering with Graph Neural Networks

Hugo Schnoering, Roman Bresson, Michalis Vazirgiannis · Submission to ICLR 2026 · Rejected

TL;DR

This paper introduces a novel framework that uses Graph Neural Networks (GNNs) and contrastive learning to refine traditional Bitcoin address clustering. By moving from "flat" binary heuristics to a hierarchical embedding space, the authors provide a way to detect and correct "cluster collapses"—instances where unrelated users are erroneously merged into a single entity.

What Problem Does This Paper Address?

In the Bitcoin world, privacy is maintained through pseudonymity: one user can control thousands of different addresses. To analyze network activity or track illicit funds, researchers use address clustering to group these pseudonyms into "user" entities.

The industry standard relies on human-made heuristics, most notably the common-input heuristic, which assumes that if multiple addresses provide inputs to the same transaction, they belong to the same person. However, these heuristics are "flat" (they don't show internal structure) and fragile. A single "CoinJoin" transaction—where multiple users intentionally mix their coins—can cause a cluster collapse, where thousands of unrelated users are incorrectly merged into one giant, meaningless cluster.

Methods

The authors propose a two-stage methodology to add nuance and error-correction to these traditional methods:

  1. Contrastive GNN Learning: The researchers train a GNN (specifically a Graph Attention Network, or GAT) using a contrastive InfoNCE loss. The model is taught to produce similar embeddings for addresses that a heuristic says belong together, while pushing addresses from different heuristic clusters far apart in latent space.
  2. Hierarchical Refinement: Instead of accepting the heuristic clusters as final, they perform Agglomerative Hierarchical Clustering (HAC) on the learned embeddings. This creates a "dendrogram" (a tree structure) for each cluster.
  3. Collapse Detection: By setting a distance threshold ($\lambda$) on this tree, they can identify "suspicious merges." If two sub-groups in a cluster are too far apart in the embedding space, the system flags them as a likely cluster collapse and splits them back into separate users.

Crucially, the paper provides a theoretical foundation, proving that GNNs acting as low-pass filters naturally inherit the geometric separability of spectral embeddings, justifying why this approach works mathematically.

Datasets

The authors have released a new, large-scale dataset of Bitcoin transaction graphs to the community under a CC BY 4.0 license.

  • Source: Raw blockchain data obtained via Bitcoin Core.
  • Construction: They used a Breadth-First Search (BFS) sampling strategy on the transaction Directed Acyclic Graph (DAG) to create manageable subgraphs.
  • Scale: The dataset includes five distinct splits (three for training, one validation, one test) containing millions of edges and hundreds of thousands of clusters.
  • Ground Truth: They utilized a dataset of ~100,000 addresses labeled with real-world entity names (exchanges, services, etc.) for evaluation.

Key Insights and Ideas

  • GNNs as Filters: The "aha moment" is the formal connection between GNN behavior and spectral clustering. The authors show that because GNNs act as low-pass filters, they are mathematically predisposed to concentrate cluster members in a specific subspace, making them perfect for "cleaning up" noisy heuristic data.
  • Multi-Resolution Analysis: Traditional clustering is all-or-nothing. The hierarchical approach allows investigators to look at a cluster at different "resolutions," seeing how sub-entities interact within a larger organization.
  • Structural Positional Encodings: The authors found that adding shortest-path distances to "landmark" nodes helped the GNN maintain locality, preventing it from accidentally clustering addresses that look similar but are far apart in the actual transaction network.

Key Results

The hybrid "refinement" approach significantly outperformed both raw heuristics and standard unsupervised GNN baselines:

  • Entity Accuracy: On ground-truth labeled data, the refinement pipeline increased the macro-F1 score and balanced accuracy by more than 10% compared to traditional heuristics.
  • False Positive Reduction: The method reduced false positives by half, effectively preventing the "cluster collapse" problem that plagues forensic analysis.
  • CoinJoin Robustness: In tests specifically targeting CoinJoin transactions (which are designed to break heuristics), the GNN-based method achieved a significantly higher True Negative Rate, correctly identifying that the addresses involved belonged to different users, whereas traditional heuristics failed completely (0% TNR).

Limitations and Future Work

  • Computational Bottleneck: While GNN inference is fast, the Hierarchical Agglomerative Clustering (HAC) step scales quadratically ($O(N^2)$) with the number of nodes. This makes it difficult to apply to the entire Bitcoin blockchain at once without pre-clustering or local sampling.
  • Label Scarcity: Like all blockchain research, the amount of "ground truth" (knowing for sure who owns an address) is limited, which can bias evaluation toward known services rather than individual private users.
  • Dynamic Graphs: The current model works on static snapshots. The authors suggest that future work should focus on online refinement, where the clustering updates in real-time as new blocks are mined.

Summary updated

Abstract

Bitcoin’s pseudonymous nature makes it challenging to analyze user-level activity, since a single user may control multiple identifiers (addresses). Existing heuristic-based methods attempt to identify addresses belonging to the same user, but they often produce flat cluster assignments with limited modularity and are prone to errors such as merging different users together. In this work, we propose a method for refining heuristic-obtain clusters by grounding our clustering on contrastive embeddings yielded by graph neural networks . Our contribution is threefold: (i) we release a publicly available dataset of Bitcoin transaction graphs containing a substantial number of clusters; (ii) we propose a methodology for learning address embeddings consistent with heuristics, and back it up with solid theoretical foundations and empirical results; (iii) through hierarchical clustering, we allow a finer analysis of heuristic clusters and provide a quantitative criterion for flagging suspicious merges.
BibTeX
@misc{schnoering2026refining,
  author = {Hugo Schnoering and Roman Bresson and Michalis Vazirgiannis},
  title = {{Refining Heuristic-Based Bitcoin Address Clustering with Graph Neural Networks}},
  year = {2026},
  eprint = {2609.01942},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.01942},
}
Figure