TopBench
收藏TopBench 数据集详情
概述
TopBench 是一个用于表格问答中隐式预测与推理的基准数据集,旨在评估语言模型能否理解隐式预测意图并解决相应的表格问答任务。该数据集托管于 Hugging Face:LAMDA-Tabular/TopBench。
任务类别
TopBench 包含四个任务族:
| 任务 | 描述 |
|---|---|
single_point_prediction |
预测一个缺失值或类别。 |
decision_making |
在多个候选预测场景中选择最佳选项。 |
treatment_effect_analysis |
估计干预后的效果或趋势。 |
ranking_and_filtering |
生成结构化的 CSV 排序或过滤结果。 |
历史名称映射:
B1→single_point_predictionB2→decision_makingB3→treatment_effect_analysisB4→ranking_and_filtering
数据集结构
下载数据集后,目录布局如下:
data/ single_point_prediction/ decision_making/ treatment_effect_analysis/ ranking_and_filtering/
使用方式
安装
bash conda create -n topbench python=3.10 -y conda activate topbench python -m pip install -U pip python -m pip install -e .
完整基线依赖:
bash python -m pip install -r requirements/full.txt
数据准备
下载数据集:
bash python scripts/download_dataset.py --local-dir data
验证数据集布局:
bash python scripts/validate_dataset.py --data-root data
推理
支持两种模式:
text_reasoning(无工具)agentic_workflow(有工具,需 Docker 沙箱)
示例:
bash python scripts/run_legacy_inference.py --data-root data --output-root outputs --model deepseek --tasks single_point_prediction decision_making treatment_effect_analysis ranking_and_filtering --modes text_reasoning agentic_workflow --max-files 1 --workers 1
输出路径:
outputs/<model>/<legacy_mode>/<legacy_task>/
评估
使用兼容性评估器:
bash python scripts/reproduce_paper_scores.py --data-root data --inference-root outputs --task decision_making --model deepseek --mode text_reasoning
Predict-Only 基线
不使用 LLM,直接使用结构化数据,集成多种表格预测器(HistGradientBoosting、ExtraTrees、XGBoost、LightGBM、CatBoost、TabPFN 等)。
运行测试:
bash python scripts/run_predict_only_baseline.py --task single_point_prediction --data-root data --output-root outputs --mode predict_only --fast-smoke
仓库结构
TopBench/ data/ # 数据集占位目录 docker/ # 沙箱 Dockerfile scripts/ # 推理、评估和基线入口 src/topbench/ # 包源代码 requirements/ # 依赖文件
许可证
MIT 许可证




