betaFeedback

WorksComputer Science

CaliMem: Search-Efficient Data Agent via Calibrated Memory

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.

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

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 [8, 9, 10, 11, 12]. 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 [20, 21, 19], protein variant-effect prediction [22], and non-coding variant-effect prediction [23]. 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 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 [9, 10, 11].

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. CaliMem 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.

Generalist coding agents can carry out machine-learning experiments end to end [14, 15, 16], making data curation a natural target for automated search. Following the propose–evaluate–revise setting of Curation-Bench [13], 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 tab:basic-trace). 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 [18]. 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 limitations of agentic curation; and (iii) we develop CaliMem, which uses predictions and their errors to keep the agent’s claims grounded in observed evidence.

Related Work

Data curation. Filtering and deduplication [8], target-aware sample selection [6, 10, 11, 59], and optimization of data-source mixtures [9, 148, 81, 80, 12] all improve training data; see [60] for a survey. A recurring lesson is that there is no context-free “best” data: selection rankings change with pool, budget [59], and compute [5, 55]. The same dependence appears in scientific workflows. Preprocessing choices in single-cell pipelines (e.g., normalization, feature selection) interact and shift downstream results [25, 26, 19]. This dependence motivates test-time curation (TTC): the agent searches the policy space against the downstream pipeline at deployment rather than committing to one recipe in advance.

Agents for machine-learning research and data work. Large language model (LLM) agents increasingly carry out iterative machine-learning experimentation, from bounded machine learning tasks to open-ended research engineering [62, 14, 141, 16]. Agents have also been applied to discovering dataset problems, data standardization, web collection, and general data-science workflows [62, 79, 63]. Closest to us, [13] place a generalist agent in a fixed train–evaluate loop for data refinement; [78] broaden autonomous data engineering with tree-structured search and global memory. We take the curation loop itself as given and focus on a complementary question: what does an agent learn about the response of one downstream pipeline over a long search trajectory, and when should it trust what it has learned?

Memory, self-improvement, and predictive agent state. Persistent-memory methods allow agents to accumulate reflections, experiences, and reusable strategies without changing model weights [18, 77, 76, 17]. Harness optimizers instead evolve prompts or workflows from execution feedback [70, 69, 68]. Our scaffold is fixed; what evolves is the agent’s beliefs about the target task. Predicting before acting connects to model-based agents [106, 67, 66] and verbalized belief states  [65]. Unlike confidence calibration [64], the calibrated object is the set of empirical claims used to choose the agent’s next intervention. Appendix Figure 6 extends this discussion.

CaliMem: Calibrated Memory for Agentic Data Curation

We build CaliMem in three steps, each motivated by a failure observed in the previous one: a basic agent that implements the curation loop (§ 3.2), a persistent memory that lets it use its whole trajectory (§ 3.3), and a calibration step that checks the claims in that memory against measured outcomes (§ 3.4).

Problem formulation: the data curation loop

An automated data-curation agent operates through an iterative propose–evaluate–revise loop [13]. The agent is given a candidate data pool D\mathcal{D}, a selection budget BB, and a fixed training and evaluation pipeline. At iteration tt, it proposes a data policy πt\pi_t, a program that selects a subset of exactly BB examples from D\mathcal{D} subject to task-specific validity constraints, such as a minimum number of examples per class or per batch (Appendix app:domains). The downstream model is trained on this subset under the fixed pipeline and measured on the evaluation split, which produces the score yt=S(πt).y_t = S(\pi_t). The agent observes yty_t and proposes the next policy πt+1\pi_{t+1}. After tt iterations, the trajectory

Ht={(π1,y1),…,(πt,yt)}\begin{equation} \mathcal{H}_t = \{(\pi_1,y_1),\ldots,(\pi_t,y_t)\} \tag*{(1)} \end{equation}

holds all the empirical experience available to guide subsequent search. We write πt⋆\pi^\star_t for the incumbent, the best policy in Ht\mathcal{H}_t, and yt⋆=max⁡i≤tyiy^\star_t=\max_{i\le t}y_i for its score. In the default setup, the agent builds on the incumbent: a change is kept if it improves on y⋆y^\star and reverted otherwise (as shown in Table tab:basic-trace). Every run starts from the same seeded random subset as π1\pi_1 and is allotted TT iterations, each costing one full training run; the quantity of interest is yT⋆y^\star_T.

Test-time curation.

We refer to this search as test-time curation (TTC): rather than preparing the data once with a fixed recipe, compute is spent at deployment, by retraining the fixed downstream model, to find the subset that serves that model best. The trade is particularly favorable in scientific domains such as biology, where new data come from costly experiments while many downstream models are relatively convenient to train (Appendix app:domains). In this context, extracting more utility from an existing pool is then far cheaper than enlarging it. Because the pipeline is fixed, a difference in score between two iterations is attributable to the change in the data policy.

Basic agent: local, reactive search

We first implement the loop with a basic agent. It receives the goal, the budget, and the commands to submit a subset and to run training and evaluation, together with a minimal protocol that asks it to read its previous results before each move; which policies to try, and how to revise them, is left to the agent. Applied to test-time curation in both the biological and the LLM post-training domains, the basic agent already improves on the random starting subset and, in the biological domains, matches or exceeds the best human-designed recipe chosen separately for each subtask (Basic agent rows of Tables tab:main-bio and tab:main-llm).

Its trajectories, however, are dominated by recent feedback. A curation policy consists of a selection strategy, such as allocating the budget across perturbations in proportion to their size, and the parameters that implement it, such as thresholds, counts, and weights. Once the agent has found a plausible strategy, it typically holds it fixed and spends its iterations adjusting one setting at a time.

IterationScoreStatusWhat changedAgent's note
baselineRow 161.30keepRandom 50% subset (baseline)The score to beat.
463.63keepGive each perturbation at least 100 cells (all of its cells if it has fewer); split the rest by perturbation sizeNew best: small perturbations now keep all their cells, and large ones keep their share.
563.83keepControl cells:∼\sim4,900→\to2,000New best: cutting controls frees cells for perturbations at little cost.
bestRow 667.53keepControl cells: 2,000→\to1,000Large gain: more perturbation cells matter more than more controls.
discardRow 766.60discardControl cells: 1,000→\to500Worse: 500 controls are too few, so 1,000 is the lower limit. Next, keep 1,000 controls and try a higher per-perturbation minimum.
discardRow 865.32discardControl cells back to 1,000; per-perturbation minimum: 100→\to150Worse: a higher minimum takes cells from large perturbations, so 100 is the right minimum.
Local refinement.

Table tab:basic-trace illustrates a sequence of local changes within a curation strategy. The agent adjusts the number of control cells while retaining the allocation rule for perturbed cells, then changes the per-perturbation minimum after further reductions in controls stop improving the score.

To describe this type of move, write a policy as π=πm,θ\pi=\pi_{m,\theta}, where mm specifies the strategy and θ\theta its numerical settings. A local proposal changes one coordinate of the incumbent: θ~t=θt−1⋆+αtstejt,  π~t=πmt−1⋆,θ~t,\widetilde{\theta}_t = \theta^\star_{t-1} + \alpha_t s_t e_{j_t}, \,\, \widetilde{\pi}_t = \pi_{m^\star_{t-1},\widetilde{\theta}_t}, where ejte_{j_t} is the basis vector for the selected coordinate, jtj_t is the selected setting, st∈{−1,+1}s_t\in\{-1,+1\} its direction, and αt>0\alpha_t>0 is a feasible step size. The resulting score is compared with the incumbent to determine whether the proposal is retained. This resembles directional derivative-free direct search ("zeroth-order coordinate optimization"), which makes decisions solely based on evaluations rather than an explicitly or implicitly modeled derivative (e.g., "gradient") [1, 2].

Local refinement is not itself a failure. The concern is that the agent may inaccurately interpret a result obtained at one configuration as a conclusion about settings or strategy variants that have not been tested. Such a conclusion can restrict later search even when the underlying mechanism remains useful under different conditions. (For example, after reducing the number of control cells from 1,000 to 500 hurts performance in Table tab:basic-trace, the agent concludes that 1,000 is a lower limit, even though the result only establishes this under the current perturbation-allocation rule.) This has two consequences. First, the search refines the current strategy rather than questioning it, and settles into a local optimum of that strategy. Second, a sign describes a move at one point of the policy space, yet the agent records what it learns as a general conclusion; yet whether an effect depends on the other settings, or reverses outside the range tested, cannot be read from a sign.

Holistic search via persistent memory

The basic agent’s exploration is driven by its most recent result and overlooks patterns that its earlier iterations already reveal. Following work on persistent memory for LLM agents [18, 17], we give the agent an external memory to explicitly record what it has tried, what it has measured, what it has concluded, and which it consults before choosing each new policy.

Evidence and claims.

The agent keeps a persistent memory Mt=(Et,Ct)\mathcal{M}_t=(\mathcal{E}_t,\mathcal{C}_t), updated after every iteration and read in full before each decision. The evidence Et\mathcal{E}_t records facts: the policies executed so far with their scores, {(πi,yi)}i<t\{(\pi_i,y_i)\}_{i<t}, and facts measured about the pool and the pipeline, such as class counts or batch sizes. The claims Ct\mathcal{C}_t record the conclusions the agent draws from this evidence, such as which settings interact, where an effect reverses, and which directions are spent, and are rewritten after each result, Ct →  (πt, yt)   Ct+1.\mathcal{C}_t\ \xrightarrow{\;(\pi_t,\,y_t)\;}\ \mathcal{C}_{t+1}. The next policy is thus informed by the whole memory rather than only local feedback. Compared to the basic agent’s log that records what was tried, the claims record what the agent currently believes it means. For example, in one cell type annotation task, the agent revisited the number of input genes across non-adjacent iterations, reducing it from the default 2,000 to 1,684 at iteration 5 and later increasing it to 2,191 at iteration 10. Because both deviations lowered the score, the memory consolidated these observations into the claim that 2,000 genes was already the best (Appendix app:memfiles). Writing the claims down also makes the agent’s beliefs inspectable, and reading them reveals a second problem. In memory, a conclusion becomes a claim that is read before every later decision, so an overbroad claim steers the rest of the run.

Figure 2. Without a prediction, one failure closes a whole direction; with a prediction, the failure is tied to its condition. Cell-type annotation (pancreas_crosstech, SVM; evaluation macro-F1). Both agents see rebalancing fail on top of a confidence filter (0.860 →\to 0.853). Top: the failure becomes a claim about rebalancing as a whole. Bottom: the gap between the predicted +0.01+0.01 and the observed −0.007-0.007 ties the failure to the filter, and rebalancing stays open. The top row follows the memory-only run; the bottom row adapts the memory + prediction run on the same task to the same move, and its best score is from that run.

Figure 2 (left) illustrates how an overgeneralized conclusion can restrict subsequent exploration: the memory accurately records the performance decrease, but the agent interprets this result as evidence that rebalancing is generally ineffective. This conclusion extends beyond the tested configuration. Once retained in memory, it guides subsequent decisions and prevents the agent from revisiting rebalancing, potentially excluding configurations that could improve performance.

Calibrated memory: predict, then calibrate

To reduce overgeneralization, CaliMem requires the agent to predict each proposed policy’s score from the evidence and claims in memory before evaluation. After evaluation, it compares the predicted and observed scores and uses the discrepancy to reassess the supporting claims. The intuition is that a performance change indicates whether a policy helped, while a prediction error indicates whether its effect matched the agent’s expectations. The agent revises the claims accordingly and uses the updated memory to guide subsequent search.

1. Predict before evaluation.

Before executing policy πt\pi_t, the agent records a point prediction y^t\widehat y_t, the evidence and claims supporting it, and an outcome that would challenge those claims. This record is fixed before evaluation: y^t=S^(πt∣Et,Ct).\widehat y_t = \widehat S(\pi_t\mid E_t,C_t).

2. Two diagnostics from one evaluation.

After observing yty_t, the agent records (i) the signed prediction residual (i.e., prediction error): rt=yt−y^t.r_t = y_t-\widehat y_t. A positive residual indicates that the outcome exceeded the prediction; a negative residual indicates that the prediction was too optimistic. We also record (ii) the observed changes relative to the incumbent: Δt=yt−yt−1⋆.\Delta_t = y_t-y^\star_{t-1}. The diagnostics answer different questions. Δt\Delta_t determines the keep-or-revert decision, subject to the validity checks. The residual rtr_t measures the discrepancy between the expected and observed score. Their incumbent-relative directions show whether the proposal crossed the improvement boundary as expected. A policy can therefore become the new incumbent while still producing a substantial prediction miss.

3. Revising the claims.

The agent uses the recorded prediction, outcome, diagnostics, and supporting evidence to rewrite its claims in natural language. The interpretation of residual magnitude is left to the agent: Agreement with a prediction is evidence about the tested configuration, not independent validation of every claim used to justify it. Conversely, a discrepancy prompts reassessment but does not by itself identify the cause: the agent must consider the executed policy, the available observations, and possible variability in the measured outcome.

As a result, with CaliMem, the claims in memory carry the conditions under which they were observed, as in Figure 2 (right), and a failed variant narrows a mechanism instead of closing it.

Empirical Studies

How does CaliMem compare with fixed curation methods and basic agents in real tasks? In this section, we investigate the empirical effectiveness of agentic test-time curation with CaliMem, covering diverse scenarios from computational biology tasks (science domains) to prevalent machine learning tasks, such as post-training for large language models (LLMs).

Experiment Setup.

The science experiments cover 3 biological domains, each with its own data type: protein sequence and functional data, genomics, and single-cell transcriptomics. We tested 5 tasks common in these domains, including protein variant effect prediction, non-coding variant effect prediction, cell type annotation, batch integration and perturbation response prediction, giving 55 dataset–model tasks in total. In each task, the agent selects 50% of the pool. LLM post-training experiments include general instruction tuning, selecting 10,000 rows from the Tülu 3 dataset [57] or LESS mixture  [10] to fine-tune OLMo-2-1B or Llama-2-7B, and code instruction tuning, selecting 10,000 rows from OpenCodeInstruct [56] to fine-tune Qwen2.5-Coder-1.5B. Every task is run under two agentic pipelines, Basic agent and CaliMem. We test 3 agents with both agentic pipelines: Claude Code driven by Opus 4.8, Sonnet 5, or Haiku 4.5; Codex driven by GPT-5.3-Codex or GPT-5.6 Sol; and OpenHands driven by Qwen3.5-397B-A17B, an open-weight model. The agents are initiated from the same-seeded random subset, counted as the first iteration, and run 15 iterations in biology and 10 in LLM post-training track. Each task is scored by several metrics following major benchmarks. Performance is measured by a fixed scorer on a held-out test split disjoint from training/validation splits; the agent observes only the resulting metrics. Additional details are provided in Appendix app:setup.

Science Experiments: Biology Tasks

Figure 3 reports results across the 5 biological tasks. Fixed curation baselines: For each biological domain, we instantiate 12 literature-derived curation recipes. The recipes span the major families of interventions commonly used for that data type—including quality filtering, balancing and stratification, coverage-based selection, and difficulty-based selection, etc. Appendix app:bio-baselines gives its source and exact implementation. These baselines represent a diverse set of reasonable human-designed choices available a priori, before observing how a particular downstream model responds. Figure fig:5 shows the detailed comparison task by task.

Figure 3.

Fixed curation is not reliably beneficial.

Averaged over the 12 recipes, fixed curation underperforms full-data training in five biological tasks with a full-data reference, by 0.8–8.3%, and even an oracle choosing the best recipe per dataset–model task improves on full data only modestly. The dependence is one of sign, not just magnitude: class balancing is redundant or harmful when the classifier already uses inverse-frequency weights, and coverage-based selection over-samples sparse, noisy regions unless unreliable examples are filtered first. A heuristic that corrects one model’s weakness can remove useful signal for another.

Test-time curation exploits this dependence.

The Basic agent searches directly against the target pipeline and exceeds both Random and the fixed-recipe alternatives across agent families. In all 24 reported Basic-agent results with a full-data reference, the selected 50% subset also outperforms training on the entire pool.

CaliMem further improves agentic search.

Across the 30 Basic-agent/CaliMem pairs in Table tab:main-bio, CaliMem improves 29, spanning protein, genomic, and single-cell tasks and both proprietary and open-weight agents. All 30 CaliMem results with full-data references remain above full-data training despite using only half of the pool. By keeping conclusions tied to the conditions that produced them, CaliMem spends the fixed budget exploring alternative policies rather than committing early to a local one.

LLM Post-Training Experiments: General and Code Instruction Tuning

Figure 4.

We next evaluate substantially more aggressive curation regimes in LLM post-training, retaining only 1.1%, 3.7%, or 0.2% of the respective pools. Results are shown in Figure 4.

Agentic search remains effective at very small data budgets.

The Basic agent improves over Random in 17 of 18 agent–task combinations, and CaliMem improves over the corresponding Basic agent in all 18. On the two general instruction-tuning setups, the strongest curated subsets even exceed full-data training while using only 1.1% or 3.7% of the data.

CaliMem is also competitive with the task-specific selection method such as LESS, matching or outperforming it in 17 of 18 comparisons. Notably, LESS needs warm-up training and per-example gradients over the pool while CaliMem uses only the downstream train-and-evaluate interface. The discovered policies go beyond filtering heuristics: on Llama-2-7B one agent adapted RDS+ so that source allocation and within-source similarity ranking are decided separately (Appendix app:casellm).

Figure 5. Best score so far per iteration under the basic agent and CaliMem (Claude Opus 4.8). Left two panels: single-cell batch integration and cell-type annotation, averaged over the 15 dataset–model tasks of each domain, 15 iterations. Right two panels: code instruction tuning (Qwen2.5-Coder-1.5B) and instruction tuning (Llama-2-7B on the LESS mixture), 10 iterations. In every panel CaliMem passes the basic agent’s final score within the first 5 iterations.

Figure 5 shows the best score reached so far as the agent spends its iteration budget. Across the various settings shown, CaliMem consistently establishes stronger incumbents earlier and finishes with a higher score. Calibrated memory improves the efficiency of the search itself, allowing evidence from earlier interventions to shape subsequent experiments more effectively.

Understanding CaliMem’s Search Behavior

The main results show that CaliMem finds stronger policies with the same experimental budget. We next investigate why. First, we test whether its calibrated memory generalizes beyond summarizing past experiments by asking it to predict the outcomes of curation interventions it has not yet seen (§ 5.1). Second, we ablate persistent memory and prospective prediction to isolate their contributions (§ 5.2). Finally, we compare the adaptive policies found by the agent with fixed biological curation recipes to understand where adaptation provides its advantage (§ 5.3).

Does the Memory Predict Unseen Curation Interventions?

We test whether CaliMem’s memory captures reusable structure rather than merely summarizing past experiments. After iteration kk, we freeze the memory and give it to a fresh agent, which predicts the scores of policies executed later in the original trajectory without seeing their outcomes. For each later policy πj\pi_j, y^j∣k=S^(πj∣Mk),  ej∣k=∣yj−y^j∣k∣.\hat y_{j|k}=\hat S(\pi_j\mid M_k),\,\, e_{j|k}=|y_j-\hat y_{j|k}|. We vary kk across the trajectory and average forecasting error across dataset–model tasks (prompt in Appendix app:exam-prompt). Figure fig:matrix shows the results for cell-type annotation. Along a row, error grows with extrapolation distance; down a column, the same target iteration becomes easier to predict as the memory is fitted on a longer prefix. The other domains show the same two patterns (Appendix app:exam).

Are Memory and Prediction Both Necessary?

We separately ablate persistent memory and prospective prediction on protein variant-effect prediction and single-cell batch integration. Memory alone improves the Basic agent by 0.44 and 1.71 points, while prediction alone changes performance by −0.09-0.09 and +0.54+0.54. Combining them performs best in both settings, improving a further 0.54 and 1.65 points over memory alone. We hypothesize that comparing predicted and observed scores helps the agent reassess the claims used to justify a policy, while persistent memory preserves the resulting revisions for subsequent decisions. Without explicit memory updates, the agent may recognize an unexpected outcome without consistently revising the assumptions used in later iterations.

Vector (PDF)

Comparison with Fixed Biological Curation Pipelines

Figure fig:5 breaks the fixed-recipe comparison down to individual recipes. The same classes of intervention (quality filtering, balancing, stratification, coverage, difficulty-based selection) help in one setting and hurt in another, so no recipe in our set transfers uniformly across datasets and models. In aggregate (Table tab:main-bio), the mean recipe is below full data in most domain, and even a per-task oracle closes only a small part of the gap. Test-time curation searches beyond this fixed menu: the agent alters thresholds and allocations, combines mechanisms, changes representations, or writes new policies in response to the measured pipeline. Notably, many of its strongest policies build on the same heuristics (Appendix app:bio-baselines). Their value is conditional on the downstream model and on interactions with the rest of the policy–the search supplies the adaptation a fixed recipe cannot.

Conclusion

Data curation is usually done once, with a fixed recipe, and reused. Across 55 dataset–model tasks in biological domains, we found this practice non-ideal: the same recipe helps one frozen model and hurts another, and averaged over recipes it is no better than a random subset of the same size. We therefore treated curation as agentic search carried out at deployment against the fixed downstream pipeline, test-time curation. A basic agent already improves on every fixed baseline. Adding persistent memory lets it use its whole trajectory and exposes a deeper failure: claims that reach beyond their evidence and steer the rest of the run. CaliMem makes every claim answerable by requiring a prediction before each experiment and writing the prediction error back into the claims. The resulting agent substantially improves on the basic agent in 47 of 48 models, exceeds full-data training by up to 19.4%, and reaches the basic agent’s final score in a third of the iterations or fewer.

Limitations and future work.

1. Noise in single-run feedback. Each iteration is a single training run, so the score the agent reacts to, and the prediction error it learns from, carry run-to-run noise. 2. Cost of test-time curation. Test-time curation exchanges computation for data utility. Our budgets are practical in the settings studied here, but they would be expensive for substantially larger models or training recipes. Cheaper proxy models, early stopping, learned surrogates, and adaptive allocation of the budget could all reduce the cost. A natural extension is an agent that predicts and decides which experiments are worth paying for. 3. From curation policies to scientific hypotheses. Connecting the agent’s empirical claims to explicit hypothesis testing, uncertainty-aware experimental design, and review by domain experts is future work, and it matters most where curation decisions guide the acquisition of new experimental data.

AI Use Statement

Generative AI is both the object of this study and a tool used in producing it, and we separate the two. As the object of study, LLM-driven coding agents (Claude Code, Codex, and OpenHands, driven by the models listed in § 4.0.0.1) proposed, implemented, and revised every curation policy reported in this paper, under the fixed harness of Appendix app:domains. We have not used generative AI to formulate or prove mathematical claims or to propose the research hypotheses. We have reviewed all AI-assisted work. We take responsibility for the final content of this work, including text, claims, or artifacts produced with the aid of generative AI.

Ethics Statement

All datasets used in this work are public research benchmarks used under their released terms: the deep mutational scanning assays of ProteinGym, the non-coding variant sets distributed by BEND (ClinVar, an IGVF reporter assay, and GRASP against 1000 Genomes), the scIB single-cell atlases, the PerturBench screens, and the Tülu 3, LESS, and OpenCodeInstruct instruction-tuning pools. The human-derived biological data are de-identified aggregate or cell-level measurements released for research; we collected no new data and conducted no human-subject studies. Automated data curation is a general-purpose capability that, like any tool for improving training data, could be applied to models built for harmful ends; we see no risk specific to this work beyond that of the underlying models and datasets.

Reproducibility Statement

We release the code, the evaluation harness, agent protocol files (Basic and CaliMem), implementation, and example trajectory logs of the runs reported in the paper. Appendix app:domains specifies each domain’s datasets, held-out splits, composition floors, frozen models, metrics, and validity guards; Appendix app:llm-recipe the fine-tuning hyperparameters of the three instruction-tuning setups; and Appendix app:exam-prompt the forecasting prompt. Every run starts from the same seeded random subset, the frozen models train with fixed seeds, the code setup uses deterministic kernels, and each human-designed recipe is materialised with 5 fill seeds. The agent runs themselves are stochastic and several of the driving models are proprietary and may change; we report the model identifiers.

Acknowledgments

We acknowledge support from the National Science Foundation through grants IIS-2312794, IIS-2313130, OAC-2239622, CNS-2424127, OAC-2613761, and the Amazon–Virginia Tech Initiative for Efficient and Robust Machine Learning. This research is in part supported by the NVIDIA Academic Grant Program using NVIDIA Brev GPU instances.

References

  1. [1]Conn, A. R., Scheinberg, K., & Vicente, L. N. (2009). Introduction to derivative-free optimization. SIAM.
  2. [2]Jordana, A., Zhang, J., Amigo, J., & Righetti, L. (2025). An introduction to zero-order optimization techniques for robotics. https://arxiv.org/abs/2506.22087
  3. [5]Muennighoff, N., Rush, A., Barak, B., Le Scao, T., Tazi, N., Piktus, A., Pyysalo, S., Wolf, T., & Raffel, C. A. (2023). Scaling Data-Constrained Language Models. Advances in Neural Information Processing Systems, 36, 50358–50376.
  4. [6]Wang, P., Liu, H., Liao, Y., Fan, Z., Du, Y., Tang, S., Wang, Y., & Wang, Y. (2025). Selecting Auxiliary Data via Neural Tangent Kernels for Low-Resource Domains.
  5. [8]Lee, K., Ippolito, D., Nystrom, A., Zhang, C., Eck, D., Callison-Burch, C., & Carlini, N. (2022). Deduplicating Training Data Makes Language Models Better. Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 8424–8445.
  6. [9]Xie, S. M., Pham, H., Dong, X., Du, N., Liu, H., Lu, Y., Liang, P. S., Le, Q. V., Ma, T., & Yu, A. W. (2023). DoReMi: Optimizing Data Mixtures Speeds Up Language Model Pretraining. Advances in Neural Information Processing Systems, 36, 69798–69818.
  7. [10]Xia, M., Malladi, S., Gururangan, S., Arora, S., & Chen, D. (2024). LESS: Selecting Influential Data for Targeted Instruction Tuning. https://arxiv.org/abs/2402.04333
  8. [11]Wu, X., Xia, M., Shao, R., Deng, Z., Koh, P. W., & Russakovsky, O. (2024). ICONS: Influence Consensus for Vision-Language Data Selection. https://arxiv.org/abs/2501.00654
  9. [12]Chen, M. F., Murray, T., Heineman, D., Jordan, M., Hajishirzi, H., Ré, C., Soldaini, L., & Lo, K. (2026). Olmix: A Framework for Data Mixing Throughout LM Development. https://arxiv.org/abs/2602.12237
  10. [13]Kang, F., Li, H., Nguyen, A., Dabas, M., Ma, J. W., Sala, F., Song, D., & Jia, R. (2026). Can Generalist Agents Automate Data Curation?. https://arxiv.org/abs/2606.04261
  11. [14]Chan, J. S., Chowdhury, N., Jaffe, O., Aung, J., Sherburn, D., Mays, E., Starace, G., Liu, K., Maksin, L., Patwardhan, T., et al. (2024). MLE-bench: Evaluating Machine Learning Agents on Machine Learning Engineering. https://arxiv.org/abs/2410.07095
  12. [15]Karpathy, A. (2026). autoresearch: AI agents running research on single-GPU nanochat training automatically. In https://github.com/karpathy/autoresearch. https://github.com/karpathy/autoresearchgithub.com/karpathy/autoresearch
  13. [16]Rank, B., Bhatnagar, H., Prabhu, A., Eisenberg, S., Nguyen, K., Bethge, M., & Andriushchenko, M. (2026). PostTrainBench: Can LLM Agents Automate LLM Post-Training?. https://arxiv.org/abs/2603.08640
  14. [17]Zhang, Q., Hu, C., Upasani, S., Ma, B., Hong, F., Kamanuru, V., Rainton, J., Wu, C., Ji, M., Li, H., Thakker, U., Zou, J., & Olukotun, K. (2025). Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models. https://arxiv.org/abs/2510.04618
  15. [18]Shinn, N., Cassano, F., Berman, E., Gopinath, A., Narasimhan, K., & Yao, S. (2023). Reflexion: Language Agents with Verbal Reinforcement Learning. https://arxiv.org/abs/2303.11366
  16. [19]Luecken, M. D., Büttner, M., Chaichoompu, K., Danese, A., Interlandi, M., Mueller, M. F., Strobl, D. C., Zappia, L., Dugas, M., Colomé-Tatché, M., & Theis, F. J. (2022). Benchmarking Atlas-Level Data Integration in Single-Cell Genomics. Nature Methods, 19(1), 41–50.
  17. [20]Luecken, M. D., & Theis, F. J. (2019). Current best practices in single-cell RNA-seq analysis: a tutorial. Molecular Systems Biology, 15(6), e8746. https://doi.org/10.15252/msb.20188746
  18. [21]Heumos, L., Schaar, A. C., Lance, C., Litinetskaya, A., Drost, F., Zappia, L., Lücken, M. D., Strobl, D. C., Henao, J., Curion, F., Single-cell Best Practices Consortium, Schiller, H. B., & Theis, F. J. (2023). Best practices for single-cell analysis across modalities. Nature Reviews Genetics, 24(8), 550–572. https://doi.org/10.1038/s41576-023-00586-w
  19. [22]Notin, P., Kollasch, A., Ritter, D., van Niekerk, L., Paul, S., Spinner, H., Rollins, N., Shaw, A., Orenbuch, R., Weitzman, R., Frazer, J., Dias, M., Franceschi, D., Gal, Y., & Marks, D. (2023). ProteinGym: Large-Scale Benchmarks for Protein Fitness Prediction and Design. Advances in Neural Information Processing Systems, 36, 64331–64379. https://doi.org/10.52202/075280-2810
  20. [23]Marin, F. I., Teufel, F., Horlacher, M., Madsen, D., Pultz, D., Winther, O., & Boomsma, W. (2024). BEND: Benchmarking DNA Language Models on Biologically Meaningful Tasks. International Conference on Learning Representations (ICLR), 15246–15281. https://proceedings.iclr.cc/paper_files/paper/2024/hash/429e7b31625a8b7839f9e4d6e2aa9bb9-Abstract-Conference.htmlproceedings.iclr.cc/paper_files/paper/2024/hash/429e7b31625a8b7839f9e4d6e2aa9bb9-Abstract-Conference.html
  21. [25]Vieth, B., Parekh, S., Ziegenhain, C., Enard, W., & Hellmann, I. (2019). A systematic evaluation of single cell RNA-seq analysis pipelines. Nature Communications, 10(1), 4667. https://doi.org/10.1038/s41467-019-12266-7
  22. [26]Germain, P.-L., Sonrel, A., & Robinson, M. D. (2020). pipeComp, a general framework for the evaluation of computational pipelines, reveals performant single cell RNA-seq preprocessing tools. Genome Biology, 21(1), 227. https://doi.org/10.1186/s13059-020-02136-7
  23. [55]Goyal, S., Maini, P., Lipton, Z. C., Raghunathan, A., & Kolter, J. Z. (2024). Scaling laws for data filtering—data curation cannot be compute agnostic. 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 22702–22711.
  24. [56]Ahmad, W. U., Ficek, A., Samadi, M., Huang, J., Noroozi, V., Majumdar, S., & Ginsburg, B. (2025). Opencodeinstruct: A large-scale instruction tuning dataset for code llms. https://arxiv.org/abs/2504.04030
  25. [57]Lambert, N., Morrison, J., Pyatkin, V., Huang, S., Ivison, H., Brahman, F., Miranda, L. J. V., Liu, A., Dziri, N., Lyu, S., et al. (2024). Tulu 3: Pushing frontiers in open language model post-training. https://arxiv.org/abs/2411.15124
  26. [59]Ivison, H., Zhang, M., Brahman, F., Koh, P. W., & Dasigi, P. (2025). Large-scale data selection for instruction tuning. https://arxiv.org/abs/2503.01807
  27. [60]Albalak, A., Elazar, Y., Xie, S. M., Longpre, S., Lambert, N., Wang, X., Muennighoff, N., Hou, B., Pan, L., Jeong, H., et al. (2024). A survey on data selection for language models. https://arxiv.org/abs/2402.16827
  28. [62]Huang, B., Yu, Y., Huang, J., Zhang, X., & Ma, J. W. (2025). DCA-bench: a benchmark for dataset curation agents. Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining V. 2, 5482–5492.
  29. [63]Zhang, D., Zhoubian, S., Cai, M., Li, F., Yang, L., Wang, W., Dong, T., Hu, Z., Tang, J., & Yue, Y. (2026). Datascibench: An llm agent benchmark for data science. Findings of the Association for Computational Linguistics: ACL 2026, 3685–3728.
  30. [64]Geng, J., Cai, F., Wang, Y., Koeppl, H., Nakov, P., & Gurevych, I. (2024). A survey of confidence estimation and calibration in large language models. Proceedings of the 2024 conference of the north American chapter of the association for computational linguistics: Human Language Technologies (volume 1: Long Papers), 6577–6595.
  31. [65]Singh, J., Khan, Z., Prasad, A., Chen, J. C.-Y., Nambi, A., Lee, H., Stengel-Eskin, E., & Bansal, M. (2026). Agent-brace: Decoupling beliefs from actions in long-horizon tasks via verbalized state uncertainty. https://arxiv.org/abs/2605.11436
  32. [66]Richens, J., Abel, D., Bellot, A., & Everitt, T. (2025). General agents contain world models. https://arxiv.org/abs/2506.01622
  33. [67]Gkountouras, J., Lindemann, M., Lippe, P., Gavves, E., & Titov, I. (2025). Language Agents Meet Causality--Bridging LLMs and Causal World Models. International Conference on Learning Representations, 2025, 37311–37336.
  34. [68]Zhang, J., Xiang, J., Yu, Z., Teng, F., Chen, X., Chen, J., Zhuge, M., Cheng, X., Hong, S., Wang, J., et al. (2025). Aflow: Automating agentic workflow generation. International Conference on Learning Representations, 2025, 34040–34077.
  35. [69]Yuksekgonul, M., Bianchi, F., Boen, J., Liu, S., Huang, Z., Guestrin, C., & Zou, J. (2024). Textgrad: Automatic" differentiation" via text. https://arxiv.org/abs/2406.07496
  36. [70]Khattab, O., Singhvi, A., Maheshwari, P., Zhang, Z., Santhanam, K., Haq, S., Sharma, A., Joshi, T., Moazam, H., Miller, H., et al. (2024). Dspy: Compiling declarative language model calls into state-of-the-art pipelines. International Conference on Learning Representations, 2024, 54928–54958.
  37. [76]Suzgun, M., Yuksekgonul, M., Bianchi, F., Jurafsky, D., & Zou, J. (2026). Dynamic cheatsheet: Test-time learning with adaptive memory. Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics (Volume 1: Long Papers), 7080–7106.
  38. [77]Zhao, A., Huang, D., Xu, Q., Lin, M., Liu, Y.-J., & Huang, G. (2024). Expel: Llm agents are experiential learners. Proceedings of the AAAI Conference on Artificial Intelligence, 38(17), 19632–19642.
  39. [78]Du, Y., Yang, X., Zhou, Z., Liu, W., Lei, Z., Chen, Z., Liu, F., Wu, H., Cai, Y., Liu, Z., et al. (2026). DataMaster: Data-Centric Autonomous AI Research. https://arxiv.org/abs/2605.10906
  40. [79]Thirukovalluru, R., Dhingra, B., Carlson, D. E., et al. (2025). InData: Towards Secure Multi-Step, Tool-Based Data Analysis. https://arxiv.org/abs/2511.11933
  41. [80]Chen, M., Hu, M., Lourie, N., Cho, K., & Ré, C. (2025). Aioli: A unified optimization framework for language model data mixing. International Conference on Learning Representations, 2025, 46089–46132.
  42. [81]Liu, Q., Zheng, X., Muennighoff, N., Zeng, G., Dou, L., Pang, T., Jiang, J., & Lin, M. (2025). Regmix: Data mixture as regression for language model pre-training. International Conference on Learning Representations, 2025, 38305–38339.
  43. [106]Gu, Y., Zhang, K., Ning, Y., Zheng, B., Gou, B., Xue, T., Chang, C., Srivastava, S., Xie, Y., Qi, P., Sun, H., & Su, Y. (2025). Is Your LLM Secretly a World Model of the Internet? Model-Based Planning for Web Agents. Transactions on Machine Learning Research. https://arxiv.org/abs/2411.06559
  44. [141]Wijk, H., Lin, T. R., Becker, J., Jawhar, S., Parikh, N., Broadley, T., Chan, L., Chen, M., Clymer, J. M., Dhyani, J., Ericheva, E., Garcia, K., Goodrich, B., Jurkovic, N., Kinniment, M., Lajko, A., Nix, S., Sato, L. J. K., Saunders, W., … Barnes, E. (2025). RE-Bench: Evaluating Frontier AI R&D Capabilities of Language Model Agents against Human Experts. Proceedings of the 42nd International Conference on Machine Learning, 267, 66772–66832.
  45. [148]Ye, J., Liu, P., Sun, T., Zhan, J., Zhou, Y., & Qiu, X. (2025). Data Mixing Laws: Optimizing Data Mixtures by Predicting Language Modeling Performance. The Thirteenth International Conference on Learning Representations (ICLR).

Paper details

vlnc:W_sa9g4sxc
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents