Regulatory Alert Triage: Qwen3-4B (v4)
A small, private AI model that reads a regulatory publication and tells a bank's compliance team what it is, how urgent it is, and who needs to act on it.
Why it exists
Regulators publish a steady stream of rules, consultations, enforcement notices, sanctions updates and speeches. Today a regulatory-change team reads each one to decide whether it matters and whose desk it belongs on. Most of that first pass is sorting, and it is slow, repetitive and easy to get inconsistent across analysts.
This model does the first pass. It turns each publication into a short, consistent record that an analyst can accept, correct or escalate in seconds, so the team's time goes to the documents that need judgement.
What it tells you
| The question your team asks | What the model returns |
|---|---|
| What is this document? | One of 14 types: final rule, consultation, enforcement action, sanctions update, reporting change, speech and so on |
| How urgent is it? | P1 act now (binding or imminent), P2 prepare (likely to bind), P3 for awareness |
| Who owns it? | The responsible functions (Compliance, Financial crime, Legal, Risk, Operations and others) and their line of defence |
| Does it create a duty or a deadline? | A yes/no on obligations, plus the key dates it finds |
| What does it say? | A plain-English summary and the firms or products in scope |
How well it works
Measured on 759 recent publications (2026-08-03 to 2026-09-28) that the model had never seen, all dated after everything it was trained on:
- Document type: right on 71%. The same base model before this training got the type right on 0.5% and produced usable output for 0.7% of documents, so the capability comes from the training, not from the base model.
- Urgency (P1/P2/P3): right on 72%.
- Creates an obligation or not: right on 88%.
- Output your systems can read: 100% of answers were valid, machine-readable records.
Strongest on enforcement actions (43 of 45), consultations (220 of 239), sanctions updates (30 of 33), reporting changes (68 of 77). Weakest on letters to firms (0 of 9), rulebook pages (0 of 15), market notices (1 of 15), speeches and press releases (91 of 184), final rules (35 of 67): treat those types as needing a human read.
The reference answers in this test were written by a larger AI model, not by compliance officers, so these scores measure agreement with that model. They are a fair comparison between versions, not a guarantee of correctness.
Why a small model
- Your documents stay with you. It runs entirely on your own hardware: no regulatory text, policy or client data is sent to a third-party AI service.
- Predictable cost. No per-document API fees; the cost is the machine it runs on.
- Fast enough for a daily feed. About 6 seconds per document on a single Apple M4 Pro laptop (24 GB), with no GPU server.
- Consistent and auditable. Run with deterministic settings (as in the quickstart below), the same document gives the same answer every time; the weights are open (Apache-2.0) and versioned, and every result above comes from a recorded test run.
- Clean provenance. Trained only on openly licensed public-sector publications.
Where it fits
A regulatory feed comes in, the model triages each item, the record lands in the right team's queue with its priority, and an analyst reviews it before anything is actioned. It is a first-pass filter that makes the human review faster, not a replacement for it.
What to know before you rely on it
- Not legal advice and not a compliance decision. Every output is meant to be reviewed by a person.
- Coverage is specific. Trained on 15 UK and US federal sources (CFPB, CFTC, CMA, FDIC, FFIEC, FINCEN, FRB, HMT, ICO, NCUA, OCC, OFAC, SEC, TREAS, UKLEG). It has not been trained on FCA or PRA material, EU regulators, or US state regulators, and should not be trusted on them yet.
- Some document types are still weak (listed above), and the limitations section below names each gap.
- Built by Comply2Reg as the in-house replacement for the general-purpose AI model behind the triage step of its regulatory-change platform. It is published for review; it is not yet the model serving that platform.
Technical details
The rest of this card is for engineers and model reviewers: how to run it, the exact label set, the training data and procedure, and the full evaluation.
Fine-tuned by Comply2Reg from
mlx-community/Qwen3-4B-Instruct-2507-4bit with LoRA, then fused back into
standalone 4-bit weights. Runs on Apple Silicon through MLX.
| Task | Multi-field triage of UK and US federal regulatory publications, emitted as JSON |
| Base model | mlx-community/Qwen3-4B-Instruct-2507-4bit |
| Method | LoRA rank 8, 16 of 36 layers, fused into the base |
| Precision | 4-bit, group size 64 (unchanged from the base) |
| Training data | 3,194 documents from UK public bodies (Open Government Licence) and US federal agencies (17 U.S.C. 105) |
| Test set | 759 documents, 2026-08-03 to 2026-09-28, later than everything trained on |
| Headline | alert-class accuracy 0.710, macro-F1 0.428, JSON validity 1.000 |
Read the macro-F1, not the accuracy. The test set is 31% one class, so accuracy flatters any model. Limitations below are specific and worth reading before you use this for anything.
Quickstart
Requires Apple Silicon and pip install mlx-lm.
from mlx_lm import load, generate
from mlx_lm.sample_utils import make_sampler
model, tokenizer = load("Comply2Reg/regulatory-alert-triage-qwen3-4b-v4")
SYSTEM = (
"You triage UK financial-services regulatory publications for a bank. "
"Return a JSON triage record with exactly these keys: alert_class (A1-A14), "
"alert_class_confidence, priority (P1-P3), primary_functions, "
"secondary_functions, lines_of_defence, summary, key_dates, applicability, "
"obligations_present, thought_trace."
)
USER = """You are the regulatory-change desk of a UK bank. Read the publication and
return a triage record: alert_class, alert_class_confidence, priority,
primary_functions, secondary_functions, lines_of_defence, summary, key_dates,
applicability, obligations_present.
Regulator: CMA
Publication type: publications
Title: Proposed steering conduct requirement for Google's mobile platform
Published: 2026-08-14
<the first ~1,500 characters of the document text>"""
prompt = tokenizer.apply_chat_template(
[{"role": "system", "content": SYSTEM}, {"role": "user", "content": USER}],
tokenize=False,
add_generation_prompt=True,
)
text = generate(model, tokenizer, prompt=prompt, max_tokens=400,
sampler=make_sampler(temp=0.0), verbose=False)
# The model opens every answer with an empty reasoning block; take the JSON.
import json
record = json.loads(text[text.find("{"): text.rfind("}") + 1])
The model opens every answer with an empty <think></think> block. That comes
from the base model, not from the training data, which contained none. It did so
on 759/759 test documents, and the JSON that follows parsed every time. Take the
substring from the first { to the last }.
Worked example
A real test document, and this model's actual output for it:
Regulator: CMA
Publication type: publications
Title: Proposed steering conduct requirement for Google's mobile platform
Published: 2026-08-14
CONSULTATION:
STEERING CONDUCT REQUIREMENT
Google's Mobile Platform
30 June 2026
...
{
"alert_class": "A3",
"alert_class_confidence": "high",
"priority": "P2",
"primary_functions": ["Product", "Legal"],
"secondary_functions": ["Compliance", "Regulatory change", "Risk", "Board"],
"lines_of_defence": [1, 2],
"summary": "The CMA is consulting on a proposed steering conduct requirement for Google's mobile platform, including whether Google should provide fair and transparent access to its Play Store, app ranking, data and APIs. ...",
"key_dates": [],
"applicability": ["Google's mobile platform", "Play Store", "app developers", "..."],
"obligations_present": false,
"thought_trace": "This is a CMA consultation, so it is a proposed rule/requirement rather than final guidance or a binding instrument. ..."
}
Output schema
| Field | Type | Meaning |
|---|---|---|
alert_class | A1 to A14 | what kind of publication this is |
alert_class_confidence | high / medium / low | the model's own confidence |
priority | P1 / P2 / P3 | how urgently a desk should act |
primary_functions | list of function names | who owns the response |
secondary_functions | list of function names | who is consulted or informed |
lines_of_defence | list of 1, 2, 3 | which lines the functions sit in |
summary | string | what the publication says and whom it affects |
key_dates | list of objects | deadlines, in-force dates, closing dates |
applicability | list of strings | the firms, products or activities in scope |
obligations_present | boolean | whether the text creates a duty |
thought_trace | string | the reasoning behind the classification |
The label space
Alert classes
Fourteen document kinds, from the taxonomy Comply2Reg's crawler applies across UK and US federal regulators.
| Class | Meaning | Train | Test | Correct |
|---|---|---|---|---|
| A1 | Primary legislation / statutory instrument | 337 | 1 | 0/1 |
| A2 | Final rule / policy statement | 340 | 67 | 35/67 |
| A3 | Proposed rule / consultation / discussion paper / call for input | 422 | 239 | 220/239 |
| A4 | Supervisory guidance (supervisory statement, statement of policy, finalised guidance, bulletin, circular) | 90 | 2 | 2/2 |
| A5 | Supervisory communication (letter to firms, portfolio or priorities letter, supervisory advisory) | 19 | 9 | 0/9 |
| A6 | Enforcement action (notice, order, consent order, penalty, settlement) | 80 | 45 | 43/45 |
| A7 | Sanctions / watchlist delta | 388 | 33 | 30/33 |
| A8 | Reporting, returns or taxonomy change | 365 | 77 | 68/77 |
| A9 | Market or operational notice | 49 | 15 | 1/15 |
| A10 | Thematic review, multi-firm review or market study | 80 | 9 | 7/9 |
| A11 | Intelligence: speech, blog, press release, research, working paper | 632 | 184 | 91/184 |
| A12 | Codified rulebook, handbook or code, point-in-time | 60 | 15 | 0/15 |
| A13 | Court or tribunal determination | 16 | 3 | 0/3 |
| A14 | Perimeter, register or authorisation change (warning list, waiver, modification, licence grant or revocation) | 316 | 60 | 42/60 |
Train counts the fine-tuning examples; Test the held-out documents; Correct how many of those this model classified correctly.
Functions and lines of defence
The model routes each publication to the functions that own it, and reports which of the three lines of defence those sit in.
| Function | Covers | Line of defence |
|---|---|---|
| Board | Board / ExCo (governing body) | - |
| Regulatory change | Regulatory change management | 2 |
| Compliance | Compliance monitoring | 2 |
| Financial crime | AML, sanctions, fraud, market abuse | 2 |
| Risk | Enterprise, operational, credit and market risk | 2 |
| Prudential | Prudential / treasury / finance | 1 |
| Operational resilience | Operational resilience, ICT, third parties | 1 |
| InfoSec | Information security / cyber | 2 |
| Legal | Legal / general counsel | 2 |
| Product | Product, business line, distribution (1st line) | 1 |
| Ops | Operations / client onboarding (1st line) | 1 |
| Privacy | Data protection / privacy | 2 |
| HR | HR, remuneration, certification | 2 |
| Internal audit | Internal audit | 3 |
Priority
- P1: binding or imminent: legislation or final rules with an in-force or compliance date, enforcement against a firm type the reader could be, sanctions changes, reporting deadlines.
- P2: action likely but not yet binding: consultations with a closing date, supervisory guidance or letters setting expectations, thematic reviews.
- P3: awareness only: speeches, research, press releases, market notices with no direct obligation.
Intended use
Built to sit in front of a regulatory-change desk: sort an incoming feed of publications, route each to the right function, and flag the ones that carry a deadline or a duty. The structured output is meant to be reviewed, not executed.
Out of scope. This is not legal advice and not a compliance decision. It does not replace a compliance officer's reading of the source document. It is calibrated only for the UK and US federal sources listed below: not for other jurisdictions, not for US state regulators, not for material published before 2022, and not for the FCA and PRA, whose publications were deliberately excluded from training. Nothing it produces carries any official or endorsed status.
Training data
3,194 training, 697 validation and 759 test documents, drawn from a corpus of 12,092 UK and US federal regulatory documents published since 2022-01-01 that Comply2Reg's crawler collected and Comply2Reg labelled.
| Regulator | Train | Test |
|---|---|---|
| CFPB | 163 | 2 |
| CFTC | 182 | 27 |
| CMA | 404 | 63 |
| FDIC | 169 | 30 |
| FFIEC | 30 | 0 |
| FINCEN | 42 | 4 |
| FRB | 358 | 42 |
| HMT | 294 | 27 |
| ICO | 9 | 1 |
| NCUA | 106 | 13 |
| OCC | 180 | 14 |
| OFAC | 405 | 35 |
| SEC | 134 | 423 |
| TREAS | 403 | 78 |
| UKLEG | 315 | 0 |
Only openly-licensed sources were used, under two regimes:
- UK, Open Government Licence v3.0: HM Treasury, the Competition and Markets Authority, the Information Commissioner's Office and legislation.gov.uk.
- US federal, not subject to copyright under 17 U.S.C. 105: the SEC, Federal Reserve Board, OCC, FDIC, CFTC, CFPB, FinCEN, NCUA, FFIEC, OFAC and the Treasury. This covers federal agencies only. It does not extend to US state regulators such as NYDFS, nor to the regional Reserve Banks, and none are in this dataset.
Publications from the FCA, PRA, Bank of England, Ofcom and the DRCF sit under terms that do not clearly permit this use, so they were held back pending a licensing review. That review remains the single largest constraint on the model's quality for UK conduct and prudential material, and the reason several classes below have almost no training data.
Labels. Every document was labelled by OpenAI's gpt-5.4-mini against the
taxonomy, one call per document, cached by content hash. A second model labelled
the same corpus and the disagreements were sampled against a stronger judge,
which sided with the chosen labeller in 18 of 20 cases. The labels are therefore
model-generated and consistent, not human-adjudicated, and some are certainly
wrong.
Preparation. Documents were cleaned of page furniture (running headers, page numbers, tables of contents, boilerplate addresses) before anything else, so stored offsets and hashes refer to the cleaned text. 2,941,933 characters were removed across 8,816 documents. Exact duplicates were removed by content hash (1218) and near-duplicates by MinHash within a regulator and document type (228).
Splits are chronological, not random. The test set is the latest 2 months (2026-08-03 to 2026-09-28); validation is the next slice back; training runs from 1948-01-01 to 2026-06-30. So the reported scores measure generalisation forward in time, which is the way the model is actually used.
Stratification. Training aimed at a fixed mix of document kinds and fell short on three of them, because the open-licence sources do not publish much guidance or enforcement material:
| Stratum | Target | Available | Kept | Shortfall |
|---|---|---|---|---|
| rule_final | 35% | 1791 | 988 | 0 |
| consultation | 20% | 814 | 381 | 0 |
| guidance | 15% | 2932 | 1490 | 0 |
| enforcement | 15% | 93 | 93 | 0 |
| intelligence | 15% | 648 | 242 | 0 |
Input format. The model sees the regulator, publication type, title, date and the first ~1,500 characters of the document, not the full text. Median training prompt 1045 tokens, 95th percentile 1230, budget 2048, nothing truncated.
The dataset is not published. The pipeline that builds it is open, in the repository linked below.
Training procedure
LoRA on 16 of 36 layers, rank 8, scale 20.0, loss on the assistant turn only. That trains 7.340M of 4022.468M (0.182%) of the model's parameters.
| Iterations | 3,200 (≈ 1 epoch at batch size 1) |
| Learning rate | 0.0001 |
| Sequence length | 2048 |
| Seed | 3407 |
| Hardware | Apple M4 Pro, 24 GB unified memory |
| Wall clock | 7.0 hours |
| Peak memory | 5.01 GB |
Validation loss at iterations 1, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900, 3000, 3100, 3200: 2.691 → 0.937 → 0.951 → 0.903 → 0.860 → 0.794 → 0.773 → 0.824 → 0.829 → 0.789 → 0.813 → 0.688 → 0.716 → 0.852 → 0.771 → 0.849 → 0.849 → 0.891 → 0.700 → 0.831 → 0.819 → 0.734 → 0.670 → 0.728 → 0.760 → 0.772 → 0.716 → 0.809 → 0.638 → 0.794 → 0.673 → 0.758 → 0.827.
The adapter was then fused into the base weights with mlx_lm fuse, with no
de-quantisation: the adapter was trained against the 4-bit weights, so those are
the weights it should be measured on.
Fusing is not lossless at 4 bits. It dequantizes each layer, adds the LoRA delta and re-quantizes, so the published model is a numerically different object from base-plus-adapter. Measured on the same test set, the two agree on 741 of 759 documents (97.6%), the fused model scoring 0.710 against 0.715. The differences fall entirely among the classes the model never learned; every figure reported here was measured on the published weights, not inherited from the adapter.
Evaluation
759 held-out documents, greedy decoding, scored field by field.
| Metric | Score | Note |
|---|---|---|
| alert_class accuracy | 0.710 | always predicting A3 scores 0.315 |
| alert_class macro-F1 | 0.428 | unweighted mean over the classes present |
| priority accuracy | 0.725 | P1 / P2 / P3 |
| obligations_present accuracy | 0.877 | binary |
| primary_functions Jaccard | 0.597 | set overlap against the gold functions |
| JSON validity | 1.000 | output parsed as a JSON object |
| Configuration | JSON validity | Accuracy | Macro-F1 | Priority |
|---|---|---|---|---|
| This model (fused, 4-bit) | 1.000 | 0.710 | 0.428 | 0.725 |
| Base + LoRA adapter | 0.997 | 0.715 | 0.432 | 0.725 |
| Best-val-loss checkpoint (iter 2800) | 0.986 | 0.701 | 0.415 | 0.734 |
| Base model, untuned (759-doc probe) | 0.007 | 0.005 | 0.003 | 0.004 |
Worth stating plainly.
Against the untuned base model. On the same 759 documents the base model reaches 0.007 JSON validity and 0.005 alert-class accuracy, against 1.000 and 0.710 here.
Lower validation loss did not mean a better model. The iteration-2800 checkpoint had the best validation loss of the run (0.638 against 0.827 at the end) and scored 0.701 alert-class accuracy against 0.710 for the released weights. The adapter was selected on task metrics, not loss.
Limitations
It has not learned most of the taxonomy. Macro-F1 is 0.428. Of the classes present in the test set, the model gets a non-zero score on 10. Scoring zero: A1 (337 training examples), A5 (19 training examples), A12 (60 training examples), A13 (16 training examples). 2 further classes have two or fewer test documents (A1, A4), too few to say anything about.
One class dominates. A3 is 31% of the test set and 13% of training. An always-A3 baseline scores 0.315 accuracy, so the +0.395 the model adds is the honest measure of the accuracy figure.
Train and test come from different regulators. Training is mostly OFAC and CMA; the test window is mostly SEC (423 of 759 documents). That makes the evaluation harder than the training distribution, and it means the scores say little about regulators the model barely saw.
The two jurisdictions are not equally financial-services. The US half is: the SEC, Federal Reserve Board, OCC, FDIC, CFTC, CFPB, FinCEN, NCUA and OFAC are financial regulators and supply most of the training data. The UK half is not, because the openly-licensed UK sources are cross-sector: Treasury policy, competition cases, data protection, statutory instruments. The FCA and PRA conduct and prudential material a UK bank most cares about is still exactly what is missing, so expect materially weaker performance on UK conduct and prudential text than the headline suggests.
General legal ability was not re-measured for this release. On an earlier version, fine-tuning cost accuracy on LexGLUE LEDGAR (0.610 base to 0.418 tuned), which is capability loss rather than format lock. The public benchmarks have not been re-run against these weights, so treat that regression as unquantified here rather than as fixed.
The labels are model-generated. No human adjudicated them. Errors in the labeller are reproduced in the model, and the evaluation shares that bias because its labels came from the same source.
No calibration. alert_class_confidence is what the labelling model said
and the fine-tune imitated. It has not been checked against observed accuracy,
so do not threshold on it.
Licence, attribution and provenance
The weights are released under Apache 2.0, inherited from Qwen3-4B-Instruct-2507.
Training text came from two sources, under two regimes.
UK, under the Open Government Licence v3.0:
Contains public sector information licensed under the Open Government Licence v3.0.
US federal: works of the United States Government are not subject to copyright protection under 17 U.S.C. 105 and are in the public domain. This applies to the federal agencies listed above, and not to US state regulators or the regional Reserve Banks, none of which are in this dataset.
The Open Government Licence requires that the use not suggest official status or endorsement. This model is not endorsed by, affiliated with or connected to any UK or US regulator or government body, and its output is not an official interpretation of anything.
Training labels were generated with OpenAI models under terms that assign the output to the customer.
Citation
@misc{comply2reg_regulatory_alert_triage_qwen3_4b_v4,
title = {Regulatory Alert Triage: Qwen3-4B (v4)},
author = {Comply2Reg},
year = {2026},
url = {https://huggingface.co/Comply2Reg/regulatory-alert-triage-qwen3-4b-v4}
}
Changelog
v4, 2026-10-13. Openly-licensed sources only (UK Open Government Licence and US federal public domain), 3,194 training documents, LoRA fused into 4-bit weights. Known gaps: no FCA or PRA material, 1 alert class the model never predicts (A5), and no human-adjudicated labels anywhere in the training or test data.
Built by Comply2Reg. Pipeline and training code: ComplianceGPT.