Research2Runtime is a full-stack application that automates the process of converting research papers into executable code. It extracts key information from uploaded PDF papers, generates PyTorch code to reproduce the described models, executes the code in a sandboxed environment, and verifies the authenticity of the paper based on training loss analysis.

- PDF text extraction from research papers
- AI-powered summarization of model architectures and training parameters
- Automatic PyTorch code generation
- Sandboxed code execution using Docker
- Authenticity verification through loss decrease analysis
- RESTful API backend with FastAPI
- React-based frontend for easy paper upload and result visualization
- FastAPI (web framework)
- Groq API (AI models for text processing)
- PyMuPDF (PDF text extraction)
- Docker (sandboxed code execution)
- PyTorch (machine learning framework)
- React (user interface)
- Vite (build tool and development server)
- Python 3.8+
- Node.js 16+
- Docker
- Groq API key
-
Navigate to the backend directory:
cd backend -
Install Python dependencies:
pip install -r requirements.txt -
Create a
.envfile in the backend directory and add your Groq API key:GROQ_API_KEY=your_api_key_here -
Ensure Docker is running on your system.
-
Navigate to the frontend directory:
cd frontend -
Install Node.js dependencies:
npm install
-
Start the backend server:
cd backend python app.pyThe backend will run on http://localhost:8000
-
Start the frontend development server:
cd frontend npm run devThe frontend will run on http://localhost:5173
-
Open your browser and navigate to the frontend URL to upload research papers.
The backend provides a single endpoint for processing papers:
POST /process-paper: Upload a PDF file to process- Request: Multipart form data with a file field named "file"
- Response: JSON containing processing results, including extracted summary, generated code, execution logs, and authenticity verdict
Research2Runtime/
├── backend/
│ ├── app.py # Main FastAPI application
│ ├── agent.py # AI agents for research, coding, and verification
│ ├── sandbox.py # Docker-based code execution
│ ├── requirements.txt # Python dependencies
│ └── temp_code/ # Temporary directory for generated code
├── frontend/
│ ├── src/ # React source code
│ ├── package.json # Node.js dependencies
│ └── vite.config.js # Vite configuration
└── README.md # This file
-
Text Extraction: Extracts text from specific pages of the uploaded PDF (typically pages 3, 4, and 7 for ResNet-style papers).
-
Research Agent: Uses AI to summarize the model architecture and training parameters from the extracted text.
-
Coder Agent: Generates PyTorch code based on the summary, following specific rules for reproducibility.
-
Sandbox Execution: Runs the generated code in a Docker container with PyTorch environment, capturing execution logs.
-
Verification Agent: Analyzes the logs to determine if the training loss decreases, providing an authenticity verdict.
-
Hybrid Logic: Combines AI verdict with loss analysis for final authenticity determination.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request