FinGuard: Detecting Financial Regulatory Non-Compliance
in LLM Interactions

Huaixia Dou\(^1\), Jie Zhu\(^1\)1, Minghao Wu\(^2\), Shuo Jiang\(^1\), Junhui Li\(^3\),
Lifan Guo\(^1\), Feng Chen\(^1\), Chi Zhang\(^1\)
\(^1\)Qwen DianJin Team, Alibaba Cloud Computing
\(^2\)Tongyi Lab, Alibaba Group
\(^3\)School of Computer Science and Technology, Soochow University


Abstract

As large language models (LLMs) are increasingly deployed in financial services, a single non-compliant interaction can expose institutions to regulatory penalties and direct consumer harm. Existing guard models are built around general harm taxonomies and overlook violations grounded in specific financial regulations. We address this gap with a regulation-driven pipeline that operates directly on regulatory documents, inducing a financial compliance risk taxonomy and synthesizing grounded training data without any predefined violation categories. Instantiating the pipeline on Chinese financial regulations, we release FinGuard-Bench, to our knowledge the first benchmark for financial regulatory compliance detection, with expert-annotated labels at both the query and response levels. We further train FinGuard, a financial compliance detection model built on Qwen3-8B and trained on the regulation-grounded data via supervised fine-tuning and self-play reinforcement learning. On FinGuard-Bench, FinGuard substantially outperforms all baselines, including dedicated guard models and much larger general-purpose LLMs such as Qwen3.5-397B-A17B and GPT-5.1. Furthermore, FinGuard also preserves general safety capabilities and adapts to unseen institution-specific policies using policy documents alone. We will publicly release the code, prompts, and resources used in this work on GitHub.

1 Introduction↩︎

Large language models (LLMs) are increasingly deployed in financial services [1][4], ranging from consumer-facing chat assistants to internal compliance copilots. In such settings, even a single non-compliant interaction can expose institutions to regulatory penalties, reputational damage, and direct financial harm to consumers. Financial compliance detection is the task of identifying such interactions, in which an LLM input or output violates specific financial regulations. These violations can originate on either side of the conversation: a user may directly solicit prohibited information (e.g., how to structure transactions to evade anti-money-laundering reporting), or the model itself may produce a non-compliant response (e.g., providing actionable guidance for illegal fundraising).

Existing guard models flag harmful content across broad categories such as toxicity and illegal activity [5][8], and they cover a subset of financial violations. However, most financial violations are defined by specific regulatory provisions that general harm taxonomies do not capture. Larger general-purpose LLMs prompted as zero-shot judges are not a reliable substitute either: even Qwen3.5-397B-A17B [9] and GPT-5.1 [10] fall well short of acceptable performance in our experiments, as they lack the regulation-grounded discrimination required to separate compliant elaboration from genuine violations. Building a dedicated detector, however, is non-trivial: regulatory documents specify legal boundaries in abstract language rather than providing examples of the interactions a deployed model will encounter, so both the violation taxonomy and the labeled training data must be derived from these documents rather than reused from existing safety corpora.

In this work, we introduce a regulation-driven pipeline that operates directly on regulatory documents. It first develops a risk taxonomy of financial violation categories, and then synthesizes labeled training data grounded in this taxonomy. We instantiate the pipeline on 3,120 publicly available regulatory documents issued by major Chinese financial regulatory authorities as an initial case study, deriving a two-level taxonomy of 11 top-level categories and 35 subcategories. Building on this pipeline, we construct FinGuard-Bench, an expert-annotated benchmark on which existing guard models and substantially larger general-purpose LLMs fail to reliably identify violations. To close this gap, we train FinGuard, an 8B-parameter detection model initialized from Qwen3-8B, on the regulation-grounded data through supervised fine-tuning and self-play reinforcement learning [11][13]. On FinGuard-Bench, the strongest general-purpose baseline (Qwen3.5-397B-A17B) reaches only 78.68 / 64.08 F1 at the query and response levels, while FinGuard achieves 90.23 / 85.43 — a gap of 11.55 and 21.35 points despite its much smaller scale.

Our contributions are summarized as follows:

  • We propose a regulation-driven pipeline that induces a financial compliance risk taxonomy directly from regulatory documents and synthesizes grounded training data, without relying on any predefined violation categories.

  • We release FinGuard-Bench, to our knowledge the first benchmark for financial regulatory compliance detection, covering 11 top-level categories and 35 subcategories with expert-annotated labels at both the query and response levels.

  • We develop FinGuard, an 8B-parameter detection model trained via supervised fine-tuning and self-play reinforcement learning, which outperforms all baselines, including dedicated guard models and substantially larger general-purpose LLMs such as Qwen3.5-397B-A17B and GPT-5.1, while also adapting to unseen institution-specific policies using policy documents alone.

2 Related Work↩︎

2.0.0.1 LLM Safety Benchmarks

Safety benchmarks for LLMs have been developed along several axes, including toxicity and hate speech detection [14], multi-category harm classification [15], red-teaming under diverse attack methods [16], and joint evaluation of prompt harmfulness and model refusal [17]. In all cases, harm categories are defined by general ethical principles rather than specific regulations. Recent work extends safety evaluation to financial scenarios [18], [19], evaluating whether models themselves behave safely when presented with harmful financial requests, but evaluation remains at the level of aggregate safety ratings without identifying which specific violation categories are triggered. FinGuard-Bench addresses this gap with per-category labels at both the query and response level.

2.0.0.2 LLMs in Financial NLP

Financial NLP has expanded from classification tasks such as sentiment analysis and entity extraction to problems requiring multi-step numerical reasoning and autonomous decision-making. LLMs have been adapted accordingly through domain-specific pre-training [20], parameter-efficient fine-tuning [21], [22], distillation of reasoning chains with reinforcement learning [1], [3], [4], and agent architectures with layered memory [23], [24]. Yet the financial compliance dimension remains largely unaddressed. Existing guard models [5][7], [25][27] classify LLM inputs or outputs against general-purpose harm taxonomies. FinGuard in this paper shifts the focus to financial compliance, training on regulation-grounded data to detect domain-specific violations.

3 Methodology↩︎

3.1 Task Formulation↩︎

We formulate safety classification as the task of determining whether a given text violates a risk definition \(\mathcal{D}\). We consider two settings. Query-level classification assesses whether a user query \(q\) itself poses a compliance risk. The model takes \(q\) and \(\mathcal{D}\) as input and predicts a binary label \(y \in \{\texttt{Safe}, \texttt{Unsafe}\}\), along with any violated subcategories \(\mathcal{C} \subseteq \mathcal{D}\). Response-level classification assesses whether an assistant’s response \(r\) is compliant, conditioned on the query \(q\) for context. Here, \(r\) is the evaluation target while \(q\) provides necessary background — this separation captures cases where a seemingly harmless query can elicit a non-compliant response.

In this work, we instantiate \(\mathcal{D}\) as a financial compliance risk taxonomy (Section 3.2.1), specializing the above formulation to detect regulatory violations in financial scenarios.

3.2 Dataset Construction for Financial Compliance↩︎

Figure 1: Overview of the data construction and training pipeline. Left: a risk taxonomy is derived from financial regulatory documents, which are then used to synthesize training data, with a subset reviewed by experts to form FinGuard-Bench. Right: the model is trained via SFT followed by self-play RL.

As shown in Figure 1 (left), we build our dataset through a multi-stage pipeline. Starting from financial regulatory documents, we induce a risk taxonomy (Section 3.2.1), synthesize adversarial queries (Section 3.2.2), and distill corresponding responses (Section 3.2.3). After automated labeling, deduplication, and quality filtering, we split the resulting corpus into FinGuard-Train and a held-out subset that domain experts annotate to form FinGuard-Bench (Sections 3.2.4 and 3.3).

3.2.1 Financial Risk Taxonomy↩︎

We derive the taxonomy from 3,120 publicly available regulatory documents issued by major Chinese financial regulatory authorities, followed by financial expert verification. Using Qwen3.5-397B-A17B [9], we extract fine-grained compliance points (e.g., prohibited behaviors, violation examples) from each document, encode them with text-embedding-v4 [28], cluster via HDBSCAN [29], and summarize into coherent categories. Three senior financial experts independently review these categories to resolve overlaps between financial risk types (e.g., distinguishing “Illegal Fundraising” from “Unauthorized Investment Advice”) and inject implicit subcategories missed by automated extraction. They reconcile disagreements through discussion until consensus is reached. This yields a two-level taxonomy of 11 top-level categories and 35 subcategories The full taxonomy with detailed definitions is provided in Appendix 7.

3.2.2 Query Construction↩︎

We synthesize user queries based on the financial risk taxonomy through a three-stage pipeline that progressively expands coverage, increases difficulty, and ensures balanced supervision. Unless otherwise noted, we use Qwen3.5-397B-A17B for all stages. The prompts are in Appendix 8.

3.2.2.1 Stage 1: Keyword-Driven Generation.

Direct query generation from categories tends to produce repetitive outputs with insufficient scenario coverage. We first compile 10 manually curated seed keywords for each of the 35 subcategories and expand them into 4,722 unique keywords capturing distinct violation scenarios. For each keyword, we generate 3 user queries, each explicitly incorporating it and adopting a violation-seeking tone, yielding 13,980 queries in total.

3.2.2.2 Stage 2: Multi-Dimensional Adversarial Augmentation.

While queries anchored to explicit keywords express violation intent directly, real-world ones often employ implicit or obfuscated strategies. Drawing on prior taxonomies of jailbreak and persuasion attacks [30], [31], we define 8 adversarial augmentation dimensions tailored to financial scenarios (see Appendix 9 for the full list). For each query, we repeat this process 3 times: randomly sample 1–3 dimensions and apply the corresponding transformations, yielding 41,940 augmented queries.

3.2.2.3 Stage 3: Compliant Counterpart Generation.

To ensure the model learns to distinguish underlying intent rather than memorize surface patterns, we generate a compliant counterpart for each violative query. Specifically, we rewrite each query into a semantically similar variant with reversed intent but preserved surface structure. For example, “How to fabricate financial statements” becomes “How to identify fabricated financial statements”. This yields 55,920 compliant queries, forming paired violative-compliant instances.

3.2.3 Response Generation↩︎

We employ a multi-model distillation strategy to generate corresponding assistant responses. Specifically, we utilize two categories of models. The first comprises five general-purpose language models spanning a range of scales: Kimi-Linear-48B-A3B-Instruct [32], GLM-4-9B-0414 [32], Qwen2.5-7B-Instruct [33], Qwen3.5-9B/397B-A17B [9], GPT-OSS-20B [34], QwQ-32B [35], and Deepseek-R1 [36]. The second consists of four abliterated models2, variants with safety alignment removed: Qwen2.5-7B-Instruct-abliterated-v3, Huihui-Qwen3.5-9B-abliterated, Huihui-gpt-oss-20b-BF16-abliterated, and QwQ-32B-abliterated. Each synthesized query is submitted to all models. For reasoning models Qwen3.5-9B and Huihui-Qwen3.5-9B-abliterated, we additionally generate responses with chain-of-thought reasoning enabled to capture deliberation-based behavior. This process yields a total of 1,456,134 responses, encompassing the full range of patterns from explicit refusal to unguarded compliance.

3.2.4 Quality Control↩︎

3.2.4.1 Automated Response Labeling.

The generated responses lack explicit safety and category labels, as the source model alone is not a reliable proxy (e.g., general LLMs may still produce unsafe outputs). To address this, we employ an ensemble-based labeling approach using multiple Qwen model variants (e.g., Qwen2.5-72B-Instruct, Qwen3-235B-A22B). Each model independently assigns a safety label (Safe vs. Unsafe) and one or more financial violation subcategories to each response. Final labels are determined through majority voting across all annotator models. We further validate the annotation quality on a held-out set of 50 human-annotated examples, where the ensemble approach achieves an F1-score above 0.95.

3.2.4.2 Deduplication and Filtering.

We apply TF-IDF [37] deduplication to the synthesized queries and employ LLM-as-a-Judge (Qwen3.5-397B-A17B) to score response quality on a 1–5 scale, filtering out outputs that score below 4. The detailed prompt is provided in Appendix 10. In total, we obtain 111,293 queries and 1,445,664 responses for financial compliance. The overall filtering rate is below 1%, indicating that the generation pipeline already produces high-quality data with minimal redundancy or degradation.

3.2.4.3 Partition

To ensure balanced representation across subcategories, we sample 30 query-response pairs per subcategory with a 2:1 unsafe-to-compliant ratio to form a held-out subset of 1,050 instances reserved for financial expert annotation (Section 3.3), and use the remaining instances as FinGuard-Train.

3.3 FinGuard-Bench↩︎

lll & & **#Num
& Samples & 1,020
& Categories & 11
& Subcategories & 35
& Unsafe Samples & 744
& Unsafe Ratio & 72.9%
& Avg. Length & 99.9
& Unsafe Samples & 315
& Unsafe Ratio & 30.9%
& Avg. Length & 1723.3**

lcr Category & #Sub & #Num
Corruption & Benefit Transfer & 3 & 82
Credit Violations & Lending Fraud & 5 & 149
Consumer Rights Violations & 4 & 115
Money Laundering & Illegal Finance & 4 & 118
Data Security & IT Violations & 3 & 89
Regulatory Evasion & Data Falsification & 4 & 119
Account & Payment Violations & 3 & 84
Foreign Exchange Violations & 2 & 59
Market Manipulation & Interbank Violations & 2 & 58
Corporate Governance Failures & 3 & 88
Administrative & Documentation Violations & 2 & 59
Overall & 35 & 1020*
***

lcc Category & #Q-Unsafe & #R-Unsafe
Data Security & IT Violations & 95.5% & 46.1%
Consumer Rights Violations & 85.2% & 40.9%
Corporate Governance Failures & 85.2% & 39.8%
Regulatory Evasion & Data Falsification & 82.4% & 39.5%
Administrative & Documentation Violations & 76.3% & 32.2%
Market Manipulation & Interbank Violations & 75.9% & 34.5%
Account & Payment Violations & 61.9% & 20.2%
Money Laundering & Illegal Finance & 61.0% & 16.1%
Corruption & Benefit Transfer & 61.0% & 32.9%
Credit Violations & Lending Fraud & 60.4% & 24.2%
Foreign Exchange Violations & 59.3% & 11.9%*
***

lcc & R-Safe & R-Unsafe
Q-Safe & 24.2% & 2.9%
Q-Unsafe & 44.9% & 28.0%********

Existing safety benchmarks focus on general domains and lack coverage of financial violation scenarios. We introduce FinGuard-Bench, a human-annotated benchmark for evaluating financial compliance at the query and response levels. To construct it, three financial experts independently annotate the held-out subset (Section 3.2.4) following structured annotation guidelines (see Appendix 11), achieving an initial inter-annotator agreement of 86.9%. Through deliberative consensus, 108 labels are revised and 30 instances with unresolved disagreements are discarded, leaving 1,020 pairs in the final benchmark.

3.3.0.1 Dataset Statistics.

Table [tab:basic95stats] summarizes FinGuard-Bench, which contains 1,020 query-response pairs spanning 11 categories and 35 subcategories. Unsafe samples account for 72.9% at the query level but only 30.9% at the response level, a 42.0-point gap that highlights the need for dual-level compliance evaluation. Queries average 99.9 tokens and responses 1,723.3 tokens, reflecting the long-form nature of financial advisory content.

3.3.0.2 Category and Safety Distribution.

Tables [tab:benchmark95distribution] and [tab:category95safety] show that category sizes range from 58 to 149 samples, roughly following the number of subcategories. Response-level unsafe ratios vary substantially across categories, from 11.9% to 46.1%, and the gap between query- and response-level unsafe ratios ranges from 28.1 to 49.4 percentage points. This diversity ensures broad coverage of compliance scenarios with heterogeneous risk profiles.

3.3.0.3 Cross-Level Safety Analysis.

Table [tab:cross95level] shows that all four query-response safety combinations appear in the benchmark. Notably, 2.9% of samples are query-safe but response-unsafe, indicating that compliance violations can arise from the model’s own elaboration even when the query is benign.

3.4 Financial Compliance Policy Learning↩︎

As illustrated in Figure 1 (right), we train FinGuard in two stages: supervised fine-tuning (Section 3.4.1) on FinGuard-Train, followed by self-play reinforcement learning (Section 3.4.2) that generates queries at moderate difficulty to further improve classification.

3.4.1 Supervised Fine-Tuning↩︎

We jointly train both tasks defined in Section 3.1. The target \((y, \mathcal{C})\) is linearized into a token sequence \(a = (a_1, \ldots, a_T)\), and the model is trained with the autoregressive objective: \[\mathcal{L}_{\text{SFT}} = -\sum_{t=1}^{T} \log p_\theta(a_t \mid a_{<t}, x)\] where the input is \(x = [q;\; \mathcal{D}]\) for query-level classification and \(x = [r;\; q;\; \mathcal{D}]\) for response-level classification. The corresponding prompt templates are provided in Appendix 12.

3.4.2 Self-Play Reinforcement Learning↩︎

While SFT provides a strong initialization, it is limited to the fixed difficulty distribution of the training data. To address this, we introduce a self-play framework inspired by [13], in which a single model \(\pi_\theta\), initialized from the SFT checkpoint, simultaneously serves as both a Generator that produces queries with intended safety labels \(\hat{y}\), and a Guard that classifies them. Both roles share parameters and are differentiated by role-specific prompts (Appendix 13). The Guard is updated via GRPO [38] with group-normalized advantages across rollouts, while the Generator uses the reward directly as the policy gradient signal. We apply self-play to query-level classification only, as extending to the response level would require an additional generation step and, more critically, would lack a reliable oracle for response safety labels. Algorithm 2 details the full procedure.

3.4.2.1 Guard Reward.

For each Guard prediction \(y_i\) given target label \(\hat{y}\): \[r^{\text{guard}}(y_i, \hat{y}) = \begin{cases} 1.0 & \text{if } y_i = \hat{y} \\ 0.0 & \text{if } y_i \neq \hat{y} \\ -0.5 & \text{if format error}\footnotemark \end{cases}\]

3.4.2.2 Generator Reward.

Let \(s = \frac{1}{N}\sum_{i=1}^{N} \mathbb{1}[y_i = \hat{y}]\) be the Guard accuracy over \(N\) rollouts. We reward the Generator with a Gaussian centered at \(s = 0.5\): \[r^{\text{gen}}(s) = \exp\!\left(-\frac{(s - 0.5)^2}{2\sigma^2}\right), \quad 0 < s < 1\]

where \(\sigma\) controls reward sharpness. Samples with \(s \in \{0, 1\}\) are discarded, as complete Guard agreement indicates the query is either trivially easy or misaligned with its intended label \(\hat{y}\). This filtering implicitly ensures that only well-calibrated queries contribute to training, and encourages the Generator to produce queries that are neither too easy nor too hard for the current Guard.

Figure 2: Self-Play Reinforcement Learning

4 Experimentation↩︎

4.1 Experimental Setup↩︎

4.1.0.1 Datasets.

We train on FinGuard-Train, downsampled to a 1:1 safe-to-unsafe ratio at both the query and response levels, yielding 495,590 training samples in total.

4.1.0.2 Model Training.

We adopt Qwen3-8B [39] as the backbone and fine-tune it with LoRA [40], followed by self-play RL with GRPO [38]. Full hyper-parameter settings are provided in Appendix 14.

4.1.0.3 Baselines.

We compare FinGuard against two groups of baselines. The first group consists of general-purpose LLMs prompted to perform compliance classification in a zero-shot setting, including Qwen3-8B, Qwen3.5-9B, Qwen3.5-397B-A17B, Gemini-3.1-Flash, and GPT-5.1. These models receive the same prompt template as FinGuard. The second group consists of safety guard models designed for general-purpose safety moderation, including LlamaGuard3-8B, NemoGuard-8B, PolyGuard-Qwen-7B, and Qwen3Guard-Gen-8B3. These models are evaluated using their native prompt formats.

4.1.0.4 Evaluation.

We evaluate on FinGuard-Bench. Following prior work on safety moderation [41][43], we use F1 score on the unsafe class as the primary metric, reported separately for query-level and response-level classification.

4.2 Main Results↩︎

l|cc Model & Query-Level & Response-Level

Qwen3-8B & 16.69 & 22.91
Qwen3.5-9B & 33.63 & 33.67
Qwen3.5-397B-A17B & 78.68 & 64.08
Gemini-3.1-Flash & 61.28 & 52.77
GPT-5.1 & 74.26 & 64.09

LlamaGuard3-8B & 23.94 & 28.87
NemoGuard-8B & 16.97 & 29.18
PolyGuard-Qwen-7B & 52.46 & 46.08
Qwen3Guard-Gen-8B (strict) & 35.50 & 73.49
Qwen3Guard-Gen-8B (loose) & 11.16 & 19.42

FinGuard w/o Self-Play& 84.13 & 84.71
FinGuard &
90.23 & 85.43********

Table [tab:main95results] presents results on FinGuard-Bench. We have the following observations:

  • FinGuard w/o Self-Play already surpasses all general-purpose LLMs — including much larger models such as Gemini-3.1-Flash and GPT-5.1 — achieving F1 scores of 84.13 and 84.71 at the query and response levels. Its own backbone, Qwen3-8B, scores only 16.69 and 22.91 under the same prompt, confirming that general language understanding alone is far from sufficient for this task.

  • Safety guard models uniformly underperform FinGuard w/o Self-Play despite being explicitly trained for content safety. The highest query-level F1 among them is 52.46 from PolyGuard-Qwen-7B, while Qwen3Guard-Gen-8B achieves the highest response-level F1 at 73.49. We attribute this gap to mismatch between general safety taxonomies and financial compliance categories.

  • With self-play RL, FinGuard achieves 90.23 and 85.43, improving over the SFT baseline by 6.10 and 0.72 at the query and response levels, respectively. Naturally, the query-level gain is larger, as self-play directly targets query-level classification. The modest response-level improvement suggests that shared parameters allow query-level gains to partially transfer.

5 Discussion↩︎

5.1 Effect on General Safety↩︎

lcc Model & Query-Level & Response-Level
LlamaGuard3-8B & 75.63 & 71.66
NemoGuard-8B & 71.74 & 79.05
PolyGuard-Qwen-7B & 86.11 & 72.14
Qwen3Guard-Gen-8B (strict) & 86.78 & 85.91
Qwen3Guard-Gen-8B (loose) & 85.49 & 86.79
Qwen3-8B & 79.18 & 79.60
FinGuard &
81.00 & 82.37********

A natural concern with domain-specific fine-tuning is whether it degrades the model’s general safety capability. We evaluate FinGuard on five query-level benchmarks (ToxicChat [44], Aegis2.0 [6], SimpleSafetyTests [45], HarmBench [16], WildGuard [17]) and three response-level benchmarks (Aegis2.0, XSTest [46], Beavertails [47]). As shown in Table [tab:general95safety95avg], FinGuard achieves average F1 of 81.00 and 82.37 at the query and response levels, slightly above its Qwen3-8B backbone at 79.18 and 79.60, confirming that financial compliance training does not compromise general safety. Nevertheless, the safety guard models score higher, as they are trained on general safety corpora that our current pipeline does not cover. Extending the pipeline to incorporate such data is a natural direction for future work.

5.2 Cross-Category Performance↩︎

l|c|cc & &
(lr)3-4 & & w/o SP & full
Corruption & Benefit Transfer & 78.35 & 75.00 & 82.11
Credit Violations & Lending Fraud & 75.82 & 84.47 & 87.72
Consumer Rights Violations & 81.44 & 84.88 & 88.76
Money Laundering & Illegal Finance & 80.65 & 82.93 & 89.39
Data Security & IT Violations & 77.70 & 92.41 & 96.34
Regulatory Evasion & Data Falsification & 79.53 & 82.84 & 86.86
Account & Payment Violations & 72.94 & 86.02 & 92.93
Foreign Exchange Violations & 83.33 & 79.31 & 85.25
Market Manipulation & Interbank Violations & 85.00 & 83.12 & 93.02
Corporate Governance Failures & 73.17 & 86.76 & 88.41
Administrative & Documentation Violations & 80.52 & 92.86 & 94.12****

Figure 3: Examples of compliance violations identified by FinGuard but missed by general-purpose LLMs or guards. Underlined text marks the segments that drive the violation.

To better characterize where the difficulty of FinGuard-Bench concentrates and how FinGuard’s gains are distributed across compliance topics, we break down query-level F1 score across the 11 top-level categories of our financial compliance risk taxonomy. Table [tab:category-breakdown] reports per-category performance. Self-play RL improves all 11 categories, with gains from 1.26 to 9.90 F1 points. After self-play, FinGuard surpasses Qwen3.5-397B-A17B on every category despite using significantly fewer parameters. The per-category F1 ranges from 82.11 to 96.34, indicating that financial compliance detection is not uniformly difficult across violation types. Categories involving procedural rules with clear regulatory definitions (e.g., Data Security & IT Violations, 96.34) are easier to detect than those requiring judgment over intent and context (e.g., Corruption & Benefit Transfer, 82.11), suggesting that the latter may benefit from richer training signals or explicit reasoning.

lc Model & F1
FinGuard & 68.42
FinGuard + Adaptation & **93.62**

5.3 Adaptation to Out-of-Domain Regulations↩︎

To test whether self-play generalizes beyond FinGuard’s training corpus, we collect 10 anonymized policy documents from unseen sources and extract compliance points using the same procedure as in Section 3.2.1. We then run self-play RL restricted to Consumer Rights Violations: the Generator produces queries on the fly from these compliance points, and the Guard learns under the same reward. Evaluation uses 100 unsafe queries manually written by three financial experts grounded in these documents. As shown in Table [tab:adaptation], F1 rises from 68.42 without adaptation to 93.62 after self-play, with no human-annotated training examples, indicating that policy documents alone provide sufficient signal to bridge out-of-domain gaps.

5.4 Case Study↩︎

We examine two FinGuard-Bench cases in Figure 3, comparing FinGuard against Qwen3-8B, Qwen3.5-397B-A17B, and Qwen3Guard-Gen-8B. In Case 1, a query framed as a routine false-positive fix (“We’re not trying to bypass compliance”) in fact adjusts the registered MCC level and whitelists partners to lower risk-control sensitivity, silently weakening an approved control; baselines accept the cooperative framing as Safe, while FinGuard flags it as Unsafe under Corporate Governance Failures. In Case 2, a seemingly procedural query about a non-public API receives a response that endorses bypassing the front-end approval workflow (“this purpose can indeed be achieved”); only FinGuard catches this response-level drift and labels it as Data Misuse.

6 Conclusion↩︎

In this work, we study financial regulatory compliance detection. From 3,120 Chinese regulatory documents, we build a pipeline that jointly induces a two-level risk taxonomy and synthesizes training data, resulting in FinGuard-Bench with expert annotations for both queries and responses. Using supervised fine-tuning and self-play reinforcement learning, an 8B model outperforms much larger general-purpose LLMs and specialized guard models on FinGuard-Bench while preserving general safety capabilities. The same approach also transfers to unseen institution-specific policies using only policy text. In future work, we plan to extend this pipeline to general-domain safety, additional jurisdictions, and multilingual regulatory settings.

Limitations↩︎

Although FinGuard-Bench and FinGuard provide a regulation-grounded compliance benchmark and guard model for the Chinese financial domain, several limitations remain:

  • Single-jurisdiction and single-language coverage. FinGuard-Bench is built on 3,120 publicly available Chinese regulatory documents and contains Chinese queries and responses. Other jurisdictions and English-language compliance are not covered, which restricts direct generalisation to multilingual or cross-border deployment.

  • Static regulatory snapshot. The 3,120 regulatory documents reflect the state of Chinese financial supervision at the time of collection. Subsequent rule revisions, new supervisory guidance, and enforcement updates will require periodic refresh of the taxonomy and evaluation set.

  • Limited adversarial-robustness evaluation. FinGuard is not stress-tested against general-purpose jailbreak attacks. The adversarial augmentation we apply is restricted to financial-domain rewriting along eight dimensions, leaving robustness under generic and out-of-domain attacks an open question.

Ethics Statement↩︎

All source documents used in this work are publicly available Chinese financial regulatory publications, introducing no privacy or intellectual-property concerns. The three financial compliance experts who verified the taxonomy and annotated the benchmark were fully informed of the research purpose and compensated above standard professional consulting rates. We acknowledge that adversarial query synthesis techniques developed for stress-testing could in principle be repurposed to evade compliance systems; however, the synthesized queries are grounded in publicly accessible regulations rather than novel attack vectors, limiting incremental risk. Data handling complies with China’s Personal Information Protection Law, and the study has received Institutional Review Board approval. To facilitate reproducibility, we will publicly release the benchmark construction code, evaluation scripts, and annotation guidelines upon publication, subject only to any third-party licensing constraints on redistributed source materials.

7 Detailed Financial Risk Categories↩︎

Table [tab:taxonomy95detail] presents the full financial risk taxonomy, comprising 11 top-level categories and 35 subcategories derived from Chinese financial regulatory documents.

|l|l|l| Category & Subcategory & Description
& Embezzlement and Misappropriation & Internal misuse or diversion of non-credit funds.
& Commercial Bribery & Bribery, gift exchange, or collusion for personal gain.
& Related-party Transactions & Concealed related parties or improper benefit transfer.
& Qualification Fraud & Forged documents or collusive loan fraud.
& Illegal Lending & Excessive or unauthorized credit approval.
& Misuse of Loan Funds & Loan funds used outside agreed purposes.
& Collateral and Guarantee Violations & False valuation or irregular guarantees.
& Due Diligence Failure & Weak pre-loan review or post-loan supervision.
& Misleading Marketing & False promotion or hidden risks.
& Forced Bundling & Fees & Bundled sales or improper charges.
& Improper Debt Collection & Harassment or abusive collection practices.
& Discriminatory Service & Service refusal or obstruction of complaints.
& KYC Violations & Failure to verify customer identity.
& Suspicious Transaction Monitoring & Failure to report or review suspicious transactions.
& AML Management Failures & Weak AML systems or information leakage.
& Illegal Financial Activities & Unlicensed operations or illegal fundraising.
& Data Leakage & Disclosure of sensitive or confidential data.
& Data Misuse & Excessive collection or improper use of data.
& System Security Failures & Weak IT controls or insecure data storage.
& Regulatory Data Manipulation & Falsified financial or regulatory reports.
& Delayed Risk Reporting & Concealing or delaying major risk reporting.
& Obstruction of Supervision & Destroying evidence or resisting inspection.
& Routine Reporting Errors & Late or inaccurate regulatory submissions.
& Illegal Account Opening & Fake or multiple accounts, misuse of accounts.
& Payment System Violations & Fake transactions or payment channel abuse.
& Cash and Instrument Violations & Issues with currency, bills, or precious metals.
& Illegal FX Trading & Unauthorized forex transactions or pricing issues.
& Cross-border Capital Violations & Irregular cross-border funds or guarantees.
& Market Manipulation & Insider trading or securities manipulation.
& Asset Management Violations & Fund pooling or improper wealth management sales.
& Institutional Governance Issues & Shareholder interference or illegal ownership.
& HR and Position Control & Unlicensed staff or lack of role separation.
& Internal Control Failures & Unauthorized approvals or weak internal systems.
& Administrative Procurement Issues & Irregular procurement or misuse of public funds.
& Seals and Record Management & Misuse of seals, lost certificates, altered records.

ll Dimension & Desciption
Multi-Step Reasoning & Decompose a direct request into seemingly reasonable intermediate steps.
Distractor Injection & Surround the core intent with irrelevant or misleading context.
Reverse Elicitation & Pose as a compliance officer or victim to solicit implementation details.
Nested Scenario & Embed the intent within a complex, realistic business situation.
Process Obfuscation & Frame the request as a workflow or efficiency concern.
Jargon Camouflage & Disguise the intent using technical or procedural language.
Boundary Probing & Question system sensitivity to extract detection thresholds.
Insider Role-Playing & Adopt a practitioner’s tone to normalize the request.****

8 Prompts for Query Construction↩︎

Figure 4 and Figure 5 show the prompts used for keyword generation and keyword-driven query synthesis in Stage 1. Figure 6 shows the prompt for adversarial augmentation in Stage 2, and Figure 7 shows the prompt for compliant counterpart generation in Stage 3.

Figure 4: Prompt used for keyword generation.
Figure 5: Prompt used for query generation.
Figure 6: Prompt used for adversarial query generation.
Figure 7: Prompt used for compliant counterpart generation.

9 Definition of Adversarial Augmentation Dimensions↩︎

Table [tab:adversarial95augmentation] lists the eight augmentation dimensions, each targeting a distinct strategy by which users may obscure violation intent.

10 Prompt for Response Quality Scoring↩︎

Figure 8 shows the prompt used to score response quality on a 1–5 scale. Only responses scoring 5 are retained.

None

Figure 8: Prompt used for scoring response..

11 Annotation Guideline↩︎

Figure 9 presents the annotation guideline used by financial experts when labeling FinGuard-Bench samples.

None

Figure 9: Annotation guideline for FinGuard-Bench..

12 Prompts for Financial Compliance Detection↩︎

Figure 10 and Figure 11 show the prompt templates used for query-level and response-level compliance classification, respectively.

None

Figure 10: Prompt used for query-level detection..

None

Figure 11: Prompt used for response-level detection..

13 Prompts for Self-Play↩︎

During self-play reinforcement learning , the Generator and Guard roles share the same model parameters but are differentiated by role-specific prompts. The Guard uses the same prompt template as query-level compliance detection (Figure 10). The Generator uses one of two templates depending on the intended safety label \(\hat{y}\): when \(\hat{y} = \texttt{Unsafe}\), it receives the non-compliant proposer prompt (Figure 12); when \(\hat{y} = \texttt{Safe}\), it receives the compliant proposer prompt (Figure 13).

None

Figure 12: Generator prompt for producing unsafe queries during self-play..

None

Figure 13: Generator prompt for producing safe queries during self-play..

14 Training Details↩︎

For supervised fine-tuning, we use the LLaMA-Factory  [48] framework and apply LoRA  [40] with a rank of 8 and a scaling factor of 16 to all linear layers. Training is conducted on 8 NVIDIA A100 80GB GPUs for 1 epoch, with a per-device batch size of 4 and gradient accumulation over 2 steps. The learning rate is set to \(3 \times 10^{-5}\) with cosine decay. For self-play reinforcement learning, the SFT checkpoint is further optimized using the VERL  [49] framework with the GRPO  [38] algorithm for 30 steps on the same hardware, with a batch size of 64, a rollout size of 8, and a learning rate of \(1 \times 10^{-6}\). The KL-penalty coefficient is set to 0.01 and the Generator reward sharpness \(\sigma\) to 0.25.

15 Results on General Safety Benchmark↩︎

Table [tab:general95safety] reports per-benchmark F1 scores on general-domain safety benchmarks.

l|cccccc|cccc & &
(lr)2-7 (lr)8-11 Model & Toxic & Aegis2.0 & SimpST & HarmB & WildG & Avg. & Aegis2.0 & XSTest & BeaverT & Avg.
Qwen3-8B & 67.15 & 77.77 & 97.96 & 80.42 & 72.61 & 79.18 & 75.07 & 88.74 & 74.99 & 79.60

LlamaGuard3-8B & 44.96 & 72.59 & 95.29 & 94.88 & 70.44 & 75.63 & 59.46 & 87.50 & 68.01 & 71.66
NemoGuard-8B & 60.88 & 74.12 & 91.30 & 65.55 & 66.84 & 71.74 & 80.96 & 81.99 & 74.19 & 79.05
PolyGuard-Qwen-7B & 65.80 & 84.82 & 99.50 & 94.04 & 86.40 & 86.11 & 82.80 & 55.47 & 78.14 & 72.14
Qwen3Guard-Gen-8B (strict) & 64.38 & 85.52 & 98.99 & 97.44 & 87.58 & 86.78 & 84.22 & 88.09 & 85.42 & 85.91
Qwen3Guard-Gen-8B (loose) & 77.11 & 80.02 & 97.44 & 89.50 & 83.38 & 85.49 & 83.51 & 93.43 & 83.44 & 86.79

FinGuard w/o Self-Play & 65.60 & 76.02 & 97.44 & 81.66 & 79.07 & 79.96 & 79.33 & 89.17 & 78.78 & 82.43
FinGuard & 65.93 & 78.42 & 98.48 & 82.35 & 79.83 & 81.00 & 79.45 & 88.05 & 79.61 & 82.37*
*******************

References↩︎

[1]
J. Zhu et al., “DianJin-R1: Evaluating and enhancing financial reasoning in large language models,” arXiv preprint arXiv:2504.15716, 2025.
[2]
L. Qian et al., “Fino1: On the transferability of reasoning-enhanced LLMs and reinforcement learning to finance,” arXiv preprint arXiv:2502.08127, 2025.
[3]
J. Zhu et al., “Fin-PRM: A domain-specialized process reward model for financial reasoning in large language models,” in Proceedings of IJCAI, 2026.
[4]
Z. Liu et al., “Fin-R1: A large language model for financial reasoning through reinforcement learning,” arXiv preprint arXiv:2503.16252, 2026.
[5]
A. @. M. Llama Team, “The llama 3 herd of models,” arXiv preprint arXiv:2407.21783, 2024.
[6]
S. Ghosh et al., AEGIS2.0: A diverse AI safety dataset and risks taxonomy for alignment of LLM guardrails,” in Proceedings of NAACL, 2025, pp. 5992–6026.
[7]
P. Kumar et al., “PolyGuard: A multilingual safety moderation tool for 17 languages,” arXiv preprint arXiv:2504.04377, 2025.
[8]
H. Zhao et al., “Qwen3Guard technical report,” arXiv preprint arXiv:2510.14276, 2025.
[9]
Qwen Team, Qwen3.5: Towards native multimodal agents.” 2026, [Online]. Available: https://qwen.ai/blog?id=qwen3.5.
[10]
A. Singh et al., “OpenAI GPT-5 system card,” arXiv preprint arXiv:2601.03267, 2026.
[11]
Y. Wang, L. Yang, Y. Tian, K. Shen, and M. Wang, “Co-evolving LLM coder and unit tester via reinforcement learning,” in Proceedings of NIPS, 2025, pp. 143630–143664.
[12]
A. Zhao et al., “Absolute zero: Reinforced self-play reasoning with zero data,” in Proceedings of NIPS, 2025, pp. 105816–105879.
[13]
Z. Yang et al., “SPELL: Self-play reinforcement learning for evolving long-context language models,” arXiv preprint arXiv:2509.23863, 2026.
[14]
T. Hartvigsen, S. Gabriel, H. Palangi, M. Sap, D. Ray, and E. Kamar, ToxiGen: A large-scale machine-generated dataset for adversarial and implicit hate speech detection,” in Proceedings of ACL, 2022, pp. 3309–3326.
[15]
Z. Zhang et al., SafetyBench: Evaluating the safety of large language models,” in Proceedings of ACL, 2024, pp. 15537–15553.
[16]
M. Mazeika et al., “HarmBench: A standardized evaluation framework for automated red teaming and robust refusal,” in Proceedings of ICML, 2024, pp. 35181–35224.
[17]
S. Han et al., “WILDGUARD: Open one-stop moderation tools for safety risks, jailbreaks, and refusals of LLMs,” in Proceedings of NIPS, 2024, pp. 8093–8131.
[18]
Z. Hui, Y. R. Dong, E. Shareghi, and N. Collier, “TRIDENT: Benchmarking LLM safety in finance, medicine, and law,” arXiv preprint arXiv:2507.21134, 2025.
[19]
J. Ding et al., “Beyond knowledge to agency: Evaluating expertise, autonomy, and integrity in finance with CNFinBench,” arXiv preprint arXiv:2512.09506, 2026.
[20]
S. Wu et al., “BloombergGPT: A large language model for finance,” arXiv preprint arXiv:2303.17564, 2023.
[21]
H. Yang, X.-Y. Liu, and C. D. Wang, “FinGPT: Open-source financial large language models,” arXiv preprint arXiv:2306.06031, 2023.
[22]
Z. Ke, Y. Ming, X.-P. Nguyen, C. Xiong, and S. Joty, “Demystifying domain-adaptive post-training for financial LLMs,” in Proceedings of EMNLP, 2025, pp. 31033–31059.
[23]
Y. Yu et al., “FinMem: A performance-enhanced LLM trading agent with layered memory and character design,” arXiv preprint arXiv:2311.13743, 2023.
[24]
W. Zhang et al., “A multimodal foundation agent for financial trading: Tool-augmented, diversified, and generalist,” arXiv preprint arXiv:2402.18485, 2024.
[25]
H. Inan et al., “Llama guard: LLM-based input-output safeguard for human-AI conversations,” arXiv preprint arXiv:2312.06674, 2023.
[26]
U. Zaratiana, M. Newhauser, G. Hurn-Maloney, and A. Lewis, “GLiGuard: Schema-conditioned classification for LLM safeguard,” arXiv preprint arXiv:2605.07982, 2026.
[27]
Y. Liu et al., “GuardReasoner: Towards reasoning-based LLM safeguards,” arXiv preprint arXiv:2501.18492, 2025.
[28]
Y. Zhang et al., “Qwen3 embedding: Advancing text embedding and reranking through foundation models,” arXiv preprint arXiv:2506.05176, 2025.
[29]
R. J. G. B. Campello, D. Moulavi, and J. Sander, “Density-based clustering based on hierarchical density estimates,” in Advances in knowledge discovery and data mining, 2013, pp. 160–172.
[30]
Y. Zeng, H. Lin, J. Zhang, D. Yang, R. Jia, and W. Shi, “How johnny can persuade LLMs to jailbreak them: Rethinking persuasion to challenge AI safety by humanizing LLMs,” in Proceedings of ACL, 2024, pp. 14322–14350.
[31]
X. Shen, Z. Chen, M. Backes, Y. Shen, and Y. Zhang, “"Do anything now": Characterizing and evaluating in-the-wild jailbreak prompts on large language models,” in Proceedings of CCS, 2024, pp. 1671–1685.
[32]
Y. Zhang et al., “Kimi linear: An expressive, efficient attention architecture,” arXiv preprint arXiv:2510.26692, 2025.
[33]
Qwen et al., “Qwen2.5 technical report,” arXiv preprint arXiv:2412.15115, 2025.
[34]
OpenAI, “Gpt-oss-120b & gpt-oss-20b model card,” arXiv preprint arXiv:2508.10925, 2025.
[35]
Q. Team, “QwQ-32B: Embracing the power of reinforcement learning.” 2025, [Online]. Available: https://qwenlm.github.io/blog/qwq-32b/.
[36]
DeepSeek-AI, “DeepSeek-R1: Incentivizing reasoning capability in LLMs via reinforcement learning,” arXiv preprint arXiv:2501.12948, 2025.
[37]
G. Salton, A. Wong, and C. S. Yang, “A vector space model for automatic indexing,” Commun. ACM, vol. 18, no. 11, pp. 613–620, Nov. 1975.
[38]
Z. Shao et al., “DeepSeekMath: Pushing the limits of mathematical reasoning in open language models,” arXiv preprint arXiv:2402.03300, 2024.
[39]
Q. Team, “Qwen3 technical report,” arXiv preprint arXiv:2505.09388, 2025.
[40]
E. J. Hu et al., “LoRA: Low-rank adaptation of large language models,” in Proceedings of ICLR, 2022.
[41]
R. B. Joshi et al., CultureGuard: Towards culturally-aware dataset and guard model for multilingual safety applications,” in Proceedings of IJCNLP, 2025, pp. 2666–2685.
[42]
H. Zhao et al., “Qwen3Guard technical report,” arXiv preprint arXiv:2510.14276, 2025.
[43]
J. Fang et al., “NExT-guard: Training-free streaming safeguard without token-level labels,” arXiv preprint arXiv:2603.02219, 2026.
[44]
Z. Lin et al., “ToxicChat: Unveiling hidden challenges of toxicity detection in real-world user-AI conversation,” arXiv preprint arXiv:2310.17389, 2023.
[45]
B. Vidgen et al., “SimpleSafetyTests: A test suite for identifying critical safety risks in large language models,” arXiv preprint arXiv:2311.08370, 2024.
[46]
P. Röttger, H. Kirk, B. Vidgen, G. Attanasio, F. Bianchi, and D. Hovy, XSTest: A test suite for identifying exaggerated safety behaviours in large language models,” in Proceedings of NAACL:HLT, 2024, pp. 5377–5400.
[47]
J. Ji et al., “Beavertails: Towards improved safety alignment of llm via a human-preference dataset,” in Proceedings of NIPS, 2024, pp. 24678–24704.
[48]
Y. Zheng, R. Zhang, J. Zhang, Y. Ye, and Z. Luo, LlamaFactory: Unified efficient fine-tuning of 100+ language models,” in Proceedings of ACL: System demonstrations, 2024, pp. 400–410.
[49]
G. Sheng et al., “HybridFlow: A flexible and efficient RLHF framework,” in Proceedings of EuroSys, 2025, pp. 1279–1297.

  1. Corresponding Author↩︎

  2. Abliterated checkpoints in this work are obtained from https://huggingface.co/huihui-ai.↩︎

  3. Qwen3Guard-Gen-8B is evaluated under both strict and loose settings, which differ in how controversial content is classified.↩︎