The Autonomous Enterprise · AE Suite · Module 04

FinRisk Sentinel
Financial Anomaly Detection
— Streaming. Dual-reviewer. 1-hour SLA.

FinRisk Sentinel monitors the live financial event stream continuously — not in batch. It computes rolling baselines per account, per payment type, and per peer group, scoring every incoming transaction against a dynamic model of normal behaviour. High-severity anomalies reach the CFO and Finance Controller simultaneously. Both see the same data. Either can act.

EU AI Act — High Risk · Annex III Isolation Forest · Z-score · Streaming BigQuery · Pub/Sub · Cloud Run SHAP · Rolling baseline HITL-08 · Dual-reviewer · 1h SLA Financial ART · H2 · PI-5
System Context — C4 Level 1

Financial event stream in. Anomaly intelligence out.

FinRisk Sentinel's context is defined by what feeds it and what it produces. The input is the BigQuery financial event stream — populated by Salesforce contract events and RevRec AI classification outputs. The output is a dual-reviewer HITL alert that neither the CFO nor the Finance Controller can miss, and a BigQuery anomaly events record that closes the audit trail.

Architecture — Streaming Pipeline

Every transaction scored. Every baseline dynamic.

FinRisk Sentinel's architectural distinction from Asset IQ's streaming anomaly detector is the sliding window aggregation layer. Asset IQ scores individual sensor readings. FinRisk computes population statistics — rolling mean, rolling standard deviation, Z-score against 90-day baseline, peer-group deviation — before any anomaly model sees the event. The model scores against a dynamic baseline that updates with every new transaction.

Agent State Machine

Four severity tiers. One concurrent-decision HITL.

The FinRisk Sentinel state machine is distinguished by two features not present in other modules: the four-tier severity branching from SCORING, and the concurrent decision handling in HITL-08. When two reviewers can both act, the state machine must correctly handle the case where both act simultaneously, where one acts before the SLA, and where neither acts before the SLA.

Data Flow & Sequence

One payment. 2.8 standard deviations above baseline. Both reviewers alerted in 18 seconds.

The München hospital account — the same account whose contract was processed by ContractGuard, whose revenue was recognised by RevRec AI, and whose MRI unit is monitored by Asset IQ — makes a payment significantly above its 90-day baseline. FinRisk scores it at 0.87 and creates a simultaneous HITL-08 for both the CFO and Finance Controller.

HITL-08 Presentation

Two reviewers. Same data. One 1-hour window.

HITL-08 is the most urgent HITL in the suite. The CFO and Finance Controller receive the same alert simultaneously — sparkline for the visual context, transaction table for the numbers, SHAP for the model's reasoning, and a dual-reviewer status panel showing whether the other reviewer has already acted. The first decision closes both queues.

HITL-08 · Finance Controller View — Anomaly Alert · Universitätsklinikum München · SLA: 47m remaining
FinRisk Sentinel — HITL-08 HIGH · Universitätsklinikum München · SLA: 47m · CFO also reviewing
Anomaly Summary
Anomaly Score
0.87
HIGH severity · > 0.75 threshold
Z-Score
85.8σ
2.8σ above 90d mean
Payment Amount
€2.84M
vs 90d mean €184K
HIGH SEVERITY · HITL-08 · DUAL REVIEWER
90-Day Payment Baseline vs Anomalous Event
Rolling 90-Day Payment History · Universitätsklinikum München
Normal range €2.84M 90d ago 45d ago Today mean €184K
Recent Transactions — Last 5
DateAmountTypeZ-ScoreStatus
2026-02-28€164,320Invoice payment−0.6σNormal
2026-02-14€201,840Invoice payment+0.6σNormal
2026-01-31€178,500Invoice payment−0.2σNormal
2026-01-15€221,750Invoice payment+1.2σNormal
2026-03-15€2,840,000Payment (type: unspecified)+85.8σ⚠ ANOMALY
SHAP Attribution — Top 3 Features
payment_to_baseline_ratio
+0.52
val: 15.4× baseline (2,840K ÷ 184K)
z_score_deviation
+0.29
val: 85.8σ — highest ever for this account
payment_frequency_anomaly
+0.11
val: payment 13 days after last (normal: 14–16 day cycle)
Dual Reviewer Status
Finance Controller (you)
Reviewing
Your decision will close this alert and auto-close the CFO queue via optimistic lock.
CFO
Also reviewing
CFO notified at same time. If CFO acts first, your queue will close automatically.
✓ Approve — Legitimate Payment
⚠ Escalate — Suspicious
↷ Defer 15min
⏱ SLA: 47 minutes remaining · Timeout → CEO + Risk Committee auto-alert · Decision immutably recorded · SHAP already in BigQuery
Account Context
Account
Universitätsklinikum München
Account tier
Tier-1 Hospital · EMEA-North
Relationship
Active · 8 years · Contract CV2026-0042 signed 2026-03-15
Payment history
42 payments · 0 disputes · avg. payment cycle: 15.2 days
Anomaly score
0.87 · HIGH
Above HITL-08 threshold (0.75)
HITL checkpoint
HITL-08 · 1h SLA
Dual-reviewer (CFO + FC)
SHAP record
Written to BigQuery before this queue was created · EU AI Act Art. 13 ✓
Context note
This account signed a new €2.84M contract on 2026-03-15 (same day). Early full-contract payment is possible but atypical. Recommend Approve if payment matches contract reference.
Concurrent reviewer
CFO has this same queue open. First decision wins. Second decision triggers optimistic lock — no double-action.
Architecture Decision Records

Three FinRisk decisions. Every alternative documented.

ADR-011 (restated for FinRisk Sentinel)
Isolation Forest over ARIMA / statistical threshold for financial anomaly detection
BigQuery ML's ARIMA_PLUS model was evaluated — it is a natural choice for financial time-series anomaly detection given that payments are temporal events with seasonality. Rejected for three reasons: (1) ARIMA models require a minimum history length per entity before they can produce reliable forecasts — new accounts or accounts with irregular payment schedules produce poor ARIMA fits. Isolation Forest requires only that a normal operating period exists, not a minimum number of observations. ClaraVis has accounts that pay quarterly, annually, or on irregular project schedules. (2) ARIMA_PLUS operates in batch mode in BigQuery ML — it is not a streaming model. For a financial anomaly system with a 1-hour HITL SLA, a batch model requires scheduling infrastructure that introduces latency. Isolation Forest runs on the Vertex AI endpoint as a synchronous REST call with sub-200ms response. (3) The deterministic SHAP TreeExplainer requirement applies equally here — ARIMA does not produce structured SHAP attributions. The CFO asking "why was this payment flagged?" needs a feature-level explanation, not an ARIMA residual value. A simple Z-score enrichment layer alongside Isolation Forest produces the Z-score metric for human-readable context ("+85.8σ above baseline") while Isolation Forest provides the multi-dimensional model signal that accounts for correlated features.
Accepted · Phase ML Design · Page 06 ADR-011
ADR-FR01 — FinRisk specific
Streaming Pub/Sub scoring over scheduled BigQuery batch detection
The alternative design was to run FinRisk as a scheduled BigQuery query — every 15 minutes, query the transactions table, compute Z-scores in SQL, and alert on outliers. This is a common financial monitoring pattern and avoids the operational complexity of a streaming Cloud Run agent. Rejected because: (1) A 15-minute batch window means a payment anomaly can sit undetected for up to 15 minutes before any alert fires. For a high-severity financial event — a potentially fraudulent payment, a duplicate transaction, or a wire transfer error — 15 minutes is operationally unacceptable. The streaming architecture detects and alerts within 18 seconds of the payment event reaching Pub/Sub. (2) BigQuery SQL cannot call a Vertex AI Isolation Forest endpoint synchronously — the batch approach would require either moving to BigQuery ML (rejected above) or a scheduled Cloud Function bridge that replicates the streaming agent's complexity without the latency advantage. (3) The sliding window feature computation (90-day rolling stats, peer-group deviation) requires maintaining state across events — this is natural in a streaming agent with in-memory state but requires materialised views or intermediate tables in a batch SQL approach, adding query cost and maintenance overhead. The streaming architecture is more complex to operate but delivers a 1-hour HITL SLA that a batch architecture cannot match.
Accepted · Phase Agent Design · FinRisk Sentinel module
ADR-FR02 — FinRisk specific
Dual-reviewer HITL-08 over single-reviewer for high-severity financial alerts
Single-reviewer HITL — either CFO or Finance Controller, not both — was the initial design for simplicity. Replaced with dual-reviewer for three reasons: (1) Separation of duties: for high-severity financial alerts (score ≥ 0.75, Z-score potentially indicating fraud or error), requiring only one reviewer creates a single point of control. The Finance Controller may have a conflict of interest for certain accounts. The CFO may lack the transaction-level context to evaluate the anomaly quickly. Having both reviewers notified simultaneously ensures the faster-responding, better-informed reviewer can act within the SLA without requiring coordination. (2) EU AI Act Article 14 requires adequate human oversight proportionate to the risk. For a system flagging potential financial fraud in a regulated medical device company, "adequate oversight" for high-severity alerts is documented as dual-reviewer — matching the four-eyes principle already applied to financial authorisations above a threshold at ClaraVis. The architecture matches existing financial governance. (3) The optimistic lock mechanism resolves the concurrent decision problem cleanly: Firestore's transaction model guarantees that the first committed decision is final, the second write detects the conflict via the document version check, and both queues close automatically. No coordination between reviewers is required — the system handles concurrency correctly by design.
Accepted · Phase Product Design · FinRisk Sentinel module
Stakeholder Rebuttals

Six objections. Each with an architectural answer.

CTO · S-01
Why not BigQuery ML ARIMA — it's already in the data warehouse?
"BigQuery ML has an ARIMA_PLUS model designed for time-series anomaly detection. ClaraVis already uses BigQuery. Why build a separate Cloud Run streaming agent and a separate Vertex AI endpoint when the anomaly detection capability is already in the tool we're paying for?"
Architectural response
ARIMA_PLUS is a batch forecasting model — it runs in scheduled query mode, not in a streaming, sub-second scoring mode. ADR-FR01 documents the latency argument: a 15-minute batch window is operationally unacceptable for a high-severity financial alert system with a 1-hour SLA. By the time a batch model fires an alert, 15 minutes have already elapsed. The streaming architecture detects and alerts in 18 seconds. There is also the SHAP requirement: ARIMA does not produce structured SHAP attributions that satisfy EU AI Act Article 13. The CFO and Finance Controller need to see "this payment was 15.4× the account baseline and 85.8σ above the rolling mean" — not an ARIMA residual value. The Isolation Forest plus Z-score combination provides both the model signal and the human-readable explanation in a single scoring pass.
Evidence: ADR-FR01 (streaming over batch) · ADR-011 (Isolation Forest over ARIMA) · HITL-08 UI (Z-score human-readable + SHAP) · EU AI Act Art. 13
CFO · S-03
What's the false positive rate — every spurious alert wastes senior executive time?
"Every HIGH severity alert lands in my queue and requires my attention within the hour. If FinRisk fires 20 false positives a week, that's 20 hours of executive time wasted. What is the expected alert volume and false positive rate?"
Architectural response
At ClaraVis's transaction volume (approximately 340 invoiced payments per month across all accounts), the Isolation Forest model with a 0.75 HIGH threshold and the Z-score enrichment is calibrated to fire HIGH alerts on approximately 1–3 events per month — not per week. The model's contamination parameter is set to 0.005 (0.5% expected anomaly rate), meaning approximately 1–2 of every 200 transactions score above the HIGH threshold. The vast majority of elevated payments — an account paying early, a large Q4 order, a multi-year prepayment — score below 0.75 and route to ALERTING (no HITL) or LOG ONLY. The sidebar context note in the HITL-08 interface specifically shows the account's contract activity on the same date, allowing the CFO to approve a legitimate early payment in under 60 seconds. The ADR-FR02 dual-reviewer design means that if the Finance Controller acts first, the CFO queue closes automatically — eliminating the CFO's time cost entirely for false positives that the FC recognises immediately.
Evidence: Page 06 FinRisk Model Card (contamination parameter 0.005 · expected HIGH alert rate) · HITL-08 UI context note (contract activity same date) · ADR-FR02 (dual-reviewer, first-act closes both)
Finance Controller
How does FinRisk distinguish genuine anomalies from planned large payments?
"At quarter-end, some of our largest accounts make bulk payments that cover 3–6 months of invoices simultaneously. These are expected and planned — but they'll look like massive anomalies to a model that only knows the 90-day rolling mean. Won't FinRisk flood us with false positives at Q1 and Q4 close?"
Architectural response
Two mechanisms address this specifically. First, the Feature Store account baseline features include a payment_seasonality_flag that is set for accounts with documented Q1/Q4 bulk payment patterns — the Isolation Forest model was trained on data that includes these seasonal payments, so the contamination rate accounts for them. The payment_frequency_anomaly SHAP feature captures whether the payment arrived on schedule or out-of-cycle — a Q4 bulk payment that arrives in the normal Q4 window scores lower on this feature. Second, the HITL-08 sidebar context note shows the account's contract and invoice history for the past 90 days alongside the CRM notes for the account. A Finance Controller reviewing a Q4 bulk payment sees immediately that it matches three outstanding invoices — the approval takes 30 seconds, not 30 minutes. The system is not designed to prevent all HIGH alerts — it is designed to make every HIGH alert reviewable in under 5 minutes with full context, so that genuine anomalies are caught and false positives are dismissed quickly.
Evidence: Page 06 FinRisk Feature Store (payment_seasonality_flag · payment_frequency_anomaly features) · HITL-08 UI (account context sidebar with contract and invoice history) · ADR-011 (Isolation Forest trained on seasonal data)
Enterprise Architect · S-08
How does the sliding window handle sparse payment schedules for smaller accounts?
"The 90-day rolling baseline assumes enough payment events to compute a meaningful mean and standard deviation. A small account that pays annually has maybe 1–2 payments in 90 days. The rolling statistics will be meaningless or undefined. How does FinRisk handle this?"
Architectural response
Accounts with fewer than 5 payment events in the rolling 90-day window fall back to peer-group-level baseline statistics rather than account-level statistics. The peer group is defined by account tier (Small, Mid, Enterprise), industry vertical (hospital, clinic, research), and region — accounts with similar payment frequency profiles. A small research institution that pays annually is compared against other annual-paying research institutions in the same region, not against its own sparse history. This peer-group fallback is explicit in the Feature Store account baseline features — the feature vector includes a baseline_source field (ACCOUNT or PEER_GROUP) that the SHAP attribution reports. The HITL-08 interface shows the Finance Controller which baseline source is being used. An annual-paying account is far less likely to trigger a HIGH alert from a peer-group baseline than from a statistical anomaly model applied to 2 data points — the contamination rate is effectively zero for accounts in their expected payment cycle within the peer group.
Evidence: Page 06 FinRisk Feature Store (baseline_source feature · peer-group fallback logic) · HITL-08 UI SHAP section (baseline source displayed) · Isolation Forest contamination parameter
CISO · S-09
Financial transaction data — what access controls apply?
"The ae-financial-events Pub/Sub topic carries actual payment amounts, account identifiers, and transaction references. This is classified financial data. Who has read access to this topic and the downstream BigQuery tables?"
Architectural response
The ae-financial-events Pub/Sub topic has three principals with subscription access: the FinRisk SA (finrisk-sa@, pull subscription only), the RevRec AI SA (revrec-sa@, publish only — RevRec writes classification events to this topic), and the Data Governance SA (datagovernance-sa@, schema validation only). No developer SA has subscription access. The BigQuery anomaly_events table in ae_audit is in the same dataset as the SHAP explanations table — access is governed by the same IAM policy: Finance Controller role (read), CFO role (read), FinRisk SA (write), audit SA (read for compliance queries). The raw Pub/Sub message payloads are not persisted in BigQuery — only the processed anomaly record (score, Z-score, SHAP values, HITL decision) is written. The payment amount is included in the anomaly record for audit purposes but the full transaction reference is stored as a hash, not in plain text, in the BigQuery audit table. The plain-text transaction reference is only accessible via the Salesforce Account record, which has its own IAM-governed access control.
Evidence: Page 07 Pub/Sub topic IAM (three SA principals) · BigQuery ae_audit dataset access policy · Page 07 CMEK configuration · transaction reference hashing in FinRisk agent
CCO · S-02
Does FinRisk fall under EU AI Act given it flags financial transactions?
"FinRisk flags financial transactions. The EU AI Act Annex III includes AI systems used in creditworthiness assessment and financial access decisions. Is FinRisk a high-risk system under that classification? And what are the obligations if it is?"
Architectural response
FinRisk Sentinel is a high-risk system under EU AI Act Annex III Category 5 (AI systems used in the area of employment and workers management) — not Category 5b (creditworthiness) because it does not assess ClaraVis's counterparties' creditworthiness or make access-to-financial-services decisions. It monitors ClaraVis's own incoming financial transactions for anomalies. The Annex III Category most directly applicable is Category 2 (critical infrastructure) by analogy with the financial system monitoring rationale, and Category 6 (law enforcement and justice) is not applicable. The conservative position — adopted in the architecture — is to treat FinRisk as High Risk regardless of the precise Annex III category, because the consequences of a false negative (a missed fraudulent transaction) or a false positive acted upon incorrectly (freezing a legitimate payment) are material. The dual-reviewer HITL-08 design satisfies Article 14 at the highest level of human oversight — two senior principals, 1-hour SLA, optimistic lock preventing double-action. The SHAP attribution per alert satisfies Article 13. The Model Card in Vertex AI Model Registry satisfies Article 11.
Evidence: Page 06 FinRisk Model Card (EU AI Act classification) · HITL-08 dual-reviewer design (ADR-FR02) · SHAP attribution (EU AI Act Art. 13) · VPC-SC + CMEK (Art. 15 robustness)
Demo Pathway

Three minutes. One payment. Two reviewers. Eighteen seconds to alert.

The München hospital account — the same account whose contract was processed by ContractGuard, whose revenue was recognised by RevRec AI, and whose MRI unit Asset IQ monitors — makes a payment that FinRisk flags. The demo shows the streaming pipeline in action, the simultaneous dual-reviewer HITL-08, and the optimistic lock in action when the Finance Controller acts before the CFO.

00
Setup · 30s before
Show the FinRisk monitoring dashboard — live event stream
Open the FinRisk Sentinel monitoring dashboard in Cloud Monitoring. Show the live Pub/Sub message rate on ae-financial-events, the Cloud Run instance count, and the rolling anomaly score distribution for the past 24 hours — mostly LOG ONLY (green), a few ALERTING (amber), zero HIGH. This establishes that the system is running continuously and that HIGH alerts are genuinely rare.
Cloud MonitoringPub/Sub monitoringCloud Run dashboard
01
Payment Event · 0:00
Publish a synthetic payment event — watch the pipeline respond
Publish a synthetic payment event to ae-financial-events via the Pub/Sub Console: account_id UKM_MCH_001, amount 2840000.00, currency EUR, payment_date 2026-03-15. Show the Cloud Run logs immediately: "Event received · UKM_MCH_001 · €2,840,000", "Fetching baseline features…", "Z-score computed: 85.8", "Isolation Forest score: 0.87 · severity: HIGH".
"I'm publishing a payment event directly to the Pub/Sub topic — simulating the Salesforce trigger. Watch the Cloud Run agent respond. The event lands, the baseline is fetched from the Feature Store online store, Z-score computed, anomaly scored — all in under 10 seconds."
Pub/Sub publishCloud Run logsFeature Store onlineVertex AI endpoint
02
SHAP + BigQuery · 0:20
Watch SHAP computed and written to BigQuery BEFORE HITL
Continue watching the Cloud Run logs: "SHAP computed · payment_to_baseline_ratio +0.52 · z_score_deviation +0.29 · payment_frequency_anomaly +0.11", "Writing SHAP to BigQuery BEFORE HITL creation…", "SHAP written · creating HITL-08 dual-reviewer checkpoint…". Open BigQuery and run a quick SELECT on ae_audit.shap_explanations — show the row already exists before the HITL queue is shown.
"The SHAP explanation is in BigQuery before the HITL queue exists. This is the EU AI Act Article 13 design — the explanation is part of the audit trail from the moment of scoring, not created retrospectively when someone asks for it."
SHAP TreeExplainerBigQuery shap_explanationsFirestore HITL-08
03
HITL-08 · 0:35 — the moment
Open both reviewer queues simultaneously — show the dual-reviewer interface
Open two browser windows side by side: one showing the Finance Controller's HITL-08 queue, one showing the CFO's. Both show the same alert. Show the full Finance Controller interface: the anomaly header (score 0.87, Z-score 85.8σ, €2.84M), the sparkline showing the payment as a spike above the 90-day baseline, the transaction table with the anomaly row highlighted, the SHAP strip, and the dual-reviewer status panel showing both reviewers are currently reviewing.
"Both reviewers see the same interface at the same time — the sparkline shows the visual pattern, the transaction table shows the exact numbers, SHAP shows why the model flagged it. The sidebar shows the account signed a new €2.84M contract on the same date — context the Finance Controller recognises immediately as a likely early full-contract payment. Click Approve in the Finance Controller window."
HITL-08 dual interfaceSparkline SVGTransaction tableSHAP strip
04
Optimistic Lock · 1:30
Show the CFO queue auto-closing via optimistic lock
After the Finance Controller approves, show the CFO browser window: the queue status changes to "Resolved — Finance Controller approved at 14:07:22 · reason: Legitimate Q1 early payment". The CFO's queue is closed without any action required. Show the Cloud Run logs: "HITL-08 decision committed · FC · optimistic lock version 2 → CFO queue closed · state: COMPLETE".
"The Finance Controller approved. The CFO's queue closed automatically — they didn't need to do anything. The optimistic lock in Firestore handled the concurrency: the FC's decision committed at version 1, and when the system attempted to mark the CFO's copy as requiring action, it found version 2 already committed — so it auto-closes. No double-action, no coordination, no race condition."
Firestore optimistic lockCFO queue auto-closeCloud Run logs
05
Audit Trail · 2:10
Query the complete anomaly audit trail
Open BigQuery. Run the audit join query: ae_audit.shap_explanations JOIN ae_audit.anomaly_events ON transaction_id for UKM_MCH_001_20260315. Show: the three SHAP values, the anomaly score, the FC's decision and timestamp, the CFO's auto-close record. This is the complete EU AI Act Article 13 + 14 evidence package for this financial anomaly event — same BigQuery pattern as every other module in the suite.
"Four modules now — ContractGuard, RevRec AI, Asset IQ, FinRisk Sentinel — and every one of them produces the same audit query pattern. That's what a shared platform looks like."
BigQuery ae_auditanomaly_events joinshap_explanations join
AE Suite Navigation
Financial domain complete.
Four modules done.

ContractGuard, RevRec AI, and FinRisk Sentinel complete the Financial domain. All three share the same München account narrative, the same BigQuery audit pattern, and the same SHAP-before-HITL design discipline.

PG 09
← AE Suite Index
All 8 modules · dependency matrix · demo pathway index
M-03
RevRec AI — Module 03
Same München account · revenue recognition
M-05
Asset IQ — Module 05
Same München MRI unit · predictive maintenance