ChatPaper.aiChatPaper

Paper2Code: 機械学習分野の科学論文からのコード生成の自動化

Paper2Code: Automating Code Generation from Scientific Papers in Machine Learning

April 24, 2025
著者: Minju Seo, Jinheon Baek, Seongyun Lee, Sung Ju Hwang
cs.AI

要旨

機械学習研究の急速な進展にもかかわらず、対応するコード実装が利用できないことが多く、研究者が結果を再現し、先行研究を基に構築するには時間と労力がかかります。一方で、最近の大規模言語モデル(LLM)は科学文書の理解と高品質なコード生成に優れています。これに着想を得て、我々は機械学習論文を機能的なコードリポジトリに変換するマルチエージェントLLMフレームワークであるPaperCoderを紹介します。PaperCoderは3つの段階で動作します:計画段階では、高レベルのロードマップを構築し、システムアーキテクチャを図示して設計し、ファイル依存関係を特定し、設定ファイルを生成します。分析段階では、実装固有の詳細を解釈することに焦点を当てます。生成段階では、モジュール化され、依存関係を考慮したコードが生成されます。さらに、各段階はパイプライン全体で効果的に協力するように設計された専門エージェントのセットによって実現されます。次に、PaperCoderを機械学習論文からコード実装を生成するタスクで評価します。モデルベースの評価と、特に元論文の著者による人間評価を行い、著者がリリースしたリポジトリを利用可能な場合にはそれをグラウンドトゥルースとして使用します。我々の結果は、PaperCoderが高品質で忠実な実装を作成する上で有効であることを示しています。さらに、最近リリースされたPaperBenchベンチマークにおいても一貫して強みを示し、強力なベースラインを大幅に上回る性能を発揮しています。
English
Despite the rapid growth of machine learning research, corresponding code implementations are often unavailable, making it slow and labor-intensive for researchers to reproduce results and build upon prior work. In the meantime, recent Large Language Models (LLMs) excel at understanding scientific documents and generating high-quality code. Inspired by this, we introduce PaperCoder, a multi-agent LLM framework that transforms machine learning papers into functional code repositories. PaperCoder operates in three stages: planning, where it constructs a high-level roadmap, designs the system architecture with diagrams, identifies file dependencies, and generates configuration files; analysis, which focuses on interpreting implementation-specific details; and generation, where modular, dependency-aware code is produced. Moreover, each phase is instantiated through a set of specialized agents designed to collaborate effectively across the pipeline. We then evaluate PaperCoder on generating code implementations from machine learning papers based on both model-based and human evaluations, specifically from the original paper authors, with author-released repositories as ground truth if available. Our results demonstrate the effectiveness of PaperCoder in creating high-quality, faithful implementations. Furthermore, it consistently shows strengths in the recently released PaperBench benchmark, surpassing strong baselines by substantial margins.

Summary

AI-Generated Summary

PDF956April 25, 2025