How a transaction graph helps the bank get to know its customer better

Andrey Savchenko13 Apr 2026

Problem

Banks encode each customer's transaction history with a self-supervised sequence model. The embedding then feeds classifiers for fraud, scoring, age or gender. The model sees every customer alone and ignores that customers paying in the same stores are probably similar. That signal is lost, so downstream quality stays lower than it could be.

Example from the article: the authors compared nearest-neighbor lists of the same customer in two spaces, the sequence embedding and the customer-store graph. Even with 1000 neighbors, the lists overlapped by less than 40%, so the graph carries information the history does not.

Solution in brief

Build a bipartite customer-merchant graph and feed it into the existing sequence model in one of three model-agnostic ways. Use pretrained graph embeddings for merchants (GrEmb), add a graph view of the customer (Reg), or add a graph-similarity ranking loss (Loss). The best choice depends on graph density. The graph is used only in training, so serving cost does not change.

Questions this case answers
  • How to inject cross-entity interaction structure into a per-entity sequence encoder when each entity is currently modeled in isolation and the existing pipeline must stay unchanged
  • How to choose a way of fusing graph and sequence representations when graph density varies from very sparse to very dense
  • How to make a customer-embedding model learn from other customers who shop in the same places?
  • How to add a client-merchant graph to an already trained event-sequence pipeline without rewriting it?

Tools and methods

  • CoLES — self-supervised contrastive encoder of event sequences, the base model the three strategies plug into
  • GraphSAGE — graph neural network that produces the pretrained merchant embeddings for GrEmb (per the paper)
  • BPR ranking loss — pairwise loss that keeps graph-close customers close in embedding space (Loss strategy)
  • LightGBM — downstream classifier on top of the embeddings (per the paper)
Continue reading — it's free

Google or a one-time email code. No password.