Preparing Your Data
Converting From a Flat Transaction Table
Most raw financial datasets start as a single large CSV with one row per transaction. Here is a systematic procedure to convert it into the required format.
Original flat table example:
Step 1 — Assign zero-based integer IDs:
Step 2 — Write node files (one row per unique entity):
Step 3 — Write edge files:
Step 4 — Create the temporal test split:
Feature Engineering Guidelines
The GNN works with whatever numeric features you provide. The following practices will directly improve model quality.
Normalise continuous features. GNNs are sensitive to feature scale. Standardise (subtract mean, divide by standard deviation) or min-max normalise all continuous features before writing the CSV.
Encode categoricals numerically. The pipeline reads only numeric values. Convert all categorical columns. Binary encoding is more compact than one-hot for higher-cardinality fields (e.g. 4 types → 2 bits instead of 4 columns):
Cap outliers before normalisation. A single extreme transaction amount can dominate the embedding. Clip to a reasonable percentile (e.g., 99th) before normalising.
Aggregate time features. For time-of-day, use cyclic encoding (sine/cosine) or equally-spaced bins. Do not pass raw Unix timestamps.