arXiv:2507.20930cs.CLcs.AI2025-07被引 6

用金融领域错误分类法提升大模型幻觉检测与修正能力

FRED: Financial Retrieval-Enhanced Detection and Editing of Hallucinations in Language Models

  • 基于金融问答数据构造带标签的错误数据集,微调模型识别幻觉
  • 微调后的Phi-4比OpenAI-o3提升8%二分类F1,检测性能增30%
  • 小模型Phi-4-mini仅40亿参数,性能接近大模型,适合部署

大语言模型的幻觉问题在金融等高风险领域尤为突出。本文提出一种基于领域错误分类体系的幻觉检测与编辑方法,通过在金融问答语料中插入带标签的错误,构建合成数据集,并对Phi-4、Phi-4-mini、Qwen3-4B和Qwen3-14B四个模型进行微调。最佳模型Phi-4相比OpenAI-o3在二分类F1上提升8%,整体检测性能提高30%。即使参数量仅40亿的Phi-4-mini,其二分类检测性能仅比OpenAI-o3低2%,整体检测仅降0.1%,表现出良好竞争力。该方法为金融文本生成中的事实一致性提供了实用解决方案,并可推广至其他领域。代码与数据已开源。

原文摘要 · Abstract (English)

Hallucinations in large language models pose a critical challenge for applications requiring factual reliability, particularly in high-stakes domains such as finance. This work presents an effective approach for detecting and editing factually incorrect content in model-generated responses based on the provided context. Given a user-defined domain-specific error taxonomy, we construct a synthetic dataset by inserting tagged errors into financial question-answering corpora and then fine-tune four language models, Phi-4, Phi-4-mini, Qwen3-4B, and Qwen3-14B, to detect and edit these factual inaccuracies. Our best-performing model, fine-tuned Phi-4, achieves an 8% improvement in binary F1 score and a 30% gain in overall detection performance compared to OpenAI-o3. Notably, our fine-tuned Phi-4-mini model, despite having only 4 billion parameters, maintains competitive performance with just a 2% drop in binary detection and a 0.1% decline in overall detection compared to OpenAI-o3. Our work provides a practical solution for detecting and editing factual inconsistencies in financial text generation while introducing a generalizable framework that can enhance the trustworthiness and alignment of large language models across diverse applications beyond finance. Our code and data are available at https://github.com/pegasi-ai/shield.

幻觉检测金融AI模型微调

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。