arXiv:2508.13382cs.CLcs.AI2025-08

Datarus-R1让大模型像研究生一样自动分析数据,还能自我纠错。

Datarus-R1: An Adaptive Multi-Step Reasoning LLM for Automated Data Analysis

  • 用完整分析流程训练,包含推理、代码执行和修正步骤。
  • 在数学与编程题上准确率比同类模型高30%,输出少49% token。
  • 支持工具调用和简洁思考两种模式,适合复杂问题求解。

我们提出 Datarus-R1-14B,一个基于 Qwen 2.5-14B-Instruct 微调的 140 亿参数开源语言模型,可作为虚拟数据分析师和研究生级问题求解者。Datarus 不是基于孤立问答对训练,而是基于包含推理步骤、代码执行、错误追踪、自我修正和最终结论的完整分析轨迹,以 ReAct 风格笔记本格式覆盖金融、医学、数值分析等量化领域。训练管道包括:(i) 生成 144,000 个带标签笔记本片段的轨迹中心合成数据生成器;(ii) 结合轻量标签结构信号与分层奖励模型(HRM)的双奖励框架,评估单步合理性和整体连贯性;(iii) 采用内存优化的组相对策略优化(GRPO),支持 KV-cache 复用、顺序生成和参考模型分片。余弦课程平滑调整重点,从结构保真度转向语义深度,缓解格式崩溃与冗余问题。核心设计为双推理接口:在代理模式下生成带 ReAct 标签的步骤并调用 Python 工具执行真实代码;在反思模式下输出以 <think> 和 <answer> 分隔的紧凑思维链。在高难度研究生级问题上,Datarus 展现出“顿悟”模式:先提出假设,修订一两次后收敛,避免循环冗余。在标准公开基准测试中,其表现超越同规模模型,甚至接近更大模型如 QwQ-32B,AIME 2024/2025 上准确率提升达 30%,在 LiveCodeBench 上也更优,且每解题输出减少 18%-49% 的 token。

原文摘要 · Abstract (English)

We present Datarus-R1-14B, a 14 B-parameter open-weights language model fine-tuned from Qwen 2.5-14B-Instruct to act as a virtual data analyst and graduate-level problem solver. Datarus is trained not on isolated question-answer pairs but on full analytical trajectories including reasoning steps, code execution, error traces, self-corrections, and final conclusions, all captured in a ReAct-style notebook format spanning finance, medicine, numerical analysis, and other quantitative domains. Our training pipeline combines (i) a trajectory-centric synthetic data generator that yielded 144 000 tagged notebook episodes, (ii) a dual-reward framework blending a lightweight tag-based structural signal with a Hierarchical Reward Model (HRM) that scores both single-step soundness and end-to-end coherence, and (iii) a memory-optimized implementation of Group Relative Policy Optimization (GRPO) featuring KV-cache reuse, sequential generation, and reference-model sharding. A cosine curriculum smoothly shifts emphasis from structural fidelity to semantic depth, reducing the format collapse and verbosity that often plague RL-aligned LLMs. A central design choice in Datarus is it dual reasoning interface. In agentic mode the model produces ReAct-tagged steps that invoke Python tools to execute real code; in reflection mode it outputs compact Chain-of-Thought (CoT) traces delimited by <think> and <answer> tags. On demanding postgraduate-level problems, Datarus exhibits an "AHA-moment" pattern: it sketches hypotheses, revises them once or twice, and converges avoiding the circular, token-inflating loops common to contemporary systems. Across standard public benchmarks Datarus surpasses similar size models and even reaches the level of larger reasoning models such as QwQ-32B achieving up to 30% higher accuracy on AIME 2024/2025 and LiveCodeBench while emitting 18-49% fewer tokens per solution.

大模型自动分析推理增强

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