CoChat

TwinMem-Agent: Episodic and Semantic Memory for Repository-Level Program Repair

Open access
Wu, Benzhao, Luo, Zhiwen, Mu, Fangwen, Xiang, Lijun · 2026 · Proceedings of the 34th ACM International Conference on the Foundations of Software Engineering

The DOI matches its Crossref record; 14 of the 14 references it cites were found in a registry or an index.

Abstract

Large language models for repository-level repair usually reset context for every issue, even though real maintenance often unfolds as a stream of tickets within the same codebase. We study this sequential regime on a stratified 8 × 25 subset of SWE-Bench Pro (eight projects, twenty-five instances each), running instances in commit-time order within each project so later repairs can draw on earlier trajectories. We present TwinMem-Agent, which pairs a test-patch-validate loop with episodic memory (grounded demonstrations) and semantic memory (LLM-distilled notes). After each issue, a memory module compacts the trajectory, merges updates under a fixed budget, and retrieves exemplars and guidelines at inference time, all without fine-tuning model weights. Using DeepSeek-V3.2 as the shared backbone and identical Dockerized instances, we compare TwinMem-Agent to mini-swe-agent on Pass@1 and average inference cost, and ablate the memory module on 25 Ansible instances measuring Pass@1 and RSR. TwinMem-Agent achieves 89.1% Pass@1 versus 60.0% for the baseline at roughly 18× lower cost ($0.0044 vs. $0.0798). Removing the memory module reduces Pass@1 by 8 pp and RSR by 12 pp, with the larger RSR drop confirming that accumulated cross-issue experience most directly benefits bug reproduction and cascades into higher patch success.

Overview

Integrity signals

Registry

Crossref · 10.1145/3803437.3807664

Cites

14 of 14 references verified0 citation errors · 0 not checkable

Statistics

Recomputing p-values needs the paper’s full text.

Verification

Claims the paper makes

The text we found for this paper looks like another document, so its claims and self-check weren’t run. The registry and citation checks still apply.

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The text we found for this paper looks like another document, so the self-check wasn’t run.

Citations

Cites

Show all 14 references

Research works printed but not linked: 1

  1. [11] John Yang, Carlos E Jimenez, Alexander Wettig, Kilian Lieret, Shunyu Yao, Karthik R Narasimhan, and Ofir Press. SWE-agent: Agent-computer interfaces enable automated software engineering. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. Crossref Google Scholar

Metadata

Authors
Wu, B., Luo, Z., Mu, F., & Xiang, L.
Affiliations
  • Beihang University (CN)
  • Chinese Academy of Sciences (CN)
Venue
Proceedings of the 34th ACM International Conference on the Foundations of Software Engineering
Publisher
ACM
Published
2026-07-05
Pages
1447-1451
OpenAlex
W7169548253
Cited by
0
References
3
FWCI
0.00
Type
conference paper
Language
en
Open access
Locations
ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) (publishedVersion, cc-by)
Topics
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Research
  • Physical Sciences › Computer Science › Software › Software Testing and Debugging Techniques
  • Physical Sciences › Computer Science › Artificial Intelligence › AI-based Problem Solving and Planning
Keywords
program repair, episodic memory, semantic memory, memory networks

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

A second model labelled each claim on 2026-10-30 (model jev-1.13-20260917, definition revision gold-guideline-v0.2).

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.