paper-with-me

홈 › Papers

Learning When to Remember: Risk-Sensitive Contextual Bandits for Abstention-Aware Memory Retrieval in LLM-Based Coding Agents

2026-04-30 · Mehmet Iscan arxiv

Large language model (LLM)-based coding agents increasingly rely on external memory to reuse prior debugging experience, repair traces, and repository-local operational knowledge. However, retrieved memory is useful only when the current failure is genuinely compatible with a previous one; superficial similarity in stack traces, terminal errors, paths, or configuration symptoms can lead to unsafe memory injection. This paper reframes issue-memory use as a selective, risk-sensitive control problem rather than a pure top-k retrieval problem. We introduce RSCB-MC, a risk-sensitive contextual bandit memory controller that decides whether an agent should use no memory, inject the top resolution, summarize multiple candidates, perform high-precision or high-recall retrieval, abstain, or ask for feedback. The system stores reusable issue knowledge through a pattern-variant-episode schema and converts retrieval evidence into a fixed 16-feature contextual state capturing relevance, uncertainty, structural compatibility, feedback history, false-positive risk, latency, and token cost. Its reward design penalizes false-positive memory injection more strongly than missed reuse, making non-injection and abstention first-class safety actions. In deterministic smoke-scale artifacts, RSCB-MC obtains the strongest non-oracle offline replay success rate, 62.5%, while maintaining a 0.0% false-positive rate. In a bounded 200-case hot-path validation, it reaches 60.5% proxy success with 0.0% false positives and a 331.466 microseconds p95 decision latency. The results show that, for coding-agent memory, the key question is not only which memory is most similar, but whether any retrieved memory is safe enough to influence the debugging trajectory.

📄 PDF Abstract BibTeX arXiv:2604.27283

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Conditionally Risk-Averse Contextual Bandits

2022-10-24 · Mónika Farsang, Paul Mineiro, Wangda Zhang

Contextual bandits with average-case statistical guarantees are inadequate in risk-averse situations because they might trade off degraded worst-case behaviour for better average performance. Designing a risk-averse cont…

ManagementMulti-Armed Banditsregression

Contextual Combinatorial Conservative Bandits

2019-11-26 · Xiaojin Zhang, Shuai Li, Weiwen Liu, Shengyu Zhang

The problem of multi-armed bandits (MAB) asks to make sequential decisions while balancing between exploitation and exploration, and have been successfully applied to a wide range of practical scenarios. Various algorith…

Multi-Armed Bandits

Neural Risk-sensitive Satisficing in Contextual Bandits

2025-01-15 · Shogo Ito, Tatsuji Takahashi, Yu Kono

The contextual bandit problem, which is a type of reinforcement learning tasks, provides an effective framework for solving challenges in recommendation systems, such as satisfying real-time requirements, enabling person…

Multi-Armed BanditsRecommendation Systems

Risk-sensitive Bandits: Arm Mixture Optimality and Regret-efficient Algorithms

2025-03-11 · Meltem Tatlı, Arpan Mukherjee, Prashanth L. A., Karthikeyan Shanmugam 외

This paper introduces a general framework for risk-sensitive bandits that integrates the notions of risk-sensitive objectives by adopting a rich class of distortion riskmetrics. The introduced framework subsumes the vari…

Off-Policy Risk Assessment in Contextual Bandits

2021-04-18 · NeurIPS 2021 12 · Audrey Huang, Liu Leqi, Zachary C. Lipton, Kamyar Azizzadenesheli

Even when unable to run experiments, practitioners can evaluate prospective policies, using previously logged data. However, while the bandits literature has adopted a diverse set of objectives, most research on off-poli…

Multi-Armed BanditsOff-policy evaluation