# mandeep15686/mulenet-ai architecture

> Architecture diagram of the GitHub repository mandeep15686/mulenet-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mandeep15686/mulenet-ai
- Repository: https://github.com/mandeep15686/mulenet-ai

## Overview

MuleNet AI detects and investigates potentially suspicious accounts in transaction data. Its main workflow engineers behavioural features and trains a feature-only GNN, exports account risk predictions, then runs explanation and ring-detection post-processing to produce an HTML investigation dashboard. Optional tabular models and paired-bootstrap model comparison are additional capabilities. The training excerpt is partial, so internal training-stage links follow the README; post-processing handoffs are supported by the orchestrator. Bootstrap is a separate comparison workflow, not invoked by that orchestrator.

Main entry points: [`mulenet/train.py`](https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/train.py) (Prediction parquet), [`mulenet/rings.py`](https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/rings.py) (Louvain detection), [`mulenet/dashboard.py`](https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/dashboard.py) (Dashboard builder), [`run_pipeline.py`](https://github.com/mandeep15686/mulenet-ai/blob/main/run_pipeline.py) (Post-processing runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_training["Risk modeling"]
  node_feature_engineering["Behavioural features<br/>[train.py]"]
  node_gnn["Feature-only GNN<br/>[train.py]"]
  node_tabular["Tabular baselines<br/>[train.py]"]
  node_risk_scores["Risk scores<br/>[train.py]"]
  node_predictions["Prediction parquet<br/>[train.py]"]
end

subgraph group_investigation["Investigation"]
  node_orchestrator["Post-processing runner<br/>[run_pipeline.py]"]
  node_explanation["Reason-code analysis<br/>[explain.py]"]
  node_dossiers["Account dossiers<br/>[explain.py]"]
  node_ring_detection["Louvain detection<br/>[rings.py]"]
  node_ring_results["Ring results<br/>[rings.py]"]
end

subgraph group_presentation["Dashboard"]
  node_dashboard_builder["Dashboard builder<br/>[dashboard.py]"]
  node_dashboard_template["HTML template"]
  node_dashboard["Investigation dashboard<br/>[dashboard.py]"]
end

subgraph group_evaluation["Model evaluation"]
  node_prior_predictions["Earlier model predictions"]
  node_bootstrap["Paired bootstrap<br/>[bootstrap.py]"]
end

node_dataset["AML transactions"]

node_dataset -->|"provides transactions"| node_feature_engineering
node_feature_engineering -->|"supplies features"| node_gnn
node_feature_engineering -.->|"supplies features"| node_tabular
node_gnn -->|"scores accounts"| node_risk_scores
node_tabular -.->|"optional scores"| node_risk_scores
node_risk_scores -->|"exports predictions"| node_predictions
node_predictions -->|"starts post-processing"| node_orchestrator
node_orchestrator -->|"runs first"| node_explanation
node_dataset -->|"provides transactions"| node_explanation
node_predictions -->|"provides scores"| node_explanation
node_explanation -->|"writes dossiers"| node_dossiers
node_orchestrator -->|"runs next"| node_ring_detection
node_dataset -->|"provides transactions"| node_ring_detection
node_predictions -->|"provides scores"| node_ring_detection
node_dossiers -->|"provides dossier data"| node_ring_detection
node_ring_detection -->|"writes ring results"| node_ring_results
node_orchestrator -->|"runs last"| node_dashboard_builder
node_dossiers -->|"loads dossiers"| node_dashboard_builder
node_ring_results -->|"loads ring data"| node_dashboard_builder
node_dashboard_template -->|"provides HTML template"| node_dashboard_builder
node_dashboard_builder -->|"writes HTML"| node_dashboard
node_predictions -->|"compared as v2.9.2"| node_bootstrap
node_prior_predictions -->|"compared as v2.9.1"| node_bootstrap

click node_feature_engineering "https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/train.py"
click node_gnn "https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/train.py"
click node_tabular "https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/train.py"
click node_risk_scores "https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/train.py"
click node_predictions "https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/train.py"
click node_orchestrator "https://github.com/mandeep15686/mulenet-ai/blob/main/run_pipeline.py"
click node_explanation "https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/explain.py"
click node_dossiers "https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/explain.py"
click node_ring_detection "https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/rings.py"
click node_ring_results "https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/rings.py"
click node_dashboard_builder "https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/dashboard.py"
click node_dashboard_template "https://github.com/mandeep15686/mulenet-ai/blob/main/dashboard/_dash_template.html"
click node_dashboard "https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/dashboard.py"
click node_bootstrap "https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/bootstrap.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_feature_engineering,node_gnn,node_tabular,node_risk_scores,node_predictions toneBlue
class node_orchestrator,node_explanation,node_dossiers,node_ring_detection,node_ring_results toneAmber
class node_dashboard_builder,node_dashboard_template,node_dashboard toneMint
class node_prior_predictions,node_bootstrap toneRose
class node_dataset toneIndigo
```

## Components

### Risk modeling

- [Behavioural features](https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/train.py): `mulenet/train.py`
- [Feature-only GNN](https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/train.py): `mulenet/train.py`
- [Tabular baselines](https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/train.py): `mulenet/train.py`
- [Risk scores](https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/train.py): `mulenet/train.py`
- [Prediction parquet](https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/train.py): `mulenet/train.py`

### Investigation

- [Post-processing runner](https://github.com/mandeep15686/mulenet-ai/blob/main/run_pipeline.py): `run_pipeline.py`
- [Reason-code analysis](https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/explain.py): `mulenet/explain.py`
- [Account dossiers](https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/explain.py): `mulenet/explain.py`
- [Louvain detection](https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/rings.py): `mulenet/rings.py`
- [Ring results](https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/rings.py): `mulenet/rings.py`

### Dashboard

- [Dashboard builder](https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/dashboard.py): `mulenet/dashboard.py`
- [HTML template](https://github.com/mandeep15686/mulenet-ai/blob/main/dashboard/_dash_template.html): `dashboard/_dash_template.html`
- [Investigation dashboard](https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/dashboard.py): `mulenet/dashboard.py`

### Model evaluation

- **Earlier model predictions**
- [Paired bootstrap](https://github.com/mandeep15686/mulenet-ai/blob/main/mulenet/bootstrap.py): `mulenet/bootstrap.py`

### Other components

- **AML transactions**

## Connections

- AML transactions → Behavioural features: provides transactions (evidence: `README.md`)
- Behavioural features → Feature-only GNN: supplies features (evidence: `README.md`)
- Behavioural features → Tabular baselines: supplies features (evidence: `mulenet/train.py`)
- Feature-only GNN → Risk scores: scores accounts (evidence: `README.md`)
- Tabular baselines → Risk scores: optional scores (evidence: `mulenet/train.py`)
- Risk scores → Prediction parquet: exports predictions (evidence: `mulenet/train.py`)
- Prediction parquet → Post-processing runner: starts post-processing (evidence: `run_pipeline.py`)
- Post-processing runner → Reason-code analysis: runs first (evidence: `run_pipeline.py`)
- AML transactions → Reason-code analysis: provides transactions
- Prediction parquet → Reason-code analysis: provides scores
- Reason-code analysis → Account dossiers: writes dossiers (evidence: `mulenet/explain.py`)
- Post-processing runner → Louvain detection: runs next (evidence: `run_pipeline.py`)
- AML transactions → Louvain detection: provides transactions
- Prediction parquet → Louvain detection: provides scores
- Account dossiers → Louvain detection: provides dossier data
- Louvain detection → Ring results: writes ring results (evidence: `mulenet/rings.py`)
- Post-processing runner → Dashboard builder: runs last (evidence: `run_pipeline.py`)
- Account dossiers → Dashboard builder: loads dossiers (evidence: `mulenet/dashboard.py`)
- Ring results → Dashboard builder: loads ring data (evidence: `mulenet/dashboard.py`)
- HTML template → Dashboard builder: provides HTML template (evidence: `mulenet/dashboard.py`)
- Dashboard builder → Investigation dashboard: writes HTML (evidence: `mulenet/dashboard.py`)
- Prediction parquet → Paired bootstrap: compared as v2.9.2 (evidence: `README.md`)
- Earlier model predictions → Paired bootstrap: compared as v2.9.1 (evidence: `mulenet/bootstrap.py`)
