> ## Documentation Index
> Fetch the complete documentation index at: https://docs.amlok.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Adaptive fraud detection and constrained counterfactual analysis

> RP-2026-10: adaptive fraud evaluation, actionable counterfactuals, evidence value, and an embedded assessment path.

![](https://mintcdn.com/amlok-docs/E2XhE7LcU8Z7MBXL/images/whitepapers/10-adaptive-defense-recourse.svg?fit=max\&auto=format\&n=E2XhE7LcU8Z7MBXL\&q=85\&s=53e02276c59799dbb2169c0641e70b9a)

**Research period:** August 2025 - November 2026 · [Research timeline](https://docs.amlok.io/research/index.md#research-timeline)

**RP-2026-10** · [Research library](https://docs.amlok.io/research/library.md) · [Results workbook RS-2026-07](https://docs.amlok.io/research/resources/robustness-results.md)

## What this study compares

The direct model comparison asks how much fraud a detector still finds as attacks adapt. It evaluates a fixed detector and AMLOK's adapting detector under the same attack round and the same **1% false-positive rate**. The system combines document, payment-flow, and graph evidence; its comparator is the static financial detector.

| Financial task and attack condition | Static-detector result | AMLOK adaptive-detector result | Difference |
| - | - | - | - |
| Detect fraud after print-scan-rescan document changes | 68.2% recall | 75.8% recall | 7.6 percentage points higher |
| Detect fraud after multi-hop kiting changes | 59.4% recall | 75.1% recall | 15.7 percentage points higher |
| Detect fraud in the final adaptive attack round | 48.2% recall | 74.5% recall | 26.3 percentage points higher |

Recall is the share of fraudulent cases detected at that fixed false-positive rate. Each row compares detectors within its stated attack condition. The later **CAD 180,000 request** is a separate worked recourse example: changing verified evidence and financial conditions changes the capacity estimate. The **66.1 ms p99** result describes an embedded assessment path that reuses borrower state. Neither is a raw-language-model comparison or the same task as the multi-step investigation workflow.

Sources: [RS-2026-07, adaptive defense and conditional recourse](https://docs.amlok.io/research/resources/robustness-results.md#adaptive-defense-and-conditional-recourse), `02_Stackelberg_MILP_Embedded`, rows 6, 7, and 9; [RP-2026-10, adaptive fraud evaluation](https://docs.amlok.io/whitepapers/10-adaptive-defense-recourse.md#adaptive-fraud-as-a-changing-distribution). The recourse and portfolio calculations below retain their scenario assumptions.

## Abstract

Fraud patterns can change in response to a detector. A fixed benchmark therefore does not fully describe resilience against an adapting adversary. Credit assessment has a different limitation: a decline explains the current evidence state but may not show which feasible changes would alter the result. Fast assessment also requires a distinct execution path from a multi-step investigation.

This paper evaluates adversarially adapted fraud detection, constrained counterfactual analysis, positive-capacity-gain estimates, and an embedded assessment path. The source reports 74.5% fraud recall at a fixed 1% false-positive rate after the final attack round, compared with 48.2% for the static detector. Its recourse study reports 14.2% conversion among the evaluated declines with a 3.1% realized default rate in the converted population. The embedded path reports 66.1-millisecond p99 latency and credit AUROC of 0.879. [RP-2026-10](https://docs.amlok.io/whitepapers/10-adaptive-defense-recourse.md), [RS-2026-07](https://docs.amlok.io/research/resources/robustness-results.md).

## Adaptive fraud as a changing distribution

A static detector is evaluated against a fixed distribution. An adaptive evaluation allows an adversarial generator to change document, payment-flow, and timing patterns while the defender updates its model. The resulting distribution depends partly on the detector itself, a setting often described as performative prediction.

The source uses a red-team generator and a defender in a minimax formulation. The generator seeks difficult fraudulent examples subject to an evasion-cost term. The defender reduces detection loss while maintaining a penalty for false alarms on clean examples. Its reinforcement-learning generator explores changing patterns; the reported comparison measures how much fraud recall survives that adaptation. [RP-2026-10, section 1](https://docs.amlok.io/whitepapers/10-adaptive-defense-recourse.md).

**Equation 10.1 - Adversarial detection objective**

$$
\begin{aligned}
\min_{\theta_D}\max_{\pi_{\mathrm{adv}}}
&\;\mathbb E_{z\sim\mathcal P_{\mathrm{fraud}},\,\widetilde X\sim\pi_{\mathrm{adv}}(\cdot\mid z)}
\left[\mathcal L_{\mathrm{Det}}(D_{\theta_D}(\widetilde X),1)
-\lambda_{\mathrm{cost}}C_{\mathrm{evade}}(z,\widetilde X)\right]\\
&+\mathbb E_{X\sim\mathcal P_{\mathrm{clean}}}
\left[\mathcal L_{\mathrm{FPR}}(D_{\theta_D}(X),0)\right].
\end{aligned}
$$

$D_{\theta_D}$ is the detector and $\pi_{\mathrm{adv}}$ proposes changed fraud examples. The evasion-cost penalty constrains the adversary's changes. The clean-example loss discourages a detector that achieves recall merely by flagging everything.

### Adaptive defense evaluation

<ol />

### Adaptive detector comparison protocol

The reported stages are 0, 1, 2, 3, and 5. They are selected challenge settings, not a complete five-step trajectory or a guaranteed detection floor.

| Element | Normative definition |
| - | - |
| Partitions | Partition borrowers and generated attack instances into training, tuning, and test sets before adaptation. Keep test seeds, template instances, documents, and transaction graphs out of generator and defender updates. Record attack-family counts and test clean/fraud counts for each displayed stage. |
| Within-round comparison | Freeze the stage-specific generator before drawing the paired test suite. Evaluate static and adapted detectors on the same clean cases and same changed fraud cases. Disclose which detector the generator targeted; a separate cross-play matrix is required for claims across adversaries. |
| Retrospective ROC point | Compute recall at 1% empirical FPR from the held-out ROC curve. Treat tied scores as one threshold block and linearly interpolate adjacent ROC points spanning 0.01, equivalent to randomized selection within the boundary block. Label it an interpolated ROC statistic, not an operational threshold. Bootstrap borrower clusters and recompute the ROC point in each replicate. |
| Deployment threshold | For a fixed-threshold claim, select the threshold on separate clean calibration data, freeze it, then report realized test FPR and recall with confidence intervals. Do not force its test FPR to equal 1% by retuning on the test set. |

### Detection under adapting attacks

Compare the static detector with the hardened detector at the attack stages supplied in the research.

Both detectors start at 76.5% recall. At the final reported round, the adaptive detector retains 74.5% and the static detector falls to 48.2%, a difference of **26.3 percentage points**. The bars use the workbook's published round values. The final-round result describes this attack suite and false-positive setting; it is not a guaranteed minimum recall against every possible future strategy. [RS-2026-07, adversarial evaluation](https://docs.amlok.io/research/resources/robustness-results.md).

## Constrained counterfactual analysis

A counterfactual asks how an assessment would change under a different evidence or financial state. A useful counterfactual must be feasible, within the borrower's control, and consistent with the model's risk and capacity constraints. Changing an immutable characteristic is not an actionable recommendation.

The paper combines GAM-24's piecewise monotone risk functions with credit-capacity and return constraints. The displayed problem is conceptual nonlinear constrained optimization: monotone functions, interactions, and nested capacity and return constraints do not by themselves define a mixed-integer linear program. Candidate changes can include adding verifiable evidence, resolving an obligation, or adding eligible collateral. Each change is conditional on the resulting facts being verified. AMLOK supplies the analysis; the institution retains its credit decision and any borrower-facing actions. [RP-2026-10, section 2.1](https://docs.amlok.io/whitepapers/10-adaptive-defense-recourse.md).

**Equation 10.2 - Minimum-effort feasible change**

$$
\begin{aligned}
\Delta\mathbf x^*
&=\arg\min_{\Delta\mathbf x\in\mathcal F_{\mathrm{act}}(\mathbf x_0)}
\mathbf c_{\mathrm{effort}}^\top|\Delta\mathbf x|,\\
\text{subject to}\quad
\widehat{\mathrm{PD}}_{24D}(\mathbf x_0+\Delta\mathbf x)
&\leq\tau_{\mathrm{PD}},\\
A_{\mathrm{CBL}}^*(\mathbf x_0+\Delta\mathbf x)
&\geq A_{\mathrm{req}},\\
\mathrm{RAROC}&\geq\tau_{\mathrm{ROE}}.
\end{aligned}
$$

$\mathcal F_{\mathrm{act}}$ contains permitted, feasible changes. The effort weights compare their costs. A solution must satisfy the configured default-risk threshold, requested capacity, and return constraint. Evaluate each proposed solution with the original risk, capacity, and return functions after verifying all changed inputs. Report solver status, bounds, the configuration version, and constraint residuals; an approximate solution is feasible only within declared financial and numerical tolerances. A MILP implementation additionally needs explicit piecewise linear encodings, binary variables, finite bounds, and approximation errors. The displayed formulation does not claim such an implementation or that an action has occurred.

### Worked capacity and rate example

The source example requests CAD 180,000. Initial bank-only evidence supports a conditional capacity estimate of CAD 112,000 at an illustrative 14.90% annual rate. Linking payment-processor and accounting evidence reduces concentration uncertainty and raises the estimate to CAD 168,500 at 13.95%. Resolving CAD 14,500 of verified tax arrears then produces a conditional estimate of CAD 196,500 at 13.55%. [RP-2026-10, Figure 10.1B](https://docs.amlok.io/whitepapers/10-adaptive-defense-recourse.md), [RS-2026-07, recourse steps](https://docs.amlok.io/research/resources/robustness-results.md).

The first evidence step adds CAD 56,500 of modeled capacity. The final step adds CAD 28,000, bringing the total above the example request. The rate change from 14.90% to 13.55% is 135 basis points. These outputs describe one conditional study example, not terms available to every borrower.

The broader recourse evaluation reports a 14.2% conversion rate and a 3.1% realized default rate in the converted population. The conversion and default percentages use different denominators. A low average default rate in that evaluated group does not establish that each proposed action is risk-free. [RP-2026-10, abstract and benchmark table](https://docs.amlok.io/whitepapers/10-adaptive-defense-recourse.md).

### Outcome and recourse estimands

Recovery, renewal income, and recourse conversion use different eligible populations. The percentages are reported study summaries. Economic examples use them as explicit assumptions; an individual treatment effect remains a different quantity.

| Element | Normative definition |
| - | - |
| Recovery | Index an eligible distressed facility before action assignment. Let Y(a) be discounted recovery receipts minus recovery and incremental action costs in CAD over the next 365 days under action a. Deduplicate cost cash flows and subtract each once. Estimate E\[Y(1)-Y(0)] in CAD; relative lift is 100 × that difference / E\[Y(0)], defined only for a positive baseline. Fix assignment, action eligibility, and follow-up before scoring. |
| Renewal | Index a renewal-eligible facility before the renewal decision. Let Y(a) be 365-day interest and fees less funding cost, credit loss, and incremental action cost. Report the CAD treatment effect and, only with a positive control mean, relative net-income lift. Do not add its percentage to recovery lift. |
| Qini | Use the same 365-day discounted net recoveries as the CAD recovery endpoint, subtracting each recovery/action cost once, then divide by positive principal outstanding at the index date. Hold that denominator fixed under both actions. This normalized Y and its Qini index are dimensionless; the CAD recovery-lift endpoint stays separate. On held-out cases, rank by predicted effect on normalized Y, breaking score ties by stable borrower ID. Use known assignment probabilities or cross-fitted propensities with 0 \< e\_i \< 1 under the stated identification assumptions. At knots u = k/n, compute G(u) = (1/n) sum over the top k cases of \[W\_i Y\_i/e\_i - (1-W\_i)Y\_i/(1-e\_i)], with G(0) = 0. Join knots linearly and integrate G(u)-uG(1) using trapezoids. The reported 0.318 index is comparable only under this outcome scale and normalization. |
| Recourse conversion | Denominator: all eligible declined applications offered the specified feasible evidence/action plan. Numerator: those that satisfy the frozen model and policy constraints within 90 days. Report offered, attempted, completed, and qualifying counts separately. Conversion is a policy-feasibility event, not automatically disbursement. |
| Converted-group default | Denominator: converted cases that subsequently receive the reference facility and have completed 365-day outcome follow-up. Numerator: qualifying credit defaults in that group. Report unfunded conversions and censored cases separately. A group default frequency is not the predicted PD of the worked-example borrower. |
| Identification | Use randomized assignment or specify consistency, overlap, and conditional exchangeability given pre-action covariates. Cross-fit nuisance models by borrower. Report the target population, counts, effect interval, and sensitivity to confounding; cross-fitting alone does not establish a causal effect. |

## Positive capacity gain from additional evidence

More data can narrow uncertainty, but it can also reveal adverse facts. A connector recommendation should therefore compare the expected information benefit with the cost or friction of obtaining it. The score below measures expected positive capacity gain less a cost expressed in capacity-equivalent CAD. It is a narrower screening objective than economic value of information.

**Equation 10.3 - Expected positive capacity gain**

$$
\begin{aligned}
\mathrm{PCG}(m_k:0\rightarrow1\mid\mathbf x_0)
=&\;\mathbb E_{x_k\sim P(\cdot\mid\mathbf x_0)}
\left[\max\left(0,
A_{\mathrm{CBL}}^*(\mathbf x_0\cup\{x_k\})
-A_{\mathrm{CBL}}^*(\mathbf x_0)\right)\right]\\
&-C_{\mathrm{connect}}(k).
\end{aligned}
$$

The model integrates over possible values of the missing evidence $x_k$. Capacity is a funding amount, not income. Convert time or monetary connection costs to this scale with an explicit capacity-equivalent conversion rule; do not subtract an unconverted fee from a claimed profit benefit. It compares the expected positive capacity gain with connection cost expressed on a compatible scale. A positive value supports requesting the evidence under this objective; it does not promise that the observed result will improve capacity.

### Evaluate a request for more evidence

<ol />

With equally likely capacity changes of +CAD 10,000 and -CAD 10,000 and capacity-equivalent cost CAD 1,000, this score is CAD 4,000, while expected net capacity change is -CAD 1,000. For decision-theoretic value of information, instead compare expected optimal action utility before and after the observation, then subtract cost in the same utility units.

The positive-gain reference share is 88.7%. Under research-methods-v2, define the event as verified capacity after evidence exceeding capacity before evidence, and report positive events / completed evidence acquisitions alongside acquisition coverage. If the model predicts the probability of that event, evaluate its calibration separately with Brier loss and reliability bins. Additional evidence can improve confidence without increasing capacity. [RP-2026-10, benchmark table](https://docs.amlok.io/whitepapers/10-adaptive-defense-recourse.md).

## Embedded assessment path

The embedded path reuses a precomputed borrower state and evaluates the changed evidence needed for an immediate assessment. Its stages are a state delta, TE-327 delta encoding, GAM-24 and capacity calculation, and deterministic policy plus refresh checks. The source describes the anomalous 1.6% tail as routed to an asynchronous investigation path. [RP-2026-10, section 3](https://docs.amlok.io/whitepapers/10-adaptive-defense-recourse.md).

**Equation 10.4 - Embedded-path timing budget**

$$
\begin{aligned}
T_{\mathrm{budget}}
&=T_{\mathrm{state}}+T_{\mathrm{TE}}+T_{\mathrm{GAM+capacity}}+T_{\mathrm{policy+refresh}}\\
&=5.1+28.0+19.0+14.0\;\mathrm{ms}\\
&=66.1\;\mathrm{ms}<250\;\mathrm{ms}.
\end{aligned}
$$

The source allocates the total across four stages and separately reports an end-to-end p99 of 66.1 milliseconds. The 250-millisecond value is the experimental target. Adding stage allocations explains the budget; adding independently measured stage percentiles would not establish an end-to-end percentile.

The same embedded configuration reports credit AUROC of 0.879. Its latency comparison is specific to the evaluated path and its available state. It should remain separate from the 11.40-second reference multi-step workflow duration in [RP-2026-08](https://docs.amlok.io/whitepapers/08-borrower-state-agents.md), which performs a different task. These are research measurements, not public API service-level commitments. [RP-2026-10, benchmark table and timing specification](https://docs.amlok.io/whitepapers/10-adaptive-defense-recourse.md).

## Portfolio economic scenario

The paper combines fraud-loss avoidance, expected credit-loss reduction, renewal income, and recourse conversion into an annual portfolio scenario. For a CAD 100 million book, the modeled contributions sum to CAD 2.0322 million before the CAD 164,200 operating assumption, leaving CAD 1.868 million net.

### Portfolio economic scenario

The paper models an annual CAD 1.868 million net benefit per CAD 100 million book. The components below are scenario contributions, not a guaranteed portfolio outcome.

Five signed contributions sum to CAD 1.868 million

<table><caption>Exact scenario inputs, CAD</caption><thead><tr><th scope="col">Contribution</th><th scope="col">Annual amount</th></tr></thead><tbody /></table>

Source: [RP-2026-10, Figure 10.2B](https://docs.amlok.io/whitepapers/10-adaptive-defense-recourse.md); [RS-2026-07](https://docs.amlok.io/research/resources/robustness-results.md).

The calculation is a scenario with additive contributions. Applying it to a particular book requires consistent populations, time horizons, baseline losses, and treatment of overlap between components. It is not a promise of realized savings, a product price, or a return guarantee.

## Benchmark summary

| Evaluation | Source comparison | Selected result | Interpretation |
| - | - | - | - |
| Adaptive fraud, final round | Static recall 48.2% after starting at 76.5% | Recall 74.5% at 1% FPR | 26.3 percentage-point final-round advantage |
| Conditional recourse | Current-state decline explanation | Conversion 14.2%; converted-group default 3.1% | Conditional, verified-action population |
| Evidence recommendation | Unconditional request for more connections | Positive-gain reference share 88.7% | Reference positive-event share; probability calibration is a separate task |
| Embedded latency | Paper's 3-to-15-second asynchronous comparison path | p50 38.4 ms; p95 54.2 ms; p99 66.1 ms | Evaluated embedded path |
| Embedded credit ranking | Same embedded configuration | AUROC 0.879 | Ranking metric, separate from latency |
| Portfolio scenario | CAD 100 million reference book | CAD 1,868,000.00 annual net modeled benefit | Sum of stated scenario contributions |

Sources: [RP-2026-10, Figures 10.1-10.2 and benchmark table](https://docs.amlok.io/whitepapers/10-adaptive-defense-recourse.md), [RS-2026-07](https://docs.amlok.io/research/resources/robustness-results.md).

## Interpretation and connection to the research

Adaptive detection measures robustness to the evaluated changes. Counterfactual analysis measures feasibility under explicit risk, capacity, and return constraints. Positive capacity gain measures only the upward capacity component of another observation; decision utility requires an explicit action and payoff model. Embedded execution measures a particular latency path. The portfolio scenario combines assumptions about their economic contributions without turning those separate results into one universal performance claim.

These methods build on [document and loss models](https://docs.amlok.io/whitepapers/07-document-loss-models.md), [incremental borrower state](https://docs.amlok.io/whitepapers/08-borrower-state-agents.md), and [private collaboration](https://docs.amlok.io/whitepapers/09-private-collaboration-transfer.md). You can also explore the [Research adaptive-defense overview](https://docs.amlok.io/research/adaptive-defense.md).

## References

* [RP-2026-10 - Adaptive fraud detection and constrained counterfactual analysis](https://docs.amlok.io/whitepapers/10-adaptive-defense-recourse.md): adversarial, recourse, information-value, timing, and portfolio-scenario equations and results.
* [RS-2026-07 - Institutional, transfer, and robustness results](https://docs.amlok.io/research/resources/robustness-results.md): reported adversarial rounds, worked capacity and rate steps, and embedded benchmark.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.