How neo4j-graph-examples/fraud-detection works
Project Type and Purpose
• This is an open-source demo/data-driven project (“fraud-detection”) showcasing how to detect fraud on the Paysim financial dataset using Neo4j Graph Data Science (GDS) and Neo4j Bloom. It provides data dumps, Cypher scripts for building and analyzing the graph, a Bloom perspective for visualization, and multi-language client examples.
Main Components
A. Data Assets
• data/ – Paysim dataset dumps (.dump) for Neo4j
• (Optionally) CSV/flat files loaded via scripts/
B. Ingestion & ETL
• scripts/*.cypher – Cypher scripts to:
– Load raw data (e.g. loadWCCNamedGraph.cypher)
– Create named graphs in GDS
– Run algorithms (PageRank, WCC, Louvain, similarity)
– Write results back to the database
• Neo4j‐admin load (via README.adoc instructions)
C. Graph Database
• Neo4j DBMS with GDS plugin (v3.5 & v4.x compatible)
• Graph model (nodes: Client, Merchant, Transaction; relationships: PERFORMED, TO, etc.)
• In-memory named graphs & projected graphs managed by GDS
D. Analytics Engine
• GDS procedures invoked by Cypher scripts
• Produces fraud scores, community detection, path analyses
E. Visualization & UX
• Neo4j Bloom perspective: bloom/fraud-detection.bloom-perspective
• Neo4j Browser guide: documentation/fraud-detection.neo4j-browser-guide
• Model & example images: documentation/img/model.svg, documentation/img/example.png
F. Client Applications
• code/javascript/example.js
• code/java/Example.java
• code/python/example.py
• code/csharp/Example.cs
• code/go/example.go
– Each uses official Neo4j drivers over Bolt/HTTP to run sample queries
G. Documentation
• README.adoc – project overview, setup, usage
• documentation/ – detailed AsciiDoc guides, images, helper scripts
Relationships & Data Flow
1. Data Load:
• Paysim dump or CSV ➔ ingest via Neo4j‐admin or scripts/*.cypher
2. Graph Construction:
• Cypher ingestion scripts create the core graph schema in Neo4j
3. Analytics Pipeline:
• CALL gds.* procedures ➔ in-memory graphs ➔ results written back as node/relationship properties or named graphs
4. Access & Visualization:
• Neo4j Bloom & Browser connect to DB via Bolt/HTTP for exploration
• Client apps query the DB for example use cases
Architectural Patterns & Design Principles
• ETL pipeline separating data ingestion, processing, and storage
• Modular Cypher scripts organized by algorithm type
• Layered architecture: storage (Neo4j), analytics (GDS), presentation (Bloom/clients)
• Polyglot client support demonstrating driver‐agnostic design