JaySuryavanshi commited on
Commit
1576a3d
·
verified ·
1 Parent(s): ae1133c

Add weibo graph anomaly detection dataset (parquet + card)

Browse files
Files changed (3) hide show
  1. README.md +72 -0
  2. edges.parquet +3 -0
  3. nodes.parquet +3 -0
README.md ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ task_categories:
4
+ - graph-ml
5
+ tags:
6
+ - anomaly-detection
7
+ - graph-anomaly-detection
8
+ - outlier-detection
9
+ - fraud-detection
10
+ - graph
11
+ pretty_name: Weibo (graph anomaly detection)
12
+ size_categories:
13
+ - 10K<n<100K
14
+ ---
15
+
16
+ # Weibo (graph anomaly detection)
17
+
18
+ Weibo users connected by shared hashtag activity, with labeled suspicious accounts. An organic (non-injected) anomaly dataset used throughout the BOND benchmark line of work.
19
+
20
+ | | |
21
+ |---|---|
22
+ | Nodes | 8,405 |
23
+ | Node features | 400 |
24
+ | Edges | 407,963 |
25
+ | Outliers | 347 (4.1%) |
26
+ | Label type | proxy |
27
+ | Label source | suspicious-account labels via the BOND benchmark |
28
+
29
+ **Files.** `nodes.parquet` (node_id, `feat_*`, `label`, split masks where available)
30
+ and `edges.parquet` (`src`, `dst`, the edge list as shipped upstream; symmetrize for
31
+ undirected use). Ships the upstream single split as `train_mask_0`, `val_mask_0`, `test_mask_0`.
32
+
33
+ **A provenance note this card refuses to paper over:** the upstream README table lists 868 outliers (10.3%) for Weibo, but the shipped `weibo.pt` file contains 347 (4.1%). The numbers on this card describe the actual file (sha256 of the source zip: `c4a5fe4c...`). If you compare against papers reporting the 10.3% variant, you are not using the same labels.
34
+
35
+ ## Load
36
+
37
+ ```python
38
+ import pandas as pd
39
+
40
+ nodes = pd.read_parquet("hf://datasets/JaySuryavanshi/graph-anomaly-weibo/nodes.parquet")
41
+ edges = pd.read_parquet("hf://datasets/JaySuryavanshi/graph-anomaly-weibo/edges.parquet")
42
+ ```
43
+
44
+ As a graph, with [graphspot](https://github.com/JayeshSuryavanshi/graphspot)
45
+ (`pip install graphspot`):
46
+
47
+ ```python
48
+ import numpy as np, scipy.sparse as sp, graphspot
49
+ from graphspot.detectors import XGBGraph
50
+
51
+ n = len(nodes)
52
+ adj = sp.csr_matrix((np.ones(len(edges)), (edges.src, edges.dst)), shape=(n, n))
53
+ g = graphspot.Graph(adj=adj, x=nodes.filter(like="feat_").to_numpy(),
54
+ node_labels=nodes.label.to_numpy())
55
+ ```
56
+
57
+ ## Provenance
58
+
59
+ Mirrored unmodified (beyond format conversion to parquet) from [pygod-team/data](https://github.com/pygod-team/data) (MIT).
60
+ Conversion is scripted and deterministic; label counts above are computed from the
61
+ files in this repository, not copied from upstream docs.
62
+
63
+ ## Citation
64
+
65
+ ```bibtex
66
+ @inproceedings{liu2022bond,
67
+ title={{BOND}: Benchmarking unsupervised outlier node detection on static attributed graphs},
68
+ author={Liu, Kay and Dou, Yingtong and Zhao, Yue and Ding, Xueying and Hu, Xiyang and Zhang, Ruitong and Ding, Kaize and Chen, Canyu and Peng, Hao and Shu, Kai and Sun, Lichao and Li, Jundong and Chen, George H. and Jia, Zhihao and Yu, Philip S.},
69
+ booktitle={Advances in Neural Information Processing Systems},
70
+ year={2022}
71
+ }
72
+ ```
edges.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:330f15fa9bdc32e0e8c076448c23bc8b8729ace69f0b92eaa51a16fcaf845c0d
3
+ size 782275
nodes.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a0351f1aa0e5f69f2caa94938da5c1808406ac699571083068932b92226e08e
3
+ size 19317903