A comprehensive template and toolkit for reproducing research papers, running experiments, and extending methodologies with ablation studies.
This repository provides a structured approach to:
- Reproduce original paper experiments with exact hyperparameters
- Validate results across different random seeds
- Extend research with custom ablations and modifications
- Track experiments with organized configs and reproducibility checklists
- Automate testing with CI/CD smoke tests
- β Minimal working baseline (PyTorch, CIFAR-10)
- β YAML configuration system for easy hyperparameter management
- β Reproducibility checklist and documentation
- β Automated CI smoke tests via GitHub Actions
- β Scripts for data download and training execution
- β Modular code structure for easy customization
- Python 3.8+
- pip or conda
- Git
# Clone and setup environment
git clone https://github.com/ChethanNazre/Paper-Repro.git
cd Paper-Repro
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run smoke test (downloads CIFAR-10 automatically)
bash scripts/run_smoke.shThis smoke test validates that:
- Dependencies are correctly installed
- Data download pipeline works
- Training loop executes without errors
- Model produces predictions
-
Review the baseline config:
cat configs/baseline.yaml
-
Update hyperparameters in
configs/baseline.yamlto match the paper's specifications -
Run training:
python src/train.py --config configs/baseline.yaml --seed 123
-
Run multiple seeds for statistical significance:
for seed in 42 123 456 789 1000; do python src/train.py --config configs/baseline.yaml --seed $seed done
Create new configs for ablation studies:
# Copy and modify baseline
cp configs/baseline.yaml configs/ablation_no_dropout.yaml
# Edit as needed
nano configs/ablation_no_dropout.yaml
# Train with custom config
python src/train.py --config configs/ablation_no_dropout.yaml --seed 42Paper-Repro/
βββ configs/ # Experiment configurations
β βββ baseline.yaml # Original paper hyperparameters
β βββ ablations/ # Custom ablation configs
βββ src/ # Core training and evaluation code
β βββ train.py # Main training script
β βββ model.py # Model architecture
β βββ data.py # Data loading and preprocessing
β βββ metrics.py # Evaluation metrics
β βββ utils.py # Helper functions
βββ scripts/ # Convenience and automation scripts
β βββ run_smoke.sh # Smoke test script
β βββ download_data.sh # Dataset download
β βββ run_experiment.sh # Batch experiment runner
βββ docs/ # Documentation and reports
β βββ REPRODUCIBILITY.md # Reproducibility checklist
β βββ EXPERIMENT_LOG.md # Experiment results and notes
β βββ CITATION.md # Paper citation
βββ .github/
β βββ workflows/
β βββ ci_smoke_test.yml # Automated CI pipeline
βββ requirements.txt # Python dependencies
βββ README.md # This file
βββ .gitignore # Git ignore rules
Edit src/model.py to implement the paper's specific architecture:
class PaperModel(nn.Module):
def __init__(self, config):
super().__init__()
# Add your model layers here
pass
def forward(self, x):
# Implement forward pass
passUpdate configs/baseline.yaml with paper parameters:
model:
architecture: "paper_model"
hidden_dim: 256
num_layers: 3
training:
epochs: 100
batch_size: 32
learning_rate: 0.001
optimizer: "adam"
loss_fn: "cross_entropy"Modify src/data.py for paper-specific data handling:
def get_dataloaders(config):
# Implement paper's data augmentation
# Handle custom train/val/test splits
# Apply domain-specific preprocessing
passAdd evaluation metrics in src/metrics.py:
def paper_specific_metric(predictions, targets):
"""Compute the paper's custom evaluation metric"""
pass- Replace "Paper Title" placeholders in configs and docs
- Add paper-specific notes in
docs/EXPERIMENT_LOG.md - Include citation in
docs/CITATION.md
python src/train.py --config configs/baseline.yaml --seed 42 --output results/exp1bash scripts/run_experiment.sh configs/baseline.yaml 5 results/baseline# Run all ablation configs
for config in configs/ablations/*.yaml; do
python src/train.py --config $config --seed 42
doneBefore publishing results, verify:
- Code runs on clean environment
- Random seeds are fixed
- Exact paper hyperparameters are used
- Dataset versions are documented
- GPU/hardware specifications are noted
- All results are logged and reproducible
- Ablation studies are documented
- Hyperparameter search methodology is explained
See docs/REPRODUCIBILITY.md for detailed checklist.
The repository includes GitHub Actions CI pipeline that:
- Runs on every push
- Installs dependencies
- Executes smoke test
- Validates code quality
View workflow: .github/workflows/ci_smoke_test.yml
Core packages:
- PyTorch 2.0+ - Deep learning framework
- torchvision - Computer vision datasets and models
- numpy - Numerical computing
- pandas - Data analysis
- matplotlib/seaborn - Visualization
- pyyaml - Config file handling
- tensorboard - Experiment tracking (optional)
Full list: see requirements.txt
Install all:
pip install -r requirements.txtLog results in docs/EXPERIMENT_LOG.md:
## Experiment 1: Baseline Reproduction
- **Config**: configs/baseline.yaml
- **Seeds**: 42, 123, 456, 789, 1000
- **Best Accuracy**: 95.2% Β± 0.3%
- **Notes**: Reproduced paper results within 0.5%- Reduce
batch_sizein config - Use
torch.cuda.empty_cache() - Disable gradient checkpointing if enabled
bash scripts/download_data.shpip install --upgrade -r requirements.txt- Verify seed setting in
src/train.py - Check CUDA version compatibility
- Confirm GPU/CPU is consistent
This template is licensed under the MIT License.
When using this template, cite the original paper:
@article{author2024papertitle,
title={Paper Title},
author={Author Name},
journal={Journal Name},
year={2024}
}See docs/CITATION.md for full citation details.
ChethanNazre
- GitHub: @ChethanNazre
- Repository: Paper-Repro
To extend this template:
- Fork the repository
- Create a feature branch
- Commit changes with clear messages
- Submit a pull request
Q: How do I modify the model architecture?
A: Edit src/model.py and update the model class to match your paper's design.
Q: Can I use a different dataset?
A: Yes, modify src/data.py to load your dataset and update configs accordingly.
Q: How do I track hyperparameter search?
A: Create multiple config files in configs/ and run experiments with each.
Q: What if results don't match the paper?
A: Check docs/REPRODUCIBILITY.md, verify hyperparameters, seeds, and data preprocessing.
Last Updated: August 2026 | Template Version: 1.0