Sub topic 12
Testing, validating, and governing a screening program
A screening system that produces alerts is not proof that it works. A system can generate thousands of alerts and still miss a listed party whose name was spelled differently. It can also be tuned so tightly that it produces few alerts and misses real matches. This chapter covers how to find out which of these is happening, and how to keep the answer current.
This chapter assumes you have read the earlier chapters on name normalization, matching, thresholds, and alert dispositions. You should be able to read short Python scripts.
What "effective" means for screening
Effectiveness has three parts, and each needs its own evidence.
- Coverage: the right parties, fields, and events are sent to screening, against the right lists.
- Detection: when a listed party or a plausible variant of one is screened, the system raises an alert.
- Decision quality: analysts resolve alerts consistently and correctly, and the record shows why.
Regulators expect testing as part of a program, not as a one-time project. The US Treasury's OFAC framework for compliance commitments, for example, lists testing and auditing among its five components, alongside management commitment, risk assessment, internal controls, and training. Other regimes use different wording but ask for the same thing.
Four kinds of testing
Each test answers a different question. A program that runs only one of them has blind spots.
| Test | Question it answers | Typical evidence |
|---|---|---|
| Data and list integrity | Did every list update load completely, and does every in-scope record reach the screening engine? | Reconciliation of list entry counts, feed logs, record counts per source system |
| Detection (below-the-line) testing | Which known and plausible variants does the engine miss at the current threshold? | Test set with expected outcomes, detection rate per threshold |
| Decision quality review | Are dispositions correct, consistent, and documented? | Sampled alerts re-reviewed by a second person |
| Independent validation | Is the configuration sound, and is it justified by evidence rather than habit? | Written report from someone who did not build or tune the system |
Data and list integrity
Detection testing is meaningless if the data never reaches the engine. Typical failures are quiet:
- A source system (a trade finance platform, a legacy loan book) is not connected to screening.
- A field such as an alias, a beneficial owner, or a payment's intermediary bank is truncated or dropped in transit.
- A list update fails to load, so the engine screens against last week's list.
- A character-encoding error turns accented or non-Latin names into question marks.
Test these by reconciliation. Count the records in each source system and compare with the count screened. Compare the number of entries in each published list with the number loaded. Push a few synthetic records with known listed names through every channel, and confirm an alert appears at the end. This last check is sometimes called an end-to-end canary test.
Detection testing
The central question is: what does the engine miss? You answer it by building a test set from listed names plus realistic variants, and measuring how many variants are caught at each threshold.
Good variants come from the ways real names change:
- Transliteration differences ("Mohammed", "Muhammad", "Mohamed")
- Reordered parts, or a family name given first
- Missing or extra middle names
- Dropped punctuation, spaces, or hyphens ("Al-Sayed", "Al Sayed", "Alsayed")
- Typing errors
- Titles or legal suffixes added or removed ("Ltd", "LLC")
Include negative cases too: unrelated names, and names that share one common token. Without them you can raise detection to 100% by lowering the threshold to zero, which is not a result.
The script below reuses the normalization and token-sort score from earlier chapters and measures both sides at several thresholds.
import re
import unicodedata
from difflib import SequenceMatcher
def normalize(name: str) -> str:
decomposed = unicodedata.normalize("NFKD", name)
no_accents = "".join(c for c in decomposed if not unicodedata.combining(c))
no_punct = re.sub(r"[^\w\s]", " ", no_accents.casefold())
return " ".join(no_punct.split())
def token_sort_score(a: str, b: str) -> float:
ta = " ".join(sorted(normalize(a).split()))
tb = " ".join(sorted(normalize(b).split()))
return SequenceMatcher(None, ta, tb).ratio()
LISTED = "Mohammed Al-Sayed"
# (screened name, should the engine alert?)
TEST_SET = [
("Al Sayed, Mohamed", True),
("Mohamed Alsayed", True),
("Muhammad Al Sayed", True),
("Mohammed Al-Sayed Trading Ltd", True),
("M. Al-Sayed", True),
("Mohammed Sayed", True),
("Jane Doe", False),
("Mohammed Rahman", False),
("Sara Al-Sayegh", False),
("Omar Hassan", False),
]
def evaluate(threshold: float) -> dict:
positives = [(n, s) for n, expect in TEST_SET if expect
for s in [token_sort_score(LISTED, n)]]
negatives = [(n, s) for n, expect in TEST_SET if not expect
for s in [token_sort_score(LISTED, n)]]
caught = [n for n, s in positives if s >= threshold]
missed = [n for n, s in positives if s < threshold]
false_alerts = [n for n, s in negatives if s >= threshold]
return {
"threshold": threshold,
"detection_rate": len(caught) / len(positives),
"false_alert_rate": len(false_alerts) / len(negatives),
"missed": missed,
}
for t in (0.95, 0.90, 0.85, 0.80, 0.70):
r = evaluate(t)
print(
f"threshold={r['threshold']:.2f} "
f"detection={r['detection_rate']:.0%} "
f"false_alerts={r['false_alert_rate']:.0%} "
f"missed={r['missed']}"
)Run it and read the missed column. It tells you which kinds of variants fall through at each threshold. That is more useful than the headline percentage, because it shows what to fix: a miss on "M. Al-Sayed" points to initials handling, while a miss on a reordered name points to tokenization.
A test set of ten names is only an illustration. A real set should be large enough to be meaningful for each list and name culture you screen, and it should be kept under version control so results can be compared between runs.
Decision quality review
Detection testing covers the engine. Quality assurance (QA) covers the people and process around it. A second reviewer re-works a sample of closed alerts without seeing the original decision, then compares outcomes.
Sample all disposition types, not just the escalated ones. Closed false positives are where a missed true match would hide, so they deserve the most attention. A reproducible, stratified sample lets an auditor repeat your selection.
import random
from collections import defaultdict
def stratified_sample(alerts, per_disposition, seed):
"""Pick up to per_disposition alerts from each disposition type.
alerts: list of dicts, each with "id" and "disposition".
The seed is recorded so the selection can be reproduced.
"""
rng = random.Random(seed)
groups = defaultdict(list)
for alert in alerts:
groups[alert["disposition"]].append(alert)
sample = []
for disposition in sorted(groups):
items = sorted(groups[disposition], key=lambda a: a["id"])
k = min(per_disposition, len(items))
sample.extend(rng.sample(items, k))
return sample
alerts = [
{"id": i, "disposition": d}
for i, d in enumerate(
["false_positive"] * 40 + ["escalated"] * 6 + ["true_match"] * 2
)
]
picked = stratified_sample(alerts, per_disposition=5, seed=20261127)
print(sorted(a["id"] for a in picked))Track the disagreement rate between the first and second reviewer, and classify each disagreement: wrong decision, right decision with weak rationale, or missing record. A wrong decision on a closed alert needs a look-back: find similar alerts closed by the same analyst or under the same rule, and re-review them.
Independent validation
Someone outside the team that built and tunes the screening configuration should periodically review it. This may be internal audit, a separate second-line function, or an outside specialist. They check that:
- The documented design matches what is actually running.
- Threshold and matching choices are supported by test evidence.
- Known limits are recorded, for example scripts or languages the engine handles poorly.
- Prior findings were fixed and retested.
If your institution has a model risk policy, a matching engine usually falls under it. Vendor systems are not exempt: you remain responsible for the result, so ask the vendor for documentation of the algorithm and run your own tests.
Governance: keeping the program under control
Testing finds problems. Governance makes sure someone owns them, and that changes are made deliberately.
Ownership and change control
Name an accountable owner for the screening program, and define who may change what. Any change that affects detection needs a record:
- Threshold or matching rule changes
- New or removed lists
- Changes to which fields or systems are screened
- Suppression or "good guy" list entries that stop repeated alerts
Treat each change like a software release: a written reason, a test of the effect before it goes live, an approval from someone other than the requester, and a regression run afterward. Good-guy lists need special care because they silently suppress alerts. Each entry should have a reason, an approver, and an expiry or review date.
Management information
Senior management and the board should see a regular, consistent set of measures. Useful ones include:
- Alert volume by list, channel, and customer segment
- Share of alerts closed as false positives, and the true match count
- Age of the review backlog and time to disposition
- List update load times and any failures
- QA disagreement rate and look-back results
- Open test and audit findings, with owners and due dates
Trends matter more than single values. A sudden drop in alert volume after a configuration change deserves as much attention as a spike.
The improvement cycle
Run the loop on a schedule, and also after triggers: a major list change, a new product or country, a system migration, a vendor release, or a jump in alert volume. The depth of each test should follow your risk assessment. A bank with extensive cross-border payments needs more frequent and broader testing than a small domestic lender.
Common errors
- Testing only what is easy. Teams test the customer batch screen and skip the payment channel or trade finance feed.
- Measuring volume instead of quality. Falling alert numbers look like efficiency, but they can mean missed matches.
- Using a test set that is too clean. Real data has typos, missing fields, and mixed scripts. Include them.
- No record of test results. Without saved inputs, outputs, dates, and versions, you cannot show an examiner what you tested.
- Findings with no owner or date. A finding that nobody is accountable for will not be fixed.
- Ignoring look-backs. When a flaw is found, review past decisions affected by it, then decide whether any reporting or remediation is required.
Exercises
Exercise
Your detection test shows 100% detection at a threshold of 0.60, and the false alert rate is 70% of your negative test cases. A colleague argues that the result proves the screening is effective. What is wrong with that argument, and what would you do next?
Show answer
Detection alone is not effectiveness. A very low threshold catches almost everything, but it also alerts on most unrelated names, which would flood analysts and push them toward rushed or inconsistent closures. Look at both rates together, choose candidate thresholds, and confirm the chosen one on a held-out test set that was not used for tuning. Also review which variant types are missed at higher thresholds and consider fixing those in normalization or matching rules rather than only lowering the threshold. Record the evidence and have the change approved.
Exercise
A QA reviewer re-reviews a sample of closed alerts and finds that one analyst closed three alerts as false positives without a documented reason, though the decisions look correct. Is this a finding, and what should happen?
Show answer
Yes, it is a finding. The decisions may be correct, but a missing rationale means the firm cannot demonstrate why the alerts were closed, which weakens the audit trail. Classify it as a documentation failure, give the analyst feedback, and check other alerts closed by that analyst or in that period for the same problem. Record the finding with an owner and due date, and track it through to closure.