Sub topic 12
Using Graph Analysis to Find Mule Networks
Rules on single accounts catch structuring and simple funnel behaviour. They miss a mule network, because each account in the network can look ordinary on its own. This chapter shows how to treat accounts and transfers as a graph, so the connections between accounts become evidence.
Prerequisites
This chapter assumes you:
- Have read the earlier chapters on funnel accounts, money mules, and fan-in/pass-through detection.
- Can read short Python and SQL.
- Know basic graph vocabulary: a node is a thing, an edge is a link between two nodes, and a graph is a set of nodes and edges.
The Python examples use the networkx library (pip install networkx).
Why single-account rules are not enough
Suppose a criminal group recruits 40 mules. Each mule receives a few small payments and forwards most of the money within a day. A pass-through rule may alert on some of them. It will not tell an investigator that all 40 accounts feed the same three collection accounts, or that one cash-out account sits at the end of every path.
Graph analysis answers three questions that account-level rules cannot:
- Which accounts are connected, directly or through shared attributes?
- Which account is the hub that many others feed or depend on?
- How close is an unreviewed account to an account already confirmed as a mule?
Modelling accounts as a graph
You choose what the nodes and edges mean. This choice decides what you can find.
| Element | Typical choice | Notes |
|---|---|---|
| Node | Account, or customer | Use customers if one person holds several accounts. |
| Directed edge | Transfer from A to B | Aggregate repeated transfers into one edge with a total and a count. |
| Edge attributes | Total amount, count, first and last date | Keep the time range so you can cut old edges. |
| Undirected edge | Shared device, phone number, address, or IP | Links accounts that never transact with each other. |
Aggregating before you build the graph matters. A hub with 5,000 individual transfers from the same sender should look like one edge, not 5,000.
What a mule network looks like
A typical network has layers. Mules sit at the edge and receive the illicit funds. One or more collection accounts gather the money. A cash-out account or an external destination ends the chain.
This is the funnel pattern from earlier chapters, seen as a connected structure instead of a list of accounts.
Measures that matter
You do not need advanced graph theory. A few measures find most of the useful structure.
- Connected component. A group of nodes that can reach each other if you ignore edge direction. Components are the first unit of review. A single alert becomes a case about the whole component.
- In-degree and out-degree. The number of distinct senders into a node and distinct recipients out of it. A high in-degree with a high pass-through ratio is the fan-in pattern.
- Weighted flow. The sum of amounts on edges. Compare inflow and outflow at a node to measure pass-through.
- Hop distance to a known bad account. The number of edges between an account and a confirmed mule. Accounts one or two hops away deserve a closer look. Accounts five hops away usually do not.
- Shared attributes. Accounts that share a device, phone number, or address are linked even without transfers between them.
Example 1: components, hubs, and pass-through
This script builds a directed graph, splits it into components, and reports the hubs in each component with their pass-through ratio.
import networkx as nx
transfers = [
("m1", "hub", 900), ("m2", "hub", 850), ("m3", "hub", 920),
("m4", "hub", 880), ("m5", "hub", 910),
("hub", "cashout", 4200), ("cashout", "atm_ext", 4100),
("alice", "bob", 50), ("bob", "carol", 20),
]
G = nx.DiGraph()
for src, dst, amount in transfers:
if G.has_edge(src, dst):
G[src][dst]["amount"] += amount
else:
G.add_edge(src, dst, amount=amount)
def summarize(graph, min_size=4, min_senders=5):
results = []
for comp in nx.weakly_connected_components(graph):
if len(comp) < min_size:
continue
sub = graph.subgraph(comp)
hubs = []
for node in sub:
if sub.in_degree(node) >= min_senders:
inflow = sub.in_degree(node, weight="amount")
outflow = sub.out_degree(node, weight="amount")
hubs.append((node, round(outflow / inflow, 2)))
total = sum(d["amount"] for _, _, d in sub.edges(data=True))
results.append({"accounts": sorted(comp), "hubs": hubs, "total": total})
return results
for row in summarize(G):
print(row)The output is one component of eight accounts, with hub flagged at a pass-through ratio of 0.94 and a total of 12,760 moved. The alice, bob, carol chain is ignored because it has only three accounts and no fan-in.
Linking accounts through shared attributes
Mule networks often avoid transferring between their own accounts, because that would be visible. They cannot easily avoid sharing logins, devices, or contact details, because the same few people operate many accounts. Build a second graph where an edge means "shares an identifier".
from collections import defaultdict
import networkx as nx
logins = [
("acc1", "dev_A"), ("acc2", "dev_A"),
("acc2", "dev_B"), ("acc3", "dev_B"),
("acc9", "dev_Z"),
]
MAX_ACCOUNTS_PER_DEVICE = 20
by_device = defaultdict(set)
for account, device in logins:
by_device[device].add(account)
links = nx.Graph()
for device, accounts in by_device.items():
if len(accounts) > MAX_ACCOUNTS_PER_DEVICE:
continue # shared kiosks, public Wi-Fi gateways, or corporate proxies
accounts = sorted(accounts)
for other in accounts[1:]:
links.add_edge(accounts[0], other, via=device)
clusters = [sorted(c) for c in nx.connected_components(links) if len(c) >= 2]
print(clusters)The result is [['acc1', 'acc2', 'acc3']]. Account acc2 bridges two devices, so three accounts that never appear together in one login join one cluster. acc9 has no link and is not reported.
You can merge both graphs. Take the transfer components from Example 1 and add the shared-attribute edges. Two small components then join into one larger case. That is often how a network that looked like several unrelated clusters turns out to be one operation.
Gotchas and failure modes
Graph analysis produces more convincing-looking output than rules do, so its mistakes are easier to believe. Watch for these.
- Super-nodes. Large merchants, payroll providers, payment processors, and charities connect to thousands of accounts. Joined into a graph, they merge unrelated customers into one giant component. Exclude known high-degree legitimate nodes, or remove any node above a degree cap before computing components.
- Shared-attribute noise. Family members, flatmates, and employees at the same business share addresses and devices. A cap such as the 20-account limit above helps, but the right value depends on your customer base. Weight strong identifiers (device, phone) above weak ones (a city or postcode).
- Time. A graph built from two years of transfers will connect accounts whose activity never overlapped. Build the graph from a window, such as 30 to 90 days, and keep timestamps on the edges. Pass-through also means little unless the inbound and outbound transfers are close in time.
- Direction. Weakly connected components ignore direction, which is right for finding groups. For flow questions, such as where the money ended up, follow edge direction with a path search from the suspect accounts.
- Guilt by association. Being one hop from a confirmed mule is a reason to review an account. It is not a reason to report it. A victim who paid a scammer is also one hop from the scammer's mule.
- Evasion. Criminals who know about graph checks use longer chains, rotate collection accounts, and move money through several banks. A bank sees only its own side of the graph, so a network may appear as disconnected fragments. Consortium data and information-sharing arrangements between institutions, where the law allows them, reduce this gap.
Turning graph output into a case
The graph tells you where to look. Customer due diligence (CDD) context tells you whether what you find is suspicious. For each flagged component, an investigator should:
- Check each account's expected activity from onboarding. A student account receiving from nine senders and sending 94% onward is out of profile. A sole trader doing the same may not be.
- Identify the roles: who receives from outside, who collects, who cashes out.
- Record the evidence that links accounts: transfer amounts and dates, shared devices, and shared contact details.
- Rank accounts for review by hop distance and by pass-through, not by component size alone.
Treat graph scores as prioritisation. The case file still needs the specific transactions and the reasoning that make the activity suspicious, because that is what a suspicious activity report requires.
Exercise
A component of 600 accounts appears in your weekly run. The highest-degree node is a payroll provider with 540 connected accounts. What should you do before reviewing the component, and what is likely to happen to the component afterwards?
Show answer
Check the highest-degree node first. It is a legitimate super-node, so add it to an exclusion list (or apply a degree cap) and rebuild the graph. The component will most likely break into many small, unrelated components. Review only those that still show fan-in, high pass-through, or shared-attribute links.
Exercise
In Example 2, why is a device used by 50 accounts skipped instead of linking all 50 accounts?
Show answer
A device shared by that many accounts is more likely a public terminal, kiosk, or corporate gateway than a mule operator's phone. Linking all 50 accounts would merge unrelated customers into one cluster and flood reviewers with false positives. The cap is a tunable threshold, and the right value depends on the customer base.