<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sameer Singh</title>
    <description>The latest articles on DEV Community by Sameer Singh (@sameer0104).</description>
    <link>https://dev.to/sameer0104</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4102287%2F59652e91-b95f-4863-ab2c-b3bf5e235b37.jpg</url>
      <title>DEV Community: Sameer Singh</title>
      <link>https://dev.to/sameer0104</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sameer0104"/>
    <language>en</language>
    <item>
      <title>MuleShield AI: Intercepting Cybercrime Cash-Outs Before the Trail Goes Cold</title>
      <dc:creator>Sameer Singh</dc:creator>
      <pubDate>Mon, 31 Aug 2026 08:54:23 +0000</pubDate>
      <link>https://dev.to/sameer0104/muleshield-ai-intercepting-cybercrime-cash-outs-before-the-trail-goes-cold-232g</link>
      <guid>https://dev.to/sameer0104/muleshield-ai-intercepting-cybercrime-cash-outs-before-the-trail-goes-cold-232g</guid>
      <description>&lt;p&gt;&lt;em&gt;How a three-model AI pipeline helps Indian law enforcement get ahead of digital financial fraud — and the engineering decisions behind it.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;India loses over &lt;strong&gt;₹1.8 lakh crore annually&lt;/strong&gt; to cybercrime. Behind nearly every UPI scam, fake loan fraud, and phishing attack is the same final step: stolen money is split across a chain of mule accounts and quietly withdrawn as untraceable cash from an ATM — often within 90 minutes of the original crime.&lt;/p&gt;

&lt;p&gt;That last step is where investigations end. Once money becomes physical cash, there is no transaction to reverse, no account to freeze, and nothing left to trace.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MuleShield AI&lt;/strong&gt; was built to interrupt that step.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem: Detection Alone Is Not Enough
&lt;/h2&gt;

&lt;p&gt;India already has robust mule-account detection infrastructure. The Reserve Bank of India's &lt;strong&gt;MuleHunter.AI&lt;/strong&gt; (live since December 2024, deployed at Canara Bank, PNB, Bank of India, Bank of Baroda, and 20+ others) identifies suspicious accounts using 19 distinct behaviour patterns, reporting 95% accuracy. The I4C Suspect Registry has shared &lt;strong&gt;32 lakh flagged mule accounts&lt;/strong&gt; with banks and declined &lt;strong&gt;₹25,698 crore&lt;/strong&gt; in transactions.&lt;/p&gt;

&lt;p&gt;These systems are excellent at what they do — but they operate exclusively inside the banking rails. They can flag an account, decline a transfer, or freeze a balance. Every one of them stops working the moment cash leaves an ATM.&lt;/p&gt;

&lt;p&gt;No existing system answers the question law enforcement actually needs answered: &lt;strong&gt;which ATM will the money come out of, and how much time is left?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;MuleShield AI starts exactly where existing solutions stop.&lt;/p&gt;




&lt;h2&gt;
  
  
  System Architecture: Three Models, Three Distinct Problems
&lt;/h2&gt;

&lt;p&gt;We deliberately avoided building a single monolithic model. The task decomposes into three structurally different problems, each requiring a different approach.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Complaint filed → 1930 helpline
        │
        ▼
[1] BFS Graph Trace ──────────► identifies the terminal mule account
        │                        (deterministic graph traversal, no ML)
        ▼
[2] GraphSAGE Classifier ─────► scores accounts: mule probability
        │
        ▼
[3] Conditional Logit Ranker ─► ranks 25 nearby ATMs → top 5 + search zone
        │
        ▼
[4] XGBoost Regressor ────────► time-to-withdrawal with confidence band
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This separation is an architectural choice with concrete benefits: each component can be tested, audited, and improved independently. If the classifier is retrained, the ranker is unaffected. If real transaction data becomes available (via RBI/NPCI inter-bank tracing infrastructure), only the trace layer needs updating.&lt;/p&gt;




&lt;h2&gt;
  
  
  Component 1: Graph-Based Mule Detection
&lt;/h2&gt;

&lt;p&gt;A mule account — receiving ₹40,000 and forwarding ₹39,500 four minutes later — looks unremarkable in isolation. Embedded in a transaction graph where eight unrelated senders converge on one receiver whose neighbours are doing the same thing simultaneously, the pattern is obvious.&lt;/p&gt;

&lt;p&gt;We quantified the isolated contribution of graph structure by holding all other variables constant:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Test F1&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Majority class baseline&lt;/td&gt;
&lt;td&gt;0.057&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Best single feature&lt;/td&gt;
&lt;td&gt;0.497&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Logistic regression (no graph)&lt;/td&gt;
&lt;td&gt;0.684&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Random forest (no graph)&lt;/td&gt;
&lt;td&gt;0.842&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;GraphSAGE (graph + features)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.895&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The graph structure contributes &lt;strong&gt;+0.053 F1&lt;/strong&gt; over the best feature-based model — a measurable, reproducible improvement, not a claim. The GNN itself is 10,561 parameters and runs in under 10 ms per inference.&lt;/p&gt;




&lt;h2&gt;
  
  
  Component 2: ATM Location Prediction via Discrete Choice Theory
&lt;/h2&gt;

&lt;p&gt;Predicting &lt;em&gt;which&lt;/em&gt; ATM a criminal will use is a discrete-choice problem: one option is selected from a finite set of alternatives based on a weighted combination of factors (distance, surveillance risk, bank familiarity, crew habit patterns).&lt;/p&gt;

&lt;p&gt;Standard gradient-boosted rankers model additive relationships. But criminal ATM selection is &lt;strong&gt;multiplicative&lt;/strong&gt; — proximity × surveillance risk × bank affinity compose as a product, not a sum. A log transformation converts a product into a sum, making a linear model structurally correct where a tree-based model is structurally misspecified.&lt;/p&gt;

&lt;p&gt;The solution is the &lt;strong&gt;conditional logit&lt;/strong&gt; — McFadden's 1974 discrete-choice model (awarded the 2000 Nobel Prize in Economics). Applied here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Utility of each candidate ATM:
&lt;/span&gt;&lt;span class="nc"&gt;U&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;atm_i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="err"&gt;₁·&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;distance_i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="err"&gt;₂·&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;risk_i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="err"&gt;₃·&lt;/span&gt;&lt;span class="n"&gt;same_bank_i&lt;/span&gt;

&lt;span class="c1"&gt;# Probability:
&lt;/span&gt;&lt;span class="nc"&gt;P&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;atm_i&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;candidates&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;softmax_i&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="nc"&gt;U&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;atm_i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because our simulation has known generative parameters, we can verify model correctness directly:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Coefficient&lt;/th&gt;
&lt;th&gt;Learned&lt;/th&gt;
&lt;th&gt;Ground truth&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Distance weight&lt;/td&gt;
&lt;td&gt;0.9887&lt;/td&gt;
&lt;td&gt;1.000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Surveillance risk&lt;/td&gt;
&lt;td&gt;0.7558&lt;/td&gt;
&lt;td&gt;1.000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Same-bank bonus&lt;/td&gt;
&lt;td&gt;0.6847&lt;/td&gt;
&lt;td&gt;log 2 = 0.693&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The model recovered the real generative structure to within 1.5% — confirming the structural choice was correct, not just empirically competitive.&lt;/p&gt;




&lt;h2&gt;
  
  
  Component 3: Time-to-Withdrawal Forecasting
&lt;/h2&gt;

&lt;p&gt;An XGBoost regressor estimates minutes until cash-out, trained on features including: network velocity, account age, transaction pattern recency, and mule archetype cluster.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;MAE&lt;/td&gt;
&lt;td&gt;11.86 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mean-guess baseline MAE&lt;/td&gt;
&lt;td&gt;14.98 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Median lead time delivered&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;42 minutes&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cases actionable (≥15 min lead time)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;85.4%&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;42 minutes of median lead time is enough for coordinated police response. 85.4% actionability means the system is useful in the overwhelming majority of cases, not just edge cases.&lt;/p&gt;




&lt;h2&gt;
  
  
  End-to-End Performance
&lt;/h2&gt;

&lt;p&gt;The deliverable for law enforcement is not a ranked list of ATMs — it is a &lt;strong&gt;geographic search zone&lt;/strong&gt; derived from the ranked probability distribution:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Strategy&lt;/th&gt;
&lt;th&gt;Withdrawal contained&lt;/th&gt;
&lt;th&gt;Median zone error&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Mule's own location&lt;/td&gt;
&lt;td&gt;75.2%&lt;/td&gt;
&lt;td&gt;6.39 km&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nearest-3 ATM centroid&lt;/td&gt;
&lt;td&gt;78.5%&lt;/td&gt;
&lt;td&gt;5.68 km&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;MuleShield AI search zone&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;87.4%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;5.49 km&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;87.4% containment at 5.49 km median error — reducing a district of 1,000+ ATMs down to a &lt;strong&gt;median of 8 candidates&lt;/strong&gt; within a ~10 km search radius. Combined with the 42-minute lead time, this gives field teams a real and specific target.&lt;/p&gt;

&lt;p&gt;The full pipeline inference time: &lt;strong&gt;7.5 ms on a single CPU, ~1 GB RAM, no GPU required.&lt;/strong&gt; The system is designed to run on standard government server infrastructure.&lt;/p&gt;




&lt;h2&gt;
  
  
  Interpretability as a Deployment Requirement
&lt;/h2&gt;

&lt;p&gt;A system whose output directs police to a physical location must be explainable — not as a design preference, but as a practical requirement for operational and legal credibility.&lt;/p&gt;

&lt;p&gt;The conditional logit ranker has three interpretable coefficients, readable out loud. GraphSAGE decisions can be traced back to specific neighbourhood structure. The trace layer is deterministic BFS — correct by construction, regardless of what the probabilistic components do.&lt;/p&gt;

&lt;p&gt;This interpretability is a first-class engineering constraint, not an afterthought.&lt;/p&gt;




&lt;h2&gt;
  
  
  Honest Assessment of Current Limitations
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;On data&lt;/strong&gt;: MuleShield AI is trained on synthetic data. This is a deliberate, necessary constraint — real NCRP transaction data is legally restricted. The synthetic generator was calibrated against known mule behaviour patterns from published I4C and CERT-In reports, and includes 2% label noise and overlapping class distributions to prevent overfit to clean simulated data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On the intake dependency&lt;/strong&gt;: A live complaint arrives at the 1930 helpline with no transaction chain attached. The victim knows what they lost; they don't know which mule accounts it passed through. That chain must come from the banking side via inter-bank tracing infrastructure (currently being developed by RBI and NPCI). MuleShield AI's demo synthesises this input honestly — on real graph accounts with real transaction patterns — and performs genuine inference on everything downstream.&lt;/p&gt;

&lt;p&gt;These limitations are documented, not hidden. A system that overstates its deployment-readiness is more dangerous than one with honest boundaries.&lt;/p&gt;




&lt;h2&gt;
  
  
  Alignment with National Cybercrime Infrastructure
&lt;/h2&gt;

&lt;p&gt;MuleShield AI is designed as a complement to, not a replacement for, existing government systems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MuleHunter.AI&lt;/strong&gt; (RBI): detects mule accounts inside banking rails → MuleShield AI picks up where it stops&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I4C Suspect Registry&lt;/strong&gt;: flags known mules → feeds the GraphSAGE feature layer as prior signal&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NCRP / 1930 Helpline&lt;/strong&gt;: complaint intake → the system's operational trigger point&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NPCI / inter-bank tracing (in development)&lt;/strong&gt;: real transaction chain data → future input layer upgrade path&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The architecture was designed with this integration roadmap in mind.&lt;/p&gt;




&lt;h2&gt;
  
  
  Technical Stack
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Graph construction&lt;/td&gt;
&lt;td&gt;NetworkX, custom BFS engine&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GNN classifier&lt;/td&gt;
&lt;td&gt;PyTorch Geometric — GraphSAGE (2-layer, mean aggregation)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ATM ranker&lt;/td&gt;
&lt;td&gt;Conditional logit via &lt;code&gt;statsmodels&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Time regressor&lt;/td&gt;
&lt;td&gt;XGBoost&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;API layer&lt;/td&gt;
&lt;td&gt;FastAPI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Frontend&lt;/td&gt;
&lt;td&gt;React + TypeScript&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test suite&lt;/td&gt;
&lt;td&gt;291 tests, including regression guards on all published figures&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;&lt;em&gt;MuleShield AI was developed for Smart India Hackathon 2026, Problem Statement SIH26184, issued by the Ministry of Home Affairs / Indian Cybercrime Coordination Centre (I4C). All figures are held-out measurements on data not seen during training. The full implementation and methodology documentation are available in the project repository.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>python</category>
      <category>datascience</category>
      <category>security</category>
    </item>
  </channel>
</rss>
