# EXPEREPAIR: Dual-Memory Enhanced LLM-based Repository-Level Program Repair

**Authors:** Fangwen Mu, Junjie Wang, Lin Shi, Song Wang, Shoubin Li, Qing Wang  
**arXiv:** [2506.10484](https://arxiv.org/abs/2506.10484)  
**Date:** 2025-06-12  
**Summary page:** https://www.summarizepaper.com/en/arxiv-id/2506.10484v1/

## Key points

- Automatically repairing software issues is a persistent challenge at the intersection of software engineering and AI.
- Recent advancements in Large Language Models (LLMs) have shown promise for repository-level repair tasks, but current methodologies have limitations.
- Current approaches often address issues in isolation without leveraging insights from past problem resolutions and rely on static prompting strategies that hinder adaptability.
- ExpeRepair is a novel LLM-based approach inspired by human cognition's dual memory systems, which continuously learns from historical repair experiences through dual-channel knowledge accumulation.
- ExpeRepair organizes past repair experiences into episodic memory storing concrete repair demonstrations and semantic memory encoding abstract reflective insights.
- During inference, ExpeRepair activates both memory systems to retrieve relevant demonstrations and high-level repair insights for context-aware prompt generation based on experience.
- Experiments show that ExpeRepair achieves a pass@1 score of 49.3% with Claude 3.7 Sonnet, outperforming all state-of-the-art open-source methods on the SWE-bench Lite benchmark.
- By incorporating historical repair experiences into repository-level Automatic Program Repair (APR), ExpeRepair aims to emulate how developers learn, adapt, and improve over time within a software project.
- This innovative approach draws inspiration from cognitive science's dual-memory system model and offers a promising direction for enhancing software issue resolution in real-world development scenarios.

## Summary

Automatically repairing software issues is a persistent challenge at the intersection of software engineering and AI. Recent advancements in Large Language Models (LLMs) have shown promise for repository-level repair tasks, but current methodologies have limitations. These approaches often address issues in isolation without leveraging insights from past problem resolutions. Additionally, they rely on static prompting strategies that hinder their ability to adapt to diverse and evolving scenarios. To address these challenges, we introduce ExpeRepair - a novel LLM-based approach inspired by human cognition's dual memory systems. This innovative method continuously learns from historical repair experiences through dual-channel knowledge accumulation. It organizes past repair experiences into two complementary memories: an episodic memory storing concrete repair demonstrations and a semantic memory encoding abstract reflective insights. During inference, ExpeRepair activates both memory systems by retrieving relevant demonstrations from the episodic memory and recalling high-level repair insights from the semantic memory. This approach enhances adaptability through dynamic prompt composition, integrating both memory types to generate context-aware prompts based on experience. Experiments conducted on the SWE-bench Lite benchmark demonstrate that ExpeRepair achieves a pass@1 score of 49.3% with Claude 3.7 Sonnet - outperforming all state-of-the-art open-source methods. By explicitly incorporating historical repair experiences into repository-level Automatic Program Repair (APR), ExpeRepair aims to emulate how developers learn, adapt, and improve over time within a software project. In conclusion, this innovative approach draws inspiration from cognitive science's dual-memory system model and offers a promising direction for enhancing software issue resolution in real-world development scenarios.
