# Discovering Persistent Behavioural Patterns for Interpretable Blockchain Forensics

Crypto.world

> Public blockchains record every transaction, but the raw records (transaction logs, contract calls, token movements) do not directly reveal who is doing what, which routines repeat, or which groups…

**arXiv**: 2608.12864

**Published**: 2026-08-13

**Authors**: Dorottya Zelenyanszki, Zhe Hou, Kamanashis Biswas, Vallipuram Muthukkumarasamy

## AI summary

## Overview

**Research area:** Blockchain forensics and DeFi security, combining natural-language sentence embeddings, sequence models, unsupervised clustering and post hoc interpretable profiling of Ethereum user behaviour.

**Technical level:** Intermediate to Advanced. The paper assumes familiarity with smart contracts, ERC-20/ERC-721 tokens, decoded event logs, and representation learning, though its motivation and profiling logic are explained in plain terms.

**Scope (one sentence):** The paper presents a scalable, application-agnostic pipeline that converts Ethereum transaction histories into "behavioural sentences", embeds them in two steps, clusters users without labels, and profiles the resulting groups to reveal recurring ordinary and suspicious behavioural patterns that persist across independent observation windows.

## What This Paper Is About

Public blockchains record every transaction, but the raw records (transaction logs, contract calls, token movements) do not directly reveal who is doing what, which routines repeat, or which groups behave suspiciously. Most existing tools are built for one specific task or protocol, depend on labelled data, or focus on individual incidents rather than on behaviours shared across large populations of users. The authors build a framework that turns millions of Ethereum user histories into compact behavioural representations, groups similar users without any labels, and then explains each group using motifs, routines, timing, entity exposure and external risk evidence, including whether the same patterns reappear in different time windows.

## Key Contributions

1. **A scalable, application-agnostic discovery framework.** Transactions and decoded event logs are converted into "behavioural sentences" that preserve action order, event semantics, entity types and market signals; these are embedded in two steps (sentence-level, then sequence-level) and clustered without labels, with profiling applied only afterwards.
2. **A systematic multi-stage configuration study.** The authors evaluate sentence embedding models, sequence aggregation methods, training objectives, sequence-length strategies, clustering algorithms and resolutions, and behavioural semantics, balancing representation quality, clustering structure and stability, scalability, "length leakage" (length artefacts influencing embeddings) and the concentration of pre-labelled behaviours.
3. **An interpretable behavioural profiler.** Discovered clusters are described through defining behavioural motifs, ordered routines, activity and temporal patterns, contract/token diversity and concentration, entity exposure, and suspiciousness evidence separated into direct labels versus exposure-based signals.
4. **A persistence analysis across observation windows.** Monthly and cumulative multi-month windows are used to check whether behavioural patterns remain stable beyond a single analysis period, supporting long-term behavioural attribution rather than one-off incident analysis.

## Main Findings

- **Scale achieved on Ethereum data:** The framework was evaluated on Ethereum using over 30 million transactions, drawn from blocks 16250000 to 16749999 in the XBlock-ETH dataset, with event decoding performed through the Infura API.
- **Population-scale address separation:** The first iteration on the first-month window yielded 6,045,497 users, 3,117,292 contracts, 1,343,354 ERC-20 tokens and 259,062 ERC-721 tokens, with 1,317,947 addresses filtered out. Separation combined from/to fields, typed address arguments in decoded logs, event emitters and created-contract fields, plus nonce checks via `eth_getTransactionCount`.
- **Both routine and malicious patterns recovered:** The unsupervised clusters captured decentralised exchange (DEX) trading, NFT activity, phishing, bot operations, oracle manipulation and rug-pull schemes, showing that suspicious behaviour appears alongside and embedded within ordinary activity rather than as a separate population.
- **Persistence across independent windows:** Many discovered patterns remained stable across independent observation windows, which the authors present as the key step beyond single-period analysis.
- **Labels used only as post hoc evidence:** The external pre-labelled set contains 358 unique addresses (with overlaps across sources), comprising 68 phishing users, 50 phishing contracts, 94 malicious contracts, 96 exploiters and 58 exploited contracts. These were never used to train, guide or constrain clustering, only to interpret clusters afterwards.
- **Runtime profile supports practical deployment:** Reported runtimes include event decoding at 9 hours, address separation at 10 hours, building intermediate sentences at 20 minutes, building final sentences at 1 hour, sentence embedding at 11 hours for 2 models, sequence-model training and sequence embedding generation at roughly 1 minute per model each, and clustering in a few minutes, giving an overall core pipeline of roughly 32 hours. API-dependent preprocessing dominates cost.
- **Sentence-embedding trade-off (from the reported comparison):** Among five models compared on one month of data (blocks 16250000 to 16499999), MiniLM-L6-v2 obtained the highest reported score (3.354) with r@10 of 0.724, AUC_act of 0.712 and AUC_1 of 0.982 at 2786 sentences/s; E5-small had the lowest score (3.117) but the most concentrated similarity distribution (0.910 ± 0.042). The caption notes that lower global similarity mean and higher standard deviation indicate a less-collapsed embedding space, so the best-scoring and least-collapsed configurations differ.
- **Not reported in the available excerpt:** the number of clusters produced, per-cluster user counts, and the full slice-based sanity check results and later comparison tables, which are cut off mid-table.

## Methodology in Plain English

The pipeline has five stages.

**1. Collect and clean.** Transactions and decoded event logs are pulled from a public Ethereum dataset, and event decoding is done through an API. Addresses are then sorted into contracts versus ordinary user accounts (EOAs) using the addresses appearing in transactions, in typed log arguments, as event emitters, and in contract-creation fields. Contract candidates are probed for ERC-20/ERC-721 traits through standard read calls, and unresolved addresses are checked with a transaction-count query: nonce of at least 1 means the address is treated as a user, nonce of 0 means it is filtered out. Obvious non-entities such as zero addresses, precompiles, dead addresses and very small numeric addresses are removed by fixed rules. Token metadata is added from CoinGecko and OpenSea, and addresses are mapped to readable IDs. Each transaction is linked to a user, either as a primary (sent) transaction or a secondary (event-linked) one.

**2. Turn transactions into sentences.** Each transaction becomes a short text-like record: normalised value, gas and timestamp tokens, then an ordered list of event aliases (for example `transfer1`) together with the entity types and compact IDs of the addresses involved. Repeated events of the same structure are compressed, token and market context is attached on first token occurrence, and contracts and users are replaced by short identifiers. Each user then has a time-ordered sequence of such sentences.

**3. Embed twice.** A pretrained sentence model turns each sentence into a vector; a sequence model then aggregates a user's ordered vector sequence into a single user-level vector, with long histories cropped and short ones padded and masked.

**4. Cluster without labels.** Users with similar user-level vectors are grouped. No labels or external references enter this step.

**5. Profile and interpret.** Only after clustering does the profiler read each cluster: it extracts compact behavioural motifs and ordered motif sequences, computes activity and timing statistics, measures contract and token diversity and concentration, matches interactions against risky-entity references and exploit-transaction references, and checks direct labels. Motifs and motif sequences that distinguish a cluster from the rest of the population are ranked. The result is a multi-label tag set per cluster with a strength score, supporting observations and a justification, plus tag-level summaries aggregating all clusters carrying a tag. The authors are explicit that a tag strength score reflects evidential support for a suspicious reading, not the probability that users are malicious, and that contact with a risky entity or exploit transaction is contextual exposure only.

## Why This Matters

The work reframes blockchain forensics from incident-chasing to population-level behavioural discovery: instead of asking "was this address involved in a known hack?", it asks "what recurring kinds of behaviour exist among millions of users, and which of those groups look suspicious?". This matters because suspicious activity is sparse, mixed into ordinary activity and shifts over time, which is exactly the regime where label-dependent, threat-specific detectors struggle.

**Real-world applications:**

- **Exchange and custody compliance:** screening counterparties by behavioural group and routine rather than only by blacklists.
- **Threat intelligence and incident triage:** using exposure to exploit-related transactions and risky entities as contextual signals to prioritise investigations.
- **DeFi protocol monitoring:** identifying bot operations, oracle manipulation and rug-pull-linked behaviour patterns among interacting users and contracts.
- **Law-enforcement and audit forensics:** producing human-readable, evidence-backed cluster reports that explain why a group looks distinctive, with provenance retained for each tag.

**Industry relevance:** The reported runtime profile (roughly 32 hours for the core pipeline, with API-dependent preprocessing dominating) and the ability to reuse cached artefacts across runs make the approach plausible for analytics vendors, exchanges and research teams operating at million-user scale, and the persistence analysis addresses a practical complaint about one-off studies that are never validated on later data.

## Future Directions

- **Quantifying persistence formally.** The paper reports stability across monthly and cumulative multi-month windows, but the available excerpt does not specify a stability metric or threshold; defining and stress-testing such measures is an obvious next step, as is extending to longer horizons and to other chains.
- **Calibrating suspiciousness tags.** Because tag strength is evidential rather than probabilistic, follow-up work could calibrate how often a high-strength tag corresponds to later confirmed malicious activity, and examine false positives driven by mere exposure to risky contracts.
- **Reducing the API bottleneck.** Event decoding (9 hours) and address separation (10 hours) dominate cost; incremental or locally decoded alternatives would make repeated re-profiling of new blocks much cheaper.
- **Improving interpretability and human evaluation.** The profiler generates reports with justifications and provenance, but the excerpt does not report an evaluation of how useful investigators find those reports, or comparisons against analyst judgement.

## Target Audience

Researchers and graduate students in blockchain security, DeFi risk and financial forensics; machine-learning practitioners working on representation learning and unsupervised clustering over transactional or sequence data; and analysts, compliance engineers and threat-intelligence teams who need interpretable, scalable tooling for population-level on-chain behaviour rather than single-address lookups.

## Authors’ abstract

Public blockchain data enables large-scale DeFi-related analysis, but many existing approaches are application-specific, difficult to scale, or hard to interpret. This research proposes a scalable, application-agnostic framework for \emph{persistent behavioural pattern discovery} from large-scale blockchain activity. It constructs behaviour sentences enriched with contract, token and market context, then applies a two-step embedding process: sentence-level embeddings capture…

[The full abstract on arXiv](https://arxiv.org/abs/2608.12864)

[Read the original paper](https://arxiv.org/abs/2608.12864)

---

Canonical: https://crypto.world/paper/discovering-persistent-behavioural-patterns-for-interpretable-2608.12864
