AML-Nexus — Catch the Criminals. Protect Everyone Else.
Inspiration: When Financial Security Harms the Innocent
What if a system designed to prevent financial crime could also protect innocent people from unnecessary financial harm?
Imagine Sara, a small business owner who relies on her account to pay employees, suppliers, and rent.
One day, legitimate customer payments are mistaken for suspicious activity. Her account is restricted, and her business suddenly faces financial uncertainty.
Or imagine an emergency fundraiser receiving donations from hundreds of people. A transaction-monitoring system might interpret the unusual activity as suspicious fund aggregation, even though the funds serve a legitimate purpose.
These are illustrative scenarios, but they highlight a serious concern: a false financial crime alert can affect real people's livelihoods, reputations, and access to essential funds.
Financial institutions must detect sophisticated money-laundering networks. But they must also avoid treating every unusual transaction as proof of wrongdoing.
I built AML-Nexus around one principle:
Financial security should protect people, not create unnecessary harm.
The Solution: Explainable, Human-Centered Financial Security
AML-Nexus is an AI-powered anti-money-laundering investigation copilot that helps investigators identify suspicious financial networks while considering evidence that may support legitimate explanations.
Instead of making automatic account-freezing decisions, AML-Nexus provides interpretable evidence and graduated recommendations for human review.
1. Detect Suspicious Money-Flow Networks
AML-Nexus analyzes financial transaction graphs to identify suspicious structures, including fund aggregation, circular transfers, and connected transaction networks.
Interactive money-flow graphs and timelines help investigators understand how suspicious patterns develop.
2. Examine Evidence For AND Against Suspicion
Unusual does not automatically mean criminal.
A charity receiving hundreds of donations and a suspicious account collecting funds from multiple sources can appear similar at first glance.
AML-Nexus evaluates supporting and contradicting evidence, helping investigators distinguish suspicious patterns from activity that may have legitimate explanations.
This makes recommendations more transparent and reviewable.
3. Keep Humans in Control
AML-Nexus provides four graduated recommendations:
- Clear: No further action indicated.
- Verify: Request additional verification.
- Monitor: Continue evidence-based monitoring.
- Escalate: Refer the case for urgent human review.
AI recommends. A human decides.
The prototype does not automatically freeze accounts or restrict access to funds.
4. Silent Evidence Watch
AML-Nexus includes a structured, time-limited monitoring workflow that supports further investigation without automatically restricting customer accounts.
Investigators can review developing patterns, document evidence, and reconsider recommendations as new information becomes available.
This creates an alternative to immediately escalating uncertain cases.
5. Explainable Risk Intelligence
The platform combines network-pattern detection, interpretable scoring, and a Naive Bayes statistical evidence ledger with Laplace smoothing.
Investigators can examine why an account was flagged and which evidence may challenge the suspicion.
6. PayPal Sandbox Integration
AML-Nexus integrates with PayPal Sandbox through OAuth 2.0 and the Transaction Search API.
It retrieves completed sandbox transactions through a read-only workflow and analyzes them using the same investigation pipeline as the demonstration scenarios.
The integration does not move funds or initiate transactions.
7. Google Gemini Investigation Summaries
Google Gemini helps generate concise investigation summaries grounded in structured case evidence.
Numerical grounding checks and fallback handling help preserve the usability of the investigation workflow when the external AI service is unavailable.
Human investigators remain responsible for consequential decisions.
8. Accountability, Audit Trails, and PDF Reports
AML-Nexus includes reviewer-quality controls, documented decisions, and tamper-evident hash-chain audit records.
Investigators can download structured PDF investigation reports directly from the application.
These features help make investigation findings understandable, traceable, and reviewable.
A Safer Outcome: Investigate Without Automatically Freezing
Consider an illustrative case in which a legitimate small business receives payments from many customers within a short period.
A simplistic detection system might treat this concentration of payments as suspicious and immediately trigger a restrictive response.
AML-Nexus takes a different approach.
It examines the network pattern alongside supporting and contradicting evidence, then presents a proportionate recommendation for human review.
When the evidence remains uncertain, the Monitor recommendation and Silent Evidence Watch workflow provide a way to continue investigating without automatically restricting access to funds.
The safer outcome is not ignoring suspicious activity. It is avoiding an unnecessary automatic restriction while maintaining an accountable investigation process.
This is a design example, not a claim that the prototype has already prevented a real-world account freeze.
Results and Evaluation
AML-Nexus was evaluated using controlled synthetic financial transaction scenarios containing planted suspicious networks and legitimate activity.
Across 10 held-out synthetic evaluation runs:
- Approximately 99.7% detection of planted laundering accounts.
- Zero innocent accounts escalated to the Escalate decision level.
In a separate synthetic evaluation, the statistical evidence ledger identified 140 out of 140 planted suspect accounts, with zero false positives among 194 innocent candidates.
The application also includes 61 passing automated tests.
These results demonstrate the prototype's performance in controlled synthetic scenarios, not independently validated results in live banking environments.
How I Built It
I developed AML-Nexus using:
- Python, pandas, and NumPy for transaction processing and analysis.
- NetworkX for transaction-network detection.
- Streamlit for the interactive investigation dashboard.
- PayPal REST API for read-only Sandbox transaction retrieval.
- Google Gemini API for evidence-grounded investigation summaries.
- Naive Bayes for interpretable statistical evidence assessment.
- GitHub Actions for automated testing and continuous integration.
Claude supported development as an AI coding assistant, with project direction, testing, and review performed by me.
The project was developed during October 2026, with source-code changes recorded in GitHub.
Challenges I Faced
The biggest challenge was designing a system that could identify suspicious financial patterns without assuming that every unusual transaction was criminal.
I addressed this by combining transaction-network analysis with balanced evidence and human-reviewed recommendations.
Another challenge was connecting PayPal Sandbox transaction records to a consistent analytical pipeline.
I also worked on making complex investigations understandable through visualizations, documented evidence, and downloadable reports.
What I Learned
Safety is not only about detecting threats. It is also about preventing unnecessary harm.
Building AML-Nexus strengthened my understanding of financial crime detection, explainable AI, statistical evaluation, API integration, and responsible AI development.
I learned that detection accuracy alone is not enough.
A trustworthy investigation system should also explain its reasoning, recognize uncertainty, preserve human oversight, and consider the consequences of incorrect recommendations.
Limitations and Responsible Deployment
AML-Nexus is a working investigation prototype evaluated using synthetic financial transaction data and PayPal Sandbox integration.
Its evaluation results do not establish production-level accuracy across real financial institutions or customer populations.
The current prototype is intended to support investigation and demonstrate responsible decision workflows, not independently authorize real-world account restrictions.
Before institutional deployment, additional real-world validation, privacy and security reviews, persistent case management, and appropriate compliance controls would be required.
What's Next
My next priorities include expanding evaluation across diverse financial behaviors, improving case management, strengthening institutional security controls, and exploring proof-of-concept collaborations.
The long-term goal is to help financial institutions investigate genuine threats while reducing unnecessary harm to legitimate customers.
Try AML-Nexus
Live Demo:
https://aml-nexus-x9byez5thetjkzdpyff4z4.streamlit.app/
GitHub Repository:
https://github.com/malakbassaam-hub/aml-nexus
The demo is hosted on Streamlit Community Cloud and may take a moment to wake up on the first visit.
AML-Nexus — Catch the criminals. Protect everyone else.
Built With
- explainable-ai
- fintech
- github-actions
- google-gemini
- human-in-the-loop
- machine-learning
- naive-bayes
- networkx
- numpy
- oauth2
- pandas
- paypal-rest-api
- paypal-sandbox
- python
- responsible-ai
- streamlit