Datasets:
The dataset viewer is not available for this dataset.
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Fraud Detection & Financial Crime Intelligence — Conversational SFT Dataset
A conversational (ChatML) supervised fine-tuning dataset for training an LLM (built and tuned for Qwen3-14B) to act as an enterprise fraud-detection and financial-crime investigation assistant. Every example teaches the model to deliver real-time risk scoring, explainable alerts, and recommended next actions with human-in-the-loop (HITL) oversight — across both card fraud and anti-money-laundering (AML).
Trained model: naazimsnh02/fraudsentinel-qwen3-14b-lora · naazimsnh02/fraudsentinel-qwen3-14b-merged
Capabilities the model learns
- Real-time risk scoring — a calibrated score (0–100 / 0.0–1.0) with a
LOW / MEDIUM / HIGH / CRITICALband. - Explainable alerts — specific, evidence-grounded red flags drawn from the actual transaction, not generic boilerplate.
- Typology classification — names the most likely fraud / laundering pattern (primary + secondary).
- Recommended next action — a concrete decision on a 6-level investigator taxonomy.
- SAR support — flags when a Suspicious Activity Report is warranted, with a one-line rationale.
- Human-in-the-loop dialogue — multi-turn investigator follow-ups ("Why this risk level?", "What else should I check?").
Two complementary answer styles
Both styles are grounded in the same real, engineered features.
1. Structured JSON (task = structured)
Dashboard- and pipeline-ready output:
{
"risk_score": 0.84,
"risk_level": "HIGH",
"conclusion": "FRAUDULENT",
"primary_typology": "card-not-present account takeover / stolen-card online cash-out",
"secondary_typology": "account_takeover",
"key_signals": ["amount_exceeds_category_p95", "high_risk_merchant_category", "unusual_hour_activity"],
"explanation": "Transaction amount $828.62 exceeds the 95th-percentile ($383.21) for 'misc_net' purchases; ...",
"feature_importance": {"amount_exceeds_category_p95": 0.46, "high_risk_merchant_category": 0.28, "unusual_hour_activity": 0.26},
"recommended_action": "AUTO_BLOCK",
"sar_required": false,
"sar_rationale": null
}
2. Analyst prose (task = explain | score | recommend | multiturn)
Investigator-facing narrative with risk score, red flags, typology, and recommended action — plus multi-turn HITL follow-ups ("Why this risk level?", "What else should I check?", "Customer confirmed legit — now what?").
6-level investigator action taxonomy (HITL)
AUTO_APPROVE → APPROVE_WITH_MONITORING → STEP_UP_AUTH → TEMPORARY_HOLD → AUTO_BLOCK → SAR_REVIEW
Data Provenance — Grounded Label Generation (No Hallucinated Labels)
The dataset is synthesized from two public, verified tabular sources using label-grounded generation: the assistant's conclusion is always derived from the ground-truth label, and every red flag is computed from engineered features of the actual transaction. No teacher LLM is used, so there are no hallucinated labels and no label leakage — the model learns to interpret raw transaction fields, not echo injected tags.
| Domain | Source dataset | Real label used | Coverage |
|---|---|---|---|
| Card fraud (card-not-present) | pointe77/credit-card-transaction (Sparkov, 1.3M tx) |
is_fraud |
risk scoring, alerts, takeover / card-testing typologies |
| Money laundering | eexzzm/IBM-Transactions-for-Anti-Money-Laundering-HI-Small-Trans (IBM AML, 5M tx) |
Is Laundering |
AML typologies, SAR-oriented actions |
Engineered signals → tagged red flags
Card transactions
- Amount vs. per-category 95th-percentile
- High-risk merchant channel (shopping_net / misc_net / grocery_pos)
- Off-hours / unusual-hour timing
- Cardholder → merchant geo distance (haversine)
- 24-hour velocity (transaction count + spend, time-since-last)
- Large absolute ticket size
AML inter-bank transfers
- Fan-out / fan-in / gather-scatter (account out-/in-degree)
- Self-loops / round-tripping
- Round-number amounts
- Cross-currency conversion
- ACH channel over-representation
- Rapid pass-through (mule) movement
feature_importance is real, not LLM-guessed
Each detection rule carries a fixed weight. The emitted importances are the normalized weights of the rules that actually fired for that transaction (they sum to 1.0). Fully deterministic and auditable.
False-positive control built into the labels
Legitimate cases deliberately suppress strong structural tags (a high-degree account can be a legitimate business; a large purchase can be legitimate spend). This keeps the score, conclusion, and action coherent and teaches the model not to over-flag — directly supporting false-positive reduction.
Composition
- 11,816 conversations (≈ 6,000 card + ≈ 6,000 AML)
- Class balance: ~44% fraud/suspicious, ~56% legitimate. Real fraud is <1%, so the set is deliberately balanced; negatives include hard negatives (high-amount or high-risk-category legitimate activity) so the model learns to say "Not suspicious."
- Task mix:
structured(3.4K) ·3.4K) ·explain(recommend(1.7K) ·1.7K) ·multiturn(score(~1.6K) - Splits:
train(11,016 examples) andtest(800 examples)
Columns
| Column | Description |
|---|---|
messages |
ChatML conversation (system / user / assistant) |
source |
cc (card) or aml (money laundering) |
label |
Ground truth: 0 legitimate, 1 fraud/suspicious |
task |
structured / explain / score / recommend / multiturn |
Evaluation note: the included
testsplit is balanced for convenient evaluation. For a realistic production estimate, re-sample a held-out set at the natural class imbalance (<1% fraud) and report precision / recall, not accuracy.
Fine-Tuning Recipe (Qwen3-14B — Validated)
This is the exact configuration used to train naazimsnh02/fraudsentinel-qwen3-14b-lora, verified on AMD MI300X with Unsloth 2026.6.1:
from unsloth import FastLanguageModel
from trl import SFTTrainer, SFTConfig
from datasets import load_dataset
import torch
# Load base model with LoRA
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "unsloth/Qwen3-14B",
max_seq_length = 4096,
dtype = torch.bfloat16,
load_in_4bit = False,
)
model = FastLanguageModel.get_peft_model(
model,
r = 16,
target_modules = ["q_proj", "k_proj", "v_proj", "o_proj",
"gate_proj", "up_proj", "down_proj"],
lora_alpha = 32,
lora_dropout = 0,
bias = "none",
use_gradient_checkpointing = "unsloth",
random_state = 3407,
)
# Load and format dataset
ds = load_dataset("naazimsnh02/fraud-financial-crime-qwen3-sft-v2")
def apply_template(example):
text = tokenizer.apply_chat_template(
example["messages"],
tokenize=False,
add_generation_prompt=False,
enable_thinking=False, # thinking OFF during SFT
)
return {"text": text}
ds = ds.map(apply_template)
# Train
trainer = SFTTrainer(
model = model,
tokenizer = tokenizer,
train_dataset = ds["train"],
args = SFTConfig(
output_dir = "./fraudsentinel_checkpoints",
save_strategy = "steps",
save_steps = 100,
save_total_limit = 5,
dataset_text_field = "text",
max_seq_length = 4096,
packing = False,
per_device_train_batch_size = 2,
gradient_accumulation_steps = 8, # effective batch = 16
num_train_epochs = 2,
warmup_ratio = 0.05,
learning_rate = 1e-4,
lr_scheduler_type = "cosine",
bf16 = True,
optim = "adamw_8bit",
padding_free = True,
weight_decay = 0.001,
logging_steps = 10,
seed = 3407,
dataloader_num_workers = 4,
),
)
trainer.train()
Actual training results (AMD MI300X, 192 GB VRAM):
| Metric | Value |
|---|---|
| Total steps | 1,378 |
| Train loss | 0.2467 |
| Training time | 70.5 min (4,230 s) |
| Peak VRAM | 39.8 GB (20.8% of 192 GB) |
| LoRA VRAM overhead | 12.0 GB (6.3% of max) |
Intended Use & Limitations
- Prototype / research use. Source data is synthetic / semi-synthetic; the typologies and scoring heuristics are illustrative, not a production-validated risk model.
- Do not deploy for real customer adjudication without independent validation, bias review, and a human-in-the-loop control layer.
- Names, accounts, and card numbers originate from the synthetic source datasets; card numbers are masked to last-4.
- Feature importance values are deterministic heuristics from the data generation pipeline, not SHAP or model-derived explanations.
Citation
Source datasets: Sparkov (credit-card transaction generator) and IBM Transactions for Anti-Money-Laundering (Altman et al., NeurIPS 2023, arXiv:2306.16424). Method inspired by arXiv:2507.14785 (LLMs for AML graphs) and arXiv:2506.11635 (LLM-based credit-card fraud investigation).
- Downloads last month
- 81