Manuscript Offprint

arXiv:2610.34500

CaliMem: Search-Efficient Data Agent via Calibrated Memory

Hanze Li, Athan Z. Li, Feiyang Kang, Jiachen T. Wang, Yuhan Chen, Ruishan Liu, Ruoxi Jia

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Data curation is a first-order design choice in machine learning, yet tailoring training data to a downstream model and task remains costly in labor, expertise, and compute. Datasets are therefore often processed through fixed pipelines and reused across applications. We show that this assumption is fragile: across 55 dataset-model tasks spanning biological domains, the same curation recipe can help one model while hurting another. Effective curation must adapt to the downstream setting, motivating automated search over data recipes. We first build an agentic system that searches for curation policies at deployment, improving data utility via test-time curation (TTC). Although achieving performance gains, its search is driven largely by recent feedback and remains local. Adding persistent memory helps the agent retain evidence across iterations and reveals a deeper problem: it forms claims that extend beyond the conditions in which they were observed, sometimes abandoning an entire strategy after a single unsuccessful trial. To address this problem, we introduce CALIMEM, a calibrated-memory agentic loop that requires the agent to predict the outcome of each proposed policy before executing it. Comparing this prediction with the observed result gives the agent a reality check on the claims behind its proposal. It uses the prediction error to retain supported claims, revise mistaken ones, and specify the conditions under which a conclusion holds. This makes the agent's beliefs testable, reduces overgeneralization, and supports more effective long-horizon exploration. Across biological and LLM post-training tasks, CALIMEM consistently outperforms fixed curation baselines and published methods, and exceeds full-data training by up to 19.4%. Code is open-sourced 1^{1}.

"However beautiful the strategy, you should occasionally look at the results" – Winston Churchill

1 INTRODUCTION

How a training set is constructed determines what a model learns and how efficiently it learns it. Data curation has accordingly grown beyond cleaning into a broad design space: removing redundant or low-value examples, selecting data for targeted capabilities, and setting the mixture of sources (Lee et al., 2022; Xie et al., 2023a; Xia et al., 2024; Wu et al., 2024; Chen et al., 2026). Tailoring these choices to a downstream model and task, however, demands expertise and repeated training runs. In practice, datasets are often processed through fixed pipelines and reused across applications. Such pipelines support consistency and reproducibility, but a curation choice that benefits one downstream setting need not benefit another.

This limitation is particularly evident in biological data, where data preparation commonly follows established workflows for single-cell transcriptomics (Luecken & Theis, 2019; Heumos et al., 2023; Luecken et al., 2022), protein variant-effect prediction (Notin et al., 2023), and non-coding variant-effect prediction (Marin et al., 2024). These workflows establish useful standards, but they do not establish which curation choices best serve a particular downstream application or model. We examine 55 dataset-model tasks across these 3 biological domains, comparing 12 standard curation

*Corresponding author: hanzeli@vt.edu.

1^{1}Code repository: https://anonymous.4open.science/r/CaliMem-450E

(a)

Figure

(b)

Figure

Figure 1: Curation depends on the downstream model, and calibrated memory guides the search for a suitable policy. (a) 12 standard recipes on a single-cell batch-integration dataset, ranked by the performance of two models trained on their half-size subsets. The recipe that ranks 1st for cVAE ranks 11th for MMD. (b) A basic agent proposes a policy, trains and evaluates the model, and responds to the latest score change. CALI-MEM records evidence and claims in memory, predicts the outcome of each proposed policy, and compares its prediction with the result. The comparison guides revisions to the claims used in subsequent iterations.

recipes at a fixed data budget. The same recipe can help one model while hurting another. On one batch-integration dataset, for example, a recipe ranks 1st for cVAE (a variational autoencoder that conditions its decoder on the batch label) but 11th for MMD-AE (an autoencoder trained with a distribution discrepancy penalty between batches (Figure 1a). Averaged across recipes, standard curation performs no better than selecting a random subset of the same size. Effective curation therefore calls for searching for a policy suited to the downstream setting. The potential reach of such search extends beyond biology: data selection and mixing also shape language-model pretraining, instruction tuning, and vision-language training (Xie et al., 2023a; Xia et al., 2024; Wu et al., 2024).

Generalist coding agents can carry out machine-learning experiments end to end (Chan et al., 2024; Karpathy, 2026; Rank et al., 2026), making data curation a natural target for automated search. Following the propose–evaluate–revise setting of Curation-Bench (Kang et al., 2026), we build an agent that searches for curation policies at deployment, improving data utility via test-time curation (TTC). Given a candidate data pool, a selection budget, and a fixed training and evaluation pipeline, it proposes a policy, trains on the selected subset, observes the evaluation score, and decides what to try next. The agent improves data utility, but its trajectories are strongly driven by recent feedback. It often changes one policy setting at a time and uses the latest score change to choose its next move (e.g., Table 1). This local search can miss interactions among choices and underuse evidence accumulated earlier in the trajectory.

To help the agent learn from its full trajectory, we add persistent memory (Shinn et al., 2023). The memory records executed policies and their outcomes as evidence, alongside the agent's claims about what that evidence means. Retaining these claims makes a deeper failure mode visible: the agent frequently states conclusions substantially beyond what its experiments warrant. For example, adding class rebalancing to a confidence-filtered policy lowers performance, and a memory-only agent concludes that rebalancing does not help (Figure 2). The experiment establishes only that this particular combination failed under the tested conditions. It does not explicitly rule out rebalancing with a different filter, setting, or policy; though, the broad claim persists in the agent's belief essentially prevents the agent from revisiting the strategy.

We introduce CALIMEM, a calibrated-memory loop that subjects such claims to an empirical reality check. Before executing each proposed policy, the agent predicts its outcome from the evidence and claims in memory. After evaluation, it compares the prediction with the observed score. This gap reveals when the agent's understanding of a policy was mistaken, even if the policy itself improved performance. The agent then retains supported claims, revises mistaken ones, or limits them to the conditions under which they hold. In the rebalancing example, an unexpected loss directs attention to its interaction with the confidence filter rather than ruling out rebalancing altogether. The resulting claims are more carefully qualified and provide a stronger basis for long-horizon exploration.

We evaluate CALIMEM on the 55 biological dataset–model tasks and on LLM post-training tasks. It improves agentic search, outperforms fixed curation baselines and published methods, and, in the strongest setting, exceeds full-data training by up to 19.4%. Our contributions are threefold: (i) we show that standard curation recipes have sharply different effects across downstream models and tasks; (ii) we identify local feedback-driven search and overgeneralized memory claims as limita-tions of agentic curation; and (iii) we develop CALIMEM, which uses predictions and their errors to keep the agent’s claims grounded in observed evidence.

References (100)

Couldn't load all references. Reload the page to try again.