Most top-performing autonomous data-science agents rely on frontier cloud models and lack persistent, cross-session memory. This paper addresses two open gaps: (1) the underexplored use of formally structured, quality-controlled Case-Based Reasoning (CBR) case bases coupling symbolic case records with executable code artefacts; and (2) the untested viability of Small Language Models (SLMs) as locally deployable agent backbones. We present CBR-augmented R&D-Agent, integrating a persistent CBR layer into Microsoft's R&D-Agent framework with a custom backend for Gemma 4 31B Dense -- the first published end-to-end evaluation of Gemma 4 as an autonomous data-science agent backbone. The CBR layer overrides three R&D loop phases via a surgical subclass toggled by a single environment variable. Cases are stored as structured records with executable code snapshots and quality metadata; a five-gate quality filter and a heuristic reuse-detection mechanism assess knowledge transfer by combining embedding similarity, code-fingerprint overlap, and injection provenance. Evaluated on two Kaggle competitions (NOMAD 2018, Spaceship Titanic) with four seeds over eight improvement loops each, CBR achieves directionally higher accuracy than the CBR-disabled baseline on Spaceship Titanic (0.8147 vs. 0.8098, d = -1.41) with substantially lower variance. Heuristic reuse detection across 108 retrieval events shows high semantic relevance (mean embedding similarity 0.882) alongside variable structural proximity (mean code-fingerprint similarity 0.305), consistent with conceptual guidance rather than verbatim code copying.
翻译:目前最优秀的自主数据科学智能体大多依赖前沿云端模型,且缺乏跨会话的持久化记忆。本文旨在填补两个研究空白:(1)将形式化结构化、符合质量控制的基于案例推理(CBR)案例库与可执行代码制品相结合的方法尚未得到充分探索;(2)小语言模型(SLM)作为本地可部署智能体骨干的可行性尚未得到验证。我们提出了CBR增强型R&D-Agent,通过在微软R&D-Agent框架中集成持久化CBR层,并针对Gemma 4 31B Dense模型构建定制后端——这是首个公开发表的将Gemma 4作为自主数据科学智能体骨干的端到端评估。该CBR层通过一个由单一环境变量触发的外科手术式子类,覆盖了R&D循环的三个阶段。案例以结构化记录形式存储,包含可执行代码快照和质量元数据;通过五级质量过滤器和启发式重用检测机制,结合嵌入相似度、代码指纹重叠度及注入溯源来评估知识迁移。在两项Kaggle竞赛(NOMAD 2018与Spaceship Titanic)中,使用四个随机种子、每项任务进行八次改进循环的评估结果显示,CBR在Spaceship Titanic上比未启用CBR的基线模型获得了方向性更高的准确率(0.8147 vs. 0.8098, d = -1.41),且方差显著降低。跨108次检索事件的启发式重用检测表明,其语义相关性高(平均嵌入相似度0.882),但结构接近度存在差异(平均代码指纹相似度0.305),这与概念指导而非逐字代码复制的特性一致。