Datasets:
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationError
Exception: TypeError
Message: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1531, in _prepare_split_single
for key, record in generator:
^^^^^^^^^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 613, in wrapped
for item in generator(*args, **kwargs):
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/webdataset/webdataset.py", line 127, in _generate_examples
for example_idx, example in enumerate(self._get_pipeline_from_tar(tar_path, tar_iterator)):
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/webdataset/webdataset.py", line 32, in _get_pipeline_from_tar
for filename, f in tar_iterator:
^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/utils/track.py", line 49, in __iter__
for x in self.generator(*self.args):
~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/utils/file_utils.py", line 1400, in _iter_from_urlpath
with xopen(urlpath, "rb", download_config=download_config, block_size=0) as f:
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/utils/file_utils.py", line 977, in xopen
file_obj = fs.open(paths[0], mode)
File "<string>", line 3, in open
File "/usr/local/lib/python3.14/unittest/mock.py", line 1176, in __call__
return self._mock_call(*args, **kwargs)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/unittest/mock.py", line 1180, in _mock_call
return self._execute_mock_call(*args, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/unittest/mock.py", line 1247, in _execute_mock_call
result = effect(*args, **kwargs)
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 786, in wrapped
tracker.files[urlpath] = {"read": 0, "size": int(f.size)}
~~~^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
~~~~~~~~~~~~~~~~~~~~~~~~~^
builder, max_dataset_size_bytes=max_dataset_size_bytes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1393, in _prepare_split
for job_id, done, content in self._prepare_split_single(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1571, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.exceptions.DatasetGenerationError: An error occurred while generating the datasetNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
csv unknown | __key__ string | __url__ string |
|---|---|---|
"YWRkcmVzcyxldGhlcnNjYW5fdGFnLGV0aGVyc2Nhbl9sYWJlbHMsaXNfY29udHJhY3QsaXNfY29udHJhY3RfYm9vbCxsYWJlbCx(...TRUNCATED) | ethphishgraph2026_stage1_outputs/ethphishgraph2026_phishing_candidates_3518 | "hf://datasets/quanturong/EthPhishGraph-2026@abd98773603c2972a1742968df7032b22a794b30/misc/stage1_ou(...TRUNCATED) |
"YWRkcmVzcyx0eF9jb3VudF9jYXBwZWQsb3Zlcl8yMDAwLGFwaV9zdGF0dXMKMHgwMDAwMDAwMDA1MzJiNDVmNDc3NzlmY2U0NDA(...TRUNCATED) | ethphishgraph2026_stage1_outputs/phishing_final_5_2000 | "hf://datasets/quanturong/EthPhishGraph-2026@abd98773603c2972a1742968df7032b22a794b30/misc/stage1_ou(...TRUNCATED) |
"YWRkcmVzcyx0eF9jb3VudF9jb3JyZWN0ZWQsb3Zlcl8yMDAwX2NvcnJlY3RlZCxyZWNoZWNrX3N0YXR1cwoweDA1NTg0MTc5NDg(...TRUNCATED) | ethphishgraph2026_stage1_outputs/phishing_high_tx_recheck | "hf://datasets/quanturong/EthPhishGraph-2026@abd98773603c2972a1742968df7032b22a794b30/misc/stage1_ou(...TRUNCATED) |
"YWRkcmVzcyx0eF9jb3VudF9jYXBwZWQsb3Zlcl8yMDAwLGFwaV9zdGF0dXMKMHgwMDAwMDAwMDA1MzJiNDVmNDc3NzlmY2U0NDA(...TRUNCATED) | ethphishgraph2026_stage1_outputs/phishing_tx_count_corrected | "hf://datasets/quanturong/EthPhishGraph-2026@abd98773603c2972a1742968df7032b22a794b30/misc/stage1_ou(...TRUNCATED) |
"YWRkcmVzcyxhbmNob3JfdHMNCjB4MmI1OTM0YThmMjQxNzZmYTVmYWJmMjMyNWRiYTdhOWI3ZjhjNjM5NSwxNTE2MDUwNDk2DQo(...TRUNCATED) | ethphishgraph2026_stage4_imbalanced/anchor_ts_unused | "hf://datasets/quanturong/EthPhishGraph-2026@abd98773603c2972a1742968df7032b22a794b30/misc/stage4_im(...TRUNCATED) |
null | ethphishgraph2026_stage4_imbalanced/imbalanced_test_1to10 | "hf://datasets/quanturong/EthPhishGraph-2026@abd98773603c2972a1742968df7032b22a794b30/misc/stage4_im(...TRUNCATED) |
null | ethphishgraph2026_stage4_imbalanced/imbalanced_test_1to5 | "hf://datasets/quanturong/EthPhishGraph-2026@abd98773603c2972a1742968df7032b22a794b30/misc/stage4_im(...TRUNCATED) |
"YWRkcmVzcyxhbmNob3JfdHMsdHhfY291bnQsdHhfYmluDQoweDAyNWQyMjY5Njg2OThkYWIzMjFmNTY1NGUzZmNlMWRhMDZlNzd(...TRUNCATED) | ethphishgraph2026_stage4_imbalanced/testonly_selected | "hf://datasets/quanturong/EthPhishGraph-2026@abd98773603c2972a1742968df7032b22a794b30/misc/stage4_im(...TRUNCATED) |
null | "ethphishgraph2026_stage4_imbalanced/normal_testonly_hop1_txs/0x001cb288ac4fdfb3cc8486999405b616afbc(...TRUNCATED) | "hf://datasets/quanturong/EthPhishGraph-2026@abd98773603c2972a1742968df7032b22a794b30/misc/stage4_im(...TRUNCATED) |
null | "ethphishgraph2026_stage4_imbalanced/normal_testonly_hop1_txs/0x004835fe706948bf3068818fc178ee8da602(...TRUNCATED) | "hf://datasets/quanturong/EthPhishGraph-2026@abd98773603c2972a1742968df7032b22a794b30/misc/stage4_im(...TRUNCATED) |
YAML Metadata Warning:The task_categories "node-classification" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
- π Dataset Statistics
- π Dataset Structure
- π¬ Data Schema
- π Usage Example
- π οΈ Pipeline Stages (how the dataset was built)
- π Models benchmarked (reference performance)
- βοΈ Adversarial Robustness Reference
- β οΈ Known Limitations
- π Related Scripts
- π Citation
- π Related Papers
- π License
- π Acknowledgments
EthPhishGraph-2026
Ego-graph K=2 dataset of Ethereum phishing accounts for Graph Neural Network based phishing detection and adversarial robustness research.
π Dataset Statistics
| Count | % Phishing | |
|---|---|---|
| Total targets | 7,036 | 50.0% |
| Phishing | 3,518 | - |
| Normal | 3,518 | - |
Temporal split (60/20/20)
| Partition | Count | Phishing ratio | Period |
|---|---|---|---|
| Train | 4,221 | 56.8% | β€ T1 = 2018-04-23 |
| Val | 1,407 | 37.3% | T1 β T2 = 2018-07-12 |
| Test | 1,408 | 42.2% | > T2 |
Graph size
| Partition | Avg nodes | Avg edges |
|---|---|---|
| Train | 2,318 | 3,241 |
| Val | 2,482 | 3,482 |
| Test | 3,677 | 5,129 |
hop-2 chiαΊΏm ~99% sα» node mα»i graph.
π Dataset Structure
EthPhishGraph-2026/
βββ README.md # This file
βββ LICENSE # CC-BY-4.0
βββ ego_graph_k2_dataset.pkl # 4.5 GB β Main pickle (train/val/test splits)
βββ temporal_split.csv # 449 KB β Address β (label, partition, anchor_ts)
βββ temporal_split_meta.json # β Split metadata (T1, T2, counts)
βββ per_target_neighbors.pkl # 11 MB β Precomputed hop-1 neighbor lists
βββ unique_hop1_neighbors.csv # β Deduplicated neighbor addresses
βββ feat_stats.pt # β Normalization stats (mean, std) from TRAIN only
βββ bad_files.txt # β Known bad hop-2 files to skip
βββ raw_txs/ # Raw transaction JSONs (for Stage 6 attacks)
β βββ phishing_hop1_txs.tar.gz # ~50 MB β Phishing accounts' hop-1 txs
β βββ normal_hop1_txs.tar.gz # ~100 MB β Normal accounts' hop-1 txs
β βββ hop2_neighbor_txs.tar.gz # ~5 GB β Hop-2 neighbor txs (compressed from 20 GB)
βββ misc/ # Optional artifacts (not needed for basic use)
βββ stage1_outputs.tar.gz
βββ stage4_imbalanced.tar.gz
βββ stage8_crosscheck_D2.tar.gz
π¬ Data Schema
ego_graph_k2_dataset.pkl (main file)
import pickle
with open("ego_graph_k2_dataset.pkl", "rb") as f:
data = pickle.load(f)
# data = {"train": [...], "val": [...], "test": [...]}
Each entry is a dict:
| Key | Type | Shape | Description |
|---|---|---|---|
target |
str |
β | Ethereum address 0x... |
label |
int |
β | 0 = normal, 1 = phishing |
target_idx |
int |
β | Position of target in node list |
n_nodes |
int |
β | Total nodes in the ego-graph |
n_edges |
int |
β | Total directed edges |
n_hop1 |
int |
β | Number of hop-1 neighbors |
node_features |
np.ndarray |
[N, 11] |
See Node features below |
edge_index |
np.ndarray |
[2, E] |
COO format (source, destination) |
edge_attr |
np.ndarray |
[E, 4] |
See Edge features below |
cutoff |
int |
β | Unix timestamp used as temporal cutoff |
Node features (11 columns)
| Col | Name | Description |
|---|---|---|
| 0 | in_count |
Number of incoming transactions |
| 1 | out_count |
Number of outgoing transactions |
| 2 | in_value_sum |
Total incoming value (wei) |
| 3 | out_value_sum |
Total outgoing value (wei) |
| 4 | in_value_mean |
Mean incoming value (wei) |
| 5 | out_value_mean |
Mean outgoing value (wei) |
| 6 | first_ts |
First tx timestamp (β οΈ absolute β recommend to drop) |
| 7 | last_ts |
Last tx timestamp (β οΈ absolute β recommend to drop) |
| 8 | active_span |
last_ts - first_ts (relative, safe) |
| 9 | unique_in_peers |
Number of distinct senders |
| 10 | unique_out_peers |
Number of distinct recipients |
Note: Columns 6, 7 are absolute timestamps which may leak temporal patterns to the model (phishing/normal classes have different time distributions). We recommend using only columns
[0,1,2,3,4,5,8,9,10]as inNODE_COLS = [0,1,2,3,4,5,8,9,10].
Edge features (4 columns)
| Col | Name | Description |
|---|---|---|
| 0 | value |
Transaction value (wei) |
| 1 | timestamp |
Transaction timestamp (β οΈ absolute β recommend to drop) |
| 2 | gas_price |
Gas price (wei) |
| 3 | gas_used |
Gas used (units) |
Note: We recommend using only
EDGE_COLS = [0, 2, 3]to avoid temporal leakage.
π Usage Example
import pickle
import numpy as np
import torch
from torch_geometric.data import Data
# Load
with open("ego_graph_k2_dataset.pkl", "rb") as f:
data = pickle.load(f)
print(f"Train: {len(data['train'])}, Val: {len(data['val'])}, Test: {len(data['test'])}")
# Convert one graph to PyG format
g = data['train'][0]
NODE_COLS = [0, 1, 2, 3, 4, 5, 8, 9, 10] # drop absolute timestamps
EDGE_COLS = [0, 2, 3]
d = Data(
x=torch.from_numpy(g['node_features'][:, NODE_COLS]).float(),
edge_index=torch.from_numpy(g['edge_index']).long(),
edge_attr=torch.from_numpy(g['edge_attr'][:, EDGE_COLS]).float(),
y=torch.tensor([g['label']], dtype=torch.long),
)
print(f"Target: {g['target']} label={g['label']} nodes={g['n_nodes']} edges={g['n_edges']}")
π οΈ Pipeline Stages (how the dataset was built)
- Stage 1 β Collect: Crawl phishing addresses from Etherscan + known phishing lists
- Stage 2 β Normal crawl: Collect normal (non-phishing) address candidates
- Stage 3 β Temporal split: Split addresses into train/val/test by timestamp (T1, T2)
- Stage 9 β K=2 ego-graph construction: For each target, extract hop-1 neighbors and hop-2 neighbors with full history up to the temporal cutoff. Features aggregated per node.
- Stage 5 β GNN baselines: Train GraphSAGE / GATv2 / PEAE-style on this dataset
- Stage 6 β Adversarial attacks: Evaluate robustness against 7+ transaction-level attacks
- Stage 7 β Defenses: Adversarial training + Reliability-aware GNN
π Models benchmarked (reference performance)
Macro-F1 on test set (3 seeds mean Β± std):
| Model | Macro-F1 | Phishing Recall | Phishing Precision |
|---|---|---|---|
| GraphSAGE | 0.8663 Β± 0.0032 | 0.7772 Β± 0.0110 | 0.9077 Β± 0.0054 |
| GATv2 | 0.8151 Β± 0.0108 | 0.6616 Β± 0.0159 | 0.9068 Β± 0.0106 |
| PEAE-style | 0.8813 Β± 0.0028 | 0.8283 Β± 0.0060 | 0.8925 Β± 0.0072 |
| peaegnnv2 | 0.8564 Β± 0.0040 | 0.7581 Β± 0.0140 | 0.9035 Β± 0.0142 |
βοΈ Adversarial Robustness Reference
Attack Success Rate (% target flipped) at max 1,200 injected transactions, 3 seeds mean Β± std:
| Attack | peaegnnv2 | GraphSAGE | GATv2 |
|---|---|---|---|
| TOH (target β fake wallet) | 42.4 Β± 3.7 | 7.1 Β± 3.0 | 18.4 Β± 2.5 |
| TIH (fake wallet β target) | 16.7 Β± 10.3 | 5.9 Β± 1.9 | 33.2 Β± 7.5 |
| BPH-T2P | 41.9 Β± 5.9 | 6.2 Β± 2.2 | 14.7 Β± 1.9 |
| STC (split + camouflage) | 23.1 Β± 5.3 | 8.2 Β± 3.0 | 5.0 Β± 1.9 |
| ADAPTIVE-STC-LV | 66.6 Β± 17.2 | 15.0 Β± 2.0 | 6.8 Β± 1.7 |
β Best attack depends on architecture; adaptive-balance mechanism (ADAPTIVE-STC-LV) is strongest on PEAE but weakest on GATv2.
β οΈ Known Limitations
- Temporal split confound: Phishing/normal class distribution differs across partitions (57% / 37% / 42%) due to their natural temporal distributions. We recommend dropping absolute
first_ts,last_ts,timestampfeatures. - Gas price is a time proxy: Gas prices on Ethereum changed over years β models may indirectly use time info even without absolute timestamps.
- Max 500 txs per neighbor was enforced during Stage 9 to limit RAM.
- Hop-2 is huge: ~99% of graph nodes are hop-2 β very memory-intensive. Consider sub-sampling for low-RAM systems.
- Phishing labels derived from publicly reported scam addresses β may contain some noise.
π Related Scripts
The code accompanying this dataset is in a separate repository (see src/ folder or thesis repo). Key files:
stage9_k2_upgrade.pyβ K=2 ego-graph builderstage5_train_baselines.pyβ GNN training (GraphSAGE, GATv2, PEAE-style)stage5_train_baselines_paper.pyβ Reproduction of Huang et al. 2024 PEAE-GNNstage6_adversarial_attacks.pyβ 7+ transaction-level attacksstage7_defense.pyβ Adversarial training + Reliability-aware GNN
π Citation
If you use this dataset, please cite:
@mastersthesis{ethphishgraph2026,
title = {Evaluating and Enhancing the Robustness of Ethereum Phishing Detection Models
Against Evasion Attacks on Transaction Graphs},
author = {[Your Name]},
school = {[Your University]},
year = {2026},
note = {EthPhishGraph-2026 dataset available at https://huggingface.co/datasets/[your-username]/EthPhishGraph-2026}
}
π Related Papers
- Wen et al. 2022, "Hide and Seek: An Adversarial Hiding Approach Against Phishing Detection on Ethereum", IEEE TCSS β source of TOH, TIH, BPH attacks
- Huang et al. 2024, "PEAE-GNN: Phishing Detection on Ethereum via Augmentation Ego-Graph Based on Graph Neural Network", IEEE TCSS β PEAE architecture
- Frankart et al. 2025, "The Feature-Space Illusion", arXiv β related adversarial robustness work on blockchain GNNs
π License
CC-BY-4.0 (Creative Commons Attribution 4.0 International).
Ethereum on-chain data is public and permissionless. Phishing/scam labels aggregated from public threat intelligence sources (Etherscan phishing tags, PhishTank, community-reported lists).
π Acknowledgments
Data collected via Etherscan API. Compare dataset D2 from XBlock project (link).
- Downloads last month
- -