https://github.com/neo4j-examples/neo4j-fabric-examples
Set of resources for the real time detection of fraud with Neo4j Fabric across shards, use case transaction structuring aka smurfing
https://github.com/neo4j-examples/neo4j-fabric-examples
fabric financial fraud-prevention neo4j sharding
Last synced: 19 days ago
JSON representation
Set of resources for the real time detection of fraud with Neo4j Fabric across shards, use case transaction structuring aka smurfing
- Host: GitHub
- URL: https://github.com/neo4j-examples/neo4j-fabric-examples
- Owner: neo4j-examples
- License: apache-2.0
- Created: 2021-12-08T13:20:08.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-09T09:44:08.000Z (almost 4 years ago)
- Last Synced: 2025-05-08T01:42:55.096Z (5 months ago)
- Topics: fabric, financial, fraud-prevention, neo4j, sharding
- Language: Jupyter Notebook
- Homepage:
- Size: 1.51 MB
- Stars: 6
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fabric for fraud
Following set of resources have been provided to help you get going with Fabric.Based upon Financial Fraud use case for Trinity Bank (a simulated bank)
Fraud type: the fraudulent structuring of transactions aka smurfingShows you how to
+ Run fabric and the database shards on docker or minikube
- refer to the folder docker
- or refer to folder kubernetes for doing it with Minikube (need to review instructions)
- at this point fabric proxy is ready BUT you cant query because the databases DONT exist
+ The synthetic data set - refer to folder synthetic-data
- of 500 customers (customers.csv) and 3 months of transactions (transactions.csv, into one graph
+ How to Import
- Either use http://data-importer.graphapp.io/ to get the data into default neo4j database
- Or refer to folder import, and use import.cypher to populate the neo4j database with the set of commands that the data-importer generated
+ How to label by month, and then shard the data across 3 shards - refer to the folder shard-the-data
1) run shard-the-dataset.cypher
2) perform admin commands in the copy-the-data-to-shards AS user neo4j (dont use ROOT)
3) create-customer-shard-constraints (these commands are outputted to console when you copy-the-shard-data)
4) create-transaction-shard-constraints
+ Perform sample queries using fabric - refer to the file Queries
- Please NOTE that the queries use the new syntax in 4.4 - Node Patterns: predicates on properties
- IF you decide to run neo4j 4.3 instead, or want a mix of 4.3 and 4.4 databases you will need to modify the queries
+ Some basic Troubleshooting if you have any problems# synthetic data generator (transaction-generator)
Has been provided in the form of a Jupyter Notebook.
It can be used to
+ Generate any number of Trinity bank customers - default is 500
+ Change the upper and lower limits for the random generator that creates transaction between bank a/c - default is 30 to 100
+ Change the % of Trinity account holders that make transactions with other Trinity a/cs
+ Change the upper limit of the no. of random transactions created between Trinity a/cs
+ Change the currency, default USDGenerates the following files
+ output/customers.csv
+ output/transactions.csvNotes on the generator
+ Uses faker python module to generate the data
+ It is representative but not accurate data
+ for example Sort-code isnt used, names dont match email addresses
+ Does not generate structured transactions# ToDO
+ Public version of the CL deck
+ More notes on running the K8s / Minikube
+ Create structured transactions
+ Create a query to find the fraud
+ More adv. cypher queries
- Recomposing the graph
+ Demo use cases for fabric with Aura
- federated Neo4j + Aura queries
- E.g cut over from on prem to cloud (question in CL session)
- use for migration
- use for DR
+ Federated databases for fraud rings
- Multi-bank system generator with stolen identities generator
- Fraud ring data set
- Synthetic and stolen identities
+ Using GDS
+ Using Bloom
+ Getting ready for 5.0