betaFeedback

WorksComputer Science

Unifying matrix completion across domains with a synthetically pretrained foundation model

Abstract

Matrix completion underlies problems from tabular imputation to causal inference. While matrix completion provides a common setup for these domains, the best methods in each domain are still specialized and do not transfer well across domains. We introduce MatrixFormer, a pre-trained matrix-native transformer that predicts a full distribution for every missing entry in a single forward pass. MatrixFormer is trained entirely on synthetic low-rank and latent-factor matrices under diverse missingness patterns. Applied zero-shot with fixed network weights, MatrixFormer achieves competitive performance on causal inference panel-data tasks, tabular imputation, and recommendation systems matrix completion. These results position MatrixFormer as a general-purpose foundation model for matrix completion.

Introduction

Matrix completion is the task of imputing missing entries in a partially observed numerical matrix. This common task appears in areas across both science and business: predicting user ratings [36], imputing tabular missing data [22], and estimating counterfactual outcomes in panel data [3]. However, there is a tension currently in the center of this field: while the problem formulation is shared across many domains, the state-of-the-art methods used in each domain are not shared. We propose a single learned foundation model to close this gap. We open-source our training and evaluation code1, as well the model2.

Classical general matrix completion methods such as SoftImpute [29] rely on specific assumptions to work such as the matrix having a low rank and entries being missing at random. Matrices from different domains have very different data-generating processes and missingness patterns: a ratings matrix is almost completely missing and is bounded from 1-5 or 1-10, panel data has contiguous missing blocks based on entry treatment patterns, and tabular data often has different scales in each column with biased random missingness. Each domain violates the standard assumptions for the general methods in different ways, which results in a loss in accuracy.

As a result of each domain drifting from standard matrix completion assumptions, researchers have proposed specialized methods that take advantage of the different data and missingness patterns in each domain. BellKor’s Pragmatic Chaos [Koren, 2009], which won the $1 million Netflix Prize [8] for recommendation systems, built highly specialized tools to take advantage of user and item biases not present in standard assumptions. In causal inference with panel data, synthetic difference-in-differences [2] have been shown to outperform standard matrix completion methods to predict causal effects, but are based on a block treatment pattern and reweighted parallel trends, neither of which immediately relate to ratings or tabular data.

Preprint.

While specialization improved performance on each domain, it also splintered the field where advancements in one domain no longer translated to the rest. Practitioners must know which regime their matrix is in and apply the correct specialized method. On top of this, for any new applications of matrix completion, researchers must start from scratch to build up good specialized methods.

To remedy these problems, we introduce MatrixFormer, a foundation model for matrix completion. MatrixFormer is transformer (∼78\sim78M parameters) pretrained only on over a million synthetic partially-observed matrices drawn from a diverse set of data-generating and missingness priors. A single forward pass on the matrix produces accurate imputations with no fine-tuning necessary. A general method works here because it does not assume a single structure for all matrices: instead, it learns many structures from the prior mixture and infers which to use at inference time.

Per-domain, MatrixFormer achieves competitive results, as shown in Figure 1: (1) for tabular missing-data imputation, MatrixFormer beats MissForest and HyperImpute, (2) for causal inference, MatrixFormer beats synthetic difference-in-differences, and (3) for ratings predictions, MatrixFormer is at-par with a recommendation system-specific matrix factorization method. Finally, extending MatrixFormer’s performance to a new domain with data-generating and missingness priors very dissimilar to the ones we used would just require adding in a new prior to our mixture and training the model further, which is much simpler than designing a new algorithm from the ground up.

Figure 1. Overview of MatrixFormer: (a) MatrixFormer is pretrained transformer to make accurate predictions across a diverse set of domains. (b) Our method achieves top performance across 3 diverse areas against domain-specific methods.

Related Work

Matrix completion across domains. Here, we discuss several domains where matrix completion methods are popular. Tabular imputation recovers missing measurements in a sample-feature table. Standard methods such as MICE [45] and HyperImpute [22] do so by iteratively modeling each variable conditional on the others. In recommendation systems, the matrix records user-item ratings, and collaborative filtering predicts unobserved ratings from similar users or shared latent factors [33, 37]. Causal panel studies involve a different kind of missingness. Here, counterfactual outcomes are modeled as missing values in a unit-time matrix. Synthetic controls construct a weighted combination of comparison units [1], while difference-in-differences and synthetic difference-in-differences use comparisons across units and time [2]. They et al. [2021] make the connection to low-rank completion explicit, accommodating the structured missingness of causal panels. The shared setup of these problems motivates a common completion model despite their vast differences in data and missingness patterns.

Prior-data fitted networks. Prior-data fitted networks (PFNs), first introduced by Müller et al. [ [31], are neural networks trained to approximate posterior predictive distributions using synthetic data generated from prespecified priors. TabPFN [20] and TabICL [32] are popular PFNs for supervised learning. TabImpute [13] is a PFN built for small-scale tabular imputation. Our work, MatrixFormer, extends this approach to priors over spectral structure, structured missingness, and sparse ratings. We apply MatrixFormer to a wide range domains including tabular imputation, recommendation system, and panel causal inference. At inference time, its weights are fixed, and the observed entries supply context for completion.

Architecture and synthetic data

MatrixFormer is a neural network with a novel transformer architecture so that it can handle matrices of arbitrary size in both dimensions. We pair this matrix-native architecture with synthetic training tasks with varied structure and missingness patterns.

Matrix-native architecture

We embed each observed matrix cell using a learned embedding layer, map missing entries to learned token, and pad learned tokens (CLS tokens) on both the rows and columns, as shown in Figure 2. The CLS tokens allow row-wise and column-wise information to be pooled effectively across layers through self-attention [46]. These tokens give the model a factor-inspired inductive bias without requiring the completed matrix to have a fixed rank. Row and column factors used in collaborative filtering and panel-data models also inform our design [37, 3]. In each layer, we cell attends to other cells within its row, followed by a 2nd attention across the column axis, and finally a feed-forward layer. After 8 layers, each token corresponding to a missing entry is decoded into a distributional output similar to TabPFN. We then predict the mean of each distribution as the final prediction for each missing cell. This gives us an architecture tailored to the row-column structure of the data.

Figure 2. MatrixFormer forward pass. (a) Each cell of the partially observed matrix becomes a token, with a learned mask token at missing entries. Each of the eight transformer blocks applies row attention within each row (feature attention), column attention within each column (datapoint attention), and a feed-forward layer. A decoder maps every token to a predictive distribution over 5000 bins, whose mean fills the missing entry. (b) The token grid: KcK_c columns of row-CLS tokens and KrK_r rows of column-CLS tokens border the R×CR \times C data tokens and are removed before decoding.

Synthetic priors

MatrixFormer is trained entirely on synthetic matrices, so the prior is designed to cover the structure often seen in real-world matrices, which are often approximately low rank with spectra ranging from a few dominant factors to long tails [44]. The main training phase mixes four equally likely families: low-rank matrices [9], two broader-rank spectral families with slowly and steeply decaying singular values (Eqs. (9) and (10)), and latent-factor matrices [37] (Eq. (11)). Within each family we randomize the rank, the shape of the spectrum, the geometry of the singular vectors and the matrix dimensions (Table 2). Entries are then hidden either uniformly at random or by a mixed scheme whose missingness can depend on the values themselves or follow structured patterns, at rates from 5% to 75%; most training examples additionally thin some rows or columns to mimic units with few observations. Later stages add sparse synthetic user–item ratings (Section B). Section B specifies the families, the masks and the normalization, and Figure 7 shows example masks and spectra.

Figure 7. Synthetic training data. Missingness masks drawn from each of MatrixFormer’s five synthetic data generators, shown at a common 48 × 48 size (observed entries in blue, missing entries in white). Training matrices are rarely square; the recommender-system and score-panel generators train on matrices with at least 128 and 96 rows, respectively. The spectral-family example uses a neural block missing-at-random (MAR) mask, and the scientific-panel example omits its fully observed time-feature columns. Right, normalized singular values of one separate draw per generator: the raw clean signal for low rank and spectral families (slow decay), the expected rating for recommender systems, and the training target otherwise. Each line ends at its matrix’s rank.

ParameterRoleRange
smax⁡s_{\max}Leading spectral scale[1, 5]
ω\omegaInitial head mixture weight[0, 3]
hhStretched-exponential head scale[1, 30]
ppHead exponent[1, 3]
HHHead-to-tail transition scale[1, 20]
τ\tauPower-law tail amplitude[0.2, 1]
λ\lambdaTerminal taper strength[0, 1]
qqTerminal taper exponent[1, 4]
σϵ\sigma_\epsilonEntrywise observation-noise standard deviation[0, 10−310^{-3}]

Table 2. Shared parameters of the three spectral prior families. All intervals specify uniform distributions in the raw generator’s units.

Results

We evaluate our pretrained MatrixFormer model across four matrix-completion domains, without ever updating its network weights. Figure 3 summarizes three of the four empirical applications using their existing metrics and evaluation protocols. The fourth, language-model benchmark-score completion, is reported in Section F.

Figure 3. Comparison of MatrixFormer with baselines on tabular imputation, recommendation and causal panel benchmarks. MatrixFormer uses one set of weights throughout. Lower is better in every panel; methods are ordered by error and the lowest value is in bold. Error bars show 95% confidence intervals. (a) Imputation error on the MissBench and UCI suites. (b) Rating-prediction error on MovieLens 100K and Netflix small. (c) Counterfactual-prediction error on the California smoking, CPS and Kansas placebo benchmarks. (d) Treatment-effect error on the same benchmarks: the absolute difference ∣τ^−τ∣|\hat{\tau}-\tau| between the estimated and the true average effect on the treated units, where the true effect τ\tau is zero in a placebo.

Tabular imputation

We evaluate imputation on MissBench, which is a suite of 42 OpenML datasets under 11 missingness mechanisms [13], and on our 12-dataset HyperImpute-inspired UCI suite [22]. Using observed entries as context, MatrixFormer completes whole matrices on MissBench and UCI, with performance measured by columnwise standard-deviation-normalized RMSE averaged across datasets. MatrixFormer achieves overall errors of 1.612 and 1.017, respectively, outperforming the eight shared baselines on both suites. Moreover, the remaining methods are each fit on each such matrix and then used for imputation, whereas, our results are simply via inference and in context learning. See Figure 3(a) for the results and Appendix § 8 for extensive benchmark and evaluation details.

Matrix completion for recommendation

We evaluate rating prediction on MovieLens 100K [16] and the Netflix small subset [36], which are two sparse user movie matrices containing ratings on a 1–5 scale. Using 80% of the available ratings as context, MatrixFormer predicts the held-out 20% without updating its pretrained network weights. We compute RMSE separately for each user and then average across users. MatrixFormer achieves the lowest RMSE among the displayed methods on MovieLens 100K (0.8926), while on Netflix small its RMSE of 0.8666 is slightly higher than Biased MF’s 0.8621 and lower than the remaining baselines.3 See Figure 3(b) for the results and Appendix § 10 for further details.

Causal inference

Estimating a treatment effect from panel data is a matrix completion problem [11, 3]: in a unit-by-time matrix of outcomes, the entries of treated units after treatment are missing counterfactuals, namely the outcomes those units would have had without treatment. We evaluate MatrixFormer on three placebo benchmarks built from California cigarette-sales data [1], CPS labor-market data [2] and the Kansas semi-synthetic design [6]. MatrixFormer predicts these missing counterfactuals from the observed entries in one forward pass. We report the RMSE of the counterfactual predictions and the error of the treatment effect they imply, whose true value is zero. MatrixFormer achieves the lowest RMSE and the lowest treatment effect error on all three benchmarks, ahead of both synthetic difference-in-differences (SDiD) [2], a method designed for panel data, and CausalPFN [5], a causal foundation model. See Figure 3(c) and (Figure 3d) for the results and Appendix § 9 for further details.

Interpretability

Here, we demonstrate that MatrixFormer encodes a representation of latent factors for rows and columns and is able to recover inherent groupings in matrices. Note that these behaviors were emergent: we did not explicitly train MatrixFormer for these behaviors.

Latent factors in the CLS tokens

From a partially observed low-rank matrix, the CLS tokens of MatrixFormer recover the underlying latent factors up to a linear projection, purely in context: no weights are updated, and the factors are never given as input. We test this on matrices X=UVTX = UV^{\mathsf{T}} of size nn and rank rr with standard-Gaussian factors and 40% of the entries observed uniformly at random; we consider rank-to-size ratios r/nr/n of 1/64, 1/32 and 1/16 (Figure 4a shows one such matrix). Write Ui∈RrU_i \in\mathbb{R}^r for the ii-th row of UU, the row factor of row ii. At each layer ℓ\ell, we concatenate the 12 row-CLS tokens of row ii into one vector ci(ℓ)c_i^{(\ell)} and fit a linear projection from ci(ℓ)c_i^{(\ell)} to UiU_i by ridge regression on seven eighths of the rows, computing R2R^2 only on the held-out rows, over eight folds. Averaged over the factor coordinates and over 30 matrices, this held-out R2R^2 increases from zero before attention, where the tokens are identical across rows, to 0.99 after the last block of attention at ratio 1/64 (Figure 4b); it reaches 0.97 and 0.86 at ratios 1/32 and 1/16. The scatter plots pool the projected and true factor coordinates of three matrices, of sizes 128, 256 and 512. The column-CLS tokens recover the column factors to the same degree (Figure 12); the full setup is in Section G.1.

Figure 4. CLS tokens recover latent factors. (a) We create a rank-2 matrix and hide 60% of its entries. A linear projection of the row-CLS tokens gives the decoded row factors U~\tilde{U}. (b) As the tokens go through attention layers, the decoded factors align with the true factors.

Figure 12. Latent column factors in the column-CLS tokens across layers. Same matrices and linear projection as Figure 4(b), for the column-CLS tokens. Left: out-of-fold R2R^2 of the linear projection by layer; each point averages 30 matrices with 95% intervals. Right: true against decoded column factors at rank/size 1/64, pooling all factors of one matrix each of size 128, 256 and 512 (ranks 2, 4 and 8). The true column factor is Vj/sjV_j/s_j, the column factor after column standardization; the panel value is R2R^2 averaged over these factors.

Recovery of latent group structure

We illustrate latent-group recovery using a single 64-by-64 matrix with four row-wise groups, Gaussian noise with standard deviation 0.25, and 40% observed entries under MCAR masking. MatrixFormer receives only observed values and the mask, not group labels. At each layer, we average cell embeddings within each row and apply K-means with four clusters to the full 768-dimensional row embeddings. Adjusted Rand index (ARI) measures agreement with the true row groups, increasing from -0.014 before attention to 1.000 after block eight as shown in Figure 5. The scatter plots use PCA only for visualization. We can see clearly that the 4 row-wise groups are easily recoverable from the embeddings alone.

Figure 5. Embeddings recover latent groups. (a) We create a matrix with 4 row-wise groups, Gaussian noise, and shuffled entries. (b) As the embeddings go through attention layers, these 4 groups become clustered. A simple K-Means with K=4K = 4 recovers the groups after layer 5.

Conclusion

We introduced MatrixFormer, a model for matrix completion that represents a partially observed matrix as a grid of cell tokens, alternates attention over rows and columns, and is pretrained only on synthetic matrices. With no fine-tuning, the same mixed-prior network was applied to tabular imputation, rating prediction, benchmark-score completion for language models and causal panel data. MatrixFormer has lower overall RMSE than the displayed baselines on UCI, while TabImpute is slightly better on MissBench. It improves on the collaborative-filtering baselines on MovieLens 100K, but Biased MF has lower error on Netflix small. At MI budget k=15k = 15, MatrixFormer has higher R2R^2 than kernel ridge on Merged and BenchPress, but lower R2R^2 on MMLU and MTEB. On causal panels, MatrixFormer has the lowest normalized point estimates among the displayed methods for both metrics on all three benchmarks. The main comparisons retain standard orientation across domains. Transposition and prediction averaging are reported as exploratory ablations, with improvements and regressions retained rather than used to select a primary result. A single-network instance of the MatrixFormer architecture completes a 1024×101024 \times10 matrix 107× faster than TabImpute; the orientation-averaging ablation uses two passes of the single model. Evaluating the predictive distributions, for example as intervals for treatment effects, and extending the context to larger matrices are directions for future work. These results show cross-domain transfer without implying uniform superiority over task-specific methods.

Model architecture

Cell representation. We form X~∈RR×C\widetilde{X} \in\mathbb{R}^{R \times C} by setting X~rc=Xrc\widetilde{X}_{rc} = X_{rc} at observed entries and X~rc=0\widetilde{X}_{rc} = 0 at missing entries. Zero serves only as a computational placeholder: the corresponding value embedding is subsequently replaced by a learned mask token, as in masked-token modeling [10]. Let dd be the embedding dimension, let fval:R→Rdf_{\mathrm{val}} : \mathbb{R} \to\mathbb{R}^{d} be a shared value-embedding multilayer perceptron (MLP), let mmask∈Rdm_{\mathrm{mask}} \in\mathbb{R}^{d} be the learned mask vector, and let emiss:{0,1}→Rde_{\mathrm{miss}} : \{0,1\} \to\mathbb{R}^{d} be an embedding lookup with separate learned vectors for observed and missing cells. The initial representation of cell (r,c)(r,c) is

Erc(0)=(1−Mrc)fval(X~rc)+Mrcmmask+emiss(Mrc).(1)E_{rc}^{(0)} = (1 - M_{rc}) f_{\mathrm{val}}(\widetilde{X}_{rc}) + M_{rc}m_{\mathrm{mask}} + e_{\mathrm{miss}}(M_{rc}). \tag*{(1)}

Thus, observed cells receive fval(Xrc)+emiss(0)f_{\mathrm{val}}(X_{rc}) + e_{\mathrm{miss}}(0), whereas missing cells receive mmask+emiss(1)m_{\mathrm{mask}} + e_{\mathrm{miss}}(1). The mask token already encodes missingness; the final term provides a separately parameterized offset for each observation status.

Alternating axial attention. Each transformer block contains two axial self-attention operations [19]. Feature attention is applied across columns separately within each row, allowing a cell to use the other variables measured for the same datapoint. Datapoint attention is then applied across rows separately within each column, allowing the same cell to use the empirical structure of that variable across observations. We write RMSNorm for root-mean-square normalization over the dd embedding coordinates of each token [49], and FFN:Rd→Rd\mathrm{FFN} : \mathbb{R}^{d} \to\mathbb{R}^{d} for a feed-forward network with SwiGLU gating [39], applied separately at each grid location with shared parameters. Both attention operations and the feed-forward sublayer use pre-normalized residual connections [47], each scaled by a learned scalar gain γi\gamma_i [4]. Writing AfeatA_{\mathrm{feat}} and AdataA_{\mathrm{data}} for the two attention operators, one block can be summarized as

U(ℓ)=G(ℓ−1)+γ1Afeat(RMSNorm⁡(G(ℓ−1))),(2)U^{(\ell)} = G^{(\ell-1)} + \gamma_1 A_{\mathrm{feat}}\left(\operatorname{RMSNorm}\left(G^{(\ell-1)}\right)\right), \tag*{(2)}
V(ℓ)=U(ℓ)+γ2Adata(RMSNorm⁡(U(ℓ))),(3)V^{(\ell)} = U^{(\ell)} + \gamma_2 A_{\mathrm{data}}\left(\operatorname{RMSNorm}\left(U^{(\ell)}\right)\right), \tag*{(3)}
G(ℓ)=V(ℓ)+γ3FFN⁡(RMSNorm⁡(V(ℓ))),(4)G^{(\ell)} = V^{(\ell)} + \gamma_3 \operatorname{FFN}\left(\operatorname{RMSNorm}\left(V^{(\ell)}\right)\right), \tag*{(4)}

for ℓ=1,…,L\ell= 1,\ldots,L, with layer- and sublayer-specific parameters suppressed in the notation. Rotary positional embeddings (RoPE) [42] are applied along the attended axis, using column positions for feature attention and row positions for datapoint attention, with data positions beginning after the corresponding CLS border. Alternating the two attention operators lets information move across the full matrix while retaining the distinction between row structure and column structure at every layer. The feed-forward network mixes embedding coordinates rather than matrix entries. We use L=8L = 8 blocks of width d=768d = 768 with 16 attention heads, feed-forward width 1536 and Kr=Kc=12K_r = K_c = 12, for 78M parameters (Table 1).

ComponentSetting
Value embedding fvalf_{\mathrm{val}}MLP 1→768→7681\to768\to768 with GELU
Missing entrieslearned mask vector mmaskm_{\mathrm{mask}}; learned two-entry missingness embedding emisse_{\mathrm{miss}} added to every cell
CLS borderKc=12K_c=12 row-CLS tokens tjrowt_j^{\mathrm{row}} and Kr=12K_r=12 column-CLS tokens ticolt_i^{\mathrm{col}}; corner entry (i,j)(i,j) is ticol+tjrowt_i^{\mathrm{col}}+t_j^{\mathrm{row}}
BlocksL=8L=8, width d=768d=768; feature attention, datapoint attention, feed-forward
Attention16 heads of dimension 48; rotary embeddings (base 10410^4) on 24 of the 48 dimensions; positions start after the border
Feed-forwardSwiGLU, W3SiLU⁡(W1h)⊙W2hW_3\operatorname{SiLU}(W_1h)\odot W_2h, hidden width 1536
Normalizationpre-norm RMSNorm with learned gain, ϵ=10−6\epsilon=10^{-6}; no final normalization
Residual gainsone learned scalar per sublayer, initialized to 0.5
Decoder fdecf_{\mathrm{dec}}MLP 768→1536→1536→5000768\to1536\to1536\to5000 with GELU; O=5000O=5000 bins
Size78.0M parameters; all linear maps have biases

Table 1. MatrixFormer architecture.

Decoder. After the final transformer block, we remove the row- and column-CLS border and retain the contextual representation hrc=GKr+r,Kc+c(L)∈Rdh_{rc} = G_{K_r+r,K_c+c}^{(L)} \in\mathbb{R}^{d} for each matrix entry. Let θ\theta collect the trainable model parameters and fdec:Rd→ROf_{\mathrm{dec}} : \mathbb{R}^{d} \to\mathbb{R}^{O} be the shared decoder MLP. Its output z∈ROz \in\mathbb{R}^{O} parameterizes a bar distribution [31, 20] on O=5000O = 5000 fixed bins with borders b0<b1<⋯<bOb_0 < b_1 < \cdots< b_O and midpoints b~k=(bk−1+bk)/2\tilde{b}_k = (b_{k-1} + b_k)/2: with bin probabilities q(z)=softmax⁡(z)q(z) = \operatorname{softmax}(z), its density p(y;z)p(y;z) at a scalar target yy equals qk(z)/(bk−bk−1)q_k(z)/(b_k - b_{k-1}) on each interior bin [bk−1,bk)[b_{k-1}, b_k), and the two outer bins are replaced by half-normal tails so that the support is R\mathbb{R} (Appendix § 6.§ 2). The distribution has no parameters of its own, so θ\theta enters only through zz. The conditional predictive density for cell (r,c)(r,c) is then

zrc=fdec(hrc)∈RO,z_{rc} = f_{\mathrm{dec}}(h_{rc}) \in\mathbb{R}^{O},
pθ,rc(y∣X,M)=p(y;zrc).(5)p_{\theta,rc}(y \mid X,M) = p(y;z_{rc}). \tag*{(5)}

The dependence of hrch_{rc} and fdecf_{\mathrm{dec}} on θ\theta is implicit. The decoder acts separately on each token, with parameters shared across rows and columns; each prediction nevertheless uses matrix-wide context through hrch_{rc}, rather than through an additional mixing operation in the output head. This cellwise readout permits all missing entries to be predicted in parallel within a single forward pass. For point imputation, we use the predictive mean,

X^rc=μθ,rc=EY∼pθ,rc(⋅∣X,M)[Y]=∑k=1Oqk(zrc) νk,Mrc=1,(6)\widehat{X}_{rc}=\mu_{\theta,rc}=\mathbb{E}_{Y\sim p_{\theta,rc}(\cdot\mid X,M)}[Y]=\sum_{k=1}^{O}q_k(z_{rc})\,\nu_k,\qquad M_{rc}=1, \tag*{(6)}

where νk=b~k\nu_k=\widetilde{b}_k for 1<k<O1<k<O and ν1,νO\nu_1,\nu_O are the means of the two tails; observed entries are left unchanged. Retaining a predictive distribution, rather than only a scalar output, allows the same decoder to support the likelihood and cumulative-distribution-function (CDF) alignment terms in the training objective, while its mean supplies the point-prediction term. During synthetic training, these losses are evaluated only at entries hidden by the training mask, as described in Section B. When discussing a single hidden entry, we suppress (r,c)(r,c) and write pθp_\theta for pθ,rcp_{\theta,rc}.

Computational scaling. Holding the embedding width fixed, dense self-attention applied to the flattened RCRC cells requires O(R2C2)O(R^2C^2) pairwise attention interactions per layer. Ignoring the CLS borders, MatrixFormer instead performs attention over CC tokens for each of RR rows and over RR tokens for each of CC columns, giving

O(RC2+CR2)=O(RC(R+C)).(7)O(RC^2+CR^2)=O(RC(R+C)). \tag*{(7)}

Including the border tokens replaces RR and CC by R+KrR+K_r and C+KcC+K_c, respectively, leaving the asymptotic order unchanged for fixed KrK_r and KcK_c. Compared with full attention on the flattened grid, this factorization reduces the attention cost while preserving the row–column structure of the problem.

Architecture

Table 1 lists the settings of the network in § 2.1.

Bar distribution

With the borders bkb_k and bin probabilities q(z)q(z) of § 2.1 and widths wk=bk−bk−1w_k=b_k-b_{k-1}, the full density is

p(y;z)={q1(z) φs1(b1−y),y<b1,qk(z)/wk,bk−1≤y<bk,1<k<O,qO(z) φsO(y−bO−1),y≥bO−1.(8)p(y;z)= \begin{cases} q_1(z)\,\varphi_{s_1}(b_1-y), & y<b_1,\\ q_k(z)/w_k, & b_{k-1}\le y<b_k,\quad1<k<O,\\ q_O(z)\,\varphi_{s_O}(y-b_{O-1}), & y\ge b_{O-1}. \end{cases} \tag*{(8)}

where φs(t)=2/π s−1e−t2/(2s2)\varphi_s(t)=\sqrt{2/\pi}\,s^{-1}e^{-t^2/(2s^2)}, t≥0t\ge0, is the half-normal density and sk=wk/Φ−1(3/4)s_k=w_k/\Phi^{-1}(3/4), so that each tail has median equal to its bin width. The family has no trainable parameters; θ\theta enters only through the logits, pθ,rc(⋅∣X,M)=p(⋅;zrc)p_{\theta,rc}(\cdot\mid X,M)=p(\cdot;z_{rc}). The tail means in μθ,rc\mu_{\theta,rc} are ν1=b1−s12/π\nu_1=b_1-s_1\sqrt{2/\pi} and νO=bO−1+sO2/π\nu_O=b_{O-1}+s_O\sqrt{2/\pi}.

Inference runtime scaling

To highlight the runtime performance of our approach, we compare the single-network MatrixFormer architecture with the entry-wise TabImpute model [13] on an NVIDIA H200, fixing the width at 10 columns and increasing the row count geometrically from 16 to 1024. Figure 6 shows that the measured speedup increases from 2.1× at 16 rows to 107.0× at 1024 rows, where median runtime is 4.167 s for TabImpute and 0.0389 s for MatrixFormer.

Figure 6. Inference runtime of MatrixFormer and TabImpute. Matrices have 10 columns and 40% of their entries missing completely at random; timings are on one NVIDIA H200. All axes are logarithmic. (a) Median runtime of five calls against the number of rows; shading is the interquartile range. (b) Speedup, the TabImpute median divided by the MatrixFormer median. The MatrixFormer timings were measured on an earlier checkpoint with the same architecture as the released weights, not on the released weights themselves.

Synthetic priors and training objective

Spectral families. For the three spectral families, sample a rank parameter kk and matrices U∈RR×kU \in\mathbb{R}^{R \times k} and V∈RC×kV \in\mathbb{R}^{C \times k} with orthonormal columns. The generator forms

T=Udiag⁡(s1,…,sk)V⊤,A=T+σϵE,Erc∼iidN(0,1).(9)T = U \operatorname{diag}(s_1,\ldots,s_k)V^\top,\qquad A = T + \sigma_{\epsilon}E,\qquad E_{rc} \overset{\mathrm{iid}}{\sim} \mathcal{N}(0,1). \tag*{(9)}

The noise level σϵ\sigma_{\epsilon} is small (Table 2), and the target is the entire clean signal TT, rather than the noisy input or an additional top-rank truncation. Thus, “low-rank” refers to TT, not necessarily to AA. With tj=j−1t_j=j-1, the spectral coefficients are

wj=(1−e−ω)e−tj/H,w_j=(1-e^{-\omega})e^{-t_j/H},
gj=[wje−(tj/h)p+(1−wj)τ(1+tj)−α]e−λ(tj/(k−1))q,sj=smax⁡gjg1.(10)g_j=\left[w_j e^{-(t_j/h)^p}+(1-w_j)\tau(1+t_j)^{-\alpha}\right]e^{-\lambda(t_j/(k-1))^q},\qquad s_j=s_{\max}\frac{g_j}{g_1}. \tag*{(10)}

This blends a rapidly decaying head with a power-law tail and a terminal taper. The low-rank family draws kk uniformly from 2–16 and α∼Unif⁡(0.2,2)\alpha\sim\operatorname{Unif}(0.2,2); the slow- and steep-tail families draw kk from 2–min⁡(160,R,C)\min(160,R,C), with α∼Unif⁡(0,0.5)\alpha\sim\operatorname{Unif}(0,0.5) and Unif⁡(1,2.5)\operatorname{Unif}(1,2.5), respectively. All ranks are capped by the matrix dimensions. The remaining parameters are sampled independently and uniformly for each matrix from the ranges in Table 2. The two broader-rank families can also draw small ranks: their names describe their tail-exponent distributions, not a guarantee of full rank. The coefficient sequence in (10) need not be monotone; because UU and VV have orthonormal columns, the singular values of TT are its decreasing rearrangement, followed by zeros.

Singular-vector geometry. For each axis of length nn, choose one of the following feature constructions with probability 1/4, independently of the other axis, and take its thin QR factor with diagonal-sign correction; this gives UU and VV in (9). Writing Gij∼iidN(0,1)G_{ij}\mathrel{\overset{\mathrm{iid}}{\sim}}\mathcal{N}(0,1), the four constructions are:

  1. Gaussian: F=GF=G, yielding a Haar-distributed orthonormal basis.

  2. Coherent: Fij=eaiGijF_{ij}=e^{a_i}G_{ij}, with ai∼N(0,η2)a_i\sim\mathcal{N}(0,\eta^2) and η∼Unif⁡(0.25,2)\eta\sim\operatorname{Unif}(0.25,2), concentrating variation in selected rows.

  3. Smooth: Fij=cos⁡(ziTωj+ϕj)+0.03GijF_{ij}=\cos(z_i^\mathsf{T}\omega_j+\phi_j)+0.03G_{ij}, where dd is uniform on {1,…,5}\{1,\ldots,5\}, zi∼N(0,Id)z_i\sim\mathcal{N}(0,I_d), ωj∼N(0,ℓ−2Id)\omega_j\sim\mathcal{N}(0,\ell^{-2}I_d), ϕj∼Unif⁡(0,2π)\phi_j\sim\operatorname{Unif}(0,2\pi), and log⁡ℓ∼Unif⁡(log⁡0.3,log⁡3)\log\ell\sim\operatorname{Unif}(\log0.3,\log3). The small Gaussian term avoids rank-deficient feature matrices.

  4. Offset-bearing: Fi1=1+0.05Gi1F_{i1}=1+0.05G_{i1} and Fij=GijF_{ij}=G_{ij} for j>1j>1.

This varies the spatial concentration and smoothness of the signal without prescribing a single singular-vector geometry.

Latent-factor. The fourth family instead draws kk uniformly from 1–min⁡(11,R,C)\min(11,R,C) and sets

T=PQ⊤,P∈RR×k,Q∈RC×k,A=T,(11)T=PQ^\top,\qquad P\in\mathbb{R}^{R\times k},\qquad Q\in\mathbb{R}^{C\times k},\qquad A=T, \tag*{(11)}

where each row of either factor independently chooses one of five equally likely distributions. Its coordinates are drawn independently from N(0,1)\mathcal{N}(0,1), Laplace(0,1)(0,1), Student-tνt_\nu with ν\nu uniform on {2,…,10}\{2,\ldots,10\}, or 12δ0+12N(0,9)\frac{1}{2}\delta_0+\frac{1}{2}\mathcal{N}(0,9), or the row is drawn jointly as D−k−11D-k^{-1}\mathbf{1} with D∼Dirichlet⁡(1k)D\sim\operatorname{Dirichlet}(\mathbf{1}_k). There is no added observation noise, feature warping, or quantization in this recipe. Unlike (9), its singular values emerge from the sampled factors rather than being specified directly, and kk is only an upper bound on the realized rank: for example, the centered Dirichlet draw is zero when k=1k=1.

From matrices to episodes. Each family is paired with either fixed-rate MCAR masking or a mixed masking kernel, yielding eight equally weighted components. The latter samples MCAR, MAR, or MNAR mechanisms [35], including structured patterns, at a nominal missing rate between 5% and 75%; the fixed MCAR rate is 40%. Missingness may therefore depend on AA, rather than always being independent of its values. To mimic rows with few observations, such as new users in a recommender system, 75% of episodes additionally thin a random subset of rows or columns; we call these sparse-support episodes. Normalization applies the same columnwise affine map to the masked input and the clean target, with an observed-support variance estimate for sparsely observed columns. The losses below are therefore computed in those standardized units.

Objective. Each episode samples a complete synthetic matrix, a mask MM and a set S⊆{(r,c):Mrc=1}S \subseteq\{(r,c): M_{rc}=1\} of scored hidden entries: all hidden entries or, in sparse-support episodes, the hidden entries of the thinned rows or columns. Let yrcy_{rc} be the true value of a hidden entry in standardized units. The point prediction is also regressed toward a reference prediction, as in knowledge distillation [18]: two earlier checkpoints of the same architecture, with frozen parameters ψ1,ψ2\psi_1,\psi_2, receive the same masked input, and their stop-gradient mean μˉrc=sg⁡[12(μψ1,rc+μψ2,rc)]\bar{\mu}_{rc}=\operatorname{sg}\left[\frac{1}{2}(\mu_{\psi_1,rc}+\mu_{\psi_2,rc})\right] is the point target. The objective is

L(θ)=E[1∣S∣∑(r,c)∈S(−log⁡pθ,rc(yrc)+2ρ(μθ,rc−μˉrc)+0.05ℓCDF(zrc,yrc))](12)\mathcal{L}(\theta)=\mathbb{E}\left[\frac{1}{|S|}\sum_{(r,c)\in S}\left(-\log p_{\theta,rc}(y_{rc})+2\rho(\mu_{\theta,rc}-\bar{\mu}_{rc})+0.05\ell_{\mathrm{CDF}}(z_{rc},y_{rc})\right)\right] \tag*{(12)}
ρ(a)={12a2,∣a∣≤1,∣a∣−12,∣a∣>1,ℓCDF(z,y)=1O∑k=1O(∑j≤kqj(z)−1{y≤b~k})2\rho(a)= \begin{cases} \frac{1}{2}a^2, & |a|\le1,\\ |a|-\frac{1}{2}, & |a|>1, \end{cases} \qquad \ell_{\mathrm{CDF}}(z,y)=\frac{1}{O}\sum_{k=1}^{O}\left(\sum_{j\le k}q_j(z)-\mathbf{1}\{y\le\widetilde{b}_k\}\right)^2

where the expectation is over episodes. The point loss ρ\rho is the Huber loss with threshold one [21], and ℓCDF\ell_{\mathrm{CDF}} is a ranked probability score [12] with thresholds at the bin midpoints, a discrete form of the continuous ranked probability score [14]. Only ρ\rho uses the reference prediction; the likelihood and CDF terms are supervised by the true value. We use ρ\rho rather than squared error because a few extreme residuals otherwise dominated the point loss.

Training curriculum. All weight updates use synthetic matrices, and training proceeds as a curriculum. The network is first trained from random initialization on small latent-factor matrices, with 10–50 rows and 5–50 columns, using the likelihood term alone. It is then trained with Eq. (12) on all four families, with spectral matrices of 80–320 rows and 35–100 columns; the latent-factor matrices are retained at their original sizes throughout as rehearsal [34]. Next, the matrix sizes are enlarged in steps, up to 2000 rows and 1000 columns, and a copy of the network is adapted to synthetic user–item rating matrices with observed densities between 0.004 and 0.08. In the final stage a single network is trained on imputation and rating episodes jointly, with a variant of Eq. (12) whose reference predictions come from the checkpoints of the previous stage. This network is MatrixFormer: inference is one forward pass of it, and no other checkpoint is used.

Optimization. The four-family stage uses the AdamW optimizer [27] (weight decay 0.02, gradient-norm clipping at 0.5) and runs 128k updates on batches of two matrices, with FP32 parameters and BF16 computation. The learning rate warms up over 600 updates to 10−510^{-5} and then follows cosine decay [26] to 5% of that peak. The size-enlargement stage runs 5k updates at half that peak learning rate. Checkpoints are selected on fixed synthetic validation suites, with one exception: the adaptation to rating matrices is selected on an inner-validation split, 10% of the training ratings of MovieLens 100K and Netflix small; test ratings do not enter this selection. Downstream benchmarks were inspected during development, and the UCI context choice in § 3.1 is an exploratory follow-up rather than a blind validation.

Tabular imputation: MissBench and UCI

We evaluate missing-value imputation on two suites. MissBench is the OpenML-based suite used with TabImpute [13]: 42 datasets under eleven missingness mechanisms at the nominal 40% setting, for 462 cases. Our local UCI-style suite, motivated by HyperImpute [22], contains 12 datasets under MCAR, Col-MAR and Self-MNAR at 10%, 20%, 30%, 40% and 50% nominal missingness with ten repeats per setting, for 1,800 cases. Neither suite has a row train/test split: all rows and columns are retained, observed entries provide context, and predictions are scored only on the masked cells. We retain every dataset and case rather than a subset selected by performance or CACTI’s ten-dataset list; published CACTI scores [15] are not directly comparable to this no-row-holdout protocol.

Metric. RMSE denotes the columnwise standard-deviation-normalized error; lower is better. For masked entries Mj\mathcal{M}_j in column jj,

ej=1∣Mj∣∑i∈Mj(xij−x^ij)2,sj=std⁡i∈Mj(xij),RMSEcase=1∣J∣∑j∈Jejsje_j = \sqrt{\frac{1}{|\mathcal{M}_j|}\sum_{i\in\mathcal{M}_j}(x_{ij}-\hat{x}_{ij})^2}, \qquad s_j = \operatorname{std}_{i\in\mathcal{M}_j}(x_{ij}), \qquad\mathrm{RMSE}_{\mathrm{case}} = \frac{1}{|\mathcal{J}|}\sum_{j\in\mathcal{J}}\frac{e_j}{s_j}

where J\mathcal{J} contains the columns with at least one masked entry and a non-constant masked target. The denominator uses the masked ground-truth values, which are never supplied to the imputer. Every number below first averages a method’s cases within a dataset and then weights datasets equally, so that large datasets and mechanisms with many cases do not dominate.

Methods. We compare MatrixFormer with eight imputers evaluated on both suites: kk-nearest-neighbor imputation (K-NN) [43]; SoftImpute [29], a low-rank completion by iterative soft-thresholded SVD; the chained-equation methods MICE [45] and ICE, which regress each column on the others in turn; MissForest [41], which does the same with random forests; the deep generative models GAIN [48] and MIWAE [28]; and HyperImpute [22], which selects a model for each column within an iterative scheme. The baselines reuse saved predictions without retraining. MatrixFormer uses whole-matrix inference on MissBench. On UCI it uses sequential windows of at most 2,000 rows and 1,000 columns, the largest matrices seen in pre-training, with observed-column normalization computed once from the entire incomplete matrix and overlapping tail-window predictions averaged; only rows are split, since these datasets have at most 90 columns. This window limit was adopted after inspecting whole-matrix results, so it is an exploratory protocol choice.

MissBench

Datasets and mechanisms. MissBench consists of 42 OpenML datasets (Table 3). They are small: between 50 and 235 rows, with a median of 98, and between 5 and 55 columns, with a median of 10. Each dataset is masked by eleven missingness mechanisms at the nominal 40% setting, giving 462 cases: MCAR, Col-MAR, Self-MNAR, neural MAR, block-neural MAR, and six structured MNAR mechanisms (polarization, soft polarization, latent factor, cluster level, two-phase subset and censoring). The structured mechanisms need not realize exactly 40% missing entries. The generators are those of Feitelberg et al. [ [13]; Col-MAR and Self-MNAR, which UCI also uses, are defined in Section C.2.

DatasetRowsColsDatasetRowsColsDatasetRowsCols
alcohol-qcm-sensor12515edm15418rabe_265517
analcatdata_election20006715EgyptianSkulls1505Rainfall-in-Kerala-1901-201711718
analcatdata_gviolence749FacultySalaries505sleuth_case1201507
analcatdata_lympic20006612Glass-Classification21410sleuth_ex1605626
appendicitis_test1068humans_numeric7515slump10310
appendicitis_test_edsa1068ICU20020SMSA5916
autoPrice15916machine_cpu2097SolarPower2045
basketball965MercuryinBass5310Student-Scores5613
benzo3219533metafeatures7532Swiss-banknote-counterfeit-detection2007
breast-cancer-coimbra11610pollution6016treepipit8610
chatfield_423513pwLinear20011visualizing_hamster736
chscase_vine15210pyrim7428WineDataset17814
dataset_analcatdata_creditscore1007rabe_131506wisconsin19433
divorce_prediction17055rabe_148666witmer_census_1980505

Table 3. The 42 MissBench datasets, all from OpenML, with the number of rows and columns of each matrix.

Results by mechanism. Table 4 separates the overall score of Figure 3(a) into the eleven mechanisms. MatrixFormer has the lowest error in nine. K-NN is lower on Col-MAR (1.075 against 1.105) and on block-neural MAR (1.039 against 1.061). The mechanisms differ greatly in difficulty: under censoring and polarization every method has an error above 3, and these two mechanisms account for much of each method’s overall score.

Table 4: MissBench RMSE by missingness mechanism at the nominal 40% setting; lower is better. Each entry averages the 42 datasets; Overall first averages the eleven mechanisms within each dataset. Neural MAR and Block MAR are the neural and block-neural MAR mechanisms; the six columns from Polar. to Censoring are the structured MNAR mechanisms. The lowest value in each column is in bold.

MethodMCARCol-MARSelf-MNARNeural MARBlock MARPolar.Soft polar.LatentClusterTwo-phaseCensoringOverall
MatrixFormer0.8611.1051.9500.8711.0613.4792.2670.9090.8810.9083.4371.612
MissForest1.0181.1972.5801.0701.4304.4332.4981.0520.9470.9374.4651.966
K-NN0.9431.0752.5391.0041.0393.6603.1570.9580.9880.9155.9612.022
HyperImpute0.9691.1172.6361.1141.3255.4922.7131.0820.9170.9314.4442.067
MICE1.0021.2982.5431.0611.7516.2312.4941.0620.9770.9315.0512.218
ICE1.2151.1352.9881.1711.2996.3182.8291.1811.0680.9474.7622.265
SoftImpute1.0071.4173.3721.2701.2434.7502.8041.0561.0791.1985.9782.289
MIWAE1.2351.7013.6081.2461.3844.0442.7531.3011.2241.3226.2842.373
GAIN1.2462.2072.9651.6672.4848.7512.2871.8331.3481.7117.2223.065

Table 4. MissBench RMSE by missingness mechanism at the nominal 40% setting; lower is better.

Results by dataset. Table 5 gives the error on each dataset, averaged over the eleven mechanisms. MatrixFormer has the lowest error on 31 of the 42 datasets and is among the two lowest on 36. It is not uniformly best: it ranks eighth of nine on ICU and last on treepipit, and fourth on three further datasets.

DatasetMatrixFormerMissForestK-NNHyperImputeMICEICESoftImputeMIWAEGAIN
alcohol-qcm-sensor0.7821.2051.8050.9451.0830.9461.9732.4422.422
analcatdata_election20002.8113.9859.6028.65711.428.87812.777.57612.78
analcatdata_gviolence1.4981.8772.0481.9331.8852.0782.0381.9582.888
analcatdata_olympic20001.0871.3031.6021.1841.2801.2741.8642.2932.054
appendicitis_test0.9381.1831.2750.9561.0551.0331.3161.4651.795
appendicitis_test_edsa0.9081.3971.4930.9591.2950.9921.6751.8161.656
autoPrice1.2311.4751.6231.5611.3701.5371.5741.8312.335
baskball1.5721.7631.6621.7011.6421.6941.8711.7171.783
benzo321.1411.3661.3491.3881.3681.9541.2771.4392.424
breast-cancer-coimbra1.6522.0812.1182.1202.1722.1722.3252.6132.341
chatfield_40.8901.3221.7661.0521.3681.0391.6172.3971.570
chscase_vine11.4651.5451.5631.5731.4681.6611.6441.9152.312
dataset_analcatdata_creditscore1.9681.8552.0602.0031.9882.3091.8182.1911.967
divorce_prediction1.0091.0241.0761.0481.0441.1261.1271.8491.511
edm1.1741.1811.1821.0531.0851.0971.3301.7891.942
EgyptianSkulls1.4611.6341.6281.6271.6241.6171.4941.6811.666
FacultySalaries0.9071.2381.6251.3651.3311.3291.6482.1781.728
Glass-Classification1.2441.3601.4231.2991.3201.2281.5271.9031.969
humans_numeric2.5423.2713.2523.3703.6664.1302.9743.5933.330
ICU2.1761.7781.7961.9981.7492.2751.7081.9331.779
machine_cpu1.8712.4172.5042.3592.5802.9333.2973.8863.014
MercuryinBass1.3671.5911.8101.5731.4861.6392.1662.2301.716
metafeatures8.60613.627.79414.5418.2619.0410.8211.2730.39
pollution1.4451.6901.7921.8051.6861.9732.1851.9563.069
pwLinear1.3511.7351.4221.7171.3011.6301.3731.5961.627
pyrim1.3601.3201.3491.3671.2341.4821.4241.6601.634
rabe_1311.5451.6941.7171.6011.6111.5981.7502.0002.215
rabe_1481.3871.5981.5731.6861.5771.7091.8891.9492.053
rabe_2651.5461.8811.8321.9811.8212.0542.0291.7952.799
Rainfall-in-Kerala-1901-20171.4591.7871.7721.5941.7121.5801.7061.9392.271
sleuth_case12011.4701.6111.4901.4531.4701.4801.9751.8222.283
sleuth_ex16051.4321.7101.6561.6771.6091.6681.6331.8372.138
slump1.7651.9681.9901.8331.9291.8462.0602.2762.656
SMSA1.6371.8411.8332.0541.8342.0242.2421.9532.830
SolarPower1.5461.7511.7421.6751.6881.5282.0091.9131.813
Student-Scores0.7641.2451.4361.1021.3071.1741.9592.0982.263
Swiss-banknote-counterfeit-detection1.2491.3391.3221.2761.2211.2791.5811.7961.795
treepigit2.5202.2232.1022.2532.1912.4782.2232.5112.203
visualizing_hamster1.3731.5521.5151.5591.4271.5231.9271.7421.696
WineDataset1.2741.3641.3621.4171.2801.4911.6021.7652.052
wisconsin0.9011.1741.4110.9551.2211.0181.2051.4411.928
witmer_census_19801.3671.6231.5381.5551.5031.6041.4961.6472.044

Table 5. MissBench RMSE by dataset, averaged over the eleven missingness mechanisms; lower is better. The lowest value in each row is in bold.

UCI

Datasets and mechanisms. The UCI suite, motivated by HyperImpute [22], has twelve datasets (Table 6), from 150 to 20,640 rows and from 5 to 90 columns. Each is masked under MCAR, Col-MAR and Self-MNAR at 10%, 20%, 30%, 40% and 50% nominal missingness with ten repeats, giving 1,800 cases. The Col-MAR and Self-MNAR generators are the same as in MissBench. Col-MAR keeps a randomly selected subset of predictor columns fully observed. A random linear combination ziz_i of those observed values determines the missingness probability for each entry in the remaining columns: σ(zi−Q1−p(z))\sigma(z_i-Q_{1-p}(z)), with independent Bernoulli draws across entries. Self-MNAR instead selects a random nonempty subset of target columns and masks each target entry with probability σ(ajxij−Q1−p(ajX⋅j))\sigma(a_jx_{ij}-Q_{1-p}(a_jX_{\cdot j})), where aj∈{−2,−1,1,2}a_j \in\{-2,-1,1,2\} is drawn independently for each target column. Thus its masking probability depends on the entry’s own value; unselected columns remain observed. Here σ\sigma is the logistic function and Q1−pQ_{1-p} is an empirical quantile. The parameter pp is a nominal setting, not a constraint on the realized whole-matrix missing fraction.

DatasetRowsColsDatasetRowsCols
Airfoil Self-Noise1,5035Landsat Satellite6,43536
California Housing20,6049Letter Recognition20,00016
Concrete Compression1,0308Libras Movement36090
Diabetes44211Spam Base4,60157
Ionosphere35134Wine Quality (red)1,59911
Iris1505Wine Quality (white)4,89811

Table 6. The twelve UCI datasets, with the number of rows and columns of each matrix.

Coverage. MatrixFormer, MissForest, K-NN, MICE, ICE and SoftImpute have predictions for all 1,800 cases. GAIN, HyperImpute and MIWAE have 1,556: they lack 244 of the 600 MCAR cases, on seven datasets. Their entries marked † average the cases they have, so they are not computed on the same cases as the other methods.

Results by mechanism and rate. MatrixFormer has the lowest error under each of the three mechanisms and at each of the five missingness rates (Table 7). Its margin is small under MCAR (0.689 against 0.694 for SoftImpute) and Col-MAR (0.826 against 0.841 for ICE) and large under Self-MNAR (1.536 against 1.952).

Table 7: UCI RMSE by missingness mechanism (averaged over the five rates) and by nominal missingness rate (averaged over the three mechanisms); lower is better. Each entry averages ten repeats within a dataset and then the twelve datasets. †: the method lacks some MCAR cases and is averaged over its valid cases. The lowest value in each column is in bold.

MethodMCARCol-MARSelf-MNAR10%20%30%40%50%Overall
MatrixFormer0.6890.8261.5361.1710.9850.9960.9640.9691.017
MissForest0.7020.8642.0251.4181.1501.1711.1051.1421.197
K-NN0.7480.8532.0071.3341.1461.1981.1241.2111.202
HyperImpute0.710†0.9571.9551.516†1.302†1.313†1.0841.372†1.301†
MICE1.1311.2482.4942.0341.5561.6351.4021.4961.625
ICE0.7220.8411.9521.3251.0971.1381.1001.1981.172
SoftImpute0.6940.9172.1871.4951.2301.2361.1781.1931.266
MIWAE3.445†1.2292.5602.579†2.121†2.016†2.2471.813†2.168†
GAIN0.941†1.7152.6612.703†1.841†2.032†1.6011.663†1.950†

Table 7.

Results by dataset. MatrixFormer has the lowest error on seven of the twelve datasets and is among the two lowest on ten (Table 8). It ranks fourth on Iris and fifth on Libras Movement, where the chained-equation methods have less than half its error.

Table 8: UCI RMSE by dataset, averaged over the three mechanisms, five rates and ten repeats; lower is better. †: the method lacks some MCAR cases on this dataset. The lowest value in each row is in bold.

DatasetMatrixFormerMissForestK-NNHyperImputeMICEICESoftImputeMIWAEGAIN
Airfoil Self-Noise1.8841.9982.0512.075†2.8562.0492.3112.999†3.404†
California Housing1.1371.3971.4641.7662.6831.4961.3553.0663.370
Concrete Compression1.7922.2272.2622.2002.5981.8762.2113.5872.531
Diabetes0.8340.9270.9770.908†1.0820.8850.8891.864†1.168†
Ionosphere0.8020.8360.7920.8461.1101.0050.8821.2650.983
Iris0.5840.5540.6300.570†0.7780.5550.8911.940†0.831†
Landsat Satellite0.6251.3571.0181.513†0.6940.7851.5153.265†3.054†
Letter Recognition1.0931.2000.9851.1151.1261.1361.2791.5091.556
Libras Movement0.1840.3240.4240.0930.0840.0920.1381.6940.474
Spam Base1.2381.2641.5592.025†3.1452.0431.3371.235†2.707†
Wine Quality (red)1.0231.1501.1371.309†1.4481.0731.2112.075†1.726†
Wine Quality (white)1.0081.1311.1331.196†1.8911.0641.1741.521†1.599†

Table 8.

Causal panel data: counterfactual completion

Estimating a treatment effect from panel data amounts to predicting the untreated outcomes of the treated units in the post-treatment periods from the remaining entries [3]. We evaluate MatrixFormer on 3,000 saved placebo draws in 12 designs, where the untreated values are known and the true effect is zero. The benchmarks are the CPS placebo study of Arkhangelsky et al. [2021]4, the Kansas semi-synthetic factor design of Ben-Michael et al. [2021] on one treated state, and the California smoking donor pool [1] with simultaneous or staggered pseudo-treatment following Athey et al. [ [3]. All three benchmarks start from real panels. CPS and Kansas simulate new panels from models fitted to the real data; California smoking uses the real outcomes directly and only the treatment is artificial. In every draw the hidden cells are untreated outcomes, so the true treatment effect is zero.

CPS placebo panels. The source is the state-by-year Current Population Survey panel shipped with the synthdid R package (version 0.0.9, sdid-paper branch): 50 states and 40 years, with outcome log wage, hours worked, or unemployment rate. Following Arkhangelsky et al. [ [2], the outcome matrix YY is standardized by its overall mean and standard deviation. Its rank-4 SVD approximation LL is split into an additive part FF (the unit and time means of LL) and an interactive part M=L−FM = L - F, and E=Y−LE = Y - L is the residual. Simulated panels are Y∗=F+M+ϵY^{*} = F + M + \epsilon, where each state’s row ϵi∼N(0,Σ)\epsilon_i \sim\mathcal{N}(0,\Sigma) and Σ\Sigma is an AR(2) correlation matrix over years, with coefficients fitted to EE by least squares and scale matched to the covariance of EE. For treatment, each state’s indicator for the chosen policy (minimum wage, abortion ban, or open carry) in the final year is regressed on the four unit factors by logistic regression, giving probabilities πi\pi_i. Each draw assigns states independently with probability πi\pi_i and keeps at most 10 of them at random (10 random states if none are drawn). The last 10 years are post-treatment (T0=30T_0 = 30), and the hidden block is the treated states in those years. We generate 200 draws for each of the nine outcome–assignment combinations. Outcomes are on the standardized scale.

Kansas semi-synthetic panels. The source is the augsynth::kansas (R) panel of quarterly log state GDP per capita: 50 states and 105 quarters (1990 Q1–2016 Q1), with 89 quarters before the 2012 Kansas tax cut and 16 after it (from 2012 Q2). As in the main factor-model simulation of Ben-Michael et al. [ [6], we fit the two-way interactive fixed-effects model yit=αi+ξt+ϕiTμt+ϵity_{it} = \alpha_i + \xi_t + \phi_i^\mathsf{T}\mu_t + \epsilon_{it} with three factors. Draws keep the time effects ξ^t\hat{\xi}_t and factors μ^t\hat{\mu}_t fixed and resample αi∼N(αˉ,sd⁡^(α^))\alpha_i \sim\mathcal{N}(\bar{\alpha}, \widehat{\operatorname{sd}}(\hat{\alpha})), ϕi∼N(0,Cov⁡(ϕ^))\phi_i \sim\mathcal{N}(0, \operatorname{Cov}(\hat{\phi})) and ϵit∼N(0,σ^2)\epsilon_{it} \sim\mathcal{N}(0, \hat{\sigma}^2) independently. One treated state is sampled with probability proportional to logit⁡θ−1(z(αi)+∑jz(ϕij))\operatorname{logit}^{-1}_\theta\left(z(\alpha_i) + \sum_j z(\phi_{ij})\right) with θ=0.5\theta= 0.5, where zz standardizes across states. Its 16 post-treatment quarters are hidden. There are 200 draws.

California smoking panels. These are real data with no simulation: annual cigarette sales in packs per capita for 1970–2000 (T=31T = 31) in the 38 states of the Proposition 99 donor pool [1]. California is excluded, so no state is actually treated. Following Athey et al. [ [3], T0=round⁡(ρT)T_0 = \operatorname{round}(\rho T) with ρ∈{0.35,0.5,0.65,0.8,0.9}\rho\in\{0.35, 0.5, 0.65, 0.8, 0.9\}, i.e. T0∈{11,16,20,25,28}T_0 \in\{11, 16, 20, 25, 28\}, and 100 draws per value. In the simultaneous design, 8 random states are hidden from year T0+1T_0 + 1 onward. In the staggered design, 35 random states are each hidden from an adoption year drawn uniformly after the first T0T_0 years.

Metrics. For draw dd with hidden block Hd\mathcal{H}_d, the treated units in their post-treatment periods, true untreated outcomes yity_{it} and predictions y^it\hat{y}_{it},

RMSE⁡d=1∣Hd∣∑(i,t)∈Hd(yit−y^it)2,∣τ^d−τd∣=∣1∣Hd∣∑(i,t)∈Hd(yit−y^it)∣.\operatorname{RMSE}_d = \sqrt{\frac{1}{|\mathcal{H}_d|}\sum_{(i,t)\in\mathcal{H}_d}(y_{it}-\hat{y}_{it})^2}, \qquad|\hat{\tau}_d-\tau_d| = \left|\frac{1}{|\mathcal{H}_d|}\sum_{(i,t)\in\mathcal{H}_d}(y_{it}-\hat{y}_{it})\right|.

The second is the absolute error of the implied average treatment effect on the treated: the hidden entries are untreated, so τd=0\tau_d = 0 and the error equals the absolute mean bias of the completion. Both metrics are in the outcome’s units. We average each over the draws of a design, and a benchmark’s value in Figure 3(c) and (Figure 3d) gives its designs equal weight. With per-design standard errors se⁡g\operatorname{se}_g over draws and GG designs, the interval is ±1.96∑gse⁡g2/G\pm1.96\sqrt{\sum_g \operatorname{se}_g^2/G}. The intervals treat the designs as fixed and the draws as independent; draws share their underlying source data, so the intervals may be somewhat optimistic.

Methods. The comparison includes the difference-in-differences (DiD), synthetic control (SC) and synthetic difference-in-differences (SDiD) estimators of Arkhangelsky et al. [ [2], and the SoftImpute, K-NN and HyperImpute Jarrett et al., [22] imputers. It also includes two cross-sectional effect estimators that are not designed for panel data, the T-learner Künzel et al., [25] with random forests and the causal foundation model CausalPFN Balazadeh et al., [5]; each is fit separately in every post-treatment period with a unit’s pre-treatment outcomes as its covariates, without tuning; its RMSE uses its untreated-outcome model fit on the control units only, and its effect error uses its own effect estimate. All methods use the same saved draws and hidden blocks.

MatrixFormer uses the same fixed checkpoint as in the other domains, with no training or checkpoint selection for this evaluation. Each panel has units as rows and time periods as columns. Column means and standard deviations use only observed entries. MatrixFormer completes the entire standardized panel in one forward pass, using the predictive mean; we then undo the standardization and restore every observed entry.

Results by design. At the level of a benchmark, MatrixFormer has the lowest RMSE and the lowest effect error on all three (Figure 3c and Figure 3d), by a small margin on CPS (RMSE 0.532 against 0.539 for SDiD, effect error 0.093 against 0.096). Table 9 and Table 10 separate the twelve designs. MatrixFormer has the lowest value in four of the twelve for each metric; it is first or second in every design for RMSE and within the first three for effect error. SDiD has the lowest RMSE in six designs.

DesignMatrixFormerSDiDSCDiDSoftImputeK-NNHyperImputeT-learnerCausalPFN
CPS
hours, abortion ban0.7200.7250.8380.8460.7670.7830.7760.7680.755
hours, minimum wage0.7540.7530.8340.8390.7820.8220.8250.8050.790
hours, open carry0.7240.7200.8110.8170.7700.7770.7770.7640.763
log wage, abortion ban0.1260.1210.1670.1690.1450.1520.1450.1410.134
log wage, minimum wage0.1260.1190.1520.1560.1370.1610.1510.1470.135
log wage, open carry0.1250.1210.1550.1570.1310.1380.1360.1330.133
unemployment, abortion ban0.7290.7540.7960.8070.7190.7910.7810.7730.764
unemployment, minimum wage0.7420.7710.8280.8610.7340.8110.8070.8040.763
unemployment, open carry0.7400.7650.7960.8030.7440.8040.7900.7780.788
California smoking
simultaneous10.2210.0015.8416.6414.4015.8613.1912.9611.54
staggered13.1916.1319.7420.4018.5521.6616.5119.1417.94
Kansas
factor model0.0270.0300.0400.0860.0590.0710.0300.0520.033

Table 9. Treated-block RMSE by placebo design, in the outcome’s units; lower is better. Each entry is a mean over the draws of the design (200 per CPS and Kansas design, 500 per California design). The lowest value in each row is in bold.

DesignMatrixFormerSDiDSCDiDSoftImputeK-NNHyperImputeT-learnerCausalPFN
CPS
hours, abortion ban0.1140.1230.1650.1880.1310.1370.1300.1290.126
hours, minimum wage0.1430.1540.1480.1570.1650.2020.2390.1720.210
hours, open carry0.1210.1200.1460.1650.1420.1440.1560.1290.140
log wage, abortion ban0.0280.0200.0290.0360.0680.0580.0430.0440.032
log wage, minimum wage0.0350.0210.0320.0430.0630.0830.0680.0680.048
log wage, open carry0.0210.0220.0300.0340.0260.0260.0240.0250.021
unemployment, abortion ban0.0990.1120.1620.1910.0910.1390.1290.1270.106
unemployment, minimum wage0.1730.1930.3040.3610.1480.2430.2570.2520.166
unemployment, open carry0.1070.1020.1300.1490.0970.1240.1320.1090.130
California smoking
simultaneous2.732.663.145.274.074.373.853.293.13
staggered3.085.716.908.125.245.093.194.023.53
Kansas
factor model0.0140.0190.0310.0790.0510.0640.0160.0410.210

Table 10. Absolute treatment-effect error ∣τ^−τ∣|\hat{\tau} - \tau| by placebo design, in the outcome’s units; lower is better. Layout as in Table 9.

The comparison with SDiD depends on the design. In paired comparisons over draws, with 95% normal intervals for the mean difference, MatrixFormer has lower RMSE in five designs (the three CPS unemployment designs, Kansas and staggered California), SDiD has lower RMSE in the three CPS log-wage designs, and the remaining four do not separate. For effect error the corresponding counts are four, two and six. The largest difference is under staggered adoption in California, where MatrixFormer’s RMSE is 13.19 against 16.13 and its effect error 3.08 against 5.71; under simultaneous adoption the two methods do not separate. MatrixFormer’s lead on the California benchmark therefore comes from the staggered design, and its RMSE lead on CPS from the unemployment designs.

Panel orientation. A panel can also be given to MatrixFormer transposed, with time periods as rows: we standardize the columns of the transposed panel, impute, undo the standardization and transpose back. A third variant averages the two completed matrices and requires two forward passes. Table 11 compares the three on the same draws. The transposed panel is worse on every benchmark and metric. Averaging lowers RMSE on all three benchmarks, and in ten of the twelve designs, but it lowers effect error only on CPS and raises it on California. Every main result uses the standard orientation, rather than an orientation selected from held-out scores.

OrientationTreated-block RMSE: CaliforniaTreated-block RMSE: CPSTreated-block RMSE: KansasTreatment-effect error: CaliforniaTreatment-effect error: CPSTreatment-effect error: Kansas
Standard11.700.5320.0272.900.0930.014
Transposed12.050.5380.0284.250.0960.016
Average10.920.5210.0273.110.0870.014

Table 11. MatrixFormer under three panel orientations, in the outcomes’ units; lower is better. Standard has units as rows and supplies every main result; transposed has time periods as rows; average takes the mean of the two completed matrices. Entries are means over draws with the designs of a benchmark weighted equally; the lowest value in each column is in bold.

Recommender-system rating prediction

We evaluate rating completion on MovieLens 100K [16] and the Netflix small subset distributed by Cornac [36]. These are sparse user–item matrices with ratings on a 1–5 scale. We reuse the benchmark’s frozen 80/20 rating-entry holdout, which scores 19,971 ratings on MovieLens 100K, 121,470 on Netflix small. This is an entry holdout, not a held-out-user split.

Metrics. We report RMSE and MAE in rating units; lower is better. Following the Cornac harness, each metric is computed within each test user and then averaged equally over users, so the RMSE is the mean of per-user RMSEs rather than a pooled rating-level RMSE.

Methods. We compare MatrixFormer with four rating-prediction baselines implemented in Cornac [36]. Matrix factorization with user and item biases [24] and probabilistic matrix factorization (PMF) [37] predict a rating from learned low-dimensional user and item vectors; the former is run as Cornac’s MF and SVD models, which give identical scores here and are listed once, as Biased MF. UserKNN and ItemKNN are neighborhood methods that predict from the ratings of the most similar users [33] or items [38]. The baselines use the same split protocol and are not retuned. MatrixFormer’s predictions are clipped to the observed training rating range. The single model uses observed-only two-way biases and shrunk user scaling, with overlapping windows of at most 2,000 rows and 1,000 columns. Inference settings, scoring definitions, and baseline hyperparameters are given in Section E.1.

Results. MatrixFormer obtains RMSE/MAE of 0.8926/0.7330 on MovieLens 100K and 0.8666/0.7364 on Netflix small. It has lower error than every displayed baseline on MovieLens 100K; on Netflix small, Biased MF has lower RMSE/MAE (0.8621/0.7358), while the remaining baselines have higher error. Figure 3(b) compares RMSE on the two datasets. The full RMSE and MAE comparison appears in Figure 8 in the appendix. These point-estimate differences are descriptive, not significance claims.

Figure 8. Rating prediction in original rating units; lower is better. Bars show RMSE and MAE macro-averaged over test users, with four-decimal labels and the lowest value in each panel in bold. Whiskers on all bars are 95% test-user bootstrap confidence intervals conditional on the fitted predictors and fixed split. MatrixFormer is blue; baselines are gray. MF and SVD give identical scores and are shown once, as Biased MF.

Recommender-system evaluation details

Datasets and splits. We use Cornac’s MovieLens 100K, Netflix small, MovieLens 1M, and MovieLens 10M datasets [16, 36]. The main-text comparison focuses on MovieLens 100K and Netflix small; the evaluation also includes the two larger datasets. In the order listed above, the training matrices have dimensions 943×1656943 \times1656, 9976×48959976 \times4895, 6040×36796040 \times3679, and 69878×1064369878 \times10643, with 80,000, 486,242, 800,167, and 8,000,043 observed ratings, respectively. All training users and items are retained. After unknown-user/item exclusion, test metrics cover 942, 9,202, 6,038, and 69,797 users, respectively. The 80/20 rating-entry holdouts use seed 123 and are fixed before the model and normalization comparisons; users are not held out as a group.

Model inference. MatrixFormer uses predictive-mean inference with FP32 weights, BF16 autocast, and sequential 2000×10002000 \times1000 windows with overlapping-tail averaging. From observed ratings only, it fits a global mean plus user and item biases with regularization 3 for 30 alternating iterations. It scales the remaining residuals globally and by shrunk user scales (prior count 20, clipped to [0.5,2][0.5, 2]), and reverses these transformations after inference. The model’s rating predictions are clipped to the observed training range ([0.5,5][0.5, 5] for MovieLens 10M and [1,5][1, 5] otherwise). No held-out rating enters the normalization statistics. For the larger datasets, block inference collects raw predictions only at observed and held-out coordinates and averages overlapping windows, avoiding storage of dense completion matrices. Scores are independently recomputed from predictions.

Scoring. For each user uu with held-out ratings indexed by TuT_u, let eui=r^ui−ruie_{ui} = \hat{r}_{ui} - r_{ui} after inverse normalization and clipping. For the set UU of scored users, we report

MAE⁡=1∣U∣∑u∈U1∣Tu∣∑i∈Tu∣eui∣,RMSE⁡=1∣U∣∑u∈U1∣Tu∣∑i∈Tueui2\operatorname{MAE} = \frac{1}{|U|}\sum_{u \in U}\frac{1}{|T_u|}\sum_{i \in T_u}|e_{ui}|,\qquad\operatorname{RMSE} = \frac{1}{|U|}\sum_{u \in U}\sqrt{\frac{1}{|T_u|}\sum_{i \in T_u}e_{ui}^{2}}

No ranking metrics are included. We report neither cross-seed uncertainty nor a blind-test claim: these public splits have been inspected during research.

Confidence intervals. For each saved predictor, we compute each test user’s RMSE and MAE before resampling users with replacement 1,000 times (seed 0). The 2.5th and 97.5th percentiles of the resulting user-mean scores form the asymmetric 95% intervals. The same user resamples are used across methods and metrics on each dataset. These intervals condition on the fitted models, frozen rating split, and observed item set; they do not measure training-seed variability or uncertainty over a new population of items. Saved predictions support intervals for MatrixFormer and all four displayed baselines on all four datasets. The MovieLens 100K/Netflix baselines were rerun with their original settings on the frozen splits to recover per-user errors; neural predictions were not rerun.

Normalization and context-size controls. We compare global and column-wise normalization for an earlier checkpoint of the model at the same context dimensions as its primary global-normalization runs. Both use observed training entries only, with statistics computed before windowing.

A separate context-size control uses an earlier checkpoint, before the matrix sizes were enlarged. It crosses three user-row limits, 1000, 2000, and 9976, with global and column-wise normalization on MovieLens 100K and Netflix small. The item-column limit remained 1000. Those configurations used identical weights, observations, test cells, and output clipping, with identical normalization statistics within each normalization setting. MovieLens 100K predictions agreed within 2×10−62 \times10^{-6} rating units because all 943 users already fit. On Netflix, increasing the row limit from 2000 to all users improved RMSE/MAE from 0.9341/0.8017 to 0.9070/0.7819 with global normalization and from 0.9330/0.8001 to 0.9058/0.7795 with column-wise normalization.

Memory and numerical equivalence. These measurements also use the earlier checkpoint. Streamed inference microbatches the encoder, independent attention sequences, feed-forward cells, and output-distribution decoding. It retains the complete attended row or column sequence, FP32 weights, BF16 autocast, and predictive-mean calculation. On a 2000 ×\times 1000 training-only Netflix block, maximum prediction deviation from dense execution is 1.05×10−61.05 \times10^{-6} rating units, with RMS deviation 4.62×10−84.62 \times10^{-8}. Model weights remain fixed, and no gradients are computed. Peak allocated

Figure 9. Rating prediction on MovieLens 1M and 10M in original rating units; lower is better. RMSE and MAE are macro-averaged over test users; whiskers are asymmetric 95% test-user bootstrap confidence intervals conditional on fitted predictors and the fixed split. Blue bars show MatrixFormer; gray bars show the same baselines as the main-text comparison. MF and SVD give identical scores and are shown once, as Biased MF. Bold labels mark the lowest displayed error in each panel.

GPU memory falls from 93.5 to 6.9 GiB. Training-only capacity probes at 4000, 8000, and all 9976 users require 13.3, 26.3, and 32.7 GiB, respectively, at 1000 items on the same H200. The largest user context in this control was selected by memory feasibility, not test error. The full Netflix rating evaluation takes approximately 133 seconds per normalization versus approximately 89 seconds for the earlier dense 2000-row configuration; this is not an equal-runtime comparison.

Baseline settings and score verification. The five Cornac rating-prediction implementations are MF, PMF, SVD, UserKNN, and ItemKNN; identical MF/SVD scores are displayed once, as Biased MF. MF, PMF, and SVD use rank 10, with 25, 100, and 25 iterations, respectively. Learning rates are 0.01, 0.001, and 0.01; regularization parameters are 0.02, 0.001, and 0.02. MF uses biases; both nearest-neighbor baselines use 20 neighbors, Pearson similarity, and mean centering. All use seed 123. SVD, PMF, UserKNN, and ItemKNN were rerun on MovieLens 100K and Netflix small using Cornac 2.3.5, preserving the frozen train/test indices and training-row order. Per-entry predictions are saved and independently rescored against Cornac’s per-user metrics. All five implementations are also evaluated on the fixed MovieLens 1M/10M splits, where their predictions are independently rescored at full precision.

Benchmark-score completion for language-model evaluation

Evaluating a language model on every benchmark is expensive. We study whether MatrixFormer can reconstruct a model’s unmeasured benchmark scores after observing a small subset of its evaluations. Rows represent models and columns represent benchmark tasks; this is score-matrix completion, not a new evaluation of generated answers. We use the released matrices and benchmark-selection algorithms of Smola [2026], summarized in Table 12: MTEB, English-task leaderboard scores for embedding models [30]; MMLU, per-subject leaderboard scores on its 57 subjects [17]; Merged, a heterogeneous matrix assembled from nine collections; and BenchPress, the curated model–benchmark matrix of BenchPress contributors [2026], which here names a dataset rather than an imputation baseline. All are fixed snapshots, not live leaderboards.

Protocol. Each matrix is split into ten folds of model rows, holding out approximately 10% of the models per fold. The remaining models form the context, capped at 3,800 by a deterministic subsample; the cap affects only MMLU. For each held-out model we reveal its available scores on kk selected tasks, for k=1,…,15k = 1, \ldots, 15, and predict its other observed scores. Naturally missing entries are not ground truth, so on the sparse matrices kk selected tasks may reveal fewer than kk scores.

DatasetModelsTasksObserved
MTEB2635677.3%
MMLU5,45257100.0%
Merged11811431.1%
BenchPress834933.8%

Table 12. Released benchmark-score matrices used for evaluation. Observed entries are the available scores before holding out model rows.

Task selection. Which tasks are revealed is decided by one of three rules from the release of Smola [ [40]. Each chooses tasks one at a time, and the two greedy rules use the task-correlation matrix estimated from the context models. Random selection draws the tasks uniformly at random. Greedy entropy adds the task with the largest conditional variance given the tasks already selected, that is, the task hardest to predict from them. Greedy mutual information (MI) adds the task with the largest mutual-information gain between the selected and the remaining tasks, that is, the task most informative about those not yet selected. The selection rule is a setting of the experiment, not a method under comparison: task orders are computed once per fold, and every predictor receives the same revealed scores.

Methods. MatrixFormer receives the context models and the revealed scores of the held-out models as one partially observed matrix, and its predictive mean fills the unrevealed entries; no weights are updated. We compare it with the predictor of the selection release, which we label kernel ridge. Let RR be the task-correlation matrix estimated from the context, OO the tasks revealed for a held-out model and UU its other tasks. In standardized coordinates the prediction is

z^U=RUO(ROO+0.01I)−1zO,\hat{z}_{U}=R_{UO}(R_{OO}+0.01I)^{-1}z_{O},

the ridge-regularized conditional mean of a Gaussian with correlation RR. This is kernel ridge regression on task indices with kernel matrix RR, not an RBF kernel. As in the release, the revealed inputs zOz_{O} are clipped to [−10,10][-10,10], and a model with no revealed score receives the context mean.

Metric. We report the root mean squared error in standardized units. Let E\mathcal{E} be the entries of a fold’s held-out models that are observed and not revealed, and let z^ij\hat{z}_{ij} and z^ij\hat{z}_{ij} be the target and the prediction, standardized with the context mean and standard deviation of task jj and clipped to [−10,10][-10,10]. Then

RMSE⁡=(1∣E∣∑(i,j)∈E(zij−z^ij)2)1/2,\operatorname{RMSE}=\left(\frac{1}{|\mathcal{E}|}\sum_{(i,j)\in\mathcal{E}}(z_{ij}-\hat{z}_{ij})^{2}\right)^{1/2},

averaged over the ten folds; lower is better. One unit is a task’s standard deviation over the context models. Every held-out model is scored, including those with no revealed score, and all predictors share the same context, revealed scores and target entries.

Results. Figure 10 shows the error under greedy MI selection. On the two sparse matrices MatrixFormer has the lower error: at k=15k=15 its RMSE is 0.608 against 0.717 on Merged and 0.907 against 1.179 on BenchPress, where kernel ridge stays close to the error of predicting each task’s context mean. At k=5k=5 the margin on Merged is small (0.763 against 0.788). On the two dense matrices the methods are close: on MTEB they are within each other’s intervals at every budget (0.405 against 0.401 at k=15k=15), and on MMLU kernel ridge is lower for k≥2k\geq2 (0.271 against 0.290 at k=15k=15). Greedy entropy and random selection give the same pattern (Figure 11). Across all 180 combinations of dataset, selection rule and budget, MatrixFormer has the lower fold-mean RMSE in 123: 44 of 45 on BenchPress, 40 on MTEB, 34 on Merged and 5 on MMLU. These counts summarize correlated settings, not independent tests.

Figure 10. Benchmark-score completion under greedy MI selection. Standardized RMSE on the unrevealed scores of held-out models against the number of revealed tasks kk; lower is better. Lines are means over ten folds and bands are 95% bootstrap intervals over the folds. The dashed line is the error of predicting each task’s context mean; on MTEB and MMLU it lies above the plotted range.

Figure 11. Benchmark-score completion under greedy entropy and random selection. Same quantities as Figure 10. Random selection uses one order per fold.

On Merged under greedy MI, the kernel-ridge interval widens at k=7k=7 because of a single fold. The seventh task selected in that fold has only two context scores, and one held-out model’s score on it is 15 context standard deviations above the mean; kernel ridge’s RMSE on the fold rises to 1.41, against 0.72 for MatrixFormer. Without this fold MatrixFormer remains lower (0.602 against 0.637 at k=15k=15), by a smaller margin. The release also provides a logit-space variant of kernel ridge. Given the same greedy-MI tasks on Merged and BenchPress, its RMSE at k=15k=15 is 0.714 and 1.312, above MatrixFormer on both.

Intervals and relation to the source paper. The intervals resample the ten fold-level scores 10,000 times. Contexts overlap between folds, so they describe variation across folds under the fixed protocol and are not significance tests. Our protocol differs from the released evaluation in its scoring, not in its selection algorithms: the released scorer skips held-out models with no revealed score and does not clip predictions, whereas we score every held-out model and apply the same clipping to all predictors. Fixing the task orders before inference also ensures that every predictor is given the same tasks when selection is sensitive to numerical ties, as on Merged.

Representation experiments: construction and scope

Latent-factor experiment on the CLS tokens

We generate noiseless matrices X=UV⊤X = UV^{\top} with standard-Gaussian U,V∈Rn×rU, V \in\mathbb{R}^{n \times r} and observe 40% of entries uniformly at random, for rank-to-size ratios r/n∈{1/64,1/32,1/16}r/n \in\{1/64, 1/32, 1/16\} and three sizes per ratio, ten matrices each. After layer ℓ\ell, we concatenate the KcK_c row-CLS tokens of row ii into ci(ℓ)∈RKcdc_i^{(\ell)} \in\mathbb{R}^{K_cd} and regress UiU_i on ci(ℓ)c_i^{(\ell)} by ridge regression, fitting on seven eighths of the rows and scoring R2R^2 on the held-out eighth, over eight folds. At layer 0 the tokens are identical across rows.

Recovery declines with the absolute rank: at r/n=1/16r/n = 1/16, R2R^2 falls from 0.93 at n=64n = 64 to 0.73 at n=256n = 256. The same experiment on the KrK_r column-CLS tokens of each column recovers the column factors to the same degree (R2=0.99R^2 = 0.99, 0.98 and 0.87; Figure 12). MatrixFormer standardizes each column of its input, but not each row, by the standard deviation sjs_j of that column’s observed entries. The model therefore sees xij/sj=UiT(Vj/sj)x_{ij}/s_j = U_i^\mathsf{T}(V_j/s_j): the row factors are unchanged, and the column target is Vj/sjV_j/s_j. Since sjs_j depends only on column jj’s own observed entries, it carries no information from the other columns.

As a check on the eight-fold score, we set aside one ninth of the rows, fit the feature scaling, the ridge penalty and the regression on the remaining rows only, and score the untouched ninth. At layer 8 this gives R2=0.99R^2 = 0.99, 0.98 and 0.87 for the row factors and 0.99, 0.98 and 0.87 for the column factors, matching the eight-fold values. Permuting the factors across rows before fitting gives R2R^2 between −0.03-0.03 and −0.01-0.01, so the scores do not come from the dimension of the token vector exceeding the number of rows.

In Figure 4(a), the example is a rank-2 matrix of size 128, masked to 40% observed entries; U^\hat{U} is the linear projection of each row’s CLS tokens at layer 8, shown beside the true UU. For display only, the columns of the matrix are ordered by their first factor; the rows keep their original order. In Figure 4(b), each point of the left panel averages 30 matrices (three sizes, ten each) with 95% intervals. Layer ℓ\ell is the output of transformer block ℓ\ell; layer 0 is the encoder output. The right panels pool all factors of one matrix each of size 128, 256 and 512 (ranks 2, 4 and 8); the panel value is R2R^2 averaged over these factors.

Latent-group experiment on the cell embeddings

Example in the main text. The matrix in Figure 5 has four row groups of 16 rows each. Each group has a profile of 64 independent standard-normal entries; every row equals its group’s profile plus independent Gaussian noise of standard deviation 0.25. Rows are shuffled and 40% of the entries are observed uniformly at random. The seed and condition were fixed before inference. Let hij(ℓ)∈R768h_{ij}^{(\ell)} \in\mathbb{R}^{768} be the embedding of cell (i,j)(i,j) after layer ℓ\ell, with the CLS border removed; layer 0 is the encoder output. The row embedding averages the row’s cells, observed and masked:

zi(ℓ)=1C∑j=1Chij(ℓ).z_i^{(\ell)} = \frac{1}{C}\sum_{j=1}^{C} h_{ij}^{(\ell)}.

KK-means with K=4K = 4 and 20 initializations clusters the full 768-dimensional row embeddings; the number of groups is supplied, the memberships are not. The adjusted Rand index (ARI) compares the clusters with the true groups: it is one for perfect recovery, approximately zero for chance agreement, and can be negative. PCA is used only for display.

References

  1. [1]Alberto Abadie, Alexis Diamond, and Jens Hainmueller. Synthetic control methods for comparative case studies: Estimating the effect of California’s tobacco control program. Journal of the American Statistical Association, 105(490):493–505, 2010.
  2. [2]Dmitry Arkhangelsky, Susan Athey, David A. Hirshberg, Guido W. Imbens, and Stefan Wager. Synthetic difference-in-differences. American Economic Review, 111(12):4088–4118, 2021.
  3. [3]Susan Athey, Mohsen Bayati, Nikolay Doudchenko, Guido Imbens, and Khashayar Khosravi. Matrix completion methods for causal panel data models. Journal of the American Statistical Association, 116(536):1716–1730, 2021.
  4. [4]Thomas Bachlechner, Bodhisattwa Prasad Majumder, Huanru Henry Mao, Garrison W. Cottrell, and Julian McAuley. ReZero is all you need: Fast convergence at large depth. In Proceedings of the Thirty-Seventh Conference on Uncertainty in Artificial Intelligence, volume 161 of Proceedings of Machine Learning Research, 2021.arxiv.org/abs/2003.04887
  5. [5]Vahid Balazadeh, Hamidreza Kamkari, Valentin Thomas, Benson Li, Junwei Ma, Jesse C. Cresswell, and Rahul G. Krishnan. CausalPFN: Amortized causal effect estimation via in-context learning. arXiv preprint arXiv:2506.07918, 2025.arxiv.org/abs/2506.07918
  6. [6]Eli Ben-Michael, Avi Feller, and Jesse Rothstein. The augmented synthetic control method. Journal of the American Statistical Association, 116(536):1789–1803, 2021.
  7. [8]James Bennett, Stan Lanning, et al. The netflix prize. In Proceedings of KDD cup and workshop, volume 2007, page 35. New York, 2007.
  8. [9]Emmanuel J. Candès and Benjamin Recht. Exact matrix completion via convex optimization. Foundations of Computational Mathematics, 9(6):717–772, 2009.
  9. [10]Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171–4186. Association for Computational Linguistics, 2019. doi: 10.18653/v1/N19-1423. URL https://aclanthology.org/N19-1423/.DOI
  10. [11]Peng Ding and Fan Li. Causal inference: A missing data perspective. Statistical Science, 33(2):214–237, 2018.arxiv.org/abs/1712.06170
  11. [12]Edward S. Epstein. A scoring system for probability forecasts of ranked categories. Journal of Applied Meteorology, 8(6):985–987, 1969.doi.org/10.1175/1520-0450(1969)008<0985:assfpf>2.0.co;2
  12. [13]Jacob Feitelberg, Dwaipayan Saha, Kyuseong Choi, Zaid Ahmad, Anish Agarwal, and Raaz Dwivedi. One pipeline, many transformers: Pattern-specific imputation specialists for tabular missing data, 2025. URL https://arxiv.org/abs/2510.02625v6. Version 6, revised August 2026; first submitted October 2025.
  13. [14]Tilmann Gneiting and Adrian E. Raftery. Strictly proper scoring rules, prediction, and estimation. Journal of the American Statistical Association, 102(477):359–378, 2007.
  14. [15]Aditya Gorla, Ryan Wang, Zhengtong Liu, Ulzee An, and Sriram Sankararaman. CACTI: Leveraging copy masking and contextual information to improve tabular data imputation. In Proceedings of the 42nd International Conference on Machine Learning, 2025. URL https://arxiv.org/abs/2506.02306.
  15. [16]F. Maxwell Harper and Joseph A. Konstan. The MovieLens datasets: History and context. ACM Transactions on Interactive Intelligent Systems, 5(4):1–19, 2015. doi: 10.1145/2827872.DOI
  16. [17]Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. Measuring massive multitask language understanding. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=d7KBjmI3GmQ.
  17. [18]Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015.arxiv.org/abs/1503.02531
  18. [19]Jonathan Ho, Nal Kalchbrenner, Dirk Weissenborn, and Tim Salimans. Axial attention in multidimensional transformers, 2019. URL https://arxiv.org/abs/1912.12180.
  19. [20]Noah Hollmann, Samuel Müller, Lennart Pruucker, Arjun Krishnakumar, Max Körfer, Shi Bin Hoo, Robin Tibor Schirrmeister, and Frank Hutter. Accurate predictions on small data with a tabular foundation model. Nature, 637:319–326, 2025.
  20. [21]Peter J. Huber. Robust estimation of a location parameter. The Annals of Mathematical Statistics, 35(1):73–101, 1964.
  21. [22]Daniel Jarrett, Bogdan Cебere, Tennison Liu, Alicia Curth, and Mihaela van der Schaar. HyperImpute: Generalized iterative imputation with automatic model selection. In Proceedings of the 39th International Conference on Machine Learning, volume 162 of Proceedings of Machine Learning Research, pages 9916–9937. PMLR, 2022. URL https://proceedings.mlr.press/v162/jarrett22a.html.
  22. [24]Yehuda Koren, Robert Bell, and Chris Volinsky. Matrix factorization techniques for recommender systems. Computer, 42(8):30–37, 2009.DOI
  23. [25]Sören R. Künzel, Jasjeet S. Sekhon, Peter J. Bickel, and Bin Yu. Metalearners for estimating heterogeneous treatment effects using machine learning. Proceedings of the National Academy of Sciences, 116(10):4156–4165, 2019.
  24. [26]Ilya Loshchilov and Frank Hutter. SGDR: Stochastic gradient descent with warm restarts. In International Conference on Learning Representations, 2017.
  25. [27]Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In International Conference on Learning Representations, 2019.
  26. [28]Pierre-Alexandre Mattei and Jes Frellsen. MIWAE: Deep generative modelling and imputation of incomplete data sets. In Proceedings of the 36th International Conference on Machine Learning, pages 4413–4423, 2019.
  27. [29]Rahul Mazumder, Trevor Hastie, and Robert Tibshirani. Spectral regularization algorithms for learning large incomplete matrices. Journal of Machine Learning Research, 11:2287–2322, 2010.
  28. [30]Niklas Muennighoff, Noumane Tazi, Loïc Magne, and Nils Reimers. MTEB: Massive text embedding benchmark. In Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics, pages 2014–2037. Association for Computational Linguistics, 2023. doi: 10.18653/v1/2023.eacl-main.148. URL https://aclanthology.org/2023.eacl-main.148/.DOI
  29. [31]Samuel Müller, Noah Hollmann, Sebastian Pineda Arango, Josif Grabocka, and Frank Hutter. Transformers can do Bayesian inference. In International Conference on Learning Representations, 2022.
  30. [32]Jingang Qu, David Holzmüller, Gaël Varoquaux, and Marine Le Morvan. TabICL: A tabular foundation model for in-context learning on large data. In Proceedings of the 42nd International Conference on Machine Learning, 2025.
  31. [33]Paul Resnick, Neophytos Iacovou, Mitesh Suchak, Peter Bergstrom, and John Riedl. GroupLens: An open architecture for collaborative filtering of netnews. In Proceedings of the 1994 ACM Conference on Computer Supported Cooperative Work, pages 175–186, 1994.
  32. [34]Anthony Robins. Catastrophic forgetting, rehearsal and pseudorehearsal. Connection Science, 7(2): 123–146, 1995.DOI
  33. [35]Donald B. Rubin. Inference and missing data. Biometrika, 63(3):581–592, 1976.
  34. [36]Aghiles Salah, Quoc-Tuan Truong, and Hady W. Lauw. Cornac: A comparative framework for multimodal recommender systems. Journal of Machine Learning Research, 21(95):1–5, 2020. URL https://jmlr.org/papers/v21/19-805.html.DOI
  35. [37]Ruslan Salakhutdinov and Andriy Mnih. Probabilistic matrix factorization. In Advances in Neural Information Processing Systems, volume 20, 2007. URL https://proceedings.neurips.cc/paper_files/paper/2007/hash/d7322ed717dedf1eb4e6e52a37ea7bcd-Abstract.html.
  36. [38]Badrul Sarwar, George Karypis, Joseph Konstan, and John Riedl. Item-based collaborative filtering recommendation algorithms. In Proceedings of the 10th International Conference on World Wide Web, pages 285–295, 2001.
  37. [39]Noam Shazeer. GLU variants improve transformer, 2020. URL https://arxiv.org/abs/2002.05202.
  38. [40]Alexander Smola. Submodular benchmark selection, 2026. URL https://arxiv.org/abs/2605.02209. Version 1; accompanying code and data release.
  39. [41]Daniel J. Stekhoven and Peter Bühlmann. MissForest—non-parametric missing value imputation for mixed-type data. Bioinformatics, 28(1):112–118, 2012.
  40. [42]Jianlin Su, Yu Lu, Shengfeng Pan, Ahmed Murtadha, Bo Wen, and Yunfeng Liu. RoFormer: Enhanced transformer with rotary position embedding, 2021. URL https://arxiv.org/abs/2104.09864.
  41. [43]Olga Troyanskaya, Michael Cantor, Gavin Sherlock, Pat Brown, Trevor Hastie, Robert Tibshirani, David Botstein, and Russ B. Altman. Missing value estimation methods for DNA microarrays. Bioinformatics, 17(6):520–525, 2001.
  42. [44]Madeleine Udell and Alex Townsend. Why are big data matrices approximately low rank? SIAM Journal on Mathematics of Data Science, 1(1):144–160, 2019.
  43. [45]Stef van Buuren and Karin Groothuis-Oudshoorn. mice: Multivariate imputation by chained equations in R. Journal of Statistical Software, 45(3):1–67, 2011. doi: 10.18637/jss.v045.i03.
  44. [46]Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, volume 30, 2017. URL https://proceedings.neurips.cc/paper/2017/hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html.
  45. [47]Ruibin Xiong, Yunchang Yang, Di He, Kai Zheng, Shuxin Zheng, Chen Xing, Huishuai Zhang, Yanyan Lan, Liwei Wang, and Tieyan Liu. On layer normalization in the transformer architecture. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 10524–10533. PMLR, 2020. URL https://proceedings.mlr.press/v119/xiong20b.html.
  46. [48]Jinsung Yoon, James Jordan, and Mihaela van der Schaar. GAIN: Missing data imputation using generative adversarial nets. In Proceedings of the 35th International Conference on Machine Learning, pages 5689–5698, 2018.
  47. [49]Biao Zhang and Rico Sennrich. Root mean square layer normalization. In Advances in Neural Information Processing Systems, volume 32, 2019.arxiv.org/abs/1910.07467

Paper details

vlnc:W_35r76fuk
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