V-FiLLM
收藏资源简介:
V-FiLLM是由苏黎世联邦理工学院构建的金融推理基准框架,旨在评估大语言模型在结构化表格数据上的组合推理能力。该数据集基于合成财务报表,涵盖15家合成公司2020至2025年的财务数据,通过可执行计算树生成问题,支持控制推理深度(0至2层)、表达式宽度、金融概念复杂度及上下文大小等难度轴。数据集创建过程采用确定性流水线:从合成数据构建带语义元数据的原子,采样类型化二值表达式树,并渲染为自然语言问题,同时自动验证答案。该基准旨在解决金融表格推理中领域知识与组合算术的挑战,提供可扩展、无标注成本的评估工具,并揭示模型在深层推理及对抗性扰动下的脆弱性。
V-FiLLM is a financial reasoning benchmark framework developed by ETH Zurich, designed to evaluate the compositional reasoning capabilities of large language models (LLMs) on structured tabular data. This dataset is built on synthetic financial statements, covering financial data of 15 synthetic companies spanning from 2020 to 2025. Questions are generated via executable computation trees, and the framework supports controlling multiple difficulty dimensions including reasoning depth (0 to 2 layers), expression width, financial concept complexity, and context size. The dataset creation follows a deterministic pipeline: constructing atomic units with semantic metadata from synthetic data, sampling typed binary expression trees, rendering them into natural language questions, and automatically validating the corresponding answers. This benchmark aims to address the challenges of domain knowledge and compositional arithmetic in financial tabular reasoning, providing a scalable, annotation-free evaluation tool, and uncovering the vulnerabilities of models under deep reasoning and adversarial perturbations.
项目概述
这是一个关于金融推理中LLM基准测试的研究项目,专注于评估语言模型在组合性金融推理任务上的表现。项目通过生成合成金融电子表格、采样表达式树并绑定生成多步骤问答对,在多种对抗条件下(数据损坏、棘手措辞、提示注入)评估语言模型的性能。
核心流程
项目采用两阶段数据生成 + 基准评估的工作流:
- 数据生成阶段:首先构建底层金融电子表格数据及其"数据障碍"变体(基线干净数据、放大数字、额外乘数、提示注入),然后从这些数据中采样表达式树,生成带已知标准答案的英文问题(可应用"查询障碍"改变措辞)。
- 评估阶段:将生成的数据集交给LLM(本地模型或API模型),在容差范围内将答案与数值标准答案进行评分比较。还支持对抗性评估、LoRA微调以及多轮问题分解。
项目结构
script/compiler_pipeline_adversarial/— 当前活跃的流水线,负责合成数据生成、表达式树采样、问题渲染及障碍应用script/benchmark/— LLM评估模块(本地模型、API模型、对抗性评估),包含结果比较与可视化工具script/lora/— LoRA微调模块,支持监督微调和思维链变体script/Multi-turn/— 将复合问题分解为多轮子问题链output/— 存放生成的数据集与评估结果,包含10q/、90q/两种数据集风格,dataset_output/为最终合并数据集,output_llm/存放原始评估结果parser/— 独立的CSV/PDF与JSON转换工具,用于手动检查或重新格式化数据集temp/— 已废弃的历史流水线版本,仅供参考
数据集特点
生成的数据集包含两个"风格"变体:
10q/— 季度报告风格的小型问答数据集90q/— 固定的90题基准数据集(混合操作符和深度)
项目设计了两个独立的对抗轴:
- 数据障碍:包括放大数字、额外乘数、提示注入(单元格值中嵌入对抗性指令)
- 查询障碍:包括单位缩放变化、无用信息、条件表述、否定表述
快速开始
数据生成
bash cd script/compiler_pipeline_adversarial python data_obstacles.py # 生成各数据障碍变体 python query_obstacles.py # 生成各查询障碍变体及单元格级损坏
LLM评估
bash python script/benchmark/run_llm_eval.py --models Qwen3.5-4B Qwen3.5-9B --datasets 10q 90q mt --tol 0.1 python script/benchmark/run_llm_eval_api_call.py --limit 10 # API模型 python script/benchmark/run_llm_eval_api_call_adversarial.py --datasets baseline prompt_injection # 对抗性评估
LoRA微调
bash python script/lora/lora2.py --limit 200 --epochs 3 python script/lora/lora2_cot.py --limit 200 --epochs 3 --gen-tokens 512 --tol 0.01
技术依赖
主要依赖包括:torch、transformers、peft/trl(LoRA微调)、anthropic/openai(API评估)、pandas/numpy/scipy、pdfplumber/reportlab(PDF解析)、matplotlib/plotly(可视化)。
- 1V-FiLLM: Verified Financial LLM Reasoning Benchmark苏黎世联邦理工学院; Aisot Technologies Ltd · 2026年




