Editing
AI for Anti-Money Laundering
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== <span style="color: #FFFFFF;">Applying</span> == '''Transaction anomaly detection with graph features:''' <syntaxhighlight lang="python"> import pandas as pd import numpy as np import networkx as nx from sklearn.ensemble import IsolationForest, GradientBoostingClassifier from sklearn.preprocessing import StandardScaler def build_transaction_graph(transactions_df: pd.DataFrame) -> nx.DiGraph: """Build directed transaction graph from financial transaction records.""" G = nx.DiGraph() for _, tx in transactions_df.iterrows(): G.add_edge(tx['sender_id'], tx['receiver_id'], amount=tx['amount'], date=tx['date'], tx_id=tx['transaction_id']) return G def extract_network_features(G: nx.DiGraph, entity_id: str) -> dict: """Extract AML-relevant network features for an entity.""" if entity_id not in G: return {} return { 'in_degree': G.in_degree(entity_id), 'out_degree': G.out_degree(entity_id), 'in_out_ratio': G.in_degree(entity_id) / (G.out_degree(entity_id) + 1), 'pagerank': nx.pagerank(G).get(entity_id, 0), 'clustering': nx.clustering(G.to_undirected(), entity_id), # Fan-in/fan-out: many senders β one receiver (concentration) 'unique_senders': len(list(G.predecessors(entity_id))), 'unique_receivers': len(list(G.successors(entity_id))), # Circular flows: A β B β A (laundering signature) 'reciprocal_edges': sum(1 for n in G.predecessors(entity_id) if G.has_edge(entity_id, n)), # Transaction velocity 'avg_in_amount': np.mean([d['amount'] for _, _, d in G.in_edges(entity_id, data=True)]) if G.in_degree(entity_id) > 0 else 0, } def detect_structuring(transactions_df: pd.DataFrame, threshold=10000) -> pd.DataFrame: """Detect structuring (breaking transactions to stay under reporting threshold).""" df = transactions_df.copy() df['date'] = pd.to_datetime(df['date']) df['window_total'] = (df.groupby('sender_id') .rolling('3D', on='date')['amount'] .sum().reset_index(0, drop=True)) # Flag: multiple sub-threshold transactions summing to over threshold suspicious = df[(df['amount'] < threshold) & (df['window_total'] > threshold * 0.9)] return suspicious # ML model combining transaction + network features features = ['amount', 'in_degree', 'out_degree', 'pagerank', 'reciprocal_edges', 'unique_senders', 'unique_receivers', 'tx_velocity_7d', 'avg_amount', 'counterparty_risk_score', 'country_risk', 'pep_flag'] # Gradient boosting on labeled SAR data (rare: ~1% positive rate) model = GradientBoostingClassifier(n_estimators=200, scale=True, subsample=0.8, learning_rate=0.05) # Risk scoring: output SAR probability, rank alerts by risk score </syntaxhighlight> ; AML AI tools : '''Network analytics''' β Quantexa, Graph for AML (Microsoft), DataWalk : '''Transaction monitoring''' β NICE Actimize, Temenos Financial Crime Mitigation : '''Adverse media / KYC''' β Dow Jones Risk & Compliance, Refinitiv World-Check, ComplyAdvantage : '''Sanctions screening''' β Firco Compliance Link, ACI Worldwide, LexisNexis Risk Solutions : '''SAR analytics''' β FinCEN BSA/AML analytics, Babel Street, Palantir AML </div> <div style="background-color: #8B4500; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;">
Summary:
Please note that all contributions to BloomWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BloomWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information