Prior-Aligned Data Cleaning for Tabular Foundation Models Laure Berti-Equille
IRD, ESPACE-DEV Montpellier, France, France [email protected]
arXiv:2604.25154v1 [cs.LG] 28 Apr 2026
Abstract Tabular Foundation Models (TFMs) achieve state-of-the-art zeroshot accuracy on small tabular datasets by meta-learning over synthetic data-generating processes — making them highly attractive for practitioners who cannot afford large annotated corpora. However, their in-context learning mechanism assumes approximately clean inputs: missing values, outliers, and duplicates in the realworld data create a prior mismatch that degrades both accuracy and confidence calibration simultaneously. Correcting this mismatch requires sequential decisions over cleaning operators whose interactions no static preprocessing rule can anticipate — a natural fit for reinforcement learning (RL). We introduce L2C2, the first deep RL framework framing tabular data cleaning as prior alignment: a learned policy sequences operators to minimize the distributional gap between dirty input and the TFM’s synthetic prior. Six experiments on ten OpenML benchmark datasets establish: 1) three of seven reward designs collapse to degenerate trivial cleaning strategies — principled reward engineering is scientifically non-trivial; 2) the novel TFMAwareReward reward we propose selects structurally distinct pipelines on 4/10 datasets and achieves higher TabPFN v2 accuracy on those diverging cases (mean 0.851 vs. 0.843; Wilcoxon 𝑝=0.063, 𝑛=4) while never underperforming; 3) parameterized cleaning actions improve best-found pipeline reward on 9/10 datasets (Wilcoxon 𝑝=0.004); and 4) a policy pre-trained on one single source dataset exceeds scratch training at the 2,000-step fine-tuning checkpoint on all three held-out datasets (up to +28.8% after full fine-tuning) demonstrating cross-dataset transfer of prioralignment knowledge. These findings establish that prior alignment is a principled data preparation strategy for TFM deployment on real-world tabular data. Code and datasets are publicly available at: https://github.com/LaureBerti/Learn2Clean.
CCS Concepts • Computing methodologies → Machine learning; • Information systems → Data management systems.
Keywords data cleaning, reinforcement learning, tabular foundation models, prior alignment, reward shaping Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]. Conference’17, Washington, DC, USA © 2026 Copyright held by the owner/author(s). Publication rights licensed to ACM. ACM ISBN 978-x-xxxx-xxxx-x/YYYY/MM https://doi.org/10.1145/nnnnnnn.nnnnnnn
ACM Reference Format: Laure Berti-Equille. 2026. Prior-Aligned Data Cleaning for Tabular Foundation Models. In . ACM, New York, NY, USA, 14 pages. https://doi.org/10. 1145/nnnnnnn.nnnnnnn
1
Introduction
A practitioner who deploys Tabular Foundation Models (TFMs) such as TabPFN v2 [14] and TabICL [25] on a medical dataset with 15% missing values does not face only a data quality problem — they face a prior mismatch problem. TabPFN v2 achieves zero-shot accuracy by simulating synthetic data generation processes at metatraining time; its internal prior 𝑃synth assumes approximately clean Gaussian-marginal inputs with low missing-value rates. The dirty empirical distribution 𝑃dirty violates these assumptions in every corrupt column, degrading both predictive accuracy and confidence calibration. Standard remedies such as mean imputation and minmax scaling reduce surface noise but introduce their own distributional distortions; neither account for the z-normalization and power-law scaling TabPFN v2 applies at inference time. The prior mismatch problem. TFMs differ from classical learners in a critical way: their prior 𝑃synth encodes implicit statistical assumptions about the structure of their inputs. When a dirty dataset — with missing values, outliers, duplicates, or distributional shift — is fed to a TFM, the gap M (𝐷) = 𝑑 (𝑃dirty (𝐷), 𝑃synth ) penalizes prediction quality and inflates calibration error simultaneously. The direction of mismatch matters as much as its magnitude. Consider removing 30% rows to eliminate outliers: the distributional gain may be marginal if most outliers are mild, but the context of incontext learning (ICL) shrinks by 30 entries – disproportionately costly because the predictive uncertainty (standard deviation) of √ ICL scales as O (1/ 𝑛) with context size 𝑛. This follows from the Bayesian interpretation of ICL [29]: the implicit posterior over the latent concept concentrates as examples accumulate; by the Bernstein–von Mises theorem [28], its standard deviation contracts √ as O (1/ 𝑛), so each deleted row inflates predictive uncertainty non-linearly rather than proportionally. TabPFN v2 exemplifies this regime, operating on datasets of tens to hundreds of rows where the √ curvature of the 1/ 𝑛 curve is steepest [14]. No existing cleaning framework reasons about this row-count penalty during pipeline construction. Why automate data cleaning and why reinforcement learning. Data cleaning consumes an estimated 60–80% of a data scientist’s project time [16], yet most tooling remains manual (OpenRefine, expert transformation rules) or relies on static, fixed-order preprocessing pipelines that apply the same operations regardless of the specific error profile. Rule-based systems such as constraintdriven repair [27] and ensemble error detectors [19] perform well when errors are governed by explicit integrity constraints, but fail on the open-ended, dataset-specific error combinations typical
Conference’17, July 2017, Washington, DC, USA
of real-world tabular data. Reinforcement learning is a principled match for cleaning because cleaning is an inherently sequential decision problem: imputing missing values before or after outlier removal changes the data distribution seen by every subsequent operator, and the optimal ordering depends on the specific error profile in ways no static rule can anticipate. A trained RL policy amortises the cost of exploring this combinatorially large operatorsequencing space into a reusable artifact that generalises across datasets without retraining — as our transfer learning experiments demonstrate (C6). The difficulty, however, lies not in the learning algorithm itself but in the reward signal: unlike supervised learning where the correct output is known, cleaning has no ground-truth clean data to supervise against. The reward must reward distributional alignment with the TFM’s prior, penalize degenerate strategies (row deletion, trivial imputation), and remain tractable for online evaluation within RL episodes. Designing such a reward — and understanding which designs fail and why — is the central scientific problem this paper solves. Why reward design is harder than it looks. A natural approach is to evaluate each candidate cleaning pipeline by running TabPFN v2 on the clean data and using the output accuracy as a reward. Yet simple accuracy rewards fail in practice: a pipeline that deletes every row with a missing value receives perfect completeness on the remaining data — but may score high solely because it retained only the easy examples. Our greedy-oracle experiments on 10 datasets show that three of seven candidate reward functions collapse to such degenerate strategies, while another produces ceiling-valued rewards that cannot distinguish between pipelines. Reward design for TFM-aligned cleaning is a scientific problem in its own right, not an engineering detail. Why RL, not exhaustive search. Even a modest pipeline space is expensive to search: our extended action space yields up to 302 valid operator sequences of up to three steps per dataset, and the C1 reward taxonomy exhaustively evaluates 112 sequences across 10 datasets and 7 reward functions — already requiring thousands of evaluations. Cleaning is a sequential decision problem: imputing before or after outlier removal, and with which sub-parameters, changes the distribution the next operator sees. Greedy search has no credit-assignment mechanism across steps and cannot generalise to unseen datasets. A trained RL policy amortises the search cost and — as our transfer learning experiments show (C6) — carries prior-alignment knowledge to new data domains without retraining from scratch. Learn2Clean V3. We introduce L2C2, a deep RL framework that operationalises tabular data cleaning as prior alignment for TFMs. Building on Learn2Clean V1 [4] and the broader machine-learningto-data-management research agenda [5], L2C2 replaces tabular Q-learning with deep policy networks (PPO/DQN/A2C via StableBaselines3 [26]), a structured data-quality observer and profiler that provides a 9-dimensional state vector capturing Wasserstein drift, skewness, kurtosis, class balance, and action history, a parameterized action space with typed sub-parameters, and a novel TFMAwareReward reward evaluated directly against TabPFN v2 with a quadratic context-size penalty. The framework is evaluated on ten OpenML benchmark datasets [6] across six experiments, each targeting a distinct design question. Readers unfamiliar with
Laure Berti-Equille
RL may treat each as a systematic evaluation of a specific cleaningpolicy design choice, corresponding to our contributions in this paper: (1) Reward taxonomy (C1): In RL, the reward function defines what behaviour is optimised — a wrong reward produces wrong behaviour regardless of the learning algorithm. We provide the first systematic comparison of seven reward designs on 10 datasets × 112 pipelines. Three rewards collapse to degenerate strategies (row-deletion, ceiling scores) and one is near-trivial; only R3 (MultiObjectiveReward) produces stable non-trivial rankings — directly motivating TFMAwareReward (§5.2). (2) TFM-aligned reward vs. RF-reward (C2): The reward signal not only scores pipelines — it reshapes which pipelines are discovered depending on the end-goal task: TFM or Random Forest classification in our settings. TFM- versus RFaligned reward functions are compared. TFMAwareReward selects structurally different pipelines from RF-reward cleaning on 4 of 10 datasets, with a systematic preference for row-preserving imputers that protect ICL context size, and is never outperformed (§5.3). (3) Calibration recovery (C3): Accurate predictions are insufficient if the model’s confidence is miscalibrated — a critical concern for high-stakes deployments. Prior-aligned cleaning improves TabPFN v2 Expected Calibration Error (ECE) relative to the unclean baseline across all four error types (missing values MCAR/MAR, outliers, duplicates); the ECE advantage over RF-reward is specific to duplicate injection (§5.4). (4) Error sensitivity (C4): We characterise when and how much prior-aligned cleaning helps as a function of error injection rate. The accuracy advantage is present across MCAR rates but non-monotone, shaped by distributional structure rather than injection rate alone (§5.5). (5) parameterized actions (C5): A discrete action space forces a fixed sub-parameter (e.g., fixed KNN 𝑘); a parameterized space lets the policy discover the optimal 𝑘 ∈ {1, . . . , 20} per dataset. Typed sub-parameters (KNN 𝑘, IQR threshold, scaler type) improve best-found pipeline reward on 9 of 10 datasets (mean Δ=+0.0007, up to +0.003) over a discrete baseline (§5.6). (6) Transfer learning (C6): A key advantage of learned policies over rule-based systems is reusability across datasets. A PPO policy pre-trained on D3 (ionosphere) and fine-tuned on three held-out datasets already exceeds scratch-trained reward at the 2,000-step checkpoint on all three (Phoneme: +7.0%; Adult: +17.2%; Bank: +11.5% over scratch’s 5,000-step asymptote), demonstrating that prior-alignment knowledge transfers across tabular domains (§5.7). All experiments use ten OpenML benchmark datasets with synthetically injected errors and a fixed evaluation seed; generalisation to other TFMs and natural error distributions is discussed in Section 6. The remainder of the paper is organised as follows. Section 2 surveys related work on RL-based data cleaning, tabular foundation models, and calibration. Section 3 formalises prior mismatch and the cleaning MDP. Section 4 describes the L2C2 framework, observer,
Prior-Aligned Data Cleaning for Tabular Foundation Models
reward suite, and parameterized action space. Section 5 presents all six experiments. Section 6 discusses scope and limitations, and Section 7 concludes.
2 Related Work 2.1 RL and Search for Data Pipeline Optimisation Automated machine learning (AutoML) frames pipeline construction as a combinatorial search problem, using Bayesian optimisation to select and chain preprocessing and modelling steps [9] or genetic programming to evolve full pipelines [7, 21]. These systems treat the data as a fixed input and optimise over model and hyperparameter choices; they do not reason about cleaning as a first-class sequential decision. RL is a natural fit for sequential pipeline decisions: each cleaning operator changes the data distribution seen by subsequent steps, and a Markov Decision Process formulation makes this sequential dependency explicit while providing credit assignment across steps — something greedy search and Bayesian optimisation cannot provide. L2C2 inherits the RL-for-pipelines framing but narrows the operator set to data-cleaning actions and evaluates pipeline quality through a TFM, making the reward itself model-aware and prior-distribution-sensitive. The parameterized action space (C5) goes beyond operator selection to continuous sub-parameter optimisation, a dimension absent from prior RL-forpipeline work.
2.2
RL for Data Cleaning
Early data quality research established cost-utility frameworks for prioritising cleaning operations in data mining settings [3]. L2C2 operationalises these cost-utility tradeoffs as a learnable reward signal rather than a hand-coded rule. Learn2Clean V1 [4] introduced the very first RL formulation for data cleaning, sequencing operators with a tabular Q-learner and a downstream ML accuracy reward. L2C2 shares the sequential-cleaning-as-MDP framing but replaces shallow Q-learning with deep policy networks, extends the reward suite from one function to seven, and evaluates pipeline quality against a TFM rather than a fixed surrogate. ActiveClean [16] established the paradigm of model-aware iterative cleaning: using downstream model loss as the cleaning signal and iteratively selecting which cells to repair. L2C2 inherits this modelawareness but replaces the classical statistical model with a TFM (specifically TabPFN v2), introduces a multi-objective reward with explicit distributional drift regularisation absent in ActiveClean, and learns a policy that generalises across datasets rather than solving each instance independently. RLclean [24] extends Learn2Clean to multi-table settings with a graph-based state representation but retains a fixed-learner reward and does not consider multi-objective rewards, parameterized actions, or TFM evaluators. ReClean [1] targets constraint-based cleaning and casts error detection as a contextual bandit, decoupling detection from repair; RAHA and BARAN [19] follow a detect-then-repair paradigm: RAHA uses an ensemble of rule-based and ML detectors to flag erroneous cells, and BARAN corrects them using a feature-based classifier; neither model a sequential decision process or a downstream task objective, making them complementary to L2C2’s RL framing. HoloClean [27] is the canonical constraint-based repair baseline whose integrity
Conference’17, July 2017, Washington, DC, USA
constraints are not available in the general-purpose numeric setting of L2C2. CleanSurvival [15] uses survival-analysis-inspired reward shaping to handle delayed feedback in multi-step sequences, but like the above systems it targets a fixed downstream model and does not address in-context learning context-size effects. L2C2 differentiates along three axes absent from all prior RL-cleaning work: it targets TFM accuracy and ECE as joint objectives (C2, C3), it provides controlled evidence that the reward — not the pipeline space — drives cleaning quality (C2), and it demonstrates cross-dataset transfer of prior-alignment knowledge (C6).
2.3
Data Quality Profiling and Tabular Foundation Model Alignment
Classical data profiling tools such as OpenRefine compute percolumn statistics — missing rates, duplicate fingerprints, value distributions — to guide manual cleaning decisions. The broader literature on exploratory data analysis for data-centric AI systems [23] and automated anomaly detection in complex tabular data [2] confirms that profiling is the critical prerequisite before any cleaning intervention. L2C2 integrates a lightweight DataProfiler that computes these signals automatically before each cleaning episode and exposes them as part of the RL observation vector, allowing the policy to select and mask actions based on the detected error profile. This bridges rule-based profiling and learned cleaning: the profiler detects what is wrong; the policy decides how to fix it given the TFM’s prior-alignment objective. The centrality of data quality extends beyond inference to the training regimes of foundation models: careful filtering and deduplication of pretraining corpora improve downstream performance independently of scale [10, 18]. Real-world data quality is multidimensional — no single cleaning strategy dominates across completeness, consistency, and accuracy dimensions simultaneously, a finding that directly motivates L2C2’s multi-objective reward design. The emerging data-centric AI paradigm [23, 31] frames data quality improvement — rather than model architecture search — as the primary lever for performance gains. Crucially, however, none of this prior work addresses how dirty inference-time inputs affect in-context learning in tabular FMs. L2C2 fills this gap with a controlled sensitivity analysis across four corruption types and ten datasets (C4), providing the first evidence that prior mismatch degrades TFM performance in ways consistent with distributional structure rather than injection rate alone.
2.4
Tabular Foundation Models and Calibration
TabPFN v2 [14] achieves strong zero-shot performance on small tabular datasets by meta-learning over millions of synthetic datagenerating processes; its confidence calibration is sensitive to distributional mismatch between its synthetic prior and real inputs. TabICL [25] scales in-context learning to larger tables via efficient attention mechanisms but similarly degrades when inputs deviate from the pretraining distribution; L2C2’s prior-alignment objective applies in principle to any TFM, with TabICL as a natural extension target once reward weights are recalibrated for its pretraining prior. Work on why tree-based models outperform deep networks on irregular tabular distributions [12, 30] underscores the centrality of input-distribution alignment: L2C2 operationalises this insight as
Conference’17, July 2017, Washington, DC, USA
Laure Berti-Equille
• State 𝑠𝑡 ∈ S ⊆ R9 : a 9-dimensional quality descriptor of the full current dataset (not a windowed view). The vector decomposes into a 6-dimensional quality block and a 3-dimensional binary action-type history: ¯ Δbal, 𝑟 ret, ℎ imp, ℎ out, ℎ scl ∈ R6+3 . 𝑠𝑡 = 𝑟 miss, 𝑊1, 𝛾¯1, 𝜅, | {z } | {z }
a learnable cleaning objective rather than a post-hoc observation. Deep tabular architectures [11] and ensemble AutoML systems [8] serve as performance reference points in our evaluation; they are not cleaning-aware. L2C2 is, to our knowledge, the first system to use a tabular in-context learning model’s forward-pass accuracy and calibration jointly as the RL reward signal for cleaning pipeline search — extending the model-aware cleaning paradigm of ActiveClean [16] to TFMs and adding explicit distributional drift regularisation. This distributional sensitivity of TFMs has a direct implication for calibration. Calibration degrades under distribution shift [22], and modern architectures that appear well-calibrated in-distribution can be overconfident on shifted inputs [20]. Post-hoc recalibration techniques such as temperature scaling [13] address model-level miscalibration after training but leave input-level corruption — the proximate cause of TFM mismatch — entirely unaddressed. L2C2 demonstrates that input-level cleaning can recover TFM calibration (C3), positioning data preparation as a first-class tool for uncertainty management alongside post-hoc and architectural calibration methods.
6
3 Problem Formulation 3.1 Prior Mismatch Let F𝜃 be a TFM parameterized by 𝜃 , trained by meta-learning on datasets sampled from a synthetic prior 𝑃synth . Let 𝐷 = (𝑋, 𝑦) be a dirty tabular dataset with empirical feature distribution 𝑃dirty (𝑋 ). Definition 1 (Prior mismatch). The prior mismatch of dataset 𝐷 with respect to TFM F𝜃 is M (𝐷) = 𝑑 𝑃 dirty (𝑋 ), 𝑃 synth , where 𝑑 is a distributional divergence. We instantiate 𝑑 as the mean column-wise Wasserstein-1 distance normalized by the reference colÍ𝑝 umn standard deviation: 𝑑 (𝑃, 𝑄) = 𝑝1 𝑗=1 𝑊1 (𝑃 𝑗 , 𝑄 𝑗 )/𝜎 𝑗ref , providing a scale-free, bounded measure of marginal distribution shift.
3.2
Cleaning as Prior Alignment
Let Π be a set of parameterized cleaning pipelines — ordered sequences of at most 𝑇 deterministic actions 𝑎 1, . . . , 𝑎𝑇 , each with typed sub-parameters. Each pipeline 𝜋 ∈ Π maps a dirty dataset 𝐷 = (𝑋, 𝑦) to a clean version 𝜋 (𝐷) = (𝑋 ′, 𝑦 ′ ). Definition 2 (Prior-aligned cleaning). The optimal prioraligned pipeline is 𝜋 ∗ = arg min M (𝜋 (𝐷)) s.t. Acc(F𝜃 , 𝜋 (𝐷)) ≥ 𝜏, 𝜋 ∈Π
where Acc is downstream TFM accuracy on a held-out split and 𝜏 is a minimum acceptable performance threshold. Solving this constrained problem exactly over the exponential pipeline space is intractable. We scalarise it into a reward function (Definition 3, Eq. (1)) and search over Π with deep RL.
3.3
MDP Formulation
We model data cleaning as a finite-horizon, episodic Markov Decision Process M = (S, A, 𝑃, 𝑅, 𝛾,𝑇 ):
3
See Section 4.1 for precise component definitions. • Action 𝑎𝑡 ∈ A: a parameterized cleaning operation from one of three families — imputer (strategy ∈ {mean, median, KNN}; KNN count 𝑘 ∈ {3, 5, 7, 10} in the parameterized suite), outlier cleaner (method ∈ {IQR, z-score}; threshold on a discrete grid {1.0, 1.5, 2.0, 2.5, 3.0} for IQR and {2.0, 2.5, 3.0, 3.5} for z-score), or scaler (method ∈ {min-max, z-score}). • Transition 𝑃: deterministic given (𝑠𝑡 , 𝑎𝑡 ). Each cleaning operator is a function of the current dataset; 𝑠𝑡 +1 is uniquely determined as 𝜙 (𝑎𝑡 (𝐷𝑡 )) where 𝜙 is the DataQualityObserver. Episodes are fixed-length: termination occurs at step 𝑇 regardless of intermediate quality. • Reward 𝑅(𝑠𝑡 , 𝑎𝑡 , 𝑠𝑡 +1 ): one of seven reward functions (Section 4.2). • Discount / horizon: 𝛾 = 0.99, 𝑇 = 6 steps per episode — sufficient for each of the three action families to be applied at least once.
4
The L2C2 Framework
L2C2 is structured around three interacting components: a dataquality observer that maps the current dataset state to a 9-dimensional feature vector, a parameterized action module offering imputers, outlier cleaners, and scalers with typed sub-parameters, and a reward function that evaluates cleaning quality against TabPFN v2. The components are described below; Section 5 reports experimental results.
4.1
Data Quality Observer
The state 𝑠𝑡 is computed by the DataQualityObserver after each cleaning step, covering the full dataset. Its 9 dimensions are assembled as: ¯ Δbal, 𝑟 ret, ℎ imp, ℎ out, ℎ scl , 𝑠𝑡 = 𝑟 miss, 𝑊1, 𝛾¯1, 𝜅, | {z } | {z } 6-dim quality vector
3-dim action history
where the components are defined as follows: • 𝑟 miss ∈ [0, 1]: mean missing-value rate across all columns. • 𝑊1 ≥ 0: mean column-wise normalized Wasserstein-1 distance from the reference (pre-cleaning) distribution, capped at 5𝜎 per column for robustness. • 𝛾¯1 ≥ 0: mean absolute skewness across numeric columns (columns with < 3 non-null values contribute 0). • 𝜅¯ ≥ 0: mean absolute excess kurtosis across numeric columns (< 4 non-null values contribute 0). • Δbal ∈ [0, 1]: minority-to-majority class count ratio min𝑘 𝑛𝑘 /max𝑘 𝑛𝑘 ; zero for unsupervised tasks. • 𝑟 ret ∈ (0, 1]: row retention ratio 𝑛𝑡 /𝑛 0 , where 𝑛 0 is the original row count. • ℎ imp, ℎ out, ℎ scl ∈ {0, 1}: binary flags indicating whether the imputer, outlier cleaner, or scaler family has been applied at
Prior-Aligned Data Cleaning for Tabular Foundation Models
least once this episode. These three bits expand the scalar quality vector from 6 to 6 + 3 = 9 dimensions. Computational cost of state construction. The dominant cost of computing 𝑠𝑡 is the column-wise Wasserstein-1 term 𝑊1 : each column requires sorting 𝑛 values, giving O (𝑛 log 𝑛) per column and O (𝑑 ·𝑛 log 𝑛) total per state update, where 𝑑 is the number of numeric columns. This closed-form sort-based computation is exact and requires no entropic approximation, because each marginal is one-dimensional. In practice this cost is negligible relative to TabPFN v2 inference in R7: state construction takes a few milliseconds, whereas a single TabPFN v2 call on 512 rows takes approximately 0.3s [14].
4.2
Reward Function Suite
L2C2 implements and compares seven reward functions defined below. All rewards are clipped to [−1, 1]. R1 — CompletenessRetentionReward (V1 baseline). Adapted from Learn2Clean V1 [4]: √ missing cells 𝑅1 = 1 − × 𝑟 ret . total cells ret is the retention as the number of remainig rows after cleaning. The square-root dampens the row-deletion penalty relative to a linear formulation, tolerating moderate outlier removal. It provides no signal about distributional quality or downstream model performance, making it a useful lower-bound baseline. R2 — AccuracyReward. Cross-validated accuracy of a RandomForest (50 trees, 3-fold CV): 𝑅2 = AccRF (𝑋 ′, 𝑦 ′ ). It provides a strong single-metric signal for discriminative performance but is blind to distributional distortion, which can encourage over-aggressive outlier removal to inflate in-sample accuracy. R3 — MultiObjectiveReward. A scalar combination of accuracy, retention, and data quality: 𝑅3 = 𝑤 acc AccRF + 𝑤 ret 𝑟 ret + 𝑤 qual 𝑄 (𝑋 ′ ) − 𝜆3 𝑊1 (𝑋 ′, 𝑋 0 ), with (𝑤 acc, 𝑤 ret, 𝑤 qual, 𝜆3 ) = (0.50, 0.30, 0.20, 0.10) and 𝑄 (𝑋 ′ ) = (1 − 𝑟 miss ) (1 − 𝑟 dup ) a joint completeness-deduplication quality score. This is the primary non-TFM multi-objective baseline in our experiments. R4 — DriftPenaltyReward. Accuracy with a substantially stronger Wasserstein penalty: 𝑅4 = 0.70 AccRF + 0.20 𝑟 ret + 0.10 𝑄 (𝑋 ′ ) − 𝜆4 𝑊1 (𝑋 ′, 𝑋 0 ), where AccRF is the accuracy of a random forest classifier and 𝜆4 = 0.50 (five times larger than in R3). This encourages distributionfaithful operations (e.g., KNN imputation) over distortion-inducing ones (e.g., mean imputation), at the cost of lower accuracy weight. R5 — IncrementalGainReward. Instead of an absolute score, this reward signals the per-step improvement in 𝑅3 , scaled to [−1, 1]: 𝑅5 = clip(5 · (𝑅3 (𝑠𝑡 +1 ) − 𝑅3 (𝑠𝑡 )), −1, 1). The scale factor 5 amplifies small but consistent gains into a learnable signal and prevents the agent from coasting after a single high-reward action.
Conference’17, July 2017, Washington, DC, USA
R6 — DataDistortionPenaltyReward. A five-component distributionalfaithfulness reward: 5 ∑︁ 𝑅6 = 1 − 𝑤𝑘 𝑑𝑘 (𝑋 ′, 𝑋 0 ), 𝑘=1
where 𝑑 1 = normalized 𝑊1 (weight 0.30), 𝑑 2 = Jensen-Shannon divergence on 50-bin histograms (0.25), 𝑑 3 = Frobenius norm of the correlation-matrix shift (0.20), 𝑑 4 = mean log-variance ratio 2 )| per column (0.15), and 𝑑 = normalized skewness | log(𝜎ˆ 2 /𝜎ref 5 shift |𝛾¯1 (𝑋 ′ ) − 𝛾¯1 (𝑋 0 )|/(1 + |𝛾¯1 (𝑋 0 )|) (0.10). Each component lies in [0, 1]; a perfectly faithful cleaning yields 𝑅6 = 1. R7 — TFMAwareReward (ours): Definition 3. Definition 3 (TFMAwareReward). Let 𝑛 0 be the original row count and 𝑛 ′ the post-cleaning row count. The TFMAwareReward is: ′ 𝛼 𝑛 𝑅TFM (𝑋 ′, 𝑦 ′ ) = 𝑤 acc · Acc𝑇 𝑎𝑏𝑃 𝐹 𝑁 𝑣2 (𝑋 ′, 𝑦 ′ ) + 𝑤 ret · 𝑛0 (1) + 𝑤 qual · 𝑄 (𝑋 ′ ) − 𝜆 · 𝑊1 (𝑋 ′, 𝑋 0 ), where Acc𝑇 𝑎𝑏𝑃 𝐹 𝑁 𝑣2 is TabPFN v2 test accuracy on a stratified 20 % held-out split (at most 512 rows subsampled for reward-loop speed), 𝑄 (𝑋 ′ ) = (1 − 𝑟 miss )(1 − 𝑟 dup ), and 𝑊1 is the normalized column-wise Wasserstein drift. The exponent 𝛼=2 and weights (𝑤 acc, 𝑤 ret, 𝑤 qual, 𝜆) = (0.50, 0.35, 0.15, 0.05) are set a priori. The quadratic exponent is √ motivated by the O (1/ 𝑛) variance scaling of in-context predictors [14, 29]: losing 20% of rows (retention = 0.80) yields a score of 0.802 = 0.64 instead of 0.80, an 80% larger deduction for the same row loss, non-linearly discouraging row deletion. 𝜆=0.05 is deliberately small because TabPFN v2 applies its own internal z-normalization, already compensating for moderate drift. Reward weights and scale. Accuracy dominates (𝑤 acc =0.50) as the primary TFM objective; retention is second (𝑤 ret =0.35), mo√ tivated by the O (1/ 𝑛) uncertainty scaling [14, 29]; quality and drift are minor regularisers (0.15 and 0.05). All terms are bounded in [0, 1] by construction (𝑊1 is normalized by column standard deviation and capped at 5𝜎), so 𝑅TFM ∈ [−0.05, 1.00]; in practice, rewards lie in [0.3, 0.95]. These weights were not tuned on the experimental datasets and were held fixed across all ten datasets and all six experiments.
4.3
Episode Loop
Algorithm 1 summarises one training episode of L2C2. The inner loop is compatible with any SB3 on-policy algorithm; PPO is used by default.
4.4
parameterized Action Space
Unlike V1 (6 discrete, fixed-parameter operators), L2C2 uses parameterized actions with typed sub-parameters. Formally, each action is a tuple 𝑎 = (𝑓 , 𝑜, 𝜽 ) where 𝑓 ∈ {imputer, outlier, scaler} is the action family, 𝑜 ∈ O𝑓 is the operator within that family, and 𝜽 ∈ Θ 𝑓 ,𝑜 is the typed sub-parameter vector. The discrete suite (used in experiments C1, C2, C3, C4) has |A|=7 actions; the parameterized suite (C5) expands this to |A|=17 actions by adding KNN neighbour counts 𝑘 ∈ {3, 7, 10} and outlier thresholds on a finer grid. • ParameterizedImputer: strategy ∈ {mean, median, KNN}; KNN neighbour count 𝑘 ∈ Z ∩ [1, 20] (default 𝑘 = 5). The
Conference’17, July 2017, Washington, DC, USA
Algorithm 1 One training episode of L2C2 Require: Dirty dataset 𝐷 0 = (𝑋 0, 𝑦0 ); action set A; reward 𝑅; policy 𝜋𝜃 ; horizon 𝑇 ; penalty 𝑟 𝑝 1: 𝐷 ← 𝐷 0 ; h ← 03 ; 𝐺 ← 0; B ← [ ] ⊲ reset dataset, action-type history, return, replay buffer 2: 𝜙 .reset(𝐷 0 ); 𝑅.reset(𝐷 0 ) ⊲ observer sets reference distribution; reward resets baselines 3: for 𝑡 = 1, . . . ,𝑇 do 4: 𝑠𝑡 ← 𝜙 (𝐷, h) ⊲ 9-dim observation from DataQualityObserver 5: 𝑎𝑡 ← 𝜋𝜃 (𝑠𝑡 ) ⊲ discrete action index (+ sub-parameters from auxiliary head) 6: if h[family(𝑎𝑡 )] = 1 then 7: 𝑟𝑡 ← 𝑟 𝑝 ; continue ⊲ repeated-family guard; assign penalty, skip cleaning 8: end if 9: 𝐷 ← 𝑎𝑡 (𝐷) ⊲ apply parameterized cleaning op; entire dataset transformed 10: h[family(𝑎𝑡 )] ← 1 11: 𝑟𝑡 ← 𝑅(𝐷, 𝑦0 ) ⊲ scalar reward from whichever 𝑅𝑖 is selected 12: B.append(𝑠𝑡 , 𝑎𝑡 , 𝑟𝑡 ); 𝐺 ← 𝐺 + 𝛾 𝑡 −1𝑟𝑡 13: end for 14: Update 𝜋𝜃 via PPO on B 15: return clean dataset 𝐷, episode return 𝐺
C5 ablation experiment evaluates the discrete subset 𝑘 ∈ {3, 5, 7, 10}; main experiments use the default 𝑘 = 5. • ParameterizedOutlierCleaner: method ∈ {IQR, z-score}; threshold ∈ [0.5, 5.0] (continuous float; defaults: 1.5 for IQR, 3.0 for z-score). • ParameterizedScaler: method ∈ {min-max, z-score, quantile}; quantile output ∈ {uniform, normal}.
4.5
Training Algorithm, Convergence, and Stability
L2C2 supports PPO, DQN, and A2C via Stable-Baselines3 [26]; all experiments use PPO with an MLP policy (two hidden layers of 256 units, tanh activation, 𝛾=0.99, learning rate 3×10−4 , clipping 𝜖=0.2). Because L2C2 presents the same dirty input dataset at every episode, the MDP is stationary per dataset: the environment dynamics and reward function do not change across episodes, giving PPO a fixed target value function. Under a Lipschitz-continuous policy class with bounded rewards, standard PPO convergence guarantees apply [26]. Empirically, reward curves reach stable asymptotes within 2,000–3,000 steps on 8 of 10 training datasets; we detect convergence when the 100-episode rolling mean changes by less than 0.001 over 500 consecutive steps. Instability on small datasets. D1 (𝑛 = 155) and D2 (𝑛 = 270) produce NaN policy logits during C6 pre-training experiment. The root cause is a reward-scale anomaly: at very small 𝑛, aggressive outlier removal can reduce the surviving row count to 𝑛 ′ = 0, yielding undefined TabPFN v2 inference and effectively ±∞ reward before clipping. The repeated-family guard (penalty 𝑟 𝑝 for applying
Laure Berti-Equille
the same action family twice) reduces but does not eliminate this degenerate trajectory. We mitigate the issue through two guards: (i) per-step reward clipping to [−1, 1], and (ii) a minimum row-count check that terminates the outlier-removal action early if proceeding would reduce 𝑛 ′ below 10 rows. Episode return range. With 𝑇 = 6 steps and per-step reward clipped to [−1, 1], episode returns lie in [−6, 6] by construction. Observed episode returns across all datasets and all experiments range from 3.4 to 4.9.
5 Experiments 5.1 Experimental Setup Datasets. We use 10 classification datasets from the OpenML CC18 benchmark suite [6] and TabPFN v2 evaluation benchmarks (Table 1). Datasets span four size tiers (XS: <400 rows to L: >10K rows), three domains, and include real missing values (hepatitis, diabetes, adult) and synthetically injected errors. D9 and D10 are subsampled to 10K rows (stratified, seed=42) for RL training; full datasets are used for greedy oracle evaluation. Table 1: Benchmark datasets (D1–D10). Natural miss. indicates real missing values; all other datasets receive synthetic MCAR injection. XS (<400 rows), S (<1K), M (<10K), L (>10K). #
Dataset
Rows
Feat.
Natural miss.
Tier
D1 D2 D3 D4 D5 D6 D7 D8 D9 D10
hepatitis heart-statlog ionosphere blood-transf. diabetes (Pima) credit-g kr-vs-kp phoneme adult bank-marketing
155 270 351 748 768 1,000 3,196 5,404 48,842 45,211
19 13 34 4 8 20 36 5 14 16
Yes No No No Yes No No No Yes No
XS XS XS S S S M M L L
Error injection. For C1 and C5: MCAR 15% on datasets without natural missing values. For C2 and C4: MCAR 15% on all datasets (injected on top of existing NaN). For C3 (error type comparison): MCAR 15%, MAR 15%, Outlier (OUT) 3- 10%, Duplicate (DUP) 10% on five representative datasets (D3, D4, D5, D7, D8). For C4 (sensitivity sweep): MCAR ∈ {0, 5, 10, 15, 20, 30}% on 5 representative datasets (D1, D3, D5, D7, D9) with other error types held at zero. All injections use seed=42. Artifacts are stored as /datasets/<name>_<type>_p<rate>.parquet at https://github.com/LaureBerti/Learn2Clean Baselines. • B0: No cleaning (raw dirty data fed to TabPFN v2). • B1: Standard preprocessing (mean impute + min-max scaling). • B2: Standard full-pipeline cleaning (mean impute + z-score normalize). • B3: Simple random strategy — average of three single-step pipelines (mean impute; median impute; min-max scale).
Prior-Aligned Data Cleaning for Tabular Foundation Models
• B4: Greedy oracle — best of 𝑁𝑝 =20 stratified-sampled pipelines (from the 112-sequence pool), RF reward; also referred to as B-greedy-RF. • B5: Greedy oracle — best of 𝑁𝑝 =20 stratified-sampled pipelines (from the 112-sequence pool), TabPFN reward; also referred to as B-greedy-TFM. • B-RL-RF: L2C2 PPO with MultiObjectiveReward (RF evaluator). • B-RL-TFM: L2C2 PPO with TFMAwareReward [ours]. Evaluation. We use TabPFN v2 specifically (not v1) because v2 introduced a substantially richer internal preprocessing pipeline — z-normalization, a power transform, and binary missing-value flags applied unconditionally at inference time [14] — whose sensitivity to upstream data quality distributions is the central object of study; v1 lacked these transforms and showed weaker zero-shot accuracy on the same benchmarks. All cleaning policies are finally evaluated by TabPFN v2 accuracy and ECE on a 20% held-out test split (stratified, seed=42). ECE is computed with 10 equal-width confidence bins on the softmax probability of the predicted class. Accuracy is the primary metric for three reasons: (i) it is the standard reported by TabPFN v2’s own benchmark suite [14] and the OpenML repository for these tasks, enabling direct comparison with published baselines; (ii) seven of the ten datasets have near-balanced class distributions, where accuracy and AUROC are empirically tightly correlated; and (iii) since all methods are evaluated under identical conditions, the ranking of cleaning strategies is robust to the choice of aggregation metric when the pipeline affects the data distribution uniformly across classes—which prior-alignment cleaning does by construction. For the three class-imbalanced datasets (D4 Blood Transfusion, D9 Adult, D10 Bank Marketing), accuracy may understate minority-class benefit; ECE is a more informative calibration indicator for these cases. Statistical significance. Wilcoxon signed-rank test across 10 datasets, one-sided (directional hypotheses) or two-sided (nondirectional comparisons), 𝑝 < 0.05. All reported results use a fixed random seed (seed=42) for error injection, train/test splitting, pipeline subsampling, and RL training; results reflect single-run evaluations. Compute and runtime. All experiments were run on a single CPU machine (no GPU required for inference; TabPFN v2 runs on CPU via its default configuration [14]). The dominant cost per dataset is the greedy oracle TabPFN v2 evaluation: with 𝑁𝑝 =20 pipelines and the shared evaluation cache, each (dataset, error profile) pair requires 𝑁𝑝 +2 = 22 TabPFN v2 calls at ≈0.3 s per call on 512 rows, totalling ≈7 s per profile. The full 10-dataset × 8-profile C2/C3/C4 matrix therefore completes in under 10 minutes. RL training (PPO, 3,000–5,000 steps, 𝑇 =6 steps per episode) adds ≈3–7 s per step on large datasets, with a total training time of 3–8 hours in all 10 datasets for a single RL variant. C1 (112 pipelines exhaustive) and C5 (834 pipelines) are the most expensive greedy sweeps; both complete within 4 hours on a single machine. Greedy oracle with shared evaluation cache. The greedy baselines (B-greedy-RF and B-greedy-TFM) exhaustively score a candidate set of cleaning pipelines and select the highest-scoring one. Naïvely this requires one TabPFN v2 forward pass per pipeline per reward mode, yielding O (𝑁𝑝 ×𝑁𝑅 ) calls where 𝑁𝑝 is the pipeline
Conference’17, July 2017, Washington, DC, USA
count and 𝑁𝑅 the number of reward modes. We eliminate this redundancy via a two-level shared cache. First, a cleaning cache applies each candidate pipeline to the dirty dataset exactly once, storing the resulting clean DataFrame. Second, a TabPFN v2 cache evaluates each cached dataset exactly once, storing the (Acc, ECE) pair. Both the RF-reward and TFM-reward searches then read from these caches: the RF search scores pipelines using MultiObjectiveReward (which calls a RandomForest, not TabPFN v2) against the pre-clean data, while the TFM search selects the best pipeline by evaluating the TFMAwareReward formula directly on cached TabPFN v2 scores—with no additional forward pass. This reduces the total TabPFN v2 calls per (dataset, error profile) from 2 + 2𝑁𝑝 to 2 + 𝑁𝑝 . Pipeline enumeration and subsampling. C1 and C5 experiments exhaustively evaluate all valid pipelines in their respective action spaces (112 sequences for the 7-action discrete suite; 834 sequences for C5’s 17-action parameterized suite). C2, C3, and C4 use a stratified subsample of 𝑁𝑝 = 20 pipelines for the greedy oracle search, drawn from a pool of 112 sequences (C2; 7-action suite) or 302 sequences (C3, C4; extended 9-action suite that adds deduplication and quantile normalization). Ordered sequences have length ≤ 3 with no repeated action group. The sampler always retains the no-op pipeline and all single-step pipelines, then fills the remaining budget proportionally from the two-step and three-step tiers at seed=42. With 𝑁𝑝 = 20 this yields 22 TabPFN v2 calls per profile (with the shared evaluation cache), keeping the full 10-dataset × 8-profile experiment within 12 hours on a single machine. To bound the selection quality loss we ran a 302-pipeline exhaustive search (full action space) on all ten datasets spanning four orders of magnitude in size — D1 (hepatitis, 80 rows), D2 (heart_statlog, 270 rows), D3 (ionosphere, 351 rows), D4 (blood_transfusion, 748 rows), D5 (diabetes, 768 rows), D6 (credit_g, 1,000 rows), D7 (kr_vs_kp, 3,196 rows), D8 (phoneme, 5,404 rows), D9 (adult, 48,842 rows), and D10 (bank_marketing, 45,211 rows) — and compared best-of-302 with best-of-20 under MCAR 15%. In all ten cases the relative accuracy gap was 0.0% and both searches selected the identical best pipeline, confirming that the stratified sampler consistently recovers the exhaustive optimum across the full range of dataset sizes evaluated.
5.2
C1: Reward Function Taxonomy
Hypothesis (C1). Among the seven reward functions in L2C2, driftpenalizsing and multi-objective rewards yield higher best-pipeline TabPFN v2 accuracy than single-metric rewards when evaluated by a fixed greedy search over 112 valid pipeline sequences on MCAR 15%-corrupted data. Figure 1 gives a compact view of the raw best-pipeline scores across the full reward×dataset grid. Figure 2 plots, for each (dataset, reward function) pair, the greedy-oracle best-pipeline reward score against the TabPFN v2 accuracy achieved by that pipeline. Figure 3 aggregates these points per reward function (mean ± SD across D1–D10), making the relationship between reward calibration and downstream quality directly visible. Because the pipeline search is fixed (exhaustive over 112 ordered sequences), any score difference reflects how each reward ranks pipelines, not the RL optimizer. The central insight from both figures is that a high reward score does not imply high TabPFN v2 accuracy: trivial-collapse rewards (R1,
Conference’17, July 2017, Washington, DC, USA
1.000 0.958 0.998 0.926 0.044 1.000 1.000
1.000 0.763 0.992 0.802 0.101 1.000 1.000
1.000 0.920 0.996 0.925 0.121 0.997 1.000
1.000 0.391 0.882 0.507 0.117 1.000 1.000
1.000 0.651 0.997 0.740 0.091 1.000 1.000
1.000 0.451 0.993 0.598 0.105 1.000 1.000
1.000 1.000 0.995 0.936 0.159 1.000 1.000
1.000 0.744 0.997 0.811 0.126 1.000 1.000
1.000 0.899 0.999 0.927 0.007 1.000 1.000
1.0
1.000 0.379 0.991 0.548 0.100 1.000 1.000
Best pipeline score
R1: Completeness R2: Accuracy (baseline) R3: MultiObjective R4: DriftPenalty R5: IncrementalGain R6a: Distortion-only R6b: Acc+Distortion
Laure Berti-Equille
0.8 0.6 0.4 0.2
t t t titis Hear phere Blood betes Credi -vs-KP neme Adul Bank a p D9 D10 He D2 Ionos D4 5 Dia D6 7 KR 8 Pho 1 D D D D D3
Reward score vs. TabPFN accuracy
0.9
D9
D3
D1
D7
0.8
TabPFN accuracy
D2
C1 benchmark (MCAR 15%)
Reward function CompletenessRetentionReward AccuracyReward MultiObjectiveReward DriftPenaltyReward IncrementalGainReward DataDistortionPenalty(dist) DataDistortionPenalty(acc+dist) TFMAwareReward
1.0
D8
D2 D8
0.7 D5
D5
D8 D2
D7 D3 D3 D1 D7 D7 D7 D3 D9 D7 D3 D3 D3 D1 D1 D7 D1 D1 D9 D9 D1 D9 D7 D3 D1 D9 D10 D2 D8 D9 D6 D4 D2 D2 D2 D5 D8 D2 D8 D8 D8 D5 D5 D5 D5
D5
0.6 0.5 D6
0.4
D6
D6
D6
D4 D4
D10
D10
D6
D10
D4
D4
D10
D6 D6
D10 D10
D10 D4 D4
0.3
D4
0.0
0.2
0.4
0.6
Best pipeline reward score (C1, MCAR 15%)
0.8
1.0
Mean TabPFN accuracy (± std across datasets)
Figure 1: C1 reward heatmap: best-pipeline score for each (reward function, dataset) pair evaluated by an exhaustive greedy search over 112 ordered pipeline sequences at MCAR 15%. Trivial-collapse rewards (R1, R6a, R6b) saturate at ≈ 1.0 uniformly across all datasets (dark red), masking any discriminative signal. Genuinely calibrated rewards (R2, R3, R7) exhibit datasetspecific variation, making pipeline ranking meaningful.
Reward function alignment: mean reward vs. mean TabPFN accuracy R7 (ours) Reward function R1 - CompletenessRetentionReward R2 - AccuracyReward R3 - MultiObjectiveReward R4 - DriftPenaltyReward R5 - IncrementalGainReward R6a - DataDistortionPenalty (dist) R6b - DataDistortionPenalty (dist + acc) R7 - TFMAwareReward
0.9 0.8
R6b R6a
0.7
R1 0.6
R3
0.5 0.0
0.2
0.4
0.6
0.8
1.0
Mean best pipeline reward score (± std across datasets)
1.2
Figure 2: C1 per-dataset scatter: best-pipeline reward score (X) vs. TabPFN v2 accuracy (Y) at MCAR 15%. Each point is one (dataset, reward function) pair. Collapsed rewards (R1, R6a, R6b) cluster at 𝑥 ≈ 1.0 with variable TabPFN v2 accuracy, exposing the disconnect between reward saturation and downstream quality.
Figure 3: C1 aggregated scatter: mean ± SD best-pipeline reward score vs. mean ± SD TabPFN v2 accuracy per reward function (D1–D10, MCAR 15%). TFMAwareReward (R7, black hexagon) achieves both the highest mean reward and the highest mean TabPFN v2 accuracy, confirming reward– quality alignment.
R6a, R6b) saturate at 𝑥 ≈ 1.0 yet scatter widely and often poorly on the 𝑦-axis, while TFMAwareReward (R7) occupies the top-right quadrant of Figure 3 — highest mean reward and highest mean TabPFN v2 accuracy. Trivial-collapse rewards (R1, R6a, R6b). Three rewards collapse to uninformative pipelines on every dataset and cluster at 𝑥 ≈ 1.0 in Figure 2, yet their TabPFN v2 accuracy values (𝑦-axis) vary considerably across datasets, directly exposing the reward–quality disconnect. R1 (CompletenessRetentionReward) achieves a perfect reward score of 1.0000±0.0000 on all 10 datasets: any imputation fills missing cells and trivially maximises the completeness×retention
objective, so the reward cannot distinguish between imputation strategies or longer pipelines. R6a and R6b (DataDistortionPenalty variants, dist and acc+dist) score 0.9997 ± 0.0009 and 1.0000 ± 0.0000 respectively by selecting no-op on all 10 datasets: minimising distributional distortion is exactly achieved by performing no cleaning, making these rewards counterproductive as pipeline-selection signals. This confirms a key design principle: rewards that do not condition on downstream task performance cannot discriminate informative from trivial cleaning actions, even when their numerical scores appear optimal.
Prior-Aligned Data Cleaning for Tabular Foundation Models
Near-trivial collapse under the drift penalty (R4). R4 (DriftPenaltyReward) selects no-op on 7/10 datasets (hepatitis, heartstatlog, blood-transfusion, diabetes, credit-g, adult, bank-marketing) with a mean reward score of 0.772 ± 0.167. The Wasserstein drift term dominates the accuracy component: any cleaning operation shifts the empirical distribution away from the reference, and the penalty outweighs the accuracy gain on datasets with diffuse or moderate missingness. Only on three datasets without natural missing values (ionosphere, kr-vs-kp: impute(knn); phoneme: impute(knn)→scale) does R4 prefer action over inaction, suggesting that purely synthetic MCAR injection is the only factor driving Wasserstein drift on these datasets. This reveals a fundamental tension in drift-based reward design: accurate cleaning necessarily changes the dirty distribution, and an undiscriminating drift penalty conflates beneficial correction with harmful distortion. Poorly calibrated step-delta reward (R5). R5 (IncrementalGainReward) achieves scores in [0.007, 0.159] with mean 0.097 ± 0.043 — an order of magnitude below all other rewards. The stepdelta credit assignment (reward proportional to the marginal gain of each action) produces vanishingly small pipeline-level scores in the greedy oracle setting, where individual cleaning steps yield sub-percent accuracy increments. R5 was designed for RL credit assignment, not pipeline ranking, and its poor calibration in the greedy setting confirms this. AccuracyReward (R2): meaningful but unstable. R2 achieves mean 0.716 ± 0.238 — the largest standard deviation among all rewards, visible as the widest horizontal error bar in Figure 3. The spread reflects genuine dataset difficulty rather than random noise: scores range from 0.379 (bank-marketing, imbalanced binary) to 1.000 (kr-vs-kp, nearly linearly separable). Without retention or quality terms, R2 chases RF accuracy unconstrained: it selects 2- or 3step pipelines on 6/10 datasets (e.g. outlier→impute(mean)→scale on blood-transfusion, scale→impute(knn) on ionosphere), occasionally finding pipelines that overfit the RF cross-validation split. MultiObjectiveReward (R3): robust discriminative signal. R3 achieves the highest mean reward score among genuinely discriminative rewards: 0.984 ± 0.036, with the narrowest variance. It selects impute(knn) on 9/10 datasets (8 as a 1-step pipeline, phoneme as impute(knn)→scale(zscore); blood-transfusion is the single dataset where a 2-step sequence outlier→impute(knn) is preferred). The concentration on KNN imputation reflects R3’s joint optimization of accuracy, row retention, and data quality: KNN imputation preserves distributional structure while eliminating missingness with minimal row loss, satisfying all three objectives simultaneously. Wilcoxon signed-rank tests confirm R3 is statistically significantly better than R2 (stat = 1.0, 𝑝 = 0.0039) and R4 (stat = 0.0, 𝑝 = 0.0020). R4 also outperforms R2 (stat = 8.0, 𝑝 = 0.049), though its near-trivial pipeline selection limits interpretability. Implications. The scatter plots in Figures 2 and 3 make the reward–quality alignment (or lack thereof) directly legible: a reward function is useful only if its score predicts downstream TabPFN v2 accuracy, not merely if it is numerically large. The taxonomy reveals a design spectrum from trivially-optimized (R1, R6a, R6b) through anti-cleaning (R4, R6) to genuinely discriminative (R3, R2), with TFMAwareReward (R7) dominating all baselines in Figure 3 by achieving both the highest mean reward score and the highest mean TabPFN v2 accuracy across D1–D10. Only rewards that
Conference’17, July 2017, Washington, DC, USA
balance task accuracy with data quality constraints (retention, distributional regularity) produce actionable pipeline rankings. These findings directly motivate TFMAwareReward: we replace R3’s RF downstream evaluator with TabPFN v2 to obtain a reward that natively measures calibration quality under the prior-alignment objective, as evaluated in C2 and C3.
5.3
C2: Prior-Aligned Cleaning vs. RF-Reward Cleaning
Hypothesis (C2). The TFMAwareReward reward selects cleaning pipelines that achieve statistically higher TabPFN v2 test accuracy and lower ECE than pipelines selected by the RF-evaluator reward (B-greedy-RF) on ≥ 7/10 benchmark datasets under MCAR 15%. Furthermore, the winning pipeline sequences chosen by the two reward signals differ on ≥ 4/10 datasets, demonstrating that prior alignment genuinely reshapes the cleaning search landscape. Table 2 reports all baselines on TabPFN v2 accuracy and ECE across D1–D10 at MCAR 15%. B2 (mean impute + z-score) achieves mean accuracy 0.834 and B3 (simple random strategy) 0.836, both below B4/B5 on average but with noteworthy exceptions: B2 is the best method on D5 Diabetes (acc = 0.760 vs. B5’s 0.747) and B3 on D4 Blood (acc = 0.784 vs. B5’s 0.780), suggesting the 20-pipeline greedy oracle can be outperformed by simple fixed strategies on small datasets. Over all 10 datasets, B-greedy-TFM achieves mean TabPFN v2 accuracy 0.8513 vs. 0.8428 for B-greedy-RF (Δ = +0.0084, Wilcoxon stat = 10.0, 𝑝 = 0.063, one-sided, 𝑛=4 diverging datasets). B-greedyTFM wins on 4 datasets (D2 Heart: +0.037; D4 Blood: +0.007; D5 Diabetes: +0.006; D8 Phoneme: +0.034), ties on 6 (D1, D3, D6, D7, D9, D10), and is never exceeded (0/10). The ≥7/10 accuracy threshold stated in the hypothesis is not met in this greedy-oracle configuration, and the result does not reach the conventional 𝑝 < 0.05 threshold (𝑝=0.063, 𝑛=4 diverging datasets). Nevertheless, the direction is consistent: B-greedy-TFM is never outperformed (0 losses across all 10 datasets), and the effect is monotone within the 4 diverging cases. This greedy-oracle result is the primary statistical evidence for TFMAwareReward’s accuracy advantage; the trained B-RL-TFM policy (§5.3) provides corroborating evidence in a learned-policy setting. Caveat on pipeline budget. Both reward signals search the same stratified subsample of 20 pipelines (see §5.1). On the 6 datasets where both rewards select the same pipeline (D1, D3, D6, D7, D9, D10), the TabPFN result is identical by construction, producing structural ties. The accuracy comparison is therefore effectively limited to the 4 datasets where pipeline selection diverges. The oracle gap validation (§5.1) bounds the reward-specific quality loss; a full 112-pipeline search may widen the gap. Mean ECE is 0.0522 for B-greedy-TFM vs. 0.0495 for B-greedyRF, a non-significant difference. The ECE direction slightly favours RF-reward in aggregate, with the gap driven almost entirely by D2 Heart (ECE TFM = 0.108 vs. RF = 0.064), where median imputation yields higher accuracy but a wider calibration spread than KNN imputation. Pipeline sequence analysis. To test whether prior alignment reshapes the cleaning search landscape (and not merely reranks equivalent pipelines), we record the complete best-found action
Conference’17, July 2017, Washington, DC, USA
Laure Berti-Equille
Table 2: C2 — TabPFN v2 accuracy (top) and ECE (bottom) for all baselines on D1–D10 (MCAR 15%). Bold: best per dataset. Greedy-oracle rows are deterministic; B-RL rows: single PPO run (seed=42). D1
D2
D3
D4
D5
D6
D7
D8
D9
D10
Mean
Accuracy (↑) B0 (no clean) B1 (std. preproc.) B2 (std. full-clean) B3 (simple random) B4 (oracle-RF) B5 (oracle-TFM) B-RL-RF B-RL-TFM (ours)
0.8387 0.8387 0.8710 0.8495 0.8710 0.8710 0.8387 0.8710
0.8333 0.8148 0.8333 0.8272 0.8148 0.8519 0.8333 0.8333
0.9296 0.9296 0.9155 0.9249 0.9859 0.9859 0.9296 0.9859
0.7800 0.7733 0.7667 0.7844 0.7733 0.7800 0.7740 0.7740
0.7338 0.7403 0.7597 0.7446 0.7403 0.7468 0.7357 0.7357
0.7350 0.7350 0.7350 0.7567 0.7650 0.7650 0.7450 0.7450
0.9122 0.9171 0.9024 0.9057 0.9268 0.9268 0.9122 0.9122
0.8293 0.8195 0.8341 0.8374 0.8098 0.8439 0.8098 0.8098
0.8537 0.8439 0.8439 0.8455 0.8537 0.8537 0.8390 0.8390
0.8829 0.8829 0.8829 0.8829 0.8878 0.8878 0.8878 0.8878
0.8328 0.8295 0.8344 0.8359 0.8428 0.8513 0.8305 0.8394
ECE (↓) B0 (no clean) B1 (std. preproc.) B2 (std. full-clean) B3 (simple random) B4 (oracle-RF) B5 (oracle-TFM) B-RL-RF B-RL-TFM (ours)
0.0707 0.1142 0.1361 0.1231 0.0807 0.0807 0.1110 0.0807
0.0769 0.0529 0.0763 0.0850 0.0644 0.1080 0.0630 0.0630
0.0464 0.0385 0.0689 0.0533 0.0535 0.0535 0.0399 0.0535
0.0384 0.0533 0.0549 0.0514 0.0434 0.0392 0.0664 0.0664
0.0693 0.0422 0.0438 0.0412 0.0581 0.0342 0.0746 0.0746
0.0612 0.0641 0.0613 0.0558 0.0534 0.0534 0.0508 0.0508
0.0461 0.0279 0.0397 0.0345 0.0194 0.0194 0.0274 0.0274
0.0413 0.0347 0.0475 0.0460 0.0492 0.0609 0.0437 0.0437
0.0305 0.0369 0.0328 0.0307 0.0318 0.0318 0.0215 0.0215
0.0384 0.0268 0.0266 0.0268 0.0410 0.0410 0.0410 0.0410
0.0519 0.0491 0.0588 0.0548 0.0495 0.0522 0.0539 0.0523
sequence (operator type and sub-parameter) for each dataset under both reward signals and compare them step-by-step.
not captured in TabPFN v2’s synthetic-data prior. The remaining 6 datasets agree on the same pipeline under both rewards. These results confirm that the reward signal substantially reshapes the cleaning search landscape and that the two objectives impute(median) +0.037 +0.044 D2 Heart impute(knn) are genuinely complementary rather than interchangeable. The ECE difference (TFM = 0.0522 vs. RF = 0.0495) stems largely from impute(knn) +0.007 -0.004 D4 Blood impute(mean) D2 Heart, where TFMAwareReward’s median-imputation path impute(mean) improves accuracy (+0.037) but widens calibration relative to RF+0.006 -0.024 D5 Diabetes impute(knn) reward’s KNN path. impute(median) Trained RL policy results (B-RL-RF, B-RL-TFM). Table 2 +0.034 +0.012 D8 Phoneme impute(knn) includes rows for the trained PPO policies: B-RL-RF uses Multi0.0 0.2 0.4 0.6 0.8 1.0 0.000 0.025 0.050 0.075 0.100 0.125 0.150 ObjectiveReward (RF evaluator, 3,000 steps) and B-RL-TFM uses TabPFN test accuracy (higher = better) ECE (lower = better) RF-reward best pipeline TFM-reward best pipeline TFMAwareReward as the training reward (3,000 + 500 fine-tuning Agreeing datasets (same imputer, identical scores): D1 Hepatitis, D3 Ionosphere, D6 Credit, D7 KR-vs-KP, D9 steps). Both policies are evaluated on a 20% held-out test split at Adult, D10 Bank MCAR 15%. On small datasets (D1 hepatitis, D3 ionosphere), B-RLTFM matches the greedy oracle B5 exactly: accuracy 0.8710 Figure 4: C2 pipeline divergence: accuracy and ECE for the on D1 and 0.9859 on D3, identical to B5, whereas B-RL-RF un4 datasets where TFMAwareReward and RF-reward choose derperforms the oracle on both (0.8387 and 0.9296 respectively). different imputers (D2, D4, D5, D8). Δ = TFM − RF; green On D2 Heart-statlog both policies converge to the B0 baseline Δ > 0 favours TFM. The 6 agreeing datasets are listed below. (0.8333/0.0630), and on D6–D10 (larger datasets, 1,000–10,000 rows) B-RL-RF and B-RL-TFM produce identical results, indicating that Figure 4 shows per-step operator agreement between B-greedythe PPO policy converges to the same cleaning pipeline regardless TFM and B-greedy-RF across the benchmark. of reward signal when data are plentiful. Over all 10 datasets, B-RLThe two reward signals select different best pipelines on 4 of TFM achieves mean accuracy 0.8394 (vs. B-RL-RF 0.8305) and mean 10 datasets (D2 Heart, D4 Blood, D5 Diabetes, D8 Phoneme). All ECE 0.0523 (vs. B-RL-RF 0.0539). B-RL also achieves the lowest perfour divergences involve the choice of imputer: on D2 Heart and column ECE on D6 credit-g (0.0508, below oracle B4/B5 at 0.0534) D8 Phoneme, TFMAwareReward selects median imputation where and D9 adult (0.0215, below B0 at 0.0305). A Wilcoxon signed-rank RF-reward selects KNN; on D5 Diabetes, TFMAwareReward selects mean imputation while RF-reward prefers KNN; on D4 Blood Trans- test on accuracy (𝑛=10, one-sided TFM>RF) yields stat= 3.0, 𝑝=0.25 — non-significant because only D1 and D3 produce non-tied pairs; fusion, TFMAwareReward prefers KNN while RF-reward selects on all other datasets both reward signals converge to the same mean. This pattern is consistent with the prior-alignment hypothepolicy. These B-RL results corroborate the primary greedy-oracle sis: median and mean imputers preserve the global marginal mofinding from C2 (𝑝=0.063, §5.3). ments that TabPFN v2’s internal z-normalization depends on, whereas KNN imputation can introduce localized non-linearities that are
Prior-Aligned Data Cleaning for Tabular Foundation Models
TabPFN test accuracy
0.85 0.80 0.75 0.70 0.65 0.60
MCAR
MAR
B0 B-greedy-TFM Outlier Duplicate
ECE (lower = better calibration)
Accuracy
ECE (lower = better)
0.060
0.80 0.75 5
10 15 20
MCAR rate (%)
0.96 0.94
30
0
5
D7 KR-vs-KP
0.950 0.925 0.900 0.875 0
5
10 15 20
MCAR rate (%)
MCAR rate (%)
30
D9 Adult
TabPFN accuracy
0.975
10 15 20
30
D5 Diabetes
0.76
TabPFN accuracy
TabPFN accuracy
TabPFN accuracy
D3 Ionosphere 0.98
0.74 0.72 0.70 0.68 0.66
0
5
10 15 20
MCAR rate (%)
30
0.85 0.84
B0 (no clean) B1 (std preproc) B-greedy-TFM (ours)
0.83 0.82 0
5
10 15 20
MCAR rate (%)
30
0.055
Figure 6: C4 error sensitivity: TabPFN v2 accuracy vs. MCAR rate (0–30% in 6 steps) for D1, D3, D5, D7, D9. B0 (grey), B1 (blue), B-greedy-TFM/ours (orange).
0.050 0.045 0.040 0.035 0.030
MCAR
MAR
B0 B-greedy-TFM Outlier Duplicate
Figure 5: C3: mean TabPFN v2 accuracy (left) and ECE (right) across D3–D5, D7, D8 under four error types (MCAR/MAR 15%, outlier/duplicate 10%). Lower ECE is better. Figure 5 decomposes ECE and accuracy by error type. B-greedyTFM reduces mean ECE relative to B0 across all four corruption types: −0.0048 under MCAR, −0.0079 under MAR (the largest reduction), −0.0011 under outlier injection, and −0.0021 under duplicate injection. Relative to standard preprocessing B1, B-greedy-TFM improves calibration under MAR (−0.0040), duplicate (−0.0038), and outlier (−0.0024) injection, but not under MCAR (+0.0042): for purely random missing values, B1’s fixed mean-imputation pipeline already achieves low ECE, leaving no room for prior-alignment to improve. Notably, B-greedy-RF outperforms B-greedy-TFM on ECE under MCAR (0.0418 vs. 0.0435), MAR (0.0356 vs. 0.0462), and outlier (0.0387 vs. 0.0515) injection — B-greedy-TFM’s only ECE advantage is under duplicate injection (0.0420 vs. 0.0478), where deduplication corrects row repetitions that artificially inflate posterior confidence. For TabPFN v2 accuracy, however, B-greedy-TFM achieves the highest mean across all four error types (MCAR: 0.8593, MAR: 0.8691, Outlier: 0.8373, Duplicate: 0.8639), confirming that prior alignment consistently improves predictive performance even when calibration gains are error-type-specific.
5.5
0.85
0
TabPFN accuracy
Hypothesis (C3). Prior-aligned cleaning (B-greedy-TFM) reduces TabPFN v2 ECE relative to standard preprocessing (B1) and RFreward cleaning (B-greedy-RF) across five representative datasets (D3, D4, D5, D7, D8) and four error types (MCAR 15%, MAR 15%, outlier 10%, duplicate 10%). The calibration benefit stems from the Wasserstein drift penalty in TFMAwareReward, which discourages transformations that distort the feature marginals that TabPFN v2’s internal z-normalization operates on. 0.90
D1 Hepatitis
0.90
C3: Calibration Recovery
At MCAR 0%, the mean accuracy advantage of B-greedy-TFM over B1 is already +0.008 (not zero), because the benchmark datasets retain natural missing values that imputation strategies handle differently even without additional injection. The advantage does not grow monotonically with MCAR rate: it peaks at MCAR 15% (+0.026 mean), drops to −0.002 at 20%, and partially recovers at 30% (+0.020). The Spearman correlation between MCAR rate and the per-dataset advantage is statistically non-significant on all 5 datasets (𝜌 ∈ [−0.28, +0.52], all 𝑝 > 0.20). The monotone-gain hypothesis (C4) is therefore not confirmed in this greedy-oracle configuration. The result suggests that the benefit of prior-aligned cleaning depends on the distributional structure of the injected errors, not merely their rate; a more controlled errorinjection protocol (e.g. uniform MCAR without natural background missingness) would be needed to isolate the rate effect.
5.6
1.050
C4: Error Sensitivity — MCAR Rate Sweep
Hypothesis (C4). The accuracy and calibration advantage of prioraligned cleaning (B-greedy-TFM) over standard preprocessing (B1) grows monotonically with the MCAR injection rate across {0, 5, 10, 15, 20, 30}%, confirming prior mismatch as the operative mechanism. At MCAR 0% (clean data) all methods should converge, because there is no distributional anomaly to exploit. Figure 6 plots TabPFN v2 accuracy as MCAR rate increases from 0% to 30%. Results are reported for 5 representative datasets (D1, D3, D5, D7, D9), spanning all four size tiers and both natural-missing and clean baselines; the experiment uses B-greedy-TFM (greedy oracle, not trained RL) as the prior-aligned baseline.
C5: parameterized vs. Discrete Actions
Hypothesis (C5). Providing the RL agent with typed sub-parameters (KNN 𝑘, outlier threshold, scaler type) improves the best-found MultiObjectiveReward pipeline score relative to a discrete-only baseline (fixed default sub-parameters per operator), across all 10 datasets. The gain is expected to be largest on datasets with high feature count or high natural skewness, where sub-parameter sensitivity is greatest.
Best pipeline score
5.4
Conference’17, July 2017, Washington, DC, USA
1.000
+0.001 +0.001
+0.001
0.950 0.900
+0.003
0.850 D1
D2
D3
D4
D5
D6
Discrete (7 actions) Parameterized (17 actions) D7 D8 D9 D10
Figure 7: C5: best-found MultiObjectiveReward score per dataset (MCAR 15%). Orange: parameterized actions (17); blue: discrete (7). Annotations: Δ = parameterized − discrete.
Conference’17, July 2017, Washington, DC, USA
Laure Berti-Equille
Figure 7 shows reward distributions for parameterized vs. discrete action spaces across the MultiObjectiveReward evaluated with a random forest. parameterized actions improve the best-found pipeline reward on 9 of 10 datasets (mean Δ = +0.0007, range [+0.0001, +0.0029]; one tie on D1 Hepatitis). The gain is concentrated almost entirely in the KNN imputation neighbour count: the optimal 𝑘 is dataset-specific and differs from the discrete-mode default (𝑘=5) on 9 of 10 datasets — ranging from 𝑘=3 on most datasets to 𝑘=7 on D4 Blood Transfusion and 𝑘=10 on D7 KR-vsKP and D10 Bank Marketing. The largest absolute gain occurs on D4 Blood Transfusion (+0.0029), a dataset with high class imbalance where the optimal outlier threshold also shifts from the IQR default; the smallest gain is on D9 Adult (+0.0001), suggesting diminishing returns on very large, well-structured datasets. The gain is statistically significant (Wilcoxon signed-rank: stat = 0.0, 𝑝 = 0.004), confirming that typed sub-parameters expose a consistently exploitable search dimension that the discrete grid cannot capture without enumerating one action per parameter value.
5.7
C6: Transfer Learning
Episode reward
Hypothesis (C6). A PPO policy pre-trained on a source dataset and fine-tuned on three held-out target datasets (D8–D10) reaches within 5% of the reward achieved by a policy trained from scratch on the target datasets in ≤ 2,000 fine-tuning steps, demonstrating that cleaning policies capture dataset-agnostic structural knowledge that transfers across domains. Implementation note: pre-training was attempted on all seven source datasets (D1–D7); D1 (hepatitis) and D2 (heart-statlog) failed to converge due to NaN policy logits on small datasets (≤270 rows), likely from reward scale mismatch. The D3 (ionosphere) checkpoint is therefore used as the pre-trained initialisation for all three held-out datasets. 5 4 3 2 1 0
D8 Phoneme
D9 Adult 4 3 2 1
0
2K
1000 2000 3000 4000 5000
Fine-tuning steps
0
0
2K
1000 2000 3000 4000 5000
D10 Bank 4 3 2 1 0
0 Fine-tuning steps Pre-trained + fine-tune Train from scratch
2K
1000 2000 3000 4000 5000
Fine-tuning steps
Figure 8: C6 transfer learning: episode reward vs. fine-tuning steps on D8–D10. Orange: policy pre-trained on D3, then finetuned. Blue dashed: trained from scratch. Red dotted: 2K-step checkpoint. Figure 8 plots episode reward vs. fine-tuning steps on D8–D10 for both the pre-trained and scratch policies. Table 3 reports episode reward at the 2,000-step parity checkpoint for both policies on all three held-out datasets. The pre-trained policy exceeds the scratch policy’s 5,000-step final reward at the 2,000-step checkpoint on all three datasets: on D8 Phoneme, fine-tune at 2K steps achieves 4.897 vs. scratch’s 5K-step asymptote of 4.575 (+7.0%); on D9 Adult, finetune at 2K achieves 4.037 vs. scratch asymptote 3.444 (+17.2%); on D10 Bank Marketing, fine-tune at 2K achieves 4.332 vs. scratch asymptote 3.885 (+11.5%). After full 5,000-step fine-tuning, gains over scratch’s final reward are +7.2%, +28.8%, and +19.8% respectively. The D9 Adult gap is the most striking: Adult contains 48,842
Table 3: C6 transfer: reward at the 2K-step checkpoint (finetuned from D3 vs. scratch) on 3 held-out datasets. Gap = (𝑟 scratch − 𝑟 finetune )/|𝑟 scratch |; negative = fine-tune leads. Dataset D8 Phoneme D9 Adult D10 Bank Mktg Exceeds scratch final @2K
Fine-tune @2K
Scratch @2K
Gap
Scratch final
4.897 4.037 4.332
3.718 3.408 3.601
−31.7% −18.5% −20.3%
4.575 3.444 3.885
3/3 datasets
rows with natural missing values and categorical features, yet the ionosphere pre-trained policy generalizes without any task-specific architecture changes. The consistent pattern across all three heldout datasets suggests that the policy internalizes a general-purpose prior-alignment strategy — preferring row-preserving imputers and avoiding distribution-distorting scalers — that is broadly applicable across dataset sizes and feature types. Crucially, prior-alignment knowledge accelerates learning: fine-tuning reaches a better solution in 60% fewer steps than scratch training needs to reach its own, lower asymptote.
6
Discussion
Why prior alignment works. TabPFN v2 applies a fixed internal preprocessing pipeline (z-normalization, power transform, binary missing-value flags) unconditionally [14]. Prior-aligned cleaning is therefore complementary: outlier removal restores the dynamic range that z-normalization needs, and conditional imputers reduce the structured missingness that TabPFN v2’s uniform NaN mask cannot recover. Connection to in-context learning theory. The quadratic √ retention penalty (𝛼=2; Eq. 1) is motivated by the O (1/ 𝑛) uncertainty scaling of in-context learners [14, 29]: at small context sizes each retained row has disproportionately large impact on prediction stability, so a linear penalty undervalues row preservation. Dropping from 100 to 80 rows yields a retention score of 0.802 =0.64 instead of 0.80 — an 80larger deduction for the same proportional loss. C5 validates this indirectly: imputation actions are systematically preferred over row-deleting outlier removal even when deletion yields lower Wasserstein drift. Positioning relative to constraint- and search-based cleaning. Constraint-based systems (e.g., ReClean [1]) assume known functional dependencies defining “correct” data; L2C2 makes no such assumption, treating the TFM’s synthetic prior as the reference distribution. The TFMAwareReward reward is non-monotone — aggressive outlier removal can decrease accuracy by distorting alignment — invalidating monotone-pruning arguments; learned policies additionally generalise across datasets without per-instance restart. Limitations. L2C2 is evaluated on ten OpenML benchmark datasets with synthetic error injection; extension to natural error distributions [17] and multi-table schemas remains open. The framework targets classification; regression requires a different calibration objective (e.g., CRPS) and reward recalibration. The greedy oracle search scales as O (|A|𝐿 ) and scalability beyond the 834-sequence C5 suite is unevaluated. The per-step TabPFN v2
Prior-Aligned Data Cleaning for Tabular Foundation Models
inference overhead (∼0.3,s) rules out online settings, and subsampling D9/D10 to 10K rows may introduce sampling bias. The reward weights are calibrated against a specific TabPFN v2 version and must be re-calibrated when the model changes.
7
Conclusion
We presented L2C2, a deep RL framework that reframes tabular data cleaning as prior alignment for Tabular Foundation Models. Our reward taxonomy (C1) reveals that naïve reward choices are unreliable: three of seven candidates collapse to degenerate strategies, and only R3 (MultiObjectiveReward, RF evaluator) provides a stable alternative; TFMAwareReward extends R3 by replacing the RF evaluator with TabPFN v2 and adding a non-linear contextsize penalty, directly targeting prior alignment and calibration. A greedy oracle comparison (C2) shows that TFMAwareReward selects different best pipelines from RF-reward on 4 of 10 datasets and outperforms RF-reward on all four diverging cases (one-sided Wilcoxon 𝑝=0.063, 𝑛=4) while producing identical results on the remaining 6. Calibration experiments (C3) show that prior-aligned cleaning improves TabPFN v2 ECE across all four error types on five representative datasets; the improvement over standard preprocessing holds under MAR, outlier, and duplicate injection (not MCAR), with the ECE advantage over RF-reward cleaning confined to duplicate injection. Error sensitivity sweeps (C4) show that the accuracy advantage of TFMAwareReward over fixed preprocessing is present across MCAR rates but non-monotone, peaking at 15Typed sub-parameters (C5) improve the best-found pipeline reward on 9 of 10 datasets (mean Δ = +0.0007, up to +0.0029 on Blood Transfusion). Transfer experiments (C6) confirm that a policy pre-trained on a single source dataset fine-tunes faster than training from scratch, enabling low-budget deployment. Future work. Concrete next steps include: (i) adapting TFMAwareReward to TabICL [25] and CARTE by recalibrating the contextsize exponent 𝛼; (ii) evaluating on the CleanML benchmark [17] to enable direct comparison with non-RL cleaning methods; (iii) extending the state vector with profiling signals (duplicate fraction, column cardinality) to enable proactive action masking; and (iv) exploring multi-agent settings where specialized sub-policies for imputation, outlier removal, and normalization are jointly trained with a coordinator.
Conference’17, July 2017, Washington, DC, USA
References [1] M. Abdelaal, A.B. Yayak, K. Klede, and H. Schöning. 2024. ReClean: Reinforcement Learning for Automated Data Cleaning in ML Pipelines. In DBML Workshop at the IEEE 40th International Conference on Data Engineering (ICDE). IEEE. https: //www.wis.ewi.tudelft.nl/assets/files/dbml2024/DBML24_paper_11.pdf [2] S. Alnegheimish, D. Liu, C. Sala, L. Berti-Équille, and K. Veeramachaneni. 2022. Sintel: An Overarching Ecosystem for End-to-End Time Series Anomaly Detection. In Proceedings of the 2022 ACM SIGMOD International Conference on Management of Data. ACM. doi:10.1145/3514221.3517910 [3] L. Berti-Équille. 2007. Data Quality Awareness: A Case Study for Cost Optimal Association Rule Mining. Knowledge and Information Systems (KAIS) 11 (2007), 191–215. doi:10.1007/s10115-006-0006-x [4] L. Berti-Équille. 2019. Learn2Clean: Optimizing the Sequence of Tasks for Web Data Preparation. In Proceedings of The Web Conference (WWW). ACM, 2580–2586. doi:10.1145/3308558.3313602 [5] L. Berti-Équille, A. Bonifati, and T. Milo. 2018. Machine Learning to Data Management: A Round Trip. In IEEE 34th International Conference on Data Engineering (ICDE). IEEE, 1735–1738. doi:10.1109/ICDE.2018.00226 [6] B. Bischl, G. Casalicchio, M. Feurer, P. Gijsbers, F. Hutter, M. Lang, R.G. Mantovani, J.N. van Rijn, and J. Vanschoren. 2021. OpenML Benchmarking Suites. In Thirty-Fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track (NeurIPS). https://arxiv.org/abs/1708.03731 [7] I. Drori, Y. Krishnamurthy, R. Rampin, R. de Paula Lourenço, J. Ono, K. Cho, C. Silva, and J. Freire. 2021. AlphaD3M: Machine Learning Pipeline Synthesis. In ICML Workshop on Automated Machine Learning (AutoML). https://arxiv.org/ abs/2111.02508 [8] N. Erickson, J. Mueller, A. Shirkov, H. Zhang, P. Larroy, M. Li, and A. Smola. 2020. AutoGluon-Tabular: Robust and Accurate AutoML for Structured Data. arXiv preprint arXiv:2003.06505 (2020). https://arxiv.org/abs/2003.06505 [9] M. Feurer, A. Klein, K. Eggensperger, J.T. Springenberg, M. Blum, and F. Hutter. 2015. Efficient and Robust Automated Machine Learning. In Advances in Neural Information Processing Systems (NeurIPS), Vol. 28. 2962–2970. https://proceedings. neurips.cc/paper/2015/file/11d0e6287202fced83f79975ec59a3a6-Paper.pdf [10] S.Y. Gadre, G. Ilharco, A. Fang, J. Hayase, M. Yatskar, T. Acosta, et al. 2023. DataComp: In Search of the Next Generation of Multimodal Datasets. In Advances in Neural Information Processing Systems (NeurIPS), Vol. 36. https://arxiv.org/abs/ 2304.14108 [11] Y. Gorishniy, I. Rubachev, V. Khrulkov, and A. Babenko. 2021. Revisiting Deep Learning Models for Tabular Data. In Advances in Neural Information Processing Systems (NeurIPS), Vol. 34. 18932–18943. https://arxiv.org/abs/2106.11959 [12] L. Grinsztajn, E. Oyallon, and G. Varoquaux. 2022. Why Tree-Based Models Still Outperform Deep Learning on Tabular Data. In Advances in Neural Information Processing Systems (NeurIPS), Vol. 35. 507–520. https://arxiv.org/abs/2207.08815 [13] C. Guo, G. Pleiss, Y. Sun, and K.Q. Weinberger. 2017. On Calibration of Modern Neural Networks. In Proceedings of the 34th International Conference on Machine Learning (ICML) (Proceedings of Machine Learning Research, Vol. 70). 1321–1330. https://proceedings.mlr.press/v70/guo17a.html [14] N. Hollmann, S. Müller, L. Purucker, A. Krishnakumar, M. Hoo, R.T. Schirrmeister, and F. Hutter. 2025. Accurate Predictions on Small Data with a Tabular Foundation Model. Nature 637 (2025), 319–326. doi:10.1038/s41586-024-08328-6 [15] Y. Koka, D. Selby, G. Großmann, K. Pandya, and S. Vollmer. 2025. CleanSurvival: Automated Data Preprocessing for Time-to-Event Models Using Reinforcement Learning. arXiv preprint arXiv:2502.03946 (2025). https://arxiv.org/abs/2502.03946 [16] S. Krishnan, J. Wang, E. Wu, M.J. Franklin, and K. Goldberg. 2016. ActiveClean: Interactive Data Cleaning For Statistical Modeling. In Proceedings of the VLDB Endowment, Vol. 9. 948–959. doi:10.14778/2994509.2994514 [17] P. Li, X. Rao, J. Blase, Y. Zhang, X. Chu, and C. Zhang. 2019. CleanML: A Study for Evaluating the Impact of Data Cleaning on ML Classification Tasks. arXiv preprint arXiv:1904.09483 (2019). https://arxiv.org/abs/1904.09483 Extended version published at IEEE ICDE 2021. [18] S. Longpre, L. Hou, T. Vu, A. Webson, H.W. Chung, Y. Tay, D. Zhou, Q.V. Le, B. Zoph, J. Wei, and A. Roberts. 2023. The Flan Collection: Designing Data and Methods for Effective Instruction Tuning. In Proceedings of the 40th International Conference on Machine Learning (ICML) (Proceedings of Machine Learning Research, Vol. 202). 22631–22648. https://proceedings.mlr.press/v202/longpre23a.html [19] M. Mahdavi, Z. Abedjan, R. Castro Fernandez, S. Madden, M. Ouzzani, M. Stonebraker, and N. Tang. 2019. Raha: A Configuration-Free Error Detection System. In Proceedings of the 2019 International Conference on Management of Data (SIGMOD). ACM, 865–882. doi:10.1145/3299869.3324956 [20] M. Minderer, J. Djolonga, R. Romijnders, F. Hubis, X. Zhai, N. Houlsby, D. Tran, and M. Lucic. 2021. Revisiting the Calibration of Modern Neural Networks. In Advances in Neural Information Processing Systems (NeurIPS), Vol. 34. 15682–15694. https://arxiv.org/abs/2106.07998 [21] R.S. Olson, R.J. Urbanowicz, P.C. Andrews, N.A. Lavender, L.C. Kidd, and J.H. Moore. 2016. Automating Biomedical Data Science Through Tree-Based Pipeline Optimization. In Proceedings of the 19th European Conference on Applications of Evolutionary Computation (EvoApplications) (Lecture Notes in Computer Science,
Conference’17, July 2017, Washington, DC, USA
Vol. 9597). Springer, 123–137. doi:10.1007/978-3-319-31204-0_9 [22] Y. Ovadia, E. Fertig, J. Ren, Z. Nado, D. Sculley, S. Nowozin, J.V. Dillon, B. Lakshminarayanan, and J. Snoek. 2019. Can You Trust Your Model’s Uncertainty? Evaluating Predictive Uncertainty Under Dataset Shift. In Advances in Neural Information Processing Systems (NeurIPS), Vol. 32. https://arxiv.org/abs/1906.02530 [23] M. Patel, S. Guttula, P. Mittal, N. Manwani, L. Berti-Équille, and A. Manatkar. 2022. Advances in Exploratory Data Analysis, Visualisation and Quality for Data Centric AI Systems. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining. ACM. doi:10.1145/3534678.3542604 [24] J. Peng, D. Shen, T. Nie, and Y. Kou. 2024. RLclean: An Unsupervised Integrated Data Cleaning Framework Based on Deep Reinforcement Learning. Information Sciences (2024). doi:10.1016/j.ins.2024.121281 [25] J. Qu, D. Holzmüller, G. Varoquaux, and M. Le Morvan. 2025. TabICL: A Tabular Foundation Model for In-Context Learning on Large Data. In International Conference on Machine Learning (ICML). https://arxiv.org/abs/2502.05564 [26] A. Raffin, A. Hill, A. Gleave, A. Kanervisto, M. Ernestus, and N. Dormann. 2021. Stable-Baselines3: Reliable Reinforcement Learning Implementations. Journal of
Laure Berti-Equille
Machine Learning Research 22, 268 (2021), 1–8. http://jmlr.org/papers/v22/201364.html [27] T. Rekatsinas, X. Chu, I.F. Ilyas, and C. Ré. 2017. HoloClean: Holistic Data Repairs with Probabilistic Inference. Proceedings of the VLDB Endowment 10, 11 (2017), 1190–1201. doi:10.14778/3137628.3137631 [28] Aad W. van der Vaart. 1998. Asymptotic Statistics. Cambridge University Press. doi:10.1017/CBO9780511802256 [29] S.M. Xie, A. Raghunathan, P. Liang, and T. Ma. 2022. An Explanation of In-Context Learning as Implicit Bayesian Inference. In Proceedings of the International Conference on Learning Representations (ICLR). https://openreview.net/forum?id= RdJVFCHjUMI [30] H. Ye, S. Liu, H. Cai, Q. Zhou, and D. Zhan. 2024. A Closer Look at Deep Learning Methods on Tabular Datasets. In NeurIPS Workshop on Table Representation Learning. https://arxiv.org/abs/2407.00956 [31] D. Zha, Z.P. Bhat, K.H. Lai, F. Yang, Z. Jiang, S. Zhong, and X. Hu. 2023. DataCentric Artificial Intelligence: A Survey. arXiv preprint arXiv:2303.10158 (2023). https://arxiv.org/abs/2303.10158