FormaFin: Verifiable Financial Analysis with Solver-Guided Reinforcement Learning
Abstract
Formally verifying financial analyses generated by large language models (LLMs) remains challenging as financial rules are largely expressed in natural language and rarely have corresponding formal specifications. Training language models to formalize these rules is hindered by the scarcity of labeled data and reliable training signals, while confidential financial data favor small models that run locally. We introduce FormaFin, a framework that trains small open language models to translate financial rules into reusable SMT formulas. FormaFin integrates teacher distillation with reinforcement learning using an SMT solver to compute rewards from numerical thresholds stated in financial rules. We evaluate FormaFin on corporate loan monitoring, in which lenders check borrowers' financial figures against loan agreements. To evaluate our framework, we curate , a benchmark containing 143 loan agreements and 2,527 questions covering compliance, earnings cushion, and debt capacity. Our results show that a 7B formalizer achieves 94.8\% accuracy, outperforming open LLMs up to ten times larger. Across three model families, accuracy ranges from 92.6 to 96.8\%. Our framework also detects 95.6 to 99.7\% of errors in other LLMs' financial analyses. We make FormaFin and publicly available.
Create a lesson
Related papers
STRIDE: Strategy-to-Tactics Retrieval-Guided Skill Disclosure and Evolution for Agentic Reinforcement Learning
Shared title terminology · Shixin Hong, Wanqing Cui, Yibo Hu et al.
SLICR: Strategy Logic-Guided Multi-Agent Reinforcement Learning
Shared title terminology · Arshia Rafieioskouie, Matthew Lucas, Tzu-Han Hsu et al.
VeriLadder: A Multi-Agent Specification Refinement System for Tool-Verified Verilog Datasets
Shared title terminology · Saeid Rajabi, Chengmo Yang, Satwik Patnaik
Beyond Unit Tests: Path-Aware Rubric-Guided LLM Autograding of Notebooks
Shared title terminology · Salman Hajizada, Mohammed Yusuf Ansari, Gianni Di Caro
SMAD: A Semantics-Guided Multi-Agent Framework for Unsupervised Time-Series Anomaly Detection
Shared title terminology · Qinghua Liu, Junpeng Wang, Mingzhi Hu et al.
GERF: A Token-Efficient Multimodal Retrieval Framework for Schema-Guided Scientific Information Extraction
Shared title terminology · Yiyu Qian, Xing Wu