This repository contains the official implementation of FailureMem, a Multimodal Automated Program Repair (MAPR) framework designed to resolve complex software issues by jointly reasoning over source code, textual issue descriptions, and visual artifacts (like GUI screenshots).
While existing Large Language Model (LLM) repair systems struggle with rigid workflows, diluted visual attention, and repeating past mistakes, FailureMem introduces a novel approach that actively learns from historical failures to guide both fault localization and patch generation.
Figure: Overview of the FailureMem framework, featuring the hybrid workflow-agent architecture, active perception tools, and the hierarchical Failure Memory Bank.
- Hybrid Workflow-Agent Architecture: Balances structured fault localization with flexible, autonomous reasoning for patch generation, preventing the model from losing direction during complex multi-step exploration.
- Active Perception & Interactive Environment: Equips the repair agent with Crop and Grounding tools to isolate bug-relevant UI regions, alongside a sandboxed Bash environment to verify repository structures and assumptions before editing code.
- Failure Memory Bank: Transforms past failed repair attempts into reusable guidance. It uses a three-layer structure (Contextual, Cognitive, and Code) to retrieve analogous cases, explain why earlier fixes failed, and inject concrete repair principles into the current task.
Evaluated on the SWE-bench Multimodal benchmark, FailureMem consistently outperforms existing state-of-the-art baselines. When paired with GPT-5.1, our framework achieves a 33.1% resolved rate, improving upon the GUIRepair baseline by 3.7 percentage points.
Currently, this repository is in a preliminary release phase. The core reasoning engine and full memory bank distillation scripts will be open-sourced soon.
To set up the basic environment, clone this repository and install the dependencies:
git clone [https://github.com/yourusername/FailureMem.git](https://github.com/yourusername/FailureMem.git)
cd FailureMem
pip install -r Code/requirments.txtIf you find this work helpful in your research, please consider citing our paper: