123DevOps··17 min read

Banking security and fraud analytics with Python: rules, machine learning, and money mules

From Pix scams to money mules: build a synthetic transactions dataset, start with velocity and customer-history rules, add IsolationForest and GradientBoosting with a time-based split, find mules by in-degree, and design real-time decisioning.

Data

With Pix, Brazil’s instant payment system, money leaves in seconds, passes through mule accounts, and vanishes before the victim calls the bank. Fighting fraud has become data engineering: deciding in milliseconds, with incomplete signals, without blocking honest customers. In this guide you’ll build the pipeline with pandas and scikit-learn: a synthetic dataset, rules, machine learning, a money mule graph, and decision operations. The numbers are real outputs with a fixed seed; the data is made up (“Customer 0042”), and nothing here is legal advice.

The fraud landscape

Each fraud type leaves a different trail in the data:

Type How it happens Signal in the data
Account takeover Fraudster logs in with a leaked password, phishing, SIM swap, or malware New device, late night, different state, high amount
Social engineering / Pix scam The victim pays: fake bank call center, fake relative, fake investment Legitimate device and login; new beneficiary and unusual amount
Money mule An opened or “rented” account receives and forwards the money Many new senders in a short time
Synthetic identity Onboarding mixes real and made-up data and “matures” before the scam Little history, data that doesn’t cross-check
Card not present Card data used in an online purchase Many attempts, small test amounts, unusual merchant

Identification vs. monitoring

Identification (KYC, know your customer) happens at onboarding and decides whether the person is who they claim to be. Transaction monitoring evaluates every movement of an account that already exists. Synthetic identities and mule accounts are fought mainly at the door; account takeover and Pix scams, in monitoring.

The Brazilian context

A summary of the rules I checked in November 2026. They change often: check the current text on the Central Bank of Brazil (BCB) website and validate with your legal team.

Mechanism What it does Rule
MED Pix refund for well-founded fraud suspicion or operational failure; excludes commercial disputes; precautionary hold of up to 72 h BCB Res. 103/2021 and 147/2021
MED 2.0 Traces money beyond the first receiving account; mandatory for account providers since Feb 2, 2026 BCB Res. 493/2025
DICT fraud marking An accepted infraction notification marks the receiver’s keys and CPF/CNPJ; since Sep 2026, an institution can also mark its own customer BCB Res. 425/2024 and 587/2026
Fraud data sharing A shared electronic system across institutions, with the customer’s prior consent in a highlighted contract clause Joint Res. No. 6/2023 and BCB Res. 343/2023
Night-time limit BRL 1,000 per account between 8 p.m. and 6 a.m. for individuals; a customer-requested increase takes effect only after at least 24 h BCB Res. 142/2021
Cybersecurity Cybersecurity policy, incident response plan, and annual report CMN Res. 4,893/2021, amended by 5,274/2025

For modelers, the strongest signal about a mule account often comes from outside your own data. BCB Res. 403/2024 requires the fraud-risk solution to use DICT security information, refreshed at least every six months, and BCB Res. 501/2025 added to Res. 142 the rejection of payments to accounts with well-founded fraud suspicion.

Then there are privacy laws such as Brazil’s LGPD or the GDPR: transactions, device, and location are personal data. Under the LGPD, biometrics are sensitive data (art. 5, II), and art. 11, II, “g” allows processing sensitive data for fraud prevention in identification and authentication. Even so, minimize data, document the legal basis, and assess a data protection impact assessment (RIPD) with your DPO.

Setting up the environment

Tested on November 25, 2026 with Python 3.15, numpy 2.5.5, pandas 3.1.1, and scikit-learn 1.9.1. networkx was not installed, so the graph part uses pandas only.

python3 -m venv .venv
source .venv/bin/activate
pip install pandas scikit-learn

A synthetic transactions dataset

The generator creates 800 customers over 60 days, with customer, timestamp, amount, channel, device_id, state (UF), beneficiary, new-beneficiary flag, and beneficiary account age.

The legitimate side includes traps: a changed phone, bill-paying day (several transactions within minutes), big purchases, and stores with hundreds of payers. The fraud side has 180 victims in three patterns: account takeover, burst, and Pix scam. They pay 30 mule accounts that operate for about ten days each; half are new accounts, half are old and “rented”.

import numpy as np
import pandas as pd

UFS = ["SP", "RJ", "MG", "RS", "PR", "BA", "PE", "CE", "GO", "SC"]
START = pd.Timestamp("2026-09-01")


def generate_transactions(n_customers=800, n_victims=180, days=60, seed=7):
    rng = np.random.default_rng(seed)  # fixed seed: same numbers every time
    # age (days since opening) of every account that receives money
    age = {f"Account {n}": int(rng.integers(1, 4000)) for n in range(1000, 9000)}
    stores = [f"Store {n:02d}" for n in range(20)]  # merchants: many payers
    age |= {store: int(rng.integers(10, 2000)) for store in stores}
    mules = [f"Account 9{n:03d}" for n in range(30)]  # money mule accounts
    age |= {m: int(rng.integers(3, 60) if n % 2 else rng.integers(150, 900))
            for n, m in enumerate(mules)}  # half new, half "rented"
    rows, customers, registered = [], [], set()

    def tx(cust, ts, amount, device, benef, uf=None, channel="app", pattern="normal"):
        rows.append(dict(customer=cust["customer"], ts=ts, amount=amount, channel=channel,
                         device_id=device, uf=uf or cust["uf"], beneficiary=benef,
                         benef_account_age_days=age[benef],
                         fraud=int(pattern != "normal"), pattern=pattern))

    for c in range(n_customers):
        cust = dict(customer=f"Customer {c:04d}", uf=str(rng.choice(UFS)),
                    ticket=rng.lognormal(5, 0.7))
        benefs = [f"Account {n}" for n in rng.integers(1000, 9000, rng.integers(3, 8))]
        registered |= {(cust["customer"], b) for b in benefs}  # long-standing payees
        customers.append(cust)
        switch = rng.random() < 0.06  # legitimate new phone mid-period
        switch_day = rng.integers(10, days)
        for _ in range(rng.poisson(1.2 * days)):
            day = int(rng.integers(days))
            ts = START + pd.Timedelta(days=day, hours=float(rng.normal(14, 3.5) % 24))
            draw = rng.random()
            benef = (str(rng.choice(benefs)) if draw < 0.78 else
                     str(rng.choice(stores)) if draw < 0.92 else
                     f"Account {rng.integers(1000, 9000)}")
            amount = rng.lognormal(np.log(cust["ticket"]), 0.5)
            if rng.random() < 0.01:
                amount *= rng.uniform(5, 10)  # legitimate big purchase
            tx(cust, ts, amount, f"dev-{c:04d}-{'b' if switch and day >= switch_day else 'a'}",
               benef, channel=str(rng.choice(["app", "web", "card_online"], p=[0.7, 0.2, 0.1])))
        if rng.random() < 0.3:  # bill-paying day: several transactions within minutes
            ts0 = START + pd.Timedelta(days=int(rng.integers(days)),
                                       hours=float(rng.uniform(8, 21)))
            for _ in range(rng.integers(3, 7)):
                tx(cust, ts0 + pd.Timedelta(minutes=float(rng.uniform(0, 10))),
                   rng.lognormal(np.log(cust["ticket"]), 0.5), f"dev-{c:04d}-a",
                   str(rng.choice(benefs)))

    for k, i in enumerate(rng.choice(n_customers, n_victims, replace=False)):
        cust, day = customers[i], int(rng.integers(3, days))
        active = [m for n, m in enumerate(mules) if 2 * n <= day < 2 * n + 10]
        ts0 = START + pd.Timedelta(days=day)
        if k < 0.4 * n_victims:  # account takeover: new device, late night, high amount
            ts0 += pd.Timedelta(hours=float(rng.uniform(22, 28)))
            for j in range(rng.integers(1, 3)):
                tx(cust, ts0 + pd.Timedelta(minutes=12 * j), cust["ticket"] * rng.uniform(4, 12),
                   f"dev-x{k:03d}", str(rng.choice(active)), uf=str(rng.choice(UFS)),
                   pattern="account_takeover")
        elif k < 0.65 * n_victims:  # burst: several transfers within a few minutes
            ts0 += pd.Timedelta(minutes=int(rng.integers(0, 1440)))
            for j in range(rng.integers(5, 10)):
                tx(cust, ts0 + pd.Timedelta(minutes=float(rng.uniform(0, 15))),
                   cust["ticket"] * rng.uniform(0.8, 2), f"dev-{i:04d}-a",
                   str(rng.choice(active)), pattern="burst")
        else:  # Pix scam: the victim pays, in daytime, on their own device
            tx(cust, ts0 + pd.Timedelta(hours=float(rng.uniform(9, 19))),
               cust["ticket"] * rng.uniform(2, 6), f"dev-{i:04d}-a",
               str(rng.choice(active)), pattern="pix_scam")

    df = pd.DataFrame(rows)
    df["ts"] = df["ts"].dt.floor("s")
    df["amount"] = df["amount"].round(2)
    df = df.sort_values(["ts", "customer"]).reset_index(drop=True)
    # new beneficiary: first time for this pair and not on the customer's old list
    old = [(c, b) in registered for c, b in zip(df["customer"], df["beneficiary"])]
    df.insert(7, "new_beneficiary", ~df.duplicated(["customer", "beneficiary"]) & ~np.array(old))
    df.insert(0, "tx_id", np.arange(len(df)))
    return df


if __name__ == "__main__":
    df = generate_transactions()
    print(df.shape)
    print(df.drop(columns=["fraud", "pattern"]).head(3).to_string(index=False))
    print(df["pattern"].value_counts().to_string())

Real output of python data.py:

(58887, 12)
 tx_id      customer                  ts  amount channel  device_id uf  beneficiary  new_beneficiary  benef_account_age_days
     0 Customer 0612 2026-09-01 00:12:39   96.44     app dev-0612-a PE Account 4482            False                    3795
     1 Customer 0693 2026-09-01 00:15:12  191.67     app dev-0693-a RJ Account 4827            False                    2219
     2 Customer 0405 2026-09-01 00:36:06  225.09     app dev-0405-a RJ     Store 17             True                    1388
pattern
normal              58382
burst                 336
account_takeover      106
pix_scam               63

That’s 505 frauds in 58,887 transactions, less than 1%. The fraud and pattern columns are the answer key: use them to measure, never as features.

Rules first

Rules come before the model: they’re explainable, ship quickly, and become the baseline ML has to beat. There are five, and each one adds points:

  • Velocity: 4 or more transactions by the customer within 10 minutes.
  • Unusual amount: z-score above 3 against the customer’s own history, using only earlier transactions.
  • New device: a device_id never seen for that customer.
  • Night: between 8 p.m. and 6 a.m., the night-time limit window.
  • Risky beneficiary: a new beneficiary whose account is less than 90 days old.
from data import generate_transactions


def build_features(df):
    df = df.sort_values(["customer", "ts"]).reset_index(drop=True)
    g = df.groupby("customer")

    # velocity: same customer's transactions in the last 10 minutes (current included)
    df["tx_10min"] = (g.rolling("10min", on="ts")["amount"].count()
                      .to_numpy().astype(int))

    # amount vs the customer's OWN history, using only the past (shift)
    mean = g["amount"].transform(lambda s: s.shift().expanding(5).mean())
    std = g["amount"].transform(lambda s: s.shift().expanding(5).std())
    df["z_amount"] = ((df["amount"] - mean) / std).fillna(0).round(2)

    # device never seen for this customer (the first transaction doesn't count)
    df["new_device"] = (df.groupby(["customer", "device_id"]).cumcount().eq(0)
                        & g.cumcount().gt(0))
    hour = df["ts"].dt.hour
    df["night"] = (hour >= 20) | (hour < 6)
    df["benef_risk"] = df["new_beneficiary"] & (df["benef_account_age_days"] < 90)
    return df.sort_values(["ts", "customer"]).reset_index(drop=True)


RULES = {
    "velocity": lambda d: d["tx_10min"] >= 4,
    "unusual_amount": lambda d: d["z_amount"] > 3,
    "new_device": lambda d: d["new_device"],
    "night": lambda d: d["night"],
    "risky_beneficiary": lambda d: d["benef_risk"],
}
WEIGHTS = {"velocity": 3, "unusual_amount": 2, "new_device": 2,
           "night": 1, "risky_beneficiary": 2}


def apply_rules(df):
    for name, rule in RULES.items():
        df[f"r_{name}"] = rule(df)
    df["points"] = sum(df[f"r_{n}"] * w for n, w in WEIGHTS.items())
    df["reasons"] = df.apply(
        lambda r: ", ".join(n for n in RULES if r[f"r_{n}"]), axis=1)
    return df


if __name__ == "__main__":
    df = apply_rules(build_features(generate_transactions()))
    total = df["fraud"].sum()
    print(f"transactions: {len(df)}  frauds: {total}")
    print(f"{'rule':<18}{'alerts':>7}{'frauds':>8}{'precision':>11}{'recall':>8}")
    for name in RULES:
        m = df[f"r_{name}"]
        tp = df.loc[m, "fraud"].sum()
        print(f"{name:<18}{m.sum():>7}{tp:>8}{tp / m.sum():>11.2f}{tp / total:>8.2f}")
    for cut in [2, 3, 4, 5]:
        m = df["points"] >= cut
        tp = df.loc[m, "fraud"].sum()
        print(f"points >= {cut}: alerts={m.sum():>5}  frauds={tp:>3}  "
              f"precision={tp / m.sum():.2f}  recall={tp / total:.2f}")

Output of python rules.py:

transactions: 58887  frauds: 505
rule               alerts  frauds  precision  recall
velocity              590     200       0.34    0.40
unusual_amount       1557     137       0.09    0.27
new_device            117      72       0.62    0.14
night                3590     256       0.07    0.51
risky_beneficiary     251     172       0.69    0.34
points >= 2: alerts= 2343  frauds=415  precision=0.18  recall=0.82
points >= 3: alerts=  819  frauds=351  precision=0.43  recall=0.70
points >= 4: alerts=  255  frauds=204  precision=0.80  recall=0.40
points >= 5: alerts=  112  frauds=108  precision=0.96  recall=0.21

On its own, the night rule has a precision of 0.07: 93% of its alerts are honest customers. Velocity sits at 0.34 because bill-paying day looks like a burst. With 4 points or more, 80% of alerts are fraud, but only 40% of frauds are caught. The Pix scam almost slips through, because the victim uses their own device, in daytime. In a real bank, the night-time limit would already stop part of the account takeovers; the dataset doesn’t apply that limit.

The machine learning layer

model.py reuses the rule features and adds how many different customers have already paid the beneficiary (benef_senders), a never-seen state, and the hour. The split is time-based: train through October 12, test from October 13. Shuffling the rows would put the same mule account in both train and test. More on leakage in machine learning with Python and scikit-learn.

import numpy as np
import pandas as pd
from sklearn.ensemble import HistGradientBoostingClassifier, IsolationForest
from sklearn.inspection import permutation_importance

from data import generate_transactions
from rules import apply_rules, build_features

df = apply_rules(build_features(generate_transactions()))

# extra features: beneficiary network and state change (all past-only)
new_pair = ~df.duplicated(["beneficiary", "customer"])
df["benef_senders"] = new_pair.groupby(df["beneficiary"]).cumsum()
df["new_uf"] = ~df.duplicated(["customer", "uf"]) & df.duplicated("customer")
df["hour"] = df["ts"].dt.hour
df["log_amount"] = np.log1p(df["amount"])
df["card_online"] = df["channel"].eq("card_online")

FEATURES = ["log_amount", "z_amount", "tx_10min", "new_device", "night", "hour",
            "new_beneficiary", "benef_account_age_days", "benef_senders", "new_uf",
            "card_online"]
X = df[FEATURES].astype(float)
y = df["fraud"]

# time-based split: train on September and early October, test on the future
cutoff = pd.Timestamp("2026-10-13")
train, test = df["ts"] < cutoff, df["ts"] >= cutoff
print(f"train: {train.sum()} tx, {y[train].sum()} frauds | "
      f"test: {test.sum()} tx, {y[test].sum()} frauds")


def summary(name, alert):
    tp = int((alert & y[test].astype(bool)).sum())
    fp = int(alert.sum() - tp)
    print(f"{name:<22} alerts={int(alert.sum()):>4}  frauds={tp:>3}/{y[test].sum()}  "
          f"false_pos={fp:>4}  precision={tp / max(alert.sum(), 1):.2f}  "
          f"recall={tp / y[test].sum():.2f}")


summary("rules (points >= 4)", df.loc[test, "points"].ge(4).to_numpy())

# 1) IsolationForest: does not use the label
iso = IsolationForest(n_estimators=300, contamination=0.01, random_state=42)
iso.fit(X[train])
summary("IsolationForest", iso.predict(X[test]) == -1)

# 2) supervised model with extra weight on the rare class
gb = HistGradientBoostingClassifier(max_iter=300, learning_rate=0.05,
                                    class_weight="balanced", random_state=42)
gb.fit(X[train], y[train])
prob = gb.predict_proba(X[test])[:, 1]
summary("GradientBoosting 0.5", prob >= 0.5)

print("\nthreshold alerts frauds false_pos precision recall friction/1000 amount_blocked")
legit = (y[test] == 0).sum()
amount = df.loc[test, "amount"].to_numpy()
fraud = y[test].to_numpy().astype(bool)
for threshold in [0.1, 0.3, 0.5, 0.7, 0.9]:
    a = prob >= threshold
    tp, fp = (a & fraud).sum(), (a & ~fraud).sum()
    blocked = amount[a & fraud].sum() / amount[fraud].sum()
    print(f"{threshold:>9}{a.sum():>7}{tp:>7}{fp:>10}{tp / a.sum():>10.2f}"
          f"{tp / fraud.sum():>7.2f}{1000 * fp / legit:>14.1f}{blocked:>15.0%}")

imp = permutation_importance(gb, X[test], y[test], scoring="average_precision",
                             n_repeats=5, random_state=42)
print("\n" + pd.Series(imp.importances_mean, index=FEATURES)
      .sort_values(ascending=False).head(5).round(3).to_string())

# what the analyst sees in the queue: model score + rule reasons
queue = df.loc[test, ["tx_id", "amount", "benef_account_age_days", "benef_senders",
                      "points", "reasons"]].assign(score=prob.round(2))
print("\n" + queue[queue["score"] >= 0.5].sort_values("score", ascending=False)
      .head(3).to_string(index=False))

Output of python model.py:

train: 40946 tx, 364 frauds | test: 17941 tx, 141 frauds
rules (points >= 4)    alerts=  71  frauds= 52/141  false_pos=  19  precision=0.73  recall=0.37
IsolationForest        alerts= 339  frauds= 60/141  false_pos= 279  precision=0.18  recall=0.43
GradientBoosting 0.5   alerts= 161  frauds=129/141  false_pos=  32  precision=0.80  recall=0.91

threshold alerts frauds false_pos precision recall friction/1000 amount_blocked
      0.1    218    133        85      0.61   0.94           4.8            91%
      0.3    188    131        57      0.70   0.93           3.2            90%
      0.5    161    129        32      0.80   0.91           1.8            89%
      0.7    145    125        20      0.86   0.89           1.1            88%
      0.9    133    118        15      0.89   0.84           0.8            87%

benef_account_age_days    0.749
benef_senders             0.287
tx_10min                  0.183
new_beneficiary           0.087
z_amount                  0.025

 tx_id  amount  benef_account_age_days  benef_senders  points                                              reasons  score
 41119   90.21                      52             15       2                                    risky_beneficiary    1.0
 41663  672.77                     467              4       2                                       unusual_amount    1.0
 54952 2343.89                      46              5       7 unusual_amount, new_device, night, risky_beneficiary    1.0

IsolationForest flagged 339 transactions, and only 18% were fraud. Anomaly isn’t fraud: a legitimate big purchase is odd, and a Pix scam looks normal. Use it as an extra feature or to explore new patterns, not to decide.

The GradientBoosting model caught 129 of the 141 test frauds, versus 52 for the rules. Be suspicious: on synthetic data, the model learns the generator. Several false positives are accounts 300 to 900 days old, the range of the “rented” mules. In production, expect worse results.

Threshold, precision, recall, and friction

Every false positive is an honest customer blocked or challenged: friction, a call to customer service, an abandoned purchase. The friction/1000 column counts legitimate customers bothered per thousand transactions. At a 0.1 threshold, the model catches 133 frauds and bothers 85 customers; at 0.9, it bothers 15 but lets 23 frauds through.

The threshold is a business decision. A common approach is tiers: a very high score blocks, a medium score triggers step-up (biometrics or confirmation), with less friction than a block. The 12 frauds missed at 0.5 went to mules that had received from at most 3 customers: that’s the freshly activated mule, and that’s where shared DICT markings help.

Money mule graph with pandas

A mule account receives from many victims. In graph terms, that’s in-degree: how many different senders point to the account. You don’t need networkx; a groupby does it.

from data import generate_transactions

df = generate_transactions()

# 1) raw in-degree: how many DIFFERENT customers paid each account
degree = df.groupby("beneficiary")["customer"].nunique().sort_values(ascending=False)
print(degree.head(4).to_string(), "\n")

# 2) NEW senders in a 7-day window, excluding known merchants
stores = df["beneficiary"].str.startswith("Store")  # in real life: a business allowlist
new = df[df["new_beneficiary"] & ~stores].sort_values(["beneficiary", "ts"])
window = (new.groupby("beneficiary").rolling("7D", on="ts")["customer"].count()
          .groupby(level=0).max().rename("new_7d"))

accounts = (df[~stores].groupby("beneficiary")
            .agg(age_days=("benef_account_age_days", "first"), mule=("fraud", "max"))
            .join(window).fillna({"new_7d": 0})
            .sort_values("new_7d", ascending=False))
print(accounts.head(6).astype(int).to_string(), "\n")

for cut in [2, 3, 4]:
    s = accounts[accounts["new_7d"] >= cut]
    print(f"new_7d >= {cut}: {len(s):>3} accounts, {s['mule'].sum()} mules "
          f"(of {accounts['mule'].sum()})")
beneficiary
Store 01    341
Store 19    338
Store 15    331
Store 00    324 

              age_days  mule  new_7d
beneficiary                         
Account 9005        11     1      15
Account 9007        44     1      15
Account 9017        52     1      14
Account 9011        51     1      14
Account 9002       879     1      13
Account 9004       269     1      13 

new_7d >= 2: 309 accounts, 30 mules (of 30)
new_7d >= 3:  36 accounts, 30 mules (of 30)
new_7d >= 4:  29 accounts, 29 mules (of 30)

Raw in-degree points to the stores. Without known merchants and counting only new senders over seven days, a cutoff of 4 isolates 29 accounts, all mules. Account 9002 is 879 days old: the age rule would miss this “rented” account, but the network catches it. This view is retrospective; in production, the counter updates on every transaction. Since MED 2.0 follows money beyond the first account, it’s worth extending the graph to onward transfers, which this dataset doesn’t simulate.

Identity verification (KYC)

Monitoring only works if the account was born clean. At onboarding, the usual layers are:

  • Document: image authenticity and data that matches trusted sources.
  • Facial biometrics: selfie against the document photo. The walkthrough is in face recognition with OpenCV; calibrate the threshold on your own data.
  • Liveness detection: active (blink, turn your head) or passive, against printed photos, on-screen video, masks, and deepfakes injected into the camera feed.
  • Device fingerprinting: device attributes, emulator, root, or SIM swap signals. The new_device feature is the minimal version of this.
  • Behavioral biometrics: typing rhythm, gestures, and navigation, which separate the account owner from an intruder or from someone following a scammer’s instructions.

Biometric data is sensitive under the LGPD: define retention, prefer storing the template over the image, and restrict access.

Operations: from stream to decision

Because Pix is instant, the decision sits on the transaction’s synchronous path:

transaction (Pix, wire transfer, card)
  -> event stream (queue / Kafka)
  -> online features (velocity counters, customer history, beneficiary in-degree)
  -> score (rules + model)
  -> decision: approve | step-up (biometrics, confirmation) | block or hold
  -> audit trail + case queue
  • Online features: counters such as tx_10min and benef_senders are updated incrementally in a low-latency store; recomputing history on the fly doesn’t fit the time budget.
  • Case management: alerts and held transactions go to a queue prioritized by score and amount, with a review deadline. How to measure that deadline is in SLA control with data.
  • Feedback loop: analyst decisions and MED disputes become labels, with a delay of days or weeks; retraining has to respect that delay.
  • Drift: fraudsters adapt. Monitor the score distribution, the alert rate, and weekly precision per fraud pattern.
  • Explainability: analysts don’t decide based on a number. The last lines of the model.py output show the score, rule reasons, and key features side by side. An LLM can summarize the case, as in integrating data with AI, but it shouldn’t decide.
  • Audit trail: for every decision, record tx_id, model and rule versions, features, score, threshold, action, analyst, and timestamp in immutable storage. It supports disputes and incident response; see also Kubernetes audit logging for security.

Checklist

  • I separate identification (KYC) from transaction monitoring
  • I start with explainable rules and measure each one’s precision and recall
  • I compare each amount with the customer’s own history, using only the past
  • I validate with a time-based split and pick the threshold by acceptable friction
  • I track beneficiary in-degree and use DICT fraud markings
  • I keep a case queue, feedback, drift monitoring, and an audit trail
  • I confirm current BCB rules and the LGPD legal basis with the legal team

Fraud is an adversary that learns: start with rules you understand, measure every alert, and let the model earn its place with numbers.

Get updates on new posts and stay in the loop!