[2602.00059] TextBFGS: A Case-Based Reasoning Approach to Code Optimization via Error-Operator Retrieval
About this article
Abstract page for arXiv paper 2602.00059: TextBFGS: A Case-Based Reasoning Approach to Code Optimization via Error-Operator Retrieval
Computer Science > Machine Learning arXiv:2602.00059 (cs) [Submitted on 20 Jan 2026 (v1), last revised 30 Mar 2026 (this version, v2)] Title:TextBFGS: A Case-Based Reasoning Approach to Code Optimization via Error-Operator Retrieval Authors:Zizheng Zhang, Yuyang Liao, Chen Chen, Jian He, Dun Wu, Qianjin Yu, Yanqin Gao, Jin Yang, Kailai Zhang, Eng Siong Chng, Xionghu Zhong View a PDF of the paper titled TextBFGS: A Case-Based Reasoning Approach to Code Optimization via Error-Operator Retrieval, by Zizheng Zhang and 9 other authors View PDF HTML (experimental) Abstract:Iterative code generation with Large Language Models (LLMs) can be viewed as an optimization process guided by textual feedback. However, existing LLM self-correction methods predominantly operate in a stateless, trial-and-error manner akin to first-order search, failing to leverage past problem-solving experiences. To bridge this gap, we introduce TextBFGS, a Case-Based Reasoning (CBR) framework inspired by the Quasi-Newton optimization method. Instead of retrieving raw, unstructured textual instances, TextBFGS maintains a dynamic Case Base of historical "Error-to-Operator" correction trajectories to approximate the semantic curvature (inverse Hessian matrix) of the task. Specifically, given a textual error feedback (the target problem), TextBFGS retrieves analogous historical correction patterns (Retrieve) and applies these abstract operators to refine the current code (Reuse/Revise). Furthermore, successful...