# RepGen: Reproducing Deep Learning Bugs through Context-Aware Code Generation and Verification

DevFeed: [RepGen: Reproducing Deep Learning Bugs through Context-Aware Code Generation and Verification](<https://devfeed.tech/articles/repgen-reproducing-deep-learning-bugs-through-context-aware-code-generation-and-verification-112669.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2610.41097>)

Author: Mehil B Shah, Mohammad Masudur Rahman, Foutse Khomh

Published: 2026-11-02T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Software Engineering](<https://devfeed.tech/sources/arxiv-software-engineering.md>)

Topics: [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Static code analysis](<https://devfeed.tech/topics/static-code-analysis.md>), [llm-reasoning](<https://devfeed.tech/topics/llm-reasoning.md>)

Tags: [bugs](<https://devfeed.tech/tags/bugs.md>), [code-generation](<https://devfeed.tech/tags/code-generation.md>), [context](<https://devfeed.tech/tags/context.md>), [cs-se](<https://devfeed.tech/tags/cs-se.md>), [deep-learning](<https://devfeed.tech/tags/deep-learning.md>), [execution](<https://devfeed.tech/tags/execution.md>), [feedback](<https://devfeed.tech/tags/feedback.md>), [github-action](<https://devfeed.tech/tags/github-action.md>), [interactive](<https://devfeed.tech/tags/interactive.md>), [llms](<https://devfeed.tech/tags/llms.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [plan](<https://devfeed.tech/tags/plan.md>), [real-world](<https://devfeed.tech/tags/real-world.md>), [report](<https://devfeed.tech/tags/report.md>), [study](<https://devfeed.tech/tags/study.md>), [verification](<https://devfeed.tech/tags/verification.md>)

## AI overview

RepGen tackles the difficulty of reproducing deep learning bugs when reports omit details and failures depend on code, models, data, dependencies, or the execution environment. Given a report and repository, it explores the codebase, builds context, plans a reproduction, and generates candidate scripts. Static checks and LLM feedback refine them; when execution is enabled, RepGen prepares the environment, runs a candidate, and compares its output with the reported failure. It offers an interactive CLI for local or hosted LLMs, configurable execution budgets, inspectable artifacts, and a GitHub Action for automated issue processing. The approach reproduced 85 of 106 real-world bugs (80.19%). In a controlled study of 27 developers, it improved reproduction success by 23.35% and reduced reproduction time by 56.8%. These results are reported in the supplied abstract.

## Source excerpt

arXiv:2610.41097v1 Announce Type: new Abstract: Reproducing deep learning (DL) bugs is challenging because failures can involve source code, models, data, dependencies, and execution environments. Incomplete bug reports further complicate reproduction by omitting essential details. We present RepGen, an open-source tool for reproducing DL bugs through context-aware code generation and iterative verification. Given a bug report and repository, RepGen explores the codebase to build a learning-enhanced context, develop a reproduction plan, and generate candidate scripts. It refines candidates using static checks and LLM feedback to improve their correctness and relevance. When enabled, the tool prepares the execution environment, runs the script, and assesses its output against the reported failure. RepGen provides an interactive command-line interface supporting local and hosted LLMs, configurable execution budgets, and inspectable artifacts, along with a GitHub Action for automated issue processing. The underlying approach reproduced 85 of 106 real-world DL bugs (80.19%). A controlled study with 27 developers showed a 23.35% improvement in reproduction success and a 56.8% reduction in reproduction time.