AML-Nexus — Catch the Criminals. Protect Everyone Else.
Inspiration
What if fighting financial crime didn't have to come at the expense of innocent people?
Behind every financial account is a real person.
Imagine Sara, a small business owner. Her legitimate transactions are flagged as suspicious, and her account is frozen. Suddenly, she may struggle to pay employees, cover rent, or keep her business running.
Or imagine an emergency fundraiser receiving donations from hundreds of people. To an automated system, that activity might resemble suspicious fund aggregation — even when every donation serves a legitimate purpose.
These are illustrative scenarios, but the underlying risk is real: a false financial crime alert can have consequences far beyond a risk score.
Financial institutions face two critical challenges simultaneously:
- Detect genuine money-laundering networks that hide behind complex transaction patterns.
- Protect legitimate customers from unnecessary suspicion, account restrictions, financial disruption, and reputational harm.
Traditional detection approaches can produce alerts without clearly explaining the evidence behind them. When investigators lack sufficient context, distinguishing genuine threats from legitimate activity becomes more difficult.
We created AML-Nexus to approach these challenges together.
Our guiding belief is simple:
Financial security should protect people — not create unnecessary harm.
AML-Nexus was built to help investigators identify suspicious financial networks while making investigations more transparent, evidence-driven, and accountable.
Catch the criminals. Protect everyone else.
What it does
AML-Nexus is an AI-powered, explainable anti-money-laundering investigation copilot that combines transaction-network analysis, balanced evidence, statistical risk intelligence, and human-controlled decisions.
Instead of relying on an opaque risk score or automatically treating every unusual transaction as wrongdoing, AML-Nexus helps investigators understand:
- What suspicious patterns have been detected?
- What evidence supports the suspicion?
- What evidence may explain legitimate activity?
- What additional information could change the recommendation?
- What proportionate action should a human investigator consider?
1. Intelligent Transaction Network Analysis
Money laundering rarely happens through a single obvious transaction. Suspicious activity can involve interconnected accounts, circular transfers, and funds moving through multiple participants.
AML-Nexus analyzes transaction graphs to identify patterns such as:
- Multiple accounts funneling funds into a central account.
- Gradual accumulation of funds.
- Circular transaction networks.
- Multi-account money-flow structures.
Its interactive money-flow map and timeline help investigators visualize relationships and examine how transaction patterns develop over time.
The goal is to reveal suspicious networks, not merely isolated transactions.
2. Balanced Evidence — For AND Against Suspicion
This is one of the core innovations of AML-Nexus.
Many suspicious-looking transaction patterns can also appear in legitimate activity.
A small business may receive numerous customer payments. A charity may collect donations from many unrelated individuals. An emergency fundraiser may experience a sudden surge in transactions.
AML-Nexus examines both supporting and contradicting evidence, allowing investigators to understand why activity was flagged and which legitimate explanations should be considered.
The platform provides interpretable risk assessments, evidence breakdowns, and explanations of what could change a recommendation.
A suspicious pattern should trigger investigation — not automatically become a verdict.
3. Explainable Risk Intelligence
AML-Nexus combines interpretable risk scoring with a statistical evidence ledger.
The ledger uses a Naive Bayes approach with Laplace smoothing to evaluate evidence and provide an additional statistical perspective on suspicious behavior.
The platform also incorporates peer-relative statistical indicators, including Benford's-law analysis.
Rather than simply displaying a risk score, AML-Nexus helps reviewers understand the evidence contributing to its recommendations.
4. Human-Controlled Decisions
AML-Nexus is designed around a fundamental principle:
AI recommends. Humans decide.
Instead of treating every alert as a binary choice between freezing an account and ignoring suspicious activity, 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.
This approach supports proportionate investigation and helps avoid unnecessary restrictions based solely on automated suspicion.
5. Silent Evidence Watch
AML-Nexus includes Silent Evidence Watch, a structured monitoring workflow designed to support continued investigation without automatically restricting customer accounts.
The workflow is time-limited, evidence-driven, and reviewable.
Investigators can follow developing transaction patterns, examine new evidence, and document monitoring decisions.
This creates an alternative to immediately escalating every uncertain case.
Investigate further when appropriate — without automatically disrupting an innocent customer's financial life.
6. PayPal Sandbox Integration
AML-Nexus integrates with the PayPal Sandbox using OAuth 2.0 and the Transaction Search API.
The integration retrieves completed test transactions through a secure, read-only workflow.
Transaction records are normalized into the same analytical structure used by the detection pipeline, allowing the application to analyze PayPal Sandbox activity through its network-analysis and investigation tools.
The integration is sandbox-only and does not initiate payments or move funds.
7. Google Gemini-Powered Investigation Summaries
AML-Nexus integrates with the Google Gemini API to generate concise investigation summaries grounded in structured case evidence.
The system supplies relevant investigation information, including detected patterns, recommendations, scores, and supporting and contradicting evidence.
Numerical grounding checks and safeguards help keep generated summaries aligned with the underlying case information.
Gemini supports the investigator's understanding of the case; it does not independently determine or change investigation decisions.
8. Reviewer Accountability and Auditability
Explainability matters most when investigation decisions can be reviewed.
AML-Nexus includes:
- Reviewer-quality controls.
- Documented investigation decisions.
- Evidence-review requirements.
- Tamper-evident hash-chain audit records.
- SHA-256 fingerprints for report integrity.
These capabilities support transparency, traceability, and accountability throughout the investigation workflow.
9. Instant PDF Investigation Reports
AML-Nexus allows investigators to download structured PDF investigation reports directly from the application.
Reports organize case findings, risk information, and supporting evidence into a portable document.
This makes investigations easier to document, review, and share with authorized stakeholders.
The Human Impact — Protecting Innocent Customers
A false alert is not always just a technical mistake. It can affect someone's livelihood.
For a small business owner, an unnecessary account restriction could interrupt payments to employees and suppliers.
For a family, losing access to funds could interfere with essential expenses.
For a charity or emergency fundraiser, unnecessary restrictions could delay financial support when it is needed most.
AML-Nexus was designed with these consequences in mind.
By combining balanced evidence, explainable recommendations, graduated responses, Silent Evidence Watch, and human-controlled decisions, the platform aims to reduce the risk of unnecessary harm while maintaining attention on genuine financial crime.
Its approach recognizes that legitimate customers should not be treated as criminals merely because their transactions resemble suspicious patterns.
Protecting innocent customers and detecting financial crime are not competing goals. They are two essential parts of responsible financial security.
This is the human-centered purpose behind AML-Nexus.
How we built it
AML-Nexus was developed using a modular Python architecture that brings together financial data analysis, transaction-network intelligence, explainable risk evaluation, and interactive investigation workflows.
Core technologies:
- Python: Application logic, detection algorithms, and investigation workflows.
- pandas and NumPy: Transaction processing and statistical analysis.
- NetworkX: Transaction-graph construction and network analysis.
- Streamlit: Interactive investigation dashboard and visualizations.
- PayPal REST API: Read-only PayPal Sandbox transaction integration using OAuth 2.0.
- Google Gemini API: Evidence-grounded investigation summaries.
- GitHub Actions: Automated testing and continuous integration.
Detection, scoring, statistical evidence analysis, reporting, and external integrations are organized into separate application modules.
We also developed synthetic financial transaction scenarios containing suspicious networks and legitimate activity with potentially similar transaction patterns.
This allowed us to evaluate both suspicious-activity detection and the treatment of innocent accounts.
Development was supported by Claude as an AI coding assistant, with project direction, testing, and review by the author.
Results and Evaluation
We evaluated AML-Nexus using controlled synthetic transaction scenarios containing planted laundering patterns and legitimate activity.
The evaluation included four development runs followed by 10 held-out synthetic evaluation runs.
Key Results
99.7% — Average detection of planted laundering accounts
Across the 10 held-out synthetic runs, AML-Nexus detected approximately 99.7% of planted laundering accounts.
Zero — Innocent accounts escalated
No innocent accounts reached the Escalate decision level in those evaluation runs.
140/140 — Planted suspect accounts identified
In a separate synthetic evaluation, the statistical evidence ledger identified all 140 planted suspect accounts while misclassifying none of the 194 innocent candidates.
61 — Passing automated tests
The project includes 61 passing automated tests supporting the reliability of tested application components.
We also compared AML-Nexus against simpler detection approaches and evaluated the contribution of contradicting evidence to investigation recommendations.
These results demonstrate the capabilities of the working prototype on controlled synthetic datasets. They are not presented as independently validated performance in live banking environments.
Challenges we addressed
One of our central challenges was distinguishing suspicious transaction structures from legitimate financial behavior that can appear similar.
We approached this by combining network analysis with supporting and contradicting evidence, interpretable scoring, and human-reviewed recommendations.
Another important challenge was creating a consistent investigation pipeline capable of analyzing both generated scenarios and PayPal Sandbox transaction records.
We addressed this through a modular architecture that normalizes transaction information into a shared analytical structure.
We also focused on making complex financial patterns understandable through visualizations, documented evidence, and structured investigation reports.
Throughout development, we prioritized not only identifying suspicious activity but also making the reasoning behind every recommendation accessible to human reviewers.
Accomplishments that we're proud of
We built an integrated investigation prototype combining:
- Intelligent transaction-network detection.
- Interactive money-flow visualization and timeline analysis.
- Balanced supporting and contradicting evidence.
- Explainable statistical risk assessment.
- Human-controlled investigation recommendations.
- Silent Evidence Watch.
- PayPal Sandbox integration.
- Gemini-powered investigation summaries.
- Reviewer accountability and tamper-evident audit records.
- Direct PDF investigation-report downloads.
- 61 passing automated tests.
- Documented synthetic evaluation results.
Our biggest accomplishment is bringing financial crime detection and the protection of innocent customers together in one coherent investigation workflow.
AML-Nexus demonstrates how AI can support stronger financial investigations without treating transparency, fairness, and human oversight as optional features.
What we learned
Explainability is a design constraint, not just a feature.
Building AML-Nexus reinforced that identifying suspicious activity is only the beginning of a responsible investigation.
Investigators need to understand why an account was flagged, what evidence challenges the suspicion, and what action is justified.
We also learned that measuring detection performance alone is insufficient.
A financial crime investigation system should also examine how its recommendations affect legitimate customers.
The quality of an AML system is not measured only by the threats it identifies, but also by how responsibly it treats the people it investigates.
What's next
Our next development priorities include expanding detection coverage, strengthening evaluation across diverse financial transaction scenarios, introducing persistent enterprise case management, improving role-based access controls, and preparing integration capabilities for institutional environments.
We also aim to explore technical collaborations and proof-of-concept evaluations with financial institutions and RegTech providers.
Our long-term vision is to help make financial crime investigations more intelligent, explainable, accountable, and human-centered.
Try AML-Nexus
Live Interactive Demo:
https://aml-nexus-x9byez5thetjkzdpyff4z4.streamlit.app/
GitHub Repository:
https://github.com/malakbassaam-hub/aml-nexus
Demo note: Hosted on Streamlit Community Cloud. The application 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-api
- machine-learning
- networkx
- numpy
- oauth2
- pandas
- paypal-rest-api
- paypal-sandbox
- python
- regtech
- streamlit