Paper2Code, also known as PaperCoder, is a multi-agent Large Language Model (LLM) framework designed to automate the generation of functional code repositories from machine learning scientific papers. This innovative tool addresses the common issue where code implementations for research papers are often unavailable, making it challenging for researchers to reproduce results and build upon existing work.
PaperCoder operates in three distinct stages:
Each stage is handled by specialized agents that collaborate effectively across the pipeline, ensuring high-quality and faithful code implementations.
PaperCoder has been rigorously evaluated using both model-based and human evaluations, including feedback from the original paper authors. It has demonstrated significant strengths in the PaperBench benchmark, outperforming strong baselines by substantial margins. The tool is particularly effective in generating high-quality code that closely aligns with the original research.
To use Paper2Code, follow these steps:
pip install openai
git clone https://github.com/going-doer/Paper2Code.git
cd scripts && bash run.sh
For detailed setup instructions, including converting PDFs to JSON format, refer to the GitHub repository.