SlideShare une entreprise Scribd logo
1  sur  88
Télécharger pour lire hors ligne
Stop Complex Fraud in
its Tracks with Neo4j
github.com/maxdemarzi
About 200 public repositories
Max De Marzi
Neo4j Field Engineer
About
Me !
01
02
03
04
maxdemarzi.com
@maxdemarzi
About 160 blog posts
Who Are Today’s Fraudsters?
Organized in groups Synthetic Identities Stolen Identities Hijacked Devices
Who Are Today’s Fraudsters?
Types of Fraud
• Credit Card Fraud
• Rogue Merchants
• Fraud Rings
• Insurance Fraud
• eCommerce Fraud
• Fraud we don’t know about yet…
“Don’t consider traditional
technology adequate to keep
up with criminal trends”
Market Guide for Online Fraud Detection, April 27, 2015
Fraud Detection
Endpoint-Centric
Analysis of users and
their end-points
1.
Navigation Centric
Analysis of
navigation behavior
and suspect
patterns
2.
Account-Centric
Analysis of anomaly
behavior by channel
3.
PC:s
Mobile Phones
IP-addresses
User ID:s
Comparing Transaction
Identity Vetting
Traditional Fraud Detection Methods
• Fraud rings
• Fake IP-adresses
• Hijacked devices
• Synthetic Identities
• Stolen Identities
• And more…
Weaknesses
DISCRETE ANALYSIS
Endpoint-Centric
Analysis of users and
their end-points
1.
Navigation Centric
Analysis of
navigation behavior
and suspect
patterns
2.
Account-Centric
Analysis of anomaly
behavior by channel
3.
Traditional Fraud Detection Methods
CONNECTED ANALYSIS
Endpoint-Centric
Analysis of users and
their end-points
Navigation Centric
Analysis of
navigation behavior
and suspect
patterns
Account-Centric
Analysis of anomaly
behavior by channel
DISCRETE ANALYSIS
1. 2. 3.
Cross Channel
Analysis of anomaly
behavior correlated
across channels
4.
Entity Linking
Analysis of relationships
to detect organized
crime and collusion
5.
Augmented Fraud Detection
INVESTIGATE
Revolving Debt
Number of Accounts
INVESTIGATE
Normal behavior
Fraud Detection with Discrete Analysis
Revolving Debt
Number of Accounts
Normal behavior
Fraudulent pattern
Fraud Detection with Connected Analysis
Fraud Detection with Graphs
Subgraph Patterns
Ni: number of neighbors of a node
Ei: number of relationships in a subgraph
Wi: total “weight” of a subgraph
λw,i: largest variability of the “weights” of a
subgraph
Power Law Density
slope=2
slope=1
slope=1.35
Power Law Weight
Power Law Weight Variability
•Influence
•Power
•Status
•Control
•Independence
•Information
Which Nodes are Important?
Graph Famous
•PageRank
•ArticleRank
•Betweenness Centrality
•Closeness Centrality
•Eigenvector Centrality
•Degree Centrality
•Harmonic Centrality
Centrality
Add Graph Features to your existing
Fraud Detection Models
Account ID Community
Size
Degree PageRank
1 31 15 10.7
3 4 12 3.4
5 98 9 11.2
•Influence
•Relationships
•Communities
Fraud Rings
Let’s create some Users
CREATE (john:User {name:"John"})

CREATE (sheila:User {name:"Sheila"})

CREATE (karen:User {name:"Karen"})
Sheila
Modeling a fraud ring as a graph
John
Karen
John has a few accounts
CREATE (cc1:Card {number:"4012888888881881", balance: 493.23})
CREATE (ba1:Account {number:"85474584", balance:1322.30, type:”Checking"})
CREATE (us1:Loan {number:"63493639", balance:5000.00, type:"Loan”})
CREATE (john)-[:HAS_ACCOUNT]->(cc1)
CREATE (john)-[:HAS_ACCOUNT]->(ba1)
CREATE (john)-[:HAS_ACCOUNT]->(us1)
Sheila also has an Identification
Number
CREATE (ba2:Account {number:"25384738", balance:2983.99, type:"Checking"})
CREATE (cc2:Card {number:"5105105105105100", balance: 893.11})
CREATE (ssn2:Identification {number:"000-42-4329", type:”SSN"})
CREATE (sheila)-[:HAS_ACCOUNT]->(ba2)
CREATE (sheila)-[:HAS_ACCOUNT]->(cc2)
CREATE (sheila)-[:HAS_ID]->(ssn2)
Karen has a phone number
CREATE (ba3:Account {number:"63493639", balance:3204.83, type:"Checking"})
CREATE (us2:Loan {number:"28372342", balance:5000.00, type:"Loan"})
CREATE (phone2:Phone {number:”312-606-0842"})
CREATE (karen)-[:HAS_ACCOUNT]->(ba3)
CREATE (karen)-[:HAS_ACCOUNT]->(us2)
CREATE (karen)-[:HAS_PHONE]->(phone2)
Sheila
John
Karen
CREDIT
CARD
BANK
ACCOUNT
BANK
ACCOUNT
BANK
ACCOUNT
PHONE
NUMBER
UNSECURED
LOAN
SSN 2
UNSECURED
LOAN
Nothing suspicious yet
CREDIT
CARD
John and Sheila are 

sharing a phone number
CREATE (phone1:Phone {number:"312-876-5309"})
CREATE (john)-[:HAS_PHONE]->(phone1)
CREATE (sheila)-[:HAS_PHONE]->(phone1)
John and Karen are sharing an
Identification Number
CREATE (ssn1:Identification {number:"000-91-7434", type:"SSN"})
CREATE (john)-[:HAS_ID]->(ssn1)
CREATE (karen)-[:HAS_ID]->(ssn1)
They all share the same address
CREATE (ad:Address {line1:"175 N. Harbor Drive",
city:"Chicago", state:"IL", zip:”60601"})
CREATE (john)-[:HAS_ADDRESS]->(ad)
CREATE (karen)-[:HAS_ADDRESS]->(ad)
CREATE (sheila)-[:HAS_ADDRESS]->(ad)
Sheila
John
Karen
CREDIT
CARD
BANK
ACCOUNT
BANK
ACCOUNT
BANK
ACCOUNT
ADDRESS
PHONE
NUMBER
PHONE
NUMBER
SSN 1
UNSECURED
LOAN
SSN 2
UNSECURED
LOAN
Starting to connect the dots…
CREDIT
CARD
Let’s add Robert
CREATE (robert:User {name:"Robert"})
CREATE (ba4:Account {number:"8374927", balance:1273.39, type:"Checking"})
CREATE (cc3:Card {number:"378282246310005", balance: 134.72})
CREATE (robert)-[:HAS_ACCOUNT]->(ba4)
CREATE (robert)-[:HAS_ACCOUNT]->(cc3)
• Triangle Count
• Clustering Coefficients
• Connected Components (Union Find)
• Strongly Connected Components
• Label Propagation
• Louvain Modularity
• Balanced Triad (identification)
Community
Detection
• Degree Centrality
• Closeness Centrality
• CC Variations: Harmonic, Dangalchev,
Wasserman & Faust
• Betweenness Centrality
• Approximate Betweenness Centrality
• PageRank
• Personalized PageRank
• ArticleRank
• Eigenvector Centrality
• Euclidean Distance
• Cosine Similarity
• Jaccard Similarity
• Overlap Similarity
• Pearson Similarity
Centrality /
Importance
Similarity
Link
Prediction
• Adamic Adar
• Common Neighbors
• Preferential Attachment
• Resource Allocations
• Same Community
• Total Neighbors
Graph Algorithms
Union Find Graph Algorithm
Finds sets where all nodes can
reach all other nodes
•Fraud Detection
•Deduplication
•Entity Resolution
See “The Real Property Graph” blog post:
Union Find Graph Algorithm
CALL algo.unionFind.stream(
  'MATCH (p:User) RETURN id(p) as id',
  'MATCH (p1:User)-->()<--(p2:User)
   RETURN id(p1) as source, id(p2) as target',
  {graph:'cypher'}
) YIELD nodeId, setId
RETURN algo.asNode(nodeId).name AS user, setId
Union Find Graph Algorithm
Connected Components
Set 3Set 0
Sheila
John
Karen
CREDIT
CARD
BANK
ACCOUNT
BANK
ACCOUNT
BANK
ACCOUNT
PHONE
NUMBER
UNSECURED
LOAN
SSN 2
UNSECURED
LOAN
Let’s pretend they aren't that stupid
CREDIT
CARD
They called from the same number
MATCH (john:User {name:"John"}),
(sheila:User {name:"Sheila"})
CREATE (ani:ANI {number:"312-666-1234"})
CREATE (ani)-[:CALLED]->(john)
CREATE (ani)-[:CALLED]->(sheila)
They logged on using the same
browser
MATCH (john:User {name:”John"}),
(robert:User {name:”Robert"})
CREATE (fg:Browser {fingerprint:”asdf7373jsdf3rw"})
CREATE (fg)-[:ACCESSED]->(john)
CREATE (fg)-[:ACCESSED]->(robert)
Sheila
John
Robert
CREDIT
CARD
BANK
ACCOUNT
BANK
ACCOUNT
BANK
ACCOUNT
BROWSER
ANI
NUMBER
PHONE
NUMBER
UNSECURED
LOAN
SSN 2
UNSECURED
LOAN
Connected by their “connections”
CREDIT
CARD
Union Find Graph Algorithm again
CALL algo.unionFind.stream(
  'MATCH (p:User) RETURN id(p) as id',
  'MATCH (p1:User)<-[:ACCESSED]-()-[:ACCESSED]->(p2:User)
   RETURN id(p1) as source, id(p2) as target',
  {graph:'cypher'}
) YIELD nodeId, setId
RETURN algo.asNode(nodeId).name AS user, setId
Union Find Graph Algorithm
Connected Components
Set 0
Set 2
Why don’t we do both?
Store the results of Union Find
CALL algo.unionFind(
  'MATCH (p:User) RETURN id(p) as id',
  'MATCH (p1:User)--()--(p2:User)
   RETURN id(p1) as source, id(p2) as target',
  {graph:'cypher'}
) YIELD setCount
Let’s see these partitions
MATCH (n:User)
RETURN n.partition, COUNT(*) AS members,
COLLECT(n.name) AS names
ORDER BY members DESC
Our fraudsters are all connected
Our fraudsters are all connected
Not all people are supposed to be loyal to you.
Some are meant to come along as a reminder to watch the company you keep.
Bad News:
Good News:
Credit Card Fraud
Manual skimming
of an ATM
Sophisticated Data Breaches
Credit Card Information get stolen all the time
Rogue Merchant
USE
ISSUES
Terminal ATM-
skimming
Data Breach
Card Holder
Card Issuer
Fraudster
USE $5MAKES
$10
MAKES
$2
MAKES
MAKES $2000
AT
Testing
Merchants
ATMAKES Tx
Credit Card Transactions as a Graph
CREATE (john:User {name:"John"})
CREATE (m1:Merchant {name:"Computer Store"})
CREATE (m2:Merchant {name:"Gas Station"})
CREATE (m3:Merchant {name:"Jewelry Store"})
CREATE (m4:Merchant {name:"Furniture Store"})
CREATE (tx1:Transaction:Fraudulent {amount: 2000.00, date:datetime()})
CREATE (tx2:Transaction {amount: 35.00, date:datetime() - duration('P1D')})
CREATE (tx3:Transaction {amount: 25.00, date:datetime() - duration('P2D')})
CREATE (tx4:Transaction {amount: 12.00, date:datetime() - duration('P3D')})
CREATE (tx1)-[:AT_MERCHANT]->(m1)
CREATE (tx2)-[:AT_MERCHANT]->(m2)
CREATE (tx3)-[:AT_MERCHANT]->(m3)
CREATE (tx4)-[:AT_MERCHANT]->(m4)
Credit Card Transactions as a Graph
CREATE (john)-[:MAKES]->(tx1)
CREATE (john)-[:MAKES]->(tx2)
CREATE (john)-[:MAKES]->(tx3)
CREATE (john)-[:MAKES]->(tx4)
John’s Transactions last week
// The last week of John's transactions
MATCH p = (n:User {name:"John"})-[:MAKES]->(tx)
WHERE tx.date > datetime() - duration('P7D')
RETURN p
John’s Transactions last week
Credit Card Transactions as a List
MATCH (u:User)
WHERE SIZE((u)-[:PREV_TX]->()) = 0 AND SIZE((u)-[:MAKES]->()) > 0
WITH u
LIMIT 100
MATCH (u)-[r:MAKES]->(tx)
WITH u, tx ORDER BY tx.date DESC
WITH u, COLLECT(tx) AS transactions, HEAD(COLLECT(tx)) AS last
CREATE (u)-[:PREV_TX]->(last)
FOREACH (n IN RANGE(0, SIZE(transactions)-2) |
FOREACH (next IN [transactions[n]] |
FOREACH (prev IN [transactions[n+1]] |
CREATE (next)-[:PREV_TX]->(prev)
)))
John’s Transactions last week
// The last week of John's transactions
MATCH p = (n:User {name:"John"})-[:PREV_TX*]->(tx)
WHERE NONE (tx IN tail(nodes(p))
          WHERE tx.date <= datetime() - duration('P7D'))
RETURN p
John’s Transactions last week
TxTx Tx TxTx Tx Tx TxTxTx TxJohn
Tx
$2000
TxTx Tx Tx TxTxTxTx Tx Tx
Computer
Store
John
Tx
$2000
Tx Tx
$25$10$4
TxTx Tx Tx TxTxTx
Computer
Store
John
Following the footsteps
// All the transactions marked fraudulent in the last week
// and the transactions that came before them
// up to two weeks ago.
MATCH p = (fraud:Fraudulent)-[:PREV_TX*]->(tx)
WHERE fraud.date > datetime() - duration('P7D')
  AND NONE (tx IN tail(nodes(p))
WHERE tx.date <= datetime() - duration('P14D'))
RETURN p
Following the footsteps
Tx
Tx
$2000
Tx Tx
$25$10$4
TxTx Tx Tx TxTxTx
Computer
Store
John
Sheila
$2
TxTxSheila TxTxTx Tx Tx TxTx
$3000
Tx
Jewelry
StoreTx
$3
Tx
Tx
$2000
Tx Tx
$25$10$4
TxTx Tx Tx TxTxTx
Computer
Store
John
Sheila
$2
TxTxSheila TxTxTx Tx Tx TxTx
$3000
Tx
Jewelry
StoreTx
$3
Robert TxTxTx Tx TxTx TxTxTx Tx Tx
TxTx
$2
TxTx
Tx
$2000
Tx Tx
$25$10$4
TxTx Tx Tx TxTxTx
Computer
Store
John
Sheila
Robert
$3
Karen
TxTxTx Tx Tx TxTx
$3000
Tx
Jewelry
StoreTx
$3
TxTxTx Tx Tx TxTx TxTx
TxTx TxTx Tx Tx TxTx
$8 $12
Tx
$1500
Furniture
Store
Tx Tx Tx
Find the Suspect Merchants
// Top 5 common merchants from fraudulent transaction chains
up to two weeks ago.
MATCH p = (fraud:Fraudulent)-[:PREV_TX*]->(tx)
WHERE fraud.date > datetime() - duration('P7D')
  AND NONE (tx IN tail(nodes(p))
            WHERE tx.date <= datetime() - duration('P14D'))
WITH nodes(p) AS transactions
UNWIND transactions AS tx
WITH DISTINCT tx
MATCH (tx)-[:AT_MERCHANT]->(merchant)
RETURN merchant.name, COUNT(*) AS txCount
ORDER BY txCount DESC
LIMIT 5
Find the Suspect Merchants
TxTx
$2
TxTx
Tx
$2000
Tx Tx
$25$10$4
TxTx Tx Tx TxTxTx
Computer
Store
John
Gas Station
Sheila
Robert
$3
Karen
TxTxTx Tx Tx TxTx
$3000
Tx
Jewelry
StoreTx
$3
TxTxTx Tx Tx TxTx TxTx
TxTx TxTx Tx Tx TxTx
$8 $12
Tx
$1500
Furniture
Store
Tx Tx Tx
How Neo4j fits in
Money
Transferring
Purchases Bank
Services Relational
database
Develop Patterns
Data Science-team
+ Good for Discrete Analysis
– No Holistic View of Data-Relationships
– Slow query speed for connections
Money
Transferring
Purchases Bank
Services Relational
database
Data Lake
+ Good for Map Reduce
+ Good for Analytical Workloads
– No holistic view
– Non-operational workloads
– Weeks-to-months processes Develop Patterns
Data Science-team
Merchant
Data
Credit
Score
Data
Other 3rd
Party
Data
Money
Transferring
Purchases Bank
Services
Neo4j powers
360° view of
transactions in
real-time
Neo4j
Cluster
SENSE
Transaction
stream
RESPOND
Alerts &
notification
LOAD RELEVANT DATA
Relational
database
Data Lake
Visualization UI
Fine Tune Patterns
Develop Patterns
Data Science-team
Merchant
Data
Credit
Score
Data
Other 3rd
Party
Data
Money
Transferring
Purchases Bank
Services
Neo4j powers
360° view of
transactions in
real-time
Neo4j
Cluster
SENSE
Transaction
stream
RESPOND
Alerts &
notification
LOAD RELEVANT DATA
Relational
database
Data Lake
Visualization UI
Fine Tune Patterns
Develop Patterns
Data Science-team
Merchant
Data
Credit
Score
Data
Other 3rd
Party
Data
Data-set used
to explore
new insights
Summary
We talked about…
Finding Fraud with Graphs
Examples of different types of Fraud:
Fraud Rings
Credit Card Testing
Fraud Origination
How Neo4j Fits in an Architecture
Detect & prevent fraud in real-time
Faster credit risk analysis and transactions
Reduce chargebacks
Quickly adapt to new methods of fraud
Why Neo4j? Who’s using it?
Financial institutions use Neo4j to:
FINANCE Government Online Retail
Names redacted to protect the innocent and conceal the guilty
No really, why Neo4j?
Fixed Sized Records
“Joins” on Creation
Spin Spin Spin through this
data structure
Pointers instead of Lookups
1
2
3
4
Partitions
Each Node’s
relationships are
partitioned by
type and direction.
Valuable Resources!
neo4jsandbox.com https://neo4j.com/use-cases/fraud-detection/ neo4j.com/product
Sandbox Fraud Detection Product
Q&A

Contenu connexe

Tendances

Interactive Recommender Systems with Netflix and Spotify
Interactive Recommender Systems with Netflix and SpotifyInteractive Recommender Systems with Netflix and Spotify
Interactive Recommender Systems with Netflix and Spotify
Chris Johnson
 
Interactive Recommender Systems
Interactive Recommender SystemsInteractive Recommender Systems
Interactive Recommender Systems
Roelof van Zwol
 
Book Recommendations.pptx
Book Recommendations.pptxBook Recommendations.pptx
Book Recommendations.pptx
DishaSharma337110
 
Predicting Influence and Communities Using Graph Algorithms
Predicting Influence and Communities Using Graph AlgorithmsPredicting Influence and Communities Using Graph Algorithms
Predicting Influence and Communities Using Graph Algorithms
Databricks
 
What Is Data Science? | Introduction to Data Science | Data Science For Begin...
What Is Data Science? | Introduction to Data Science | Data Science For Begin...What Is Data Science? | Introduction to Data Science | Data Science For Begin...
What Is Data Science? | Introduction to Data Science | Data Science For Begin...
Simplilearn
 

Tendances (20)

What Is GDS and Neo4j’s GDS Library
What Is GDS and Neo4j’s GDS LibraryWhat Is GDS and Neo4j’s GDS Library
What Is GDS and Neo4j’s GDS Library
 
Past, Present & Future of Recommender Systems: An Industry Perspective
Past, Present & Future of Recommender Systems: An Industry PerspectivePast, Present & Future of Recommender Systems: An Industry Perspective
Past, Present & Future of Recommender Systems: An Industry Perspective
 
Detecting fraud with Python and machine learning
Detecting fraud with Python and machine learningDetecting fraud with Python and machine learning
Detecting fraud with Python and machine learning
 
Fraud Detection with Graphs at the Danish Business Authority
Fraud Detection with Graphs at the Danish Business AuthorityFraud Detection with Graphs at the Danish Business Authority
Fraud Detection with Graphs at the Danish Business Authority
 
Interactive Recommender Systems with Netflix and Spotify
Interactive Recommender Systems with Netflix and SpotifyInteractive Recommender Systems with Netflix and Spotify
Interactive Recommender Systems with Netflix and Spotify
 
Interactive Recommender Systems
Interactive Recommender SystemsInteractive Recommender Systems
Interactive Recommender Systems
 
LinkedIn Sourcing: Beyond the Basics - Glen Cathey's 2012 Dallas SourceCon Pr...
LinkedIn Sourcing: Beyond the Basics - Glen Cathey's 2012 Dallas SourceCon Pr...LinkedIn Sourcing: Beyond the Basics - Glen Cathey's 2012 Dallas SourceCon Pr...
LinkedIn Sourcing: Beyond the Basics - Glen Cathey's 2012 Dallas SourceCon Pr...
 
Data Science At Zillow
Data Science At ZillowData Science At Zillow
Data Science At Zillow
 
Data Modeling with Neo4j
Data Modeling with Neo4jData Modeling with Neo4j
Data Modeling with Neo4j
 
Transforming BT’s Infrastructure Management with Graph Technology
Transforming BT’s Infrastructure Management with Graph TechnologyTransforming BT’s Infrastructure Management with Graph Technology
Transforming BT’s Infrastructure Management with Graph Technology
 
Intro to Neo4j and Graph Databases
Intro to Neo4j and Graph DatabasesIntro to Neo4j and Graph Databases
Intro to Neo4j and Graph Databases
 
Algorithmic Music Recommendations at Spotify
Algorithmic Music Recommendations at SpotifyAlgorithmic Music Recommendations at Spotify
Algorithmic Music Recommendations at Spotify
 
Recommendation at Netflix Scale
Recommendation at Netflix ScaleRecommendation at Netflix Scale
Recommendation at Netflix Scale
 
Book Recommendations.pptx
Book Recommendations.pptxBook Recommendations.pptx
Book Recommendations.pptx
 
Recent Trends in Personalization at Netflix
Recent Trends in Personalization at NetflixRecent Trends in Personalization at Netflix
Recent Trends in Personalization at Netflix
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Predicting Influence and Communities Using Graph Algorithms
Predicting Influence and Communities Using Graph AlgorithmsPredicting Influence and Communities Using Graph Algorithms
Predicting Influence and Communities Using Graph Algorithms
 
What Is Data Science? | Introduction to Data Science | Data Science For Begin...
What Is Data Science? | Introduction to Data Science | Data Science For Begin...What Is Data Science? | Introduction to Data Science | Data Science For Begin...
What Is Data Science? | Introduction to Data Science | Data Science For Begin...
 
Time, Context and Causality in Recommender Systems
Time, Context and Causality in Recommender SystemsTime, Context and Causality in Recommender Systems
Time, Context and Causality in Recommender Systems
 
How Graph Technology is Changing AI
How Graph Technology is Changing AIHow Graph Technology is Changing AI
How Graph Technology is Changing AI
 

Similaire à Fraud Detection and Neo4j

Final Project.ipynb_checkpointsSpr2019_Decision_Trees_Project1.docx
Final Project.ipynb_checkpointsSpr2019_Decision_Trees_Project1.docxFinal Project.ipynb_checkpointsSpr2019_Decision_Trees_Project1.docx
Final Project.ipynb_checkpointsSpr2019_Decision_Trees_Project1.docx
lmelaine
 
SH 1 - SES 8 - Stitch_Overview_TLV.pptx
SH 1 - SES 8 - Stitch_Overview_TLV.pptxSH 1 - SES 8 - Stitch_Overview_TLV.pptx
SH 1 - SES 8 - Stitch_Overview_TLV.pptx
MongoDB
 
Mongo db world 2014 billrun
Mongo db world 2014   billrunMongo db world 2014   billrun
Mongo db world 2014 billrun
MongoDB
 
Work in TDW
Work in TDWWork in TDW
Work in TDW
saso70
 

Similaire à Fraud Detection and Neo4j (20)

MySQL under the siege
MySQL under the siegeMySQL under the siege
MySQL under the siege
 
Final Project.ipynb_checkpointsSpr2019_Decision_Trees_Project1.docx
Final Project.ipynb_checkpointsSpr2019_Decision_Trees_Project1.docxFinal Project.ipynb_checkpointsSpr2019_Decision_Trees_Project1.docx
Final Project.ipynb_checkpointsSpr2019_Decision_Trees_Project1.docx
 
Saml authentication bypass
Saml authentication bypassSaml authentication bypass
Saml authentication bypass
 
SH 1 - SES 8 - Stitch_Overview_TLV.pptx
SH 1 - SES 8 - Stitch_Overview_TLV.pptxSH 1 - SES 8 - Stitch_Overview_TLV.pptx
SH 1 - SES 8 - Stitch_Overview_TLV.pptx
 
Mongo db world 2014 billrun
Mongo db world 2014   billrunMongo db world 2014   billrun
Mongo db world 2014 billrun
 
Integration of payment gateways using Paypal account
Integration of payment gateways using Paypal account Integration of payment gateways using Paypal account
Integration of payment gateways using Paypal account
 
Digital cash
Digital cashDigital cash
Digital cash
 
Quill vs Slick Smackdown
Quill vs Slick SmackdownQuill vs Slick Smackdown
Quill vs Slick Smackdown
 
MongoDB World 2014 - BillRun, Billing on top of MongoDB
MongoDB World 2014 - BillRun, Billing on top of MongoDBMongoDB World 2014 - BillRun, Billing on top of MongoDB
MongoDB World 2014 - BillRun, Billing on top of MongoDB
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
MongoDB Stich Overview
MongoDB Stich OverviewMongoDB Stich Overview
MongoDB Stich Overview
 
Banking Database
Banking DatabaseBanking Database
Banking Database
 
Mắt kính chính hãng trả góp 0%
Mắt kính chính hãng trả góp 0%Mắt kính chính hãng trả góp 0%
Mắt kính chính hãng trả góp 0%
 
PayPal Real Time Analytics
PayPal  Real Time AnalyticsPayPal  Real Time Analytics
PayPal Real Time Analytics
 
CDR-Stats : VoIP Analytics Solution for Asterisk and FreeSWITCH with MongoDB
CDR-Stats : VoIP Analytics Solution for Asterisk and FreeSWITCH with MongoDBCDR-Stats : VoIP Analytics Solution for Asterisk and FreeSWITCH with MongoDB
CDR-Stats : VoIP Analytics Solution for Asterisk and FreeSWITCH with MongoDB
 
Paymill vs Stripe
Paymill vs StripePaymill vs Stripe
Paymill vs Stripe
 
TRIPACTIONS-PPT.pptx
TRIPACTIONS-PPT.pptxTRIPACTIONS-PPT.pptx
TRIPACTIONS-PPT.pptx
 
Work in TDW
Work in TDWWork in TDW
Work in TDW
 
INTEGRATE 2022 - Data Mapping in the Microsoft Cloud
INTEGRATE 2022 - Data Mapping in the Microsoft CloudINTEGRATE 2022 - Data Mapping in the Microsoft Cloud
INTEGRATE 2022 - Data Mapping in the Microsoft Cloud
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 

Plus de Max De Marzi

Plus de Max De Marzi (20)

DataDay 2023 Presentation
DataDay 2023 PresentationDataDay 2023 Presentation
DataDay 2023 Presentation
 
DataDay 2023 Presentation - Notes
DataDay 2023 Presentation - NotesDataDay 2023 Presentation - Notes
DataDay 2023 Presentation - Notes
 
Developer Intro Deck-PowerPoint - Download for Speaker Notes
Developer Intro Deck-PowerPoint - Download for Speaker NotesDeveloper Intro Deck-PowerPoint - Download for Speaker Notes
Developer Intro Deck-PowerPoint - Download for Speaker Notes
 
Outrageous Ideas for Graph Databases
Outrageous Ideas for Graph DatabasesOutrageous Ideas for Graph Databases
Outrageous Ideas for Graph Databases
 
Neo4j Training Cypher
Neo4j Training CypherNeo4j Training Cypher
Neo4j Training Cypher
 
Neo4j Training Modeling
Neo4j Training ModelingNeo4j Training Modeling
Neo4j Training Modeling
 
Detenga el fraude complejo con Neo4j
Detenga el fraude complejo con Neo4jDetenga el fraude complejo con Neo4j
Detenga el fraude complejo con Neo4j
 
Data Modeling Tricks for Neo4j
Data Modeling Tricks for Neo4jData Modeling Tricks for Neo4j
Data Modeling Tricks for Neo4j
 
Detecion de Fraude con Neo4j
Detecion de Fraude con Neo4jDetecion de Fraude con Neo4j
Detecion de Fraude con Neo4j
 
Neo4j Stored Procedure Training Part 2
Neo4j Stored Procedure Training Part 2Neo4j Stored Procedure Training Part 2
Neo4j Stored Procedure Training Part 2
 
Neo4j Stored Procedure Training Part 1
Neo4j Stored Procedure Training Part 1Neo4j Stored Procedure Training Part 1
Neo4j Stored Procedure Training Part 1
 
Decision Trees in Neo4j
Decision Trees in Neo4jDecision Trees in Neo4j
Decision Trees in Neo4j
 
Neo4j y Fraude Spanish
Neo4j y Fraude SpanishNeo4j y Fraude Spanish
Neo4j y Fraude Spanish
 
Data modeling with neo4j tutorial
Data modeling with neo4j tutorialData modeling with neo4j tutorial
Data modeling with neo4j tutorial
 
Neo4j Fundamentals
Neo4j FundamentalsNeo4j Fundamentals
Neo4j Fundamentals
 
Neo4j Presentation
Neo4j PresentationNeo4j Presentation
Neo4j Presentation
 
Fraud Detection Class Slides
Fraud Detection Class SlidesFraud Detection Class Slides
Fraud Detection Class Slides
 
Neo4j in Depth
Neo4j in DepthNeo4j in Depth
Neo4j in Depth
 
Bootstrapping Recommendations OSCON 2015
Bootstrapping Recommendations OSCON 2015Bootstrapping Recommendations OSCON 2015
Bootstrapping Recommendations OSCON 2015
 
What Finance can learn from Dating Sites
What Finance can learn from Dating SitesWhat Finance can learn from Dating Sites
What Finance can learn from Dating Sites
 

Dernier

FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 

Dernier (20)

CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 

Fraud Detection and Neo4j

  • 1. Stop Complex Fraud in its Tracks with Neo4j
  • 2. github.com/maxdemarzi About 200 public repositories Max De Marzi Neo4j Field Engineer About Me ! 01 02 03 04 maxdemarzi.com @maxdemarzi About 160 blog posts
  • 3. Who Are Today’s Fraudsters?
  • 4. Organized in groups Synthetic Identities Stolen Identities Hijacked Devices Who Are Today’s Fraudsters?
  • 5. Types of Fraud • Credit Card Fraud • Rogue Merchants • Fraud Rings • Insurance Fraud • eCommerce Fraud • Fraud we don’t know about yet…
  • 6. “Don’t consider traditional technology adequate to keep up with criminal trends” Market Guide for Online Fraud Detection, April 27, 2015
  • 7.
  • 9. Endpoint-Centric Analysis of users and their end-points 1. Navigation Centric Analysis of navigation behavior and suspect patterns 2. Account-Centric Analysis of anomaly behavior by channel 3. PC:s Mobile Phones IP-addresses User ID:s Comparing Transaction Identity Vetting Traditional Fraud Detection Methods
  • 10. • Fraud rings • Fake IP-adresses • Hijacked devices • Synthetic Identities • Stolen Identities • And more… Weaknesses DISCRETE ANALYSIS Endpoint-Centric Analysis of users and their end-points 1. Navigation Centric Analysis of navigation behavior and suspect patterns 2. Account-Centric Analysis of anomaly behavior by channel 3. Traditional Fraud Detection Methods
  • 11. CONNECTED ANALYSIS Endpoint-Centric Analysis of users and their end-points Navigation Centric Analysis of navigation behavior and suspect patterns Account-Centric Analysis of anomaly behavior by channel DISCRETE ANALYSIS 1. 2. 3. Cross Channel Analysis of anomaly behavior correlated across channels 4. Entity Linking Analysis of relationships to detect organized crime and collusion 5. Augmented Fraud Detection
  • 12. INVESTIGATE Revolving Debt Number of Accounts INVESTIGATE Normal behavior Fraud Detection with Discrete Analysis
  • 13. Revolving Debt Number of Accounts Normal behavior Fraudulent pattern Fraud Detection with Connected Analysis
  • 15. Subgraph Patterns Ni: number of neighbors of a node Ei: number of relationships in a subgraph Wi: total “weight” of a subgraph λw,i: largest variability of the “weights” of a subgraph
  • 18. Power Law Weight Variability
  • 20. •PageRank •ArticleRank •Betweenness Centrality •Closeness Centrality •Eigenvector Centrality •Degree Centrality •Harmonic Centrality Centrality
  • 21. Add Graph Features to your existing Fraud Detection Models Account ID Community Size Degree PageRank 1 31 15 10.7 3 4 12 3.4 5 98 9 11.2 •Influence •Relationships •Communities
  • 23. Let’s create some Users CREATE (john:User {name:"John"})
 CREATE (sheila:User {name:"Sheila"})
 CREATE (karen:User {name:"Karen"})
  • 24. Sheila Modeling a fraud ring as a graph John Karen
  • 25. John has a few accounts CREATE (cc1:Card {number:"4012888888881881", balance: 493.23}) CREATE (ba1:Account {number:"85474584", balance:1322.30, type:”Checking"}) CREATE (us1:Loan {number:"63493639", balance:5000.00, type:"Loan”}) CREATE (john)-[:HAS_ACCOUNT]->(cc1) CREATE (john)-[:HAS_ACCOUNT]->(ba1) CREATE (john)-[:HAS_ACCOUNT]->(us1)
  • 26. Sheila also has an Identification Number CREATE (ba2:Account {number:"25384738", balance:2983.99, type:"Checking"}) CREATE (cc2:Card {number:"5105105105105100", balance: 893.11}) CREATE (ssn2:Identification {number:"000-42-4329", type:”SSN"}) CREATE (sheila)-[:HAS_ACCOUNT]->(ba2) CREATE (sheila)-[:HAS_ACCOUNT]->(cc2) CREATE (sheila)-[:HAS_ID]->(ssn2)
  • 27. Karen has a phone number CREATE (ba3:Account {number:"63493639", balance:3204.83, type:"Checking"}) CREATE (us2:Loan {number:"28372342", balance:5000.00, type:"Loan"}) CREATE (phone2:Phone {number:”312-606-0842"}) CREATE (karen)-[:HAS_ACCOUNT]->(ba3) CREATE (karen)-[:HAS_ACCOUNT]->(us2) CREATE (karen)-[:HAS_PHONE]->(phone2)
  • 29. John and Sheila are 
 sharing a phone number CREATE (phone1:Phone {number:"312-876-5309"}) CREATE (john)-[:HAS_PHONE]->(phone1) CREATE (sheila)-[:HAS_PHONE]->(phone1)
  • 30. John and Karen are sharing an Identification Number CREATE (ssn1:Identification {number:"000-91-7434", type:"SSN"}) CREATE (john)-[:HAS_ID]->(ssn1) CREATE (karen)-[:HAS_ID]->(ssn1)
  • 31. They all share the same address CREATE (ad:Address {line1:"175 N. Harbor Drive", city:"Chicago", state:"IL", zip:”60601"}) CREATE (john)-[:HAS_ADDRESS]->(ad) CREATE (karen)-[:HAS_ADDRESS]->(ad) CREATE (sheila)-[:HAS_ADDRESS]->(ad)
  • 33. Let’s add Robert CREATE (robert:User {name:"Robert"}) CREATE (ba4:Account {number:"8374927", balance:1273.39, type:"Checking"}) CREATE (cc3:Card {number:"378282246310005", balance: 134.72}) CREATE (robert)-[:HAS_ACCOUNT]->(ba4) CREATE (robert)-[:HAS_ACCOUNT]->(cc3)
  • 34. • Triangle Count • Clustering Coefficients • Connected Components (Union Find) • Strongly Connected Components • Label Propagation • Louvain Modularity • Balanced Triad (identification) Community Detection • Degree Centrality • Closeness Centrality • CC Variations: Harmonic, Dangalchev, Wasserman & Faust • Betweenness Centrality • Approximate Betweenness Centrality • PageRank • Personalized PageRank • ArticleRank • Eigenvector Centrality • Euclidean Distance • Cosine Similarity • Jaccard Similarity • Overlap Similarity • Pearson Similarity Centrality / Importance Similarity Link Prediction • Adamic Adar • Common Neighbors • Preferential Attachment • Resource Allocations • Same Community • Total Neighbors Graph Algorithms
  • 35. Union Find Graph Algorithm Finds sets where all nodes can reach all other nodes •Fraud Detection •Deduplication •Entity Resolution See “The Real Property Graph” blog post:
  • 36. Union Find Graph Algorithm CALL algo.unionFind.stream(   'MATCH (p:User) RETURN id(p) as id',   'MATCH (p1:User)-->()<--(p2:User)    RETURN id(p1) as source, id(p2) as target',   {graph:'cypher'} ) YIELD nodeId, setId RETURN algo.asNode(nodeId).name AS user, setId
  • 37. Union Find Graph Algorithm
  • 40. They called from the same number MATCH (john:User {name:"John"}), (sheila:User {name:"Sheila"}) CREATE (ani:ANI {number:"312-666-1234"}) CREATE (ani)-[:CALLED]->(john) CREATE (ani)-[:CALLED]->(sheila)
  • 41. They logged on using the same browser MATCH (john:User {name:”John"}), (robert:User {name:”Robert"}) CREATE (fg:Browser {fingerprint:”asdf7373jsdf3rw"}) CREATE (fg)-[:ACCESSED]->(john) CREATE (fg)-[:ACCESSED]->(robert)
  • 43. Union Find Graph Algorithm again CALL algo.unionFind.stream(   'MATCH (p:User) RETURN id(p) as id',   'MATCH (p1:User)<-[:ACCESSED]-()-[:ACCESSED]->(p2:User)    RETURN id(p1) as source, id(p2) as target',   {graph:'cypher'} ) YIELD nodeId, setId RETURN algo.asNode(nodeId).name AS user, setId
  • 44. Union Find Graph Algorithm
  • 46. Why don’t we do both?
  • 47. Store the results of Union Find CALL algo.unionFind(   'MATCH (p:User) RETURN id(p) as id',   'MATCH (p1:User)--()--(p2:User)    RETURN id(p1) as source, id(p2) as target',   {graph:'cypher'} ) YIELD setCount
  • 48. Let’s see these partitions MATCH (n:User) RETURN n.partition, COUNT(*) AS members, COLLECT(n.name) AS names ORDER BY members DESC
  • 49. Our fraudsters are all connected
  • 50. Our fraudsters are all connected
  • 51. Not all people are supposed to be loyal to you. Some are meant to come along as a reminder to watch the company you keep. Bad News:
  • 54. Manual skimming of an ATM Sophisticated Data Breaches Credit Card Information get stolen all the time Rogue Merchant
  • 55. USE ISSUES Terminal ATM- skimming Data Breach Card Holder Card Issuer Fraudster USE $5MAKES $10 MAKES $2 MAKES MAKES $2000 AT Testing Merchants ATMAKES Tx
  • 56. Credit Card Transactions as a Graph CREATE (john:User {name:"John"}) CREATE (m1:Merchant {name:"Computer Store"}) CREATE (m2:Merchant {name:"Gas Station"}) CREATE (m3:Merchant {name:"Jewelry Store"}) CREATE (m4:Merchant {name:"Furniture Store"}) CREATE (tx1:Transaction:Fraudulent {amount: 2000.00, date:datetime()}) CREATE (tx2:Transaction {amount: 35.00, date:datetime() - duration('P1D')}) CREATE (tx3:Transaction {amount: 25.00, date:datetime() - duration('P2D')}) CREATE (tx4:Transaction {amount: 12.00, date:datetime() - duration('P3D')}) CREATE (tx1)-[:AT_MERCHANT]->(m1) CREATE (tx2)-[:AT_MERCHANT]->(m2) CREATE (tx3)-[:AT_MERCHANT]->(m3) CREATE (tx4)-[:AT_MERCHANT]->(m4)
  • 57. Credit Card Transactions as a Graph CREATE (john)-[:MAKES]->(tx1) CREATE (john)-[:MAKES]->(tx2) CREATE (john)-[:MAKES]->(tx3) CREATE (john)-[:MAKES]->(tx4)
  • 58. John’s Transactions last week // The last week of John's transactions MATCH p = (n:User {name:"John"})-[:MAKES]->(tx) WHERE tx.date > datetime() - duration('P7D') RETURN p
  • 60. Credit Card Transactions as a List MATCH (u:User) WHERE SIZE((u)-[:PREV_TX]->()) = 0 AND SIZE((u)-[:MAKES]->()) > 0 WITH u LIMIT 100 MATCH (u)-[r:MAKES]->(tx) WITH u, tx ORDER BY tx.date DESC WITH u, COLLECT(tx) AS transactions, HEAD(COLLECT(tx)) AS last CREATE (u)-[:PREV_TX]->(last) FOREACH (n IN RANGE(0, SIZE(transactions)-2) | FOREACH (next IN [transactions[n]] | FOREACH (prev IN [transactions[n+1]] | CREATE (next)-[:PREV_TX]->(prev) )))
  • 61. John’s Transactions last week // The last week of John's transactions MATCH p = (n:User {name:"John"})-[:PREV_TX*]->(tx) WHERE NONE (tx IN tail(nodes(p))           WHERE tx.date <= datetime() - duration('P7D')) RETURN p
  • 63.
  • 64.
  • 65. TxTx Tx TxTx Tx Tx TxTxTx TxJohn
  • 66. Tx $2000 TxTx Tx Tx TxTxTxTx Tx Tx Computer Store John
  • 67. Tx $2000 Tx Tx $25$10$4 TxTx Tx Tx TxTxTx Computer Store John
  • 68. Following the footsteps // All the transactions marked fraudulent in the last week // and the transactions that came before them // up to two weeks ago. MATCH p = (fraud:Fraudulent)-[:PREV_TX*]->(tx) WHERE fraud.date > datetime() - duration('P7D')   AND NONE (tx IN tail(nodes(p)) WHERE tx.date <= datetime() - duration('P14D')) RETURN p
  • 70. Tx Tx $2000 Tx Tx $25$10$4 TxTx Tx Tx TxTxTx Computer Store John Sheila $2 TxTxSheila TxTxTx Tx Tx TxTx $3000 Tx Jewelry StoreTx $3
  • 71. Tx Tx $2000 Tx Tx $25$10$4 TxTx Tx Tx TxTxTx Computer Store John Sheila $2 TxTxSheila TxTxTx Tx Tx TxTx $3000 Tx Jewelry StoreTx $3 Robert TxTxTx Tx TxTx TxTxTx Tx Tx
  • 72. TxTx $2 TxTx Tx $2000 Tx Tx $25$10$4 TxTx Tx Tx TxTxTx Computer Store John Sheila Robert $3 Karen TxTxTx Tx Tx TxTx $3000 Tx Jewelry StoreTx $3 TxTxTx Tx Tx TxTx TxTx TxTx TxTx Tx Tx TxTx $8 $12 Tx $1500 Furniture Store Tx Tx Tx
  • 73. Find the Suspect Merchants // Top 5 common merchants from fraudulent transaction chains up to two weeks ago. MATCH p = (fraud:Fraudulent)-[:PREV_TX*]->(tx) WHERE fraud.date > datetime() - duration('P7D')   AND NONE (tx IN tail(nodes(p))             WHERE tx.date <= datetime() - duration('P14D')) WITH nodes(p) AS transactions UNWIND transactions AS tx WITH DISTINCT tx MATCH (tx)-[:AT_MERCHANT]->(merchant) RETURN merchant.name, COUNT(*) AS txCount ORDER BY txCount DESC LIMIT 5
  • 74. Find the Suspect Merchants
  • 75. TxTx $2 TxTx Tx $2000 Tx Tx $25$10$4 TxTx Tx Tx TxTxTx Computer Store John Gas Station Sheila Robert $3 Karen TxTxTx Tx Tx TxTx $3000 Tx Jewelry StoreTx $3 TxTxTx Tx Tx TxTx TxTx TxTx TxTx Tx Tx TxTx $8 $12 Tx $1500 Furniture Store Tx Tx Tx
  • 77. Money Transferring Purchases Bank Services Relational database Develop Patterns Data Science-team + Good for Discrete Analysis – No Holistic View of Data-Relationships – Slow query speed for connections
  • 78. Money Transferring Purchases Bank Services Relational database Data Lake + Good for Map Reduce + Good for Analytical Workloads – No holistic view – Non-operational workloads – Weeks-to-months processes Develop Patterns Data Science-team Merchant Data Credit Score Data Other 3rd Party Data
  • 79. Money Transferring Purchases Bank Services Neo4j powers 360° view of transactions in real-time Neo4j Cluster SENSE Transaction stream RESPOND Alerts & notification LOAD RELEVANT DATA Relational database Data Lake Visualization UI Fine Tune Patterns Develop Patterns Data Science-team Merchant Data Credit Score Data Other 3rd Party Data
  • 80. Money Transferring Purchases Bank Services Neo4j powers 360° view of transactions in real-time Neo4j Cluster SENSE Transaction stream RESPOND Alerts & notification LOAD RELEVANT DATA Relational database Data Lake Visualization UI Fine Tune Patterns Develop Patterns Data Science-team Merchant Data Credit Score Data Other 3rd Party Data Data-set used to explore new insights
  • 82. We talked about… Finding Fraud with Graphs Examples of different types of Fraud: Fraud Rings Credit Card Testing Fraud Origination How Neo4j Fits in an Architecture
  • 83. Detect & prevent fraud in real-time Faster credit risk analysis and transactions Reduce chargebacks Quickly adapt to new methods of fraud Why Neo4j? Who’s using it? Financial institutions use Neo4j to: FINANCE Government Online Retail Names redacted to protect the innocent and conceal the guilty
  • 84. No really, why Neo4j?
  • 85. Fixed Sized Records “Joins” on Creation Spin Spin Spin through this data structure Pointers instead of Lookups 1 2 3 4
  • 88. Q&A