AuthentiSense
“Don’t Just Trust the Sender. Secure Entirely"
Created on 29th August 2026
•
AuthentiSense
“Don’t Just Trust the Sender. Secure Entirely"
The problem AuthentiSense solves
The core problem
Every fraud control in retail banking is pointed at the sender. Is this the right device, the usual location, a normal amount, the expected spending pattern? That entire apparatus asks one question: is this person really who they claim to be?
It's a good question. It's also the wrong one when the account under attack is on the receiving end.
When a customer pays someone they've paid a dozen times before, every sender-side check passes cleanly — because nothing about the sender is wrong. They are who they say they are, on their own phone, sending a normal amount to a saved beneficiary. The transfer clears in under a second. And the money lands in an account that someone else took control of twenty minutes earlier.
The victim did nothing unusual. The bank's fraud engine did its job correctly. The money is still gone.
Why that gap exists
Account takeover fraud has an asymmetry that most systems never exploit: the compromise happens before the money moves, and it leaves a trail.
An attacker taking over an account has to do a sequence of things first — reset the password, swap the SIM to intercept OTPs, register their device, add a beneficiary they control. Each of those events is individually unremarkable. People reset passwords. People get new phones. In isolation, none of it justifies blocking anything.
But compressed into a few minutes, in that order, it's a signature. That's the window your system operates in — the gap between "this account is now controlled by an attacker" and "money arrives in it." Your engine measures exactly this, through two features most systems don't have: how many distinct security-sensitive event types fired, and how tightly clustered in time they were. The same four events spread over three days score near zero.
The reason nobody does this isn't that it's technically hard. It's a data-access problem. The sender's bank doesn't get to see the recipient's login history. Inside a single institution — where both accounts sit on the same core system — that objection disappears entirely, which is why your realistic v1 is an intra-bank pre-settlement check.
The second problem
Then there's the attacker who doesn't need to take over anything, because they already have credentials: the administrator, the support agent, the service account.
Insider misuse is genuinely harder than external fraud, for a structural reason — every action looks authorised, because it is. There's no stolen credential to detect, no anomalous login to flag. A database export at 2 AM is either routine maintenance or exfiltration, and the difference isn't in the action. It's in the context: was there a change ticket, is this the person's normal hour, is this volume normal for their role.
Insider Shield's answer is behavioral baselines learned per role from live activity, rather than thresholds someone typed into a config file — because a hand-set threshold is either so loose it never fires or so tight it gets ignored within a week.
And the reason it runs as a separate process against a read-only view is the part worth defending: a monitor living inside the system it watches can be switched off by whoever compromises that system. An insider with admin rights can disable their own audit trail. Yours can't reach it.
What the two together actually change
Recipient Shield protects the customer's money from someone else's compromised account. Insider Shield protects against the people who can move money without needing to compromise anything.
Neither is the complete picture on its own — that's the argument for building both. The full threat surface for a transfer is: the sender (already covered by the industry), the recipient (your first product), and the operator (your second).
Challenges we ran into
The model wouldn't produce a usable middle. The first instinct was a binary classifier — compromised or not. But predict_proba saturates: once the forest finds the strongest discriminating combination, almost everything lands near 0 or near 1. That's fine for a yes/no, and useless for a product whose entire value is the MEDIUM band, where you ask for one more factor instead of blocking someone's rent.
The fix was to reframe it as regression. A transparent weighted-sum "teacher" function generates continuous severity targets, a RandomForestRegressor learns to approximate it with noise injected so it generalises rather than memorising, and the teacher never runs in production. (app/risk/teacher.py — the reasoning is written up in the module docstring.)
Proving the score was real. A demo where risk = 90 if account == "compromised" looks identical from the outside. Keeping it honest meant the runtime score always comes from the model evaluated on a live feature vector — including combinations that appear in no hand-written archetype — and no code path anywhere branches on an account ID. Harder to build, much easier to defend.
The system over-reacted to honest behaviour. Early on, one legitimate security event was enough to trip a flag — a real person changing their password on a Tuesday. So a deliberate hard-negative archetype went into the training data: a normal account that genuinely triggers one benign security event. Getting it to not fire on those, while still catching real sequences, is what the time_between_security_events and multiple_security_changes features exist for.
One feature ended up carrying the model. recent_device_change sits at 0.767 importance — 77% of the work across twenty features. It's a consequence of synthetic generation: device change appears in nearly every compromised archetype, so the forest treats it as a near-perfect separator and starves the rest. Worth stating as a known limitation rather than leaving for a judge to find.
Systems
Two applications, one SQLite file. The monitor reads the banking database live while the banking app is writing to it, and SQLite's default behaviour is to throw database is locked mid-transfer. Solved with WAL journal mode plus a busy timeout, so readers don't block writers.
Real-time without hammering the database. The first version polled every three seconds and rebuilt the entire feed each time — re-scoring every transaction through the ML engine to usually discover nothing had changed. Replacing that with SSE plus a cheap fingerprint probe (one COUNT/MAX query, push only on change) took latency from up-to-3-seconds down to sub-second and made an idle system cheaper.
Settling money is not one update. The override path debits the sender, credits the recipient, marks the transaction complete, and increments the trust counter. Any of those failing partway leaves money debited but not credited. It needed balance validation up front and a single transaction with rollback — the kind of thing that's invisible when it works and unforgivable when it doesn't.
Three independent risk layers disagreeing. Recipient ML risk, sender-behavior signals, and recipient aging can all fire on the same transfer. Without a rule they'd fight — a rule downgrading a hold, or a minor signal escalating one. The resolution was a decision ranking where the extra layers can only escalate, and only as far as VERIFY. Holding money stays reserved for recipient risk. (_escalate_decision in routers/transfers.py.)
Product judgment
Explanations that were technically correct and practically noise. Showing every feature contribution on a LOW-risk transfer buried the signal in trivia and made a clean account look suspicious. Contributions under 8 points are now suppressed on the LOW screen — a small change that decides whether the explanation reads as insight or as clutter.
Learning baselines from populations too small to learn from. The monitor computes per-role deviation in sigmas, and with three identities a "6.8σ deviation" is arithmetic, not evidence. Every baseline now carries a confidence derived from identity and observation count, and a role can only be labelled deviating at high confidence. Getting a system to refuse to raise an alarm it can't support was harder than getting it to raise one.
Duplicate notifications. A refresh or a double-click was enough to fire a second "transfer successful" message for the same transaction. Needed an explicit notification_sent guard on the transaction row.
Technologies used