--- pretty_name: FROST DGB Temporal Graph Datasets tags: - frost - temporal-graph - dynamic-graph - tgnn - link-prediction - node-classification --- # FROST DGB Temporal Graph Datasets This repository packages the curated temporal graph datasets used by FROST as a flat artifact bundle and is published on Hugging Face as [`dttutty/frost_dataset`](https://huggingface.co/datasets/dttutty/frost_dataset). Each top-level dataset directory stores the canonical preprocessed edge list plus any optional sidecar arrays needed for downstream experiments. The layout is intended for exact file download with `hf download`, `snapshot_download()`, or `hf_hub_download()`, not for automatic `datasets.load_dataset()` ingestion or a Viewer-first tabular experience. ## Download From Hugging Face Use the dataset repository as a file bundle: ```bash # Full bundle hf download dttutty/frost_dataset --repo-type dataset --local-dir DATA # One dataset directory only hf download dttutty/frost_dataset --repo-type dataset --include "LASTFM/*" --local-dir DATA ``` If you do not want to install `hf` globally, `uvx --from huggingface_hub hf ...` works the same way. `--local-dir DATA` mirrors the repository tree into `DATA/` and creates `DATA/.cache/huggingface/` metadata for incremental refreshes. ## Repository Layout - `/edges.csv` is the canonical preprocessed edge table. - `/full_graph_with_reverse_edges.npz` is the topology cache used directly by FROST runtime loading. - `/edge_features.npy` is present when the dataset exposes non-zero edge features. Some datasets keep the original float tensor; selected integer-valued datasets use a downcast materialized copy. - `/ban_labels.csv` exists for `MOOC`, `REDDIT`, and `WIKIPEDIA`, preserving the non-trivial user-state label as a separate sidecar table. - `/node_role.npy` is included for selected bipartite datasets that need node-role annotations. ## Use From Python Use this repository as a file bundle: ```python from pathlib import Path from huggingface_hub import snapshot_download repo_dir = Path( snapshot_download( repo_id="dttutty/frost_dataset", repo_type="dataset", local_dir="DATA", ) ) edges = repo_dir / "MOOC" / "edges.csv" graph = repo_dir / "MOOC" / "full_graph_with_reverse_edges.npz" edge_features = repo_dir / "MOOC" / "edge_features.npy" labels = repo_dir / "MOOC" / "ban_labels.csv" ``` If you need a `datasets` library dataset or a Hub Viewer-backed table, export the per-dataset artifacts into a supported viewer-first layout such as CSV or Parquet with explicit split or config metadata. The current repository mixes CSV, NPY, and NPZ sidecar files and is optimized for artifact download instead of viewer-native browsing. ## Format Notes - Upstream raw DGB networks are originally stored as `.csv`, with one edge per line. - The raw edge-list schema is `source_node,destination_node,timestamp,edge_label,edge_features...`. - This bundle keeps the baseline-friendly preprocessed files directly under each dataset directory. - `edges.csv` stores the preprocessed event table with columns `eid`, `src`, `dst`, `ts`, and `default_split`. - The original constant or task-specific `label` column has been removed from the top-level `edges.csv` files. When a non-trivial state label is useful downstream, it is preserved separately in `ban_labels.csv`. - `edge_features.npy` stores the dense edge-feature matrix when the dataset contains non-zero edge features. - `ban_labels.csv` stores the extracted state-label sidecar for `MOOC`, `REDDIT`, and `WIKIPEDIA`. The filename is historical; for `MOOC` it still contains dropout-style state labels rather than ban labels. - `node_role.npy` stores a boolean bipartite partition mask when the dataset needs it. - Preprocessed `.npy` files often have one extra leading row for index alignment or padding, so their first dimension is usually `edge_count + 1` or `node_count + 1`. ## `state_label` / `label` Notes - In DGB or DyGLib preprocessing, the preprocessed CSV can carry a `label` column copied from the raw `state_label` field. - This repository preserves that signal only where it is non-trivial, via top-level `ban_labels.csv` for `MOOC`, `REDDIT`, and `WIKIPEDIA`. - `MOOC`: `state(label)` means whether the student drops out after this action, that is, whether this is the user's last action. In this repository: `1 = 4,066`, `0 = 407,683`. - `Wikipedia`: `state(label)` is the ban-state label, that is, whether the user gets banned after this action. In this repository: `1 = 217`, `0 = 157,257`. - `Reddit`: `state(label)` is the user state-change label; on Reddit this specifically means whether the user gets banned after this interaction. In this repository: `1 = 366`, `0 = 672,081`. - `SocialEvo`: the original `state(label)` is degenerate and always `1`. - The other top-level datasets in this bundle have a constant source label and therefore do not carry a separate label sidecar. - In the self-supervised link prediction pipelines used by DGB and DyGLib, these stored `state(label)` values are not used as link-prediction targets; positive and negative labels are created on the fly from observed edges and sampled negative edges. - JODIE's original state-change setting does use these labels for user-state prediction tasks such as MOOC dropout prediction and Wikipedia or Reddit ban prediction. ## Normalization Notes - The published bundle already includes the normalization that FROST expects at runtime. - `CanParl`, `UNtrade`, and `UNvote` use contiguous 0-based yearly timestamp indices. - Selected integer-valued edge-feature arrays are materialized with lossless downcasts for storage efficiency. - `MOOC`, `REDDIT`, and `WIKIPEDIA` expose their non-trivial state labels as top-level `ban_labels.csv` sidecars. ## Recommended `max_macro_batch_size` These conservative recommendations are derived from the `num_edges` values below, assuming the standard `80/10/10` train/val/test split and: `max_macro_batch_size = floor(num_edges / 10)` This keeps `macro_batch_size` within the approximate smallest evaluation split budget for the current FROST runtime. | Dataset | max_macro_batch_size | | --- | ---: | | CanParl | 7447 | | Contacts | 242627 | | Flights | 192714 | | SocialEvo | 209951 | | UNtrade | 50749 | | UNvote | 103574 | | USLegis | 6039 | | Enron | 12523 | | LastFM | 129310 | | MOOC | 41174 | | Reddit | 67244 | | UCI | 5983 | | Wikipedia | 15747 | ## Dataset Details - Source or destination ranges are computed from `*/edges.csv` (`u`, `i`). - The curated bundle already reflects timestamp normalization for `CanParl`, `UNtrade`, and `UNvote`, downcast integer edge-feature materialization for `CanParl`, `Contacts`, `Flights`, `UNtrade`, `UNvote`, and `USLegis`, and state-label extraction into `ban_labels.csv` for `MOOC`, `REDDIT`, and `WIKIPEDIA`. - DGB paper: [https://arxiv.org/pdf/2207.10128](https://arxiv.org/pdf/2207.10128) - `Features & Labels` lists only non-`edges.csv` sidecar artifacts, shown as `size, rowsxcols, dtype`. | Dataset | SRC_NID | DST_NID | Notes | Features & Labels | TS INFO | | --- | --- | --- | --- | --- | --- | | [CanParl](CANPARL/edges.csv) (num_edges: 74,478) | range: 1->734
unique: 734 | range: 2->734
unique: 244 | Canadian MP interaction network.
Edge weight = yearly count of shared "yes" votes on bills. | [edge_features.npy](CANPARL/edge_features.npy) 145.6KB, 74,479x1, int16 | yearly
range=[0->13]
unique=14 | | [Contacts](CONTACTS/edges.csv) (num_edges: 2,426,279) | range: 1->692
unique: 676 | range: 1->690
unique: 676 | University-student physical proximity network over one month.
Edge weight = proximity strength. | [edge_features.npy](CONTACTS/edge_features.npy) 2.3MB, 2,426,280x1, int8 | Second
range=[0->2418900]
unique=8064 | | [Flights](FLIGHTS/edges.csv) (num_edges: 1,927,145) | range: 1->13169
unique: 11574 | range: 1->13169
unique: 12939 | Airport traffic during COVID-19.
Edge weight = number of flights between two airports in a day. | [edge_features.npy](FLIGHTS/edge_features.npy) 3.7MB, 1,927,146x1, int16 | daily
range=[0->121]
unique=122 | | [SocialEvo](SOCIALEVO/edges.csv) (num_edges: 2,099,519) | range: 1->74
unique: 74 | range: 1->74
unique: 70 | Mobile phone proximity network in an undergraduate dorm over eight months.
Each edge has a 2-dim feature. | [edge_features.npy](SOCIALEVO/edge_features.npy) 32.0MB, 2,099,520x2, float64 | Second
range=[0->20,935,623]
unique=565,932 | | [UNtrade](UNTRADE/edges.csv) (num_edges: 507,497) | range: 1->255
unique: 255 | range: 1->255
unique: 254 | Food and agriculture trade between nations over 30+ years.
Edge weight = normalized import or export value. | [edge_features.npy](UNTRADE/edge_features.npy) 1.9MB, 507,498x1, int32 | yearly
range=[0->31]
unique=32 | | [UNvote](UNVOTE/edges.csv) (num_edges: 1,035,742) | range: 1->201
unique: 201 | range: 1->201
unique: 201 | UN General Assembly roll-call votes.
Edge weight increases when two nations both vote "yes". | [edge_features.npy](UNVOTE/edge_features.npy) 2.0MB, 1,035,743x1, int16 | yearly
range=[0->71]
unique=72 | | [USLegis](USLEGIS/edges.csv) (num_edges: 60,396) | range: 1->225
unique: 224 | range: 1->225
unique: 225 | US Senate co-sponsorship network.
Edge weight = number of shared bill co-sponsorships in a congress. | [edge_features.npy](USLEGIS/edge_features.npy) 118.1KB, 60,397x1, int16 | bi-yearly
range=[0->11]
unique=12 | | [Enron](ENRON/edges.csv) (num_edges: 125,235) | range: 1->184
unique: 181 | range: 1->184
unique: 184 | Email communications between Enron employees over three years. | n/a | Second
range=[0->113,740,399]
unique=22,632 | | [LastFM](LASTFM/edges.csv) (num_edges: 1,293,103) | range: 1->980
unique: 980 | range: 981->1980
unique: 1000 | Bipartite user-song listening graph over one month. | [node_role.npy](LASTFM/node_role.npy) 2.1KB, 1,981x1, bool | Second
range=[0->137,107,267]
unique=1,283,614 | | [MOOC](MOOC/edges.csv) (num_edges: 411,749) | range: 1->7047
unique: 7047 | range: 7048->7144
unique: 97 | Bipartite student-content interaction graph.
Each edge has a 4-dim feature. | [edge_features.npy](MOOC/edge_features.npy) 12.6MB, 411,750x4, float64
[ban_labels.csv](MOOC/ban_labels.csv) 2.0MB, 411,749x1, bool
[node_role.npy](MOOC/node_role.npy) 7.1KB, 7,145x1, bool | Second
range=[0->2,572,086]
unique=345,600 | | [Reddit](REDDIT/edges.csv) (num_edges: 672,447) | range: 1->10000
unique: 10000 | range: 10001->10984
unique: 984 | Bipartite user-subreddit posting graph over one month.
172-dim LIWC edge feature.
Dynamic ban labels. | [edge_features.npy](REDDIT/edge_features.npy) 882.4MB, 672,448x172, float64
[ban_labels.csv](REDDIT/ban_labels.csv) 3.3MB, 672,447x1, bool
[node_role.npy](REDDIT/node_role.npy) 10.9KB, 10,985x1, bool | Millisecond
range=[0->2,678,390,016]
unique=669,065 | | [UCI](UCI/edges.csv) (num_edges: 59,835) | range: 1->1899
unique: 1350 | range: 1->1898
unique: 1862 | Online communication network where nodes are university students.
Edges are posted messages. | n/a | Second
range=[0->16,736,181]
unique=58,911 | | [Wikipedia](WIKIPEDIA/edges.csv) (num_edges: 157,474) | range: 1->8227
unique: 8227 | range: 8228->9227
unique: 1000 | Bipartite user-page editing graph over one month.
172-dim LIWC edge feature.
Dynamic temporary-ban labels. | [edge_features.npy](WIKIPEDIA/edge_features.npy) 206.6MB, 157,475x172, float64
[ban_labels.csv](WIKIPEDIA/ban_labels.csv) 772KB, 157,474x1, bool
[node_role.npy](WIKIPEDIA/node_role.npy) 9.1KB, 9,228x1, bool | Second
range=[0->2,678,373]
unique=152,757 |