Manuscript Offprint
arXiv:2611.04848Amortized Nonlinear Variable Selection with Prior-Data Fitted Networks
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Variable selection is an important task for interpreting potentially complex systems in fields such as biology, business, and sociology. The importance of variable selection has attracted considerable attention in statistics and machine learning. In this paper, we are mainly interested in model-agnostic variable selection for identifying variables that have general nonlinear dependence on the response. We propose MambaPFN, short for model-agnostic Markov blanket selection with prior-data fitted networks, which is built upon the Transformer, a building block of many popular large language models. Specifically, we consider a functional-mapping perspective on variable-selection learning, in which the Transformer is treated as a learnable mapping from a dataset to its relevant variables. To learn this mapping, MambaPFN introduces three new components: (i) a faithful, rich, and scalable scheme for generating pretraining data, (ii) an objective that targets each variable's posterior inclusion probability, and (iii) a modified Transformer architecture tailored to variable selection. Once pretrained, MambaPFN is applied to new datasets without parameter updates. Empirically, MambaPFN achieves desirable variable-selection performance in simulation studies and exhibits a scaling law—more pretraining datasets and larger models can continuously improve its performance. Applied to a Facebook comments dataset, MambaPFN selects the fewest variables and achieves the highest computational efficiency and predictive performance, improving upon the best baselines by about 20%.
Keywords: Variable selection, Markov blanket, Transformer, Prior-data fitted networks
*Jin Zhu and Junxian Zhu contributed equally to this work and are listed in alphabetical order.
1 Introduction
Variable selection aims to identify the most relevant and informative variables in a dataset while removing irrelevant, noisy, or redundant ones. It is central to many scientific and societal applications because it can provide insight into the underlying system. For example, in biomedicine, selecting informative variables from high-dimensional omics and single-cell data supports reliable biomarker discovery (Hédou et al. 2024). In materials science, selecting compact physicochemical descriptors can reveal structure-property relationships and guide catalyst design (Han et al. 2024). Furthermore, variable selection can improve robustness and generalization while reducing effective model complexity (Li et al. 2024, Liao et al. 2024). Therefore, variable selection remains a fundamental and active problem in machine learning and data-driven science.
Literature review. Because of the importance of variable selection, dozens of methods have been developed over the last few decades; we review representative ones here. Existing variable selection methods can be divided mainly into two categories: model-based and model-agnostic methods.
Model-based variable selection imposes explicit structure on the regression function. For linear models, sparsity is induced through convex or non-concave penalties (Tibshirani 1996, Fan & Li 2001, Zhang 2010, Shen et al. 2012) or iterative algorithms (Blumensath & Davies 2009, Huang et al. 2018, Zhu et al. 2020). These methods have been extended to more complicated models, such as models in which predictors have a known group structure (Yuan & Lin 2006), models in which hierarchical penalties enforce heredity among main and interaction effects (Bien et al. 2013, Lim & Hastie 2015), single-index models (Kong & Xia 2007), and sparse additive models (Ravikumar et al. 2009, Meier et al. 2009, Huang et al. 2010). These methods yield interpretable estimators and, under suitable conditions, strong selection guarantees. Their targets and guarantees, however, are tied to the assumed structure.
Model-agnostic variable selection is typically implemented via statistics-based methods and machine-learning (ML)-based methods.
-
Statistics-based methods. Notable examples are knockoff procedures, which construct negative-control variables and use them to control false discoveries in variable selection (Candès et al. 2018, Romano et al. 2020, Bates et al. 2021, Zhu et al. 2021, Spector & Janson 2022, Ren et al. 2023). Kernel-based methods instead identify variables through gradients of conditional dependence measures in reproducing kernel Hilbert spaces or through conditional covariance operators (Yamada et al. 2014, Yang et al. 2016, Chen et al. 2017, Climente-González et al. 2019, Poignard & Yamada 2020).
-
ML-based methods select relevant variables using ML algorithms such as neural networks. For example, because neural networks have a strong capacity to approximate arbitrary nonlinear relationships, various methods have been developed to select variables that have complicated relationships with the response (Yoon et al. 2019, Yamada et al. 2020, Lemhadri et al. 2021, Chen et al. 2021, Luo & Halabi 2025, Jiang et al. 2024, Yang et al. 2024).
However, none of the aforementioned methods implements this viewpoint because they are not amortized across datasets; in other words, given a new dataset, they need to refit a model, whether it is a neural network or a linear model, to perform variable selection. Furthermore, non-amortized methods are static and cannot exhibit a scaling-law effect across datasets, under which the performance of an amortized method would reasonably improve if more diverse datasets were used for training. At the same time, neural-network-based variable-selection methods, particularly those without distributional assumptions on the data, can be time-consuming (e.g., Chen et al. 2021). From the perspective of model deployment, because the variable-selection step aims to reduce the variable set before fitting a model, a time-consuming selection procedure is less desirable in applications.
On the other hand, methods that adopt this viewpoint are achieving increasingly strong performance through amortized learning. For example, prior-data fitted networks (PFNs) apply this amortized-learning paradigm: a model is pretrained once and then makes predictions on new datasets without retraining (Müller et al. 2022). Subsequent methods have improved their predictive accuracy, scalability, and coverage of real-data tasks (Hollmann et al. 2023, Grinsztajn et al. 2025, Zhang et al. 2025, Ma et al. 2026, Qu et al. 2026), together with a complementary theoretical understanding of these methods (Ma et al. 2025). Amortization has also moved beyond point prediction to tasks such as causal-structure identification (Lorch et al. 2022, Peng et al. 2026, Thompson et al. 2026), (conditional) average treatment effect estimation (Balazadeh Meresht et al. 2025, Robertson et al. 2025, Sauter et al. 2025), interval estimation (Ye et al. 2026), and Bayesian optimization (Müller et al. 2023, Rakotoarison et al. 2026).
These advances raise a natural question: can variable selection itself be amortized, so that the relevant variables of a new dataset are obtained without any task-specific optimization? Existing amortized models do not answer this question directly: PFN-based predictors do not output selected variables, and amortized causal-discovery methods must first recover the whole causal graph, a harder task than identifying the Markov blanket of the response.
1.2 Proposal and contributions
In this paper, we introduce a variable-selection method for identifying the minimal Markov blanket of the response without prespecifying the form of the regression function. The method is amortized: a Transformer is pretrained on a large collection of variable-selection tasks and can then be applied to a new dataset without parameter updates, yielding substantial computational savings.
The paper makes two main contributions.
-
Methodologically, we introduce three key components for learning a suitable Transformer for amortized variable selection: (i) a faithful, rich, and scalable scheme for generating pretraining data; (ii) an objective that guides the Transformer toward estimating each variable's posterior inclusion probability; and (iii) a modified Transformer architecture tailored to variable selection.
-
Empirically, the proposal achieves higher nonlinear variable-selection accuracy than representative model-agnostic methods in our simulation studies. We also observe empirical scaling behavior: the learned Transformer performs better as either the diversity of the pretraining datasets or the Transformer model size increases. The analysis of the Facebook comments data provides further empirical evidence of the proposal's practical utility: it selects the fewest variables while achieving the highest predictive performance. It also performs variable selection efficiently, providing more than a 10-fold speedup over the neural-network-based baseline while remaining computationally competitive with linear-model-based methods such as Lasso.
1.3 Organization
The remainder of this paper is organized as follows. In Section 2, we introduce some basic concepts and techniques used in this paper. Section 3 introduces the proposed method. Sections 4 and 5 present numerical analyses of synthetic datasets and a real-world dataset, respectively. We conclude the paper and provide a discussion in Section 6. Technical proofs and experimental details are deferred to the Appendix.
2 Preliminaries
2.1 Problem formulation
This paper concerns variable selection in a general regression setting. Let be the response, i.e., the random variable of interest, and let be a -dimensional vector of covariates used to model the response. Throughout the paper, we impose the following assumption.
Assumption 1. The probability density function of is strictly positive on .
This assumption can be interpreted as an identifiability condition; for example, it excludes cases in which two variables follow an exact deterministic relationship (e.g., a linear relationship). Similar identifiability conditions are imposed in the literature to avoid such ill-posed cases (Zhang 2010). Moreover, this assumption is weak overall because it does not rely on any model structure, such as the linear model or the generalized additive model. This makes the assumption well suited to our goal of selecting variables with nonlinear effects.
Under Assumption 1, there exists a unique minimal set (Dawid 1979, Pearl 2014) such that the sub-vector of indexed by satisfies
This means that, given , the remaining variables are independent of ; in other words, is the smallest set of variables sufficient to explain . Thus, , which we call the Markov blanket of , is the target of this paper.¹
In practice, is unknown, and we typically only have a dataset where are independently and identically drawn from the joint distribution of . Our goal is to identify from .
2.2 Transformer
The core module of our amortized learner is the Transformer, which was first introduced by Vaswani et al. (2017) and is widely used in modern large language models. A notable property of the Transformer is its ability to make predictions from variable-length input sequences by leveraging interactions among the sequence elements. It achieves this property through several key components: embeddings, self-attention, and multilayer perceptrons, which are described below.
Embedding. A Transformer first maps its input tokens to a common representation space. Given scalars , a learnable embedding matrix produces
Self-attention module. Given a token matrix , self-attention forms query, key, and value matrices , and , where are learnable parameters, and aggregates the value representations using normalized query-key similarities.
¹It is also called the Markov boundary in some references; throughout the paper, we use the term Markov blanket.
With an additional learnable and an identity mapping, the self-attention map is
For simplicity, we omit the positional embedding in Equation (1), multi-head attention and layer normalization from Equation (2), as in Kim et al. (2023), Kajitsuka & Sato (2024).
Multilayer perceptron. The multilayer perceptron (MLP) applies the same two-layer mapping independently to each row of an input . Let be the hidden width. The MLP introduces the learnable weight matrices and and the learnable bias vectors and to process via the following rule:
where is the -dimensional vector of ones and is an element-wise activation function.
The complete Transformer alternately stacks multiple SA and MLP modules and takes the form
where averages the representations over all samples, and is a learnable parameter that produces a scalar output.
3 Methodology
3.1 Variable selection: a mapping perspective
Variable selection can be interpreted from a mapping perspective. Specifically, can be equivalently represented as a -dimensional indicator vector , where . Variable selection seeks to obtain a function that maps a dataset to an indicator vector that indicates which variables should be selected. This perspective can also be used to interpret existing variable selection methods, such as the Lasso. Given a dataset, the Lasso learns a sparse coefficient vector under the linear model assumption and then derives a variable selection result from the estimated coefficient .
In this section, we introduce a learning-based method for obtaining a function that can perform variable selection. Once is learned, it can be applied directly to new datasets to select variables. Learning such a function raises three questions:
-
The first question is how to collect pairs of datasets and their true variable indicators for learning an effective function . This question arises because the true variable indicators are typically unknown in practice.
-
The second question is how to design an objective function so that the learned function outputs an that is close to .
-
The last question is how to design the function itself. For example, it should accommodate various input shapes, as the input datasets can have different and .
We answer these three questions in Sections 3.2, 3.3, and 3.4, respectively.
3.2 Pretraining data generation
In this section, we describe our approach to generating the pretraining data . Ideally, the generation procedure should satisfy three principles:
-
Computational scalability: generating should be computationally convenient so that we can generate a large amount of pretraining data and increase the likelihood of successfully training the mapping.
-
Distributional richness: the generated probability density functions should represent a
wide range of relationships between the covariates and the response, thereby supporting the goal of nonlinear variable selection.
- Faithfulness: the probability density function used to generate the dataset should indeed correspond to and should also satisfy Assumption 1.
Algorithm 1 Generation of a pretraining pair
Input: Graph class ; function class ; family of strictly positive densities.
Output: dataset and indicator vector .
1: Draw a causal graph from on the nodes and .
2: For , if is a parent, child, or spouse of ; otherwise .
3: Partition the nodes of into topological layers .
4: for do ▷ root nodes
5: Draw from and sample .
6: end for
7: for do ▷ layer-wise sampling
8: for do
9: Draw from and a noise distribution from .
10: For , set where .
11: end for
12: end for
13: Set and for .
To this end, we introduce a graph-based method, whose complete procedure is summarized in Algorithm 1. Specifically, we start with a directed acyclic graph randomly drawn from , a class of directed acyclic graphs on nodes. The graph characterizes the causal relationships among , where each node in the graph corresponds to one variable. Since is known, we can directly extract the Markov blanket of and thereby find . Specifically, the Markov blanket of is the union of (i) the parents of , (ii) the children of , and (iii) the other parents of those children.
Given the graph , we then generate a probability distribution. The density associated with admits a factorization. Specifically, let denote the th node in for , and let denote the last node. The nodes of can then be partitioned into topological layers , where contains the root nodes, and, for , every parent of a node in belongs to an earlier layer. The resulting joint density therefore factorizes as
Next, we specify the setup for the distribution and the conditional distributions . For the distribution , to satisfy Assumption 1, we consider a set of common distributions , each of which has a strictly positive density. For the conditional distributions , we adopt the following structural model:
where is an independent random variable associated with a distribution in , and is a function randomly drawn from a predefined function class comprising various functions. The function should take all parents of as arguments. We denote the resulting joint distribution by and the collection of all possible joint distributions by .
Next, we examine whether the above procedure satisfies computational scalability, distributional richness, and faithfulness. First, the dataset is computationally convenient to construct. Equation (3) naturally induces a layer-wise sampling algorithm. We first sample all root variables in . Then, for , once the variables in the preceding layers have been generated, we sample all variables in according to Equation (4). A complete observation is obtained after a pass through all topological layers. Second, the family is distributionally rich because the structural model allows various functional combinations and can generate various graph structures. The following result illustrates this richness by showing that includes common statistical models.
Proposition 1. The structural model includes generalized additive models and interaction models for the response as special cases.
Finally, we examine faithfulness, . Let denote the Markov blanket of in . Since the densities in are strictly positive, the joint density (3) is also strictly positive; hence, Assumption 1 holds, which implies (Koller & Friedman 2009, Pearl 2014). The reverse inclusion may fail because the dependence of on a covariate can cancel out. For example, if and with , then , yet and thus . Another example concerns the specification of : if a child of is generated by , then all affect . Because and never jointly affect , we have , although .
Lemma 2 shows how such cancellations can be avoided under the following restrictions.
Assumption 2. Let be a graph drawn from . No satisfies any of the following conditions: (A) is a parent of both and a child of ; (B) is a child of and a parent of another child of ; (C) is a parent of at least two children of .
Assumption 3. Let be a mapping from to . For each and almost every for , the function is not almost everywhere constant.
Assumption 4. Every distribution in has a log-concave density , i.e., , for all and .
Lemma 2. For the joint density given by Equations (3)–(4), we have if Assumptions 2–4 hold.
Lemma 2 imposes assumptions on , , and to rule out the examples above. Assumption 2 is not restrictive because it concerns only the local structure of around . For example, it holds whenever has no children, which already allows Proposition 1 to hold, as shown in its proof. Assumption 3 excludes scenarios in which two parents never act together. It can be further relaxed to a local condition on the functions around , analogous to Assumption 2. Assumption 4 is satisfied by many common distributions, such as the Gaussian, Laplace, and logistic distributions; in particular, it covers the Gaussian noise frequently assumed in the variable-selection literature (Zhang 2010, Huang et al. 2018, Wainwright 2019). Assumption 4 can be further relaxed because the proof requires it only for the noise terms associated with the children of . More importantly, these assumptions are easy to implement in practice and ensure faithfulness.
3.3 Optimization objective
We seek a dataset-level function mapping to that minimizes the misclassification loss , where denotes the learnable parameter vector. An objective value of zero corresponds to exact variable selection. However, directly minimizing this objective is challenging as the indicator function is non-differentiable. We therefore consider the following differentiable elementwise Bernoulli log-loss
This objective function is easy to implement using standard deep-learning frameworks, which also provide various optimizers.
Proposition 3 reveals the population-level target of the optimization problem in (5). Specifically, let be the population loss. Here, we make two notational simplifications: (i) we use to represent a distribution drawn from the family , and (ii) we omit the subscripts of expectations whenever this causes no confusion. For each , let be the posterior inclusion probability of the th covariate given a finite-sample dataset . Note that this posterior depends only on the family used in the pretraining data-generation process. Proposition 3 shows that if belongs to a sufficiently large function class, the global minimizer of the population risk identifies the posterior inclusion probabilities.
Proposition 3 (Posterior inclusion probabilities). Under Assumptions 2–4, if there exists such that for every , then for any .
Furthermore, when contains sufficiently many observations, a stronger result holds.
Proposition 4 (Large-sample behavior). Under the same notation and assumptions as in Proposition 3, as .
This proposition shows that the solution to the global optimization problem converges to the deterministic true label .
In practice, we often encounter finite-sample datasets; thus, for obtained by optimizing Equation (5), lies in . To obtain the variable-selection results, we apply a hard threshold to the estimated inclusion probabilities . Specifically, we use to obtain , where . Given a grid of candidate , the threshold is selected by the following three steps:
-
We use the same procedure described in Section 3.2 to generate pairs of .
-
Apply and each candidate to to obtain , and compute the mis-selection rate .
-
Repeat Steps 1–2 times to compute the average mis-selection rate for each candidate value, and select the one with the smallest average mis-selection rate.
Depending on practical preferences, the mis-selection rate can be replaced by another criterion, such as the Matthews correlation coefficient. Thus, the learned posterior inclusion probabilities can be reused across different decision criteria, separating probability estimation from metric-specific variable selection without retraining the model.
3.4 Transformer for variable selection
Motivated by Proposition 3, we consider a large function class represented by a Transformer; however, the standard Transformer architecture described in Section 2.2 cannot be applied directly for three reasons: (i) its input and output shapes are incompatible with our problem; (ii) the response should not be treated as equivalent to a covariate; and (iii) it does not explicitly enforce the two permutation properties required for variable selection: invariance to permutations of the observations and equivariance to permutations of the covariates.
To address these issues, we redesign the Transformer architecture to include embedding, self-attention, and output modules.
Entry-wise embedding. Using the embedding rule in Equation (1), we construct for and , and construct for , where is a learnable parameter used to distinguish the response from the covariates.
Bidirectional self-attention. We design a bi-attention module that first performs row-axis attention and then column-axis attention. Intuitively, row-axis attention utilizes information from the entire observed column of each variable, while column-axis attention utilizes information across the covariates and the response. Specifically, under row-axis attention, for each variable , we take the embeddings associated with that variable and obtain
where is a self-attention module as described in Section 2.2 and is applied to each variable. We then apply self-attention along the column axis; i.e., for , we obtain
where the self-attention module is applied to each observation. Then, goes through another bidirectional self-attention module to obtain . In total, we apply the bidirectional self-attention module times to obtain .
Output module. This module produces a -dimensional vector of inclusion probabilities. For each observation and covariate , we first combine the covariate representation with the response representation to form , where are learnable matrices. We then aggregate the information across observations by
where is a learnable query vector. Stacking these vectors gives the matrix , which is fed into an MLP to output the -dimensional vector of inclusion probabilities sigmoid(, where and are learnable parameters.
4 Simulation
In this section, we conduct simulation studies to investigate the empirical performance of the proposed method, which we call MambaPFN, short for model-agnostic Markov blanket selection with PFN. In Section 4.1, we evaluate the quality of variable selection; in Section 4.2, we examine how the performance scales with the amount of pretraining data and the number of parameters; and in Section 4.3, we analyze the computational cost.
4.1 Variable selection evaluation
We compare MambaPFN with several well-known variable selection methods, including Lasso (Tibshirani 1996), SCAD (Fan & Li 2001), ABESS (Zhu et al. 2020), DFS (Chen et al. 2021), STG (Yamada et al. 2020), HSIC-Lasso (Yamada et al. 2014), and Knockoffs

Figure 1: Comparison of baselines and MambaPFN on variable selection. Each row contains three panels showing the F1-score, AUC, and absolute model-size gap, respectively. The upper row varies with , whereas the lower row varies with .
(Spector & Janson 2022). These baselines cover both linear-model-based and nonlinear variable selection methods. We also compare with an amortized method for causal graph identification, from whose learned graph we extract the Markov blanket of the response. Specifically, we use CauScale (Peng et al. 2026), a state-of-the-art method for this task.
We report the F1-score of the selected subset and the area under the ROC curve (AUC), which evaluates the complete ranking of active versus inactive covariates; details of the evaluation of each method are described in Appendix B. We evaluate selection accuracy on held-out datasets generated by Algorithm 1 (Section 3.2) and consider two cases: in the first, the number of observations varies over 100, 200, 400, 800, and 1600 with ; in the second, the number of observations is fixed at 800 while grows from 15 to 35.
The numerical results are summarized in Figure 1. As the sample size increases, the AUC and F1-score of the methods generally increase, as expected. MambaPFN typically attains the highest F1-score and AUC, reflecting its effectiveness. Moreover, when the sample size is large, the AUC of MambaPFN is high, demonstrating that it separates active variables from irrelevant ones well. STG and DFS also perform reasonably well because both capture nonlinearity when selecting variables, which allows them to surpass linear-model-based methods such as SCAD and Lasso. It is also worth comparing with CauScale, which MambaPFN outperforms, probably because learning the full causal graph is more difficult. Finally, the rightmost panels of Figure 1 show that MambaPFN maintains a substantially smaller absolute model-size gap than the baselines, and this gap approaches zero as the sample size increases.
4.2 Scaling law
MambaPFN is pretrained once and then applied without parameter updates. Its selection accuracy is therefore determined at the pretraining stage, and in particular by two resources: the number of pretraining datasets and the number of network parameters . In this section, we examine whether the performance of MambaPFN improves predictably as and increase, in the spirit of the scaling laws reported for language models (Kaplan et al. 2020). To separate the two resources, we follow Kaplan et al. (2020) and vary one of them while holding the other fixed.
We generate the pretraining data in advance. Specifically, we draw a pool of datasets. From this pool, we form six nested training sets consisting of the first , , , , , and datasets. As for model size, following Kaplan et al. (2020), we increase the width and the depth jointly and otherwise keep the architecture. The numbers of parameters range from to . When one

Figure 2: Validation log-loss of MambaPFN on logarithmic axes. Left: the largest model trained on nested training sets of datasets. Right: models with parameters trained on the full pool (). Each point is the average of the three smallest validation losses of one run over 25 checkpoints, and the lines are the fitted power laws.
factor varies, the other is fixed at its largest value. We evaluate the validation loss at 25 checkpoints equally spaced on a logarithmic scale during training, and report the average of its three smallest values over these checkpoints. The validation set is the fixed set of 2,048 held-out DGPs, generated from a seed stream disjoint from the pretraining pool, following Li et al. (2025).
The results are summarized in Figure 2. The validation loss decreases with both and over the ranges considered. These trends therefore indicate that the estimated inclusion probabilities move closer to the posterior inclusion probabilities as and grow, and suggest that the accuracy of MambaPFN can be further improved by scaling up the pretraining.
Selecting the best checkpoints plays the role of early stopping when a small training set is revisited many times, while averaging three of them reduces the fluctuation of a single checkpoint.

Figure 3: Runtime comparison of MambaPFN with existing methods. The left panel varies with , whereas the right panel varies with .
4.3 Computational analysis
In this section, we compare the computational cost of MambaPFN with that of the baselines. We consider two cases: in the first, we fix the dimension and increase the sample size; in the second, we fix the sample size and increase the dimension. We measure runtime in seconds, and the results are summarized in Figure 3.
MambaPFN and ABESS have the shortest runtimes, and MambaPFN is faster than Lasso, even though it tackles a more challenging, model-agnostic setting. It is nearly 10 times faster than model-agnostic methods such as Knockoffs and HSIC-Lasso, and it is also faster than SCAD, which relies on a linear model. It is also about 10 times faster than CauScale, which spends more time recovering the full graph. These results confirm the computational merits of MambaPFN for selecting variables with nonlinear effects.
5 Facebook Comments Data Analysis
In this section, we evaluate MambaPFN on a real-world dataset for predicting the volume of comments on Facebook posts. Social media platforms such as Facebook seek to maximize the value of promoting a post. If a post shows a strong growth trend, promoting it may increase its traffic and generate additional revenue. At the same time, rapidly growing posts may carry a higher risk of spreading misinformation or provoking heated discussion; identifying such posts allows platforms to allocate human resources for timely monitoring and moderation.
To gain further insight into such growth trends, Singh et al. (2015) collected a Facebook comment-volume dataset that is publicly available from the UCI repository³. The response of interest is the number of new comments received by a post. The dataset contains 53 covariates: 4 post-related variables, such as the number of likes; 25 variables comprising five summary statistics of historical comment counts (minimum, maximum, mean, median, and standard deviation); and 24 variables related to the timing and characteristics of the post (e.g., day-of-week indicators and the number of times the post was shared). Because this real-world dataset was not used to train the Transformer, it represents a challenging out-of-distribution setting. The dataset contains 40,949 observations.
We apply MambaPFN to the Facebook dataset to investigate which variables are most important for predicting the response. For comparison, we also consider the baselines introduced in Section 4⁴. Because the relevant variables are unknown in this real-world dataset, we use predictive performance on the test set as a surrogate criterion. Specifically, we randomly allocate 30% of the observations to variable selection, 30% to fitting an MLP using only the selected variables, and 40% to evaluating its predictive performance. We repeat the complete split-and-evaluate procedure 10 times to reduce split randomness. We also include a setting in which all variables are selected.
The results are reported in Figure 4. MambaPFN achieves the highest , suggesting that
³https://archive.ics.uci.edu/dataset/363/facebook+comment+volume+dataset
⁴DFS is excluded because variable selection takes more than 10 hours on the same computing device.


Figure 4: Comparison of methods on the Facebook comment dataset. The left panel shows the test-set , the middle panel shows the number of selected variables, and the right panel shows the runtime of each method. Error bars show one standard error across the 10 repeated data splits.
its selected variables have a strong association with the response. In contrast, naively fitting an MLP using all variables yields a substantially lower test than performing variable selection, reflecting the advantage of variable selection. MambaPFN also significantly outperforms all other methods and the improvement upon the best baseline approaches 20%. Meanwhile, it selects the fewest variables, suggesting that it effectively captures nonlinear dependence with a more parsimonious subset. Finally, it has the shortest runtime, taking less than one second to analyze the dataset, which is about 5 and 9 times faster than HSIC-Lasso and CauScale, the two model-agnostic methods with the most competitive predictive performance.
Finally, it is worth noting that MambaPFN selects three variables: (i) the time elapsed between publication of the post and the current prediction time (denoted as Base time); (ii) the number of comments in the last 24 hours; and (iii) the temporal difference in comment counts, measured over 24-hour intervals. Their associations with the response are visualized in Figure 5, and all three exhibit some degree of nonlinearity. The last variable shows the strongest nonlinearity, with a roughly V-shaped association: a large positive value indicates

Figure 5: Scatterplots of the three selected variables against the log-transformed response. Each panel shows one selected variable. The red curve denotes the nonlinear regression fit, while the black dashed line denotes the linear regression fit. The estimated posterior probabilities of the three variables are 0.94, 0.89, and 0.71, respectively.
accelerating comment activity, whereas a large negative value can correspond to a previously active post that is now cooling. Values near zero largely represent inactive posts, so this variable captures both the direction and the scale of comment activity; this may explain why linear-model-based methods require additional variables to represent the same pattern. The number of comments in the last 24 hours has a strong positive but nonlinear association with the response, making it a direct proxy for the post's current popularity. In contrast, Base time is negatively associated with future comments, consistent with an attention-decay process that is steep shortly after publication and then gradually levels off.
6 Conclusion and Discussion
This paper brings the viewpoint of the bitter lesson to variable selection, a long-standing problem in statistics, and develops an amortized variable selection method, MambaPFN. We provide a principled implementation of this method through the design of the pretraining data, the loss, and the architecture. Both synthetic and real-world data analyses confirm the empirical merits of this method.
Several directions deserve further investigation. First, MambaPFN currently returns only the variable selection results, and a separate MLP is trained for prediction, forming a two-step procedure. It would be interesting to extend the current architecture to make sample-wise predictions based on the posterior inclusion probabilities, yielding an interpretable machine learning method that outputs both the selected variables and predictions based on them. Second, although MambaPFN saves considerable time at the selection stage, pretraining the Transformer is computationally costly. It would be interesting to consider other architectures, such as selective state space models (Gu & Dao 2023) or grouped-query attention (Ainslie et al. 2023), to speed up training and inference.
References
Ainslie, J., Lee-Thorp, J., De Jong, M., Zemlyanskiy, Y., Lebrón, F. & Sanghai, S. (2023), Gqa: Training generalized multi-query transformer models from multi-head checkpoints, in ‘Proceedings of the 2023 conference on empirical methods in natural language processing’, pp. 4895–4901.
Anthropic (2026), ‘System card: Claude fable 5 & claude mythos 5’.
Balazadeh Meresht, V., Kamkari, H., Thomas, V., Ma, J., Li, B., Cresswell, J. & Krishnan, R. (2025), CausalPFN: Amortized causal effect estimation via in-context learning, in ‘Advances in Neural Information Processing Systems’, Vol. 38, pp. 154945–154984.
Bates, S., Candès, E., Janson, L. & Wang, W. (2021), ‘Metropolized knockoff sampling’, Journal of the American Statistical Association 116(535), 1413–1427.
Bien, J., Taylor, J. & Tibshirani, R. (2013), ‘A lasso for hierarchical interactions’, The Annals of Statistics 41(3), 1111–1141.
Blumensath, T. & Davies, M. E. (2009), 'Iterative hard thresholding for compressed sensing', Applied and Computational Harmonic Analysis 27(3), 265–274.
Candès, E., Fan, Y., Janson, L. & Lv, J. (2018), 'Panning for gold: Model-X knockoffs for high-dimensional controlled variable selection', Journal of the Royal Statistical Society Series B: Statistical Methodology 80(3), 551–577.
Chen, J., Stern, M., Wainwright, M. J. & Jordan, M. I. (2017), Kernel feature selection via conditional covariance minimization, in 'Advances in Neural Information Processing Systems', Vol. 30, pp. 6946–6955.
Chen, Y., Gao, Q., Liang, F. & Wang, X. (2021), 'Nonlinear variable selection via deep neural networks', Journal of Computational and Graphical Statistics 30(2), 484–492.
Climente-González, H., Azencott, C.-A., Kaski, S. & Yamada, M. (2019), 'Block HSIC lasso: Model-free biomarker detection for ultra-high dimensional data', Bioinformatics 35(14), i427–i435.
Dawid, A. P. (1979), 'Conditional independence in statistical theory', Journal of the Royal Statistical Society Series B: Statistical Methodology 41(1), 1–15.
DeepSeek-AI (2026), 'Deepseek-v4: Towards highly efficient million-token context intelligence'.
Fan, J. & Li, R. (2001), 'Variable selection via nonconcave penalized likelihood and its oracle properties', Journal of the American Statistical Association 96(456), 1348–1360.
Ge, J., Li, X., Jiang, H., Liu, H., Zhang, T., Wang, M. & Zhao, T. (2019), 'Picasso: A sparse learning library for high dimensional data analysis in r and python', Journal of Machine Learning Research 20(44), 1–5.
Grinsztajn, L., Flöge, K., Key, O., Birkel, F., Jund, P., Roof, B., Jäger, B., Safaric, D.,
Alessi, S., Hayler, A. et al. (2025), ‘Tabpfn-2.5: Advancing the state of the art in tabular foundation models’, arXiv preprint arXiv:2511.08667.
Gu, A. & Dao, T. (2023), ‘Mamba: Linear-time sequence modeling with selective state spaces’, arXiv preprint arXiv:2312.00752.
Han, Z., Chen, A., Li, Z. et al. (2024), ‘Machine learning-based design of electrocatalytic materials towards high-energy lithium-sulfur batteries development’, Nature Communications 15, 8433.
Hédou, J., Marić, I., Bellan, G. et al. (2024), ‘Discovery of sparse, reliable omic biomarkers with Stabl’, Nature Biotechnology 42, 1581–1593.
Hollmann, N., Müller, S., Eggensperger, K. & Hutter, F. (2023), TabPFN: A transformer that solves small tabular classification problems in a second, in ‘International Conference on Learning Representations’.
Huang, J., Horowitz, J. L. & Wei, F. (2010), ‘Variable selection in nonparametric additive models’, The Annals of Statistics 38(4), 2282–2313.
Huang, J., Jiao, Y., Liu, Y. & Lu, X. (2018), ‘A constructive approach to penalized regression’, Journal of Machine Learning Research 19(10), 1–37.
Jiang, X., Margeloiu, A., Simidjievski, N. & Jamnik, M. (2024), ProtoGate: Prototype-based neural networks with global-to-local feature selection for tabular biomedical data, in ‘International Conference on Machine Learning’, Vol. 235 of Proceedings of Machine Learning Research, PMLR, pp. 21844–21878.
Kajitsuka, T. & Sato, I. (2024), Are transformers with one layer self-attention using low-rank weight matrices universal approximators?, in ‘International Conference on Learning Representations’, Vol. 2024, pp. 35177–35205.
Kaplan, J., McCandlish, S., Henighan, T., Brown, T. B., Chess, B., Child, R., Gray, S., Radford, A., Wu, J. & Amodei, D. (2020), 'Scaling laws for neural language models', arXiv preprint arXiv:2001.08361.
Kim, J., Kim, M. & Mozafari, B. (2023), Provable memorization capacity of transformers, in 'The eleventh international conference on learning representations'.
Koller, D. & Friedman, N. (2009), Probabilistic graphical models, Vol. 165, MIT press Cambridge.
Kong, E. & Xia, Y. (2007), 'Variable selection for the single-index model', Biometrika 94(1), 217–229.
Lemhadri, I., Ruan, F., Abraham, L. & Tibshirani, R. (2021), 'Lassonet: A neural network with feature sparsity', Journal of Machine Learning Research 22(127), 1–29.
Li, C.-N., Huang, L.-W., Shao, Y.-H., Guo, T. & Mao, Y. (2024), 'Feature selection by Universum embedding', Pattern Recognition 153, 110514.
Li, J., Liu, Y., Liu, W., Fang, S., Wang, L., Xu, C. & Bian, J. (2025), Mars: a financial market simulation engine powered by generative foundation model, in 'The Thirteenth International Conference on Learning Representations'.
Liao, H., Chen, H., Mi, Y., Luo, C., Horng, S.-J. & Li, T. (2024), 'Sparse orthogonal supervised feature selection with global redundancy minimization, label scaling, and robustness', Information Sciences 666, 120454.
Lim, M. & Hastie, T. (2015), 'Learning interactions via hierarchical group-lasso regularization', Journal of Computational and Graphical Statistics 24(3), 627–654.
Lorch, L., Sussex, S., Rothfuss, J., Krause, A. & Schölkopf, B. (2022), 'Amortized infer-ence for causal structure learning', Advances in Neural Information Processing Systems 35, 13104–13118.
Luo, B. & Halabi, S. (2025), 'Sparse-input neural network using group concave regularization', Transactions on Machine Learning Research.
Ma, J., Thomas, V., Hosseinzadeh, R., Labach, A., Cresswell, J., Golestan, K., Yu, G., Caterini, A. L. & Volkovs, M. (2026), 'Tabdpt: Scaling tabular foundation models on real data', Advances in Neural Information Processing Systems 38, 172692–172722.
Ma, T., Wang, T. & Samworth, R. J. (2025), 'Optimal in-context adaptivity and distributional robustness of transformers', arXiv preprint arXiv:2510.23254.
Meier, L., van de Geer, S. & Bühlmann, P. (2009), 'High-dimensional additive modeling', The Annals of Statistics 37(6B), 3779–3821.
Muennighoff, N., Rush, A. M., Barak, B., Le Scao, T., Piktus, A., Tazi, N., Pyysalo, S., Wolf, T. & Raffel, C. (2023), 'Scaling data-constrained language models', Advances in Neural Information Processing Systems 36.
Müller, S., Feurer, M., Hollmann, N. & Hutter, F. (2023), PFNs4BO: In-context learning for bayesian optimization, in 'Proceedings of the 40th International Conference on Machine Learning', Vol. 202 of Proceedings of Machine Learning Research, PMLR, pp. 25444–25470.
Müller, S., Hollmann, N., Arango, S. P., Grabocka, J. & Hutter, F. (2022), Transformers can do bayesian inference, in 'International Conference on Learning Representations'.
OpenAI (2026), 'Gpt-6 astr: System card'.
Pearl, J. (2014), Probabilistic reasoning in intelligent systems, Vol. 88, Elsevier.
Peng, B., Chen, S., Tian, J., Qiao, Y. & Lu, C. (2026), CauScale: Neural causal discovery at scale, in 'Proceedings of the 43rd International Conference on Machine Learning', Vol. 306 of Proceedings of Machine Learning Research, PMLR, pp. 97940–97957.
Poignard, B. & Yamada, M. (2020), Sparse Hilbert–Schmidt independence criterion regression, in 'Proceedings of the Twenty Third International Conference on Artificial Intelligence and Statistics', Vol. 108, pp. 538–548.
Prékopa, A. (1973), 'On logarithmic concave measures and functions', Acta Scientiarum Mathematicarum 34, 335–343.
Qu, J., HolzmÄzller, D., Varoquaux, G. & Morvan, M. L. (2026), 'Tabiclv2: A better, faster, scalable, and open tabular foundation model', arXiv preprint arXiv:2602.11139.
Rakotoarison, H., Adriaensen, S., Viering, T. J., Hvarfner, C., Müller, S., Hutter, F. & Bakshy, E. (2026), α-PFN: Fast entropy search via in-context learning, in 'Proceedings of the 43rd International Conference on Machine Learning', Vol. 306, pp. 103387–103406.
Ravikumar, P., Lafferty, J., Liu, H. & Wasserman, L. (2009), 'Sparse additive models', Journal of the Royal Statistical Society Series B: Statistical Methodology 71(5), 1009–1030.
Ren, Z., Wei, Y. & Candès, E. (2023), 'Derandomizing knockoffs', Journal of the American Statistical Association 118(542), 948–958.
Robertson, J., Reuter, A., Guo, S., Hollmann, N., Hutter, F. & Schölkopf, B. (2025), Do-PFN: In-context learning for causal effect estimation, in 'Advances in Neural Information Processing Systems', Vol. 38, pp. 174811–174848.
Romano, Y., Sesia, M. & Candès, E. (2020), 'Deep knockoffs', Journal of the American Statistical Association 115(532), 1861–1872.
Sauter, A., Salehkaleybar, S., van Harmelen, F., Plaat, A. & Acar, E. (2025), 'ACTIVA:
Amortized causal effect estimation via transformer-based variational autoencoder', arXiv preprint arXiv:2503.01290.
Shen, X., Pan, W. & Zhu, Y. (2012), 'Likelihood-based selection and sharp parameter estimation', Journal of the American Statistical Association 107(497), 223–232.
Singh, K., Sandhu, R. K. & Kumar, D. (2015), Comment volume prediction using neural networks and decision trees, in 'IEEE UKSim-AMSS 17th International Conference on Computer Modelling and Simulation, UKSim2015 (UKSim2015)'.
Spector, A. & Janson, L. (2022), 'Powerful knockoffs via minimizing reconstructability', The Annals of Statistics 50(1), 252–276.
Sutton, R. (2019), 'The bitter lesson', Incomplete Ideas (blog) 13(1), 38.
Thompson, R., Zhao, H., Steinberg, D. M. & Bonilla, E. V. (2026), 'Arrow: A foundation model for causal discovery', arXiv preprint arXiv:2605.07204.
Tibshirani, R. (1996), 'Regression shrinkage and selection via the lasso', Journal of the Royal Statistical Society Series B: Statistical Methodology 58(1), 267–288.
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L. & Polosukhin, I. (2017), 'Attention is all you need', Advances in neural information processing systems 30.
Wainwright, M. J. (2019), High-dimensional statistics: A non-asymptotic viewpoint, Vol. 48, Cambridge university press.
Williams, D. (1991), Probability with Martingales, Cambridge University Press, Cambridge.
Yamada, M., Jitkrittum, W., Sigal, L., Xing, E. P. & Sugiyama, M. (2014), 'High-dimensional feature selection by feature-wise kernelized lasso', Neural computation 26(1), 185–207.
Yamada, Y., Lindenbaum, O., Negahban, S. & Kluger, Y. (2020), Feature selection using stochastic gates, in 'International conference on machine learning', pp. 10648–10659.
Yang, K., Ganguli, A. & Maiti, T. (2024), 'ENNS: Variable selection, regression, classification, and deep neural network for high-dimensional data', Journal of Machine Learning Research 25(335), 1–45.
Yang, L., Lv, S. & Wang, J. (2016), 'Model free variable selection via kernel method', Journal of Machine Learning Research 17(82), 1–24.
Ye, K., Gong, S., Zhou, H., Zangirolami, V. & Shi, C. (2026), 'Can tabular foundation models amortize statistical inference?', arXiv preprint arXiv:2609.33114.
Yoon, J., Jordon, J. & van der Schaar, M. (2019), INVASE: Instance-wise variable selection using neural networks, in 'International Conference on Learning Representations'.
Yuan, M. & Lin, Y. (2006), 'Model selection and estimation in regression with grouped variables', Journal of the Royal Statistical Society Series B: Statistical Methodology 68(1), 49–67.
Zhang, C.-H. (2010), 'Nearly unbiased variable selection under minimax concave penalty', The Annals of Statistics 38(2), 894–942.
Zhang, X., Ren, G., Yu, H., Yuan, H., Wang, H., Li, J., Wu, J., Mo, L., Mao, L., Hao, M. et al. (2025), 'Limix: Unleashing structured-data modeling capability for generalist intelligence', arXiv preprint arXiv:2509.03505.
Zhu, J., Wang, X., Hu, L., Huang, J., Jiang, K., Zhang, Y., Lin, S. & Zhu, J. (2022), 'abess: a fast best-subset selection library in python and r', Journal of Machine Learning Research 23(202), 1–7.
Zhu, J., Wen, C., Zhu, J., Zhang, H. & Wang, X. (2020), 'A polynomial algorithm for best-subset selection problem', Proceedings of the National Academy of Sciences 117(52), 33117–33123.
Zhu, Z., Fan, Y., Kong, Y., Lv, J. & Sun, F. (2021), ‘DeepLINK: Deep learning inference using knockoffs with applications to genomics’, Proceedings of the National Academy of Sciences 118(36), e2104683118.
A Proofs
A.1 Proof of Proposition 1
Proof. Choose such that has no children and its parents are the active covariates. Equation (4) then gives
where is independent of because no covariate is generated from .
For a generalized additive model, take
in . Substitution yields , with outside ; choosing gives the linear model as a special case. For an interaction model, take
and choose to contain exactly the covariates having a nonzero main or interaction term. Equation (4) then gives the corresponding interaction model. Thus both model classes are included in the structural model.
A.2 Proof of Lemma 2
Proof. Strict positivity of the factors in Equation (3) implies (Pearl 2014, Koller & Friedman 2009). For the reverse inclusion, fix . If , then : otherwise, weak union applied to the defining conditional independence for would give .
Only the factor of and those of its children remain in the conditional density of given . Assumption 2 ensures that occurs in exactly one of these factors: it is either a parent of , a child of , or another parent of one child of . We use two elementary properties of the noise density . First, for almost every implies : integration gives , and a nonzero translation would make an integrable density periodic. Second, log-concavity implies
Indeed, the Hellinger autocorrelation is even and log-concave, and is strictly decreasing in by the first property and the Cauchy–Schwarz inequality (Prékopa 1973). Integrating the square root of the displayed identity gives equal separations between the two pairs of shifts; after aligning their signs, unequal midpoints would make the corresponding positive, integrable centered product periodic. Hence the two pairs coincide.
Suppose, contrary to the claim, that . If is a parent of , the factor associated with shows that two translates of its noise density must be proportional as varies. The first property forces the corresponding values of to be equal, contradicting Assumption 3. The same argument, with and interchanged, applies when is a child of .
Finally, suppose that is another parent of a child of . Conditional independence and the factor associated with that child give, for almost every , the second displayed identity with the four shifts
The resulting equality of the two multisets requires either both -sections or both -sections to agree. Fixing a nonconstant -section forces the -sections to be constant on a set of positive measure, while fixing a nonconstant -section forces the -sections to be constant. Either conclusion contradicts Assumption 3. Thus in all three cases, so . Combining the two inclusions proves .
A.3 Proof of Proposition 3
Proof. Conditioning on in Equation (5) gives
Substituting the assumed expression for and subtracting yields
Hence for every .
A.4 Proof of Proposition 4
Proof. To compare different context lengths on the same data, we take the contexts to be nested: is an infinite sequence of observations with , and consists of its first terms, so that .
Let denote the whole sequence. Throughout the proof, and refer to the joint law under which is drawn from and, given are independent with law . Write
so that by the definition of in Proposition 3. Since is bounded, is a martingale, and Lévy's upward theorem (Williams 1991, Section 14.2) gives
It remains to show that is almost surely a function of , in which case .
Let be the distribution function of on and the empirical distribution function of . Conditionally on , the observations are independent with law , and the strong law of large numbers gives almost surely for each ; since is countable, the convergence holds simultaneously for all such , and integrating over , it holds with probability one. A distribution function is determined by its values on by right-continuity, and it determines the distribution, so is almost surely a function of . By Lemma 2, , where is the minimal Markov blanket of under (Section 2); hence is determined by and is therefore almost surely a function of . Consequently, almost surely, and almost surely.
B Experimental details
B.1 Details of Section 4.1
Experimental design. We evaluate all methods on held-out data-generating processes (DGPs) independently generated by Algorithm 1 (Section 3.2). In the sample-size experiment, we fix and use ; each point is averaged over 200 DGP replicates. Within a replicate, the structural parameters, response variable, and active set are shared across context lengths, and all methods receive the same dataset. Covariates are randomly permuted before evaluation. For the classical baselines, both the covariates and response are standardized within each dataset; MambaPFN applies its own internal standardization.
Implementation and selection rules. Each method determines its own model size, and the true support size is used only for evaluation. In particular,
- Lasso uses five-fold cross-validation and selects the nonzero coefficients. ABESS uses the
support selected by its official implementation under the extended special information criterion, while SCAD selects the minimum-BIC point along its regularization path. The functions/libraries for Lasso, ABESS and SCAD are LassoCV, abess (Zhu et al. 2022), and picasso (Ge et al. 2019), respectively.
-
DFS fits candidate support sizes from 0 to p and selects the minimum-BIC candidate. Our PyTorch implementation follows the authors' reference code⁵ for Chen et al. (2021). STG selects variables whose learned gate probabilities exceed 0.5.
-
HSIC-Lasso applies three-fold positive sklearn.linear_model.LassoCV to the block-HSIC design; for n > 800, it uses a random subsample of 800 observations. A reference implementation is provided by the pyHSICLasso library⁶. Knockoffs is implemented with the knockpy library⁷ and uses Gaussian model-X knockoffs with the minimum-variance-reconstructability construction, a Lasso feature statistic, Ledoit–Wolf covariance shrinkage, and target FDR 0.1.
-
CauScale uses the authors' official implementation⁸ and the released synthetic-data checkpoint⁹ to estimate a directed adjacency matrix for (Y, X). After thresholding edge probabilities at 0.5, we select the estimated Markov blanket of Y, consisting of its parents, children, and other parents of its children.
Thus, no method is given |S★| when constructing its selected set. Continuous scores used for AUC are also method-specific: these are inclusion probabilities for MambaPFN, path-entry or coefficient scores for the penalized methods, learned gate scores for DFS and STG, the knockoff statistic for Knockoffs, and Markov-blanket edge scores for CauScale.
⁵https://github.com/cyustcer/Deep-Feature-Selection ⁶https://github.com/riken-aip/pyHSICLasso ⁷https://github.com/amspector100/knockpy ⁸https://github.com/OpenCausaLab/CauScale ⁹https://huggingface.co/OpenCausaLab/causcale-model
Evaluation criteria. Let and denote the selected and true active sets. Precision and recall are defined as
Precision is the proportion of selected variables that are truly active, whereas recall is the proportion of truly active variables recovered by the method. Their harmonic mean gives
When no variable is selected, precision and the F1-score are set to zero. The ROC-AUC is computed from the continuous variable scores within each dataset and equals the proportion of active-inactive pairs for which the active variable receives the larger score, with ties assigned weight 1/2. We also report the absolute model-size gap to distinguish ranking errors from systematic over- or under-selection. Reported curves are replicate means, and their error bars are pointwise 95% intervals obtained from 2,000 bootstrap resamples of complete DGP replicates; for the sample-size experiment, this preserves the pairing across context lengths. Runtime, when reported, is wall-clock time per dataset for method-specific fitting and scoring and excludes DGP generation, metric calculation, and plotting. MambaPFN and CauScale inference was performed on a single NVIDIA A100 GPU with 80 GB of memory, while the remaining baselines ran on the allocated CPU cores.
B.2 Details of Section 4.2
All runs share the same number of gradient steps and the same optimization settings, so a run cycles over its training set several times, e.g., four times for the full pool. Fixing
We limit the repetition on the full pool to four passes because, for language models, up to four passes over the same data have been found to yield a loss close to that obtained with the same amount of fresh data (Muennighoff et al. 2023).
the number of steps ensures that a larger brings more distinct data rather than more optimization.
When studying the effect of model size, we fix the training set at the full pool, , and vary the model size. As for studying the effect of pretraining data scale, we fix the largest model with , so that model capacity is unlikely to be the bottleneck, and vary over the six nested training sets. The two experiments share one run, namely the largest model trained on the full pool.
B.3 Details of Section 5
Dataset preparation. We use Variant 1 of the Facebook Comment Volume training data from the UCI repository, containing 40,949 observations, 53 predictors, and the number of comments received in the following hours as the response. The fourth predictor, page category, is treated as categorical. The remaining predictors are treated as numeric, and the two downstream figures retain the original feature definitions supplied with the dataset.
Leakage-separated evaluation. For each of 10 seeded repetitions, we randomly divide the data into 12,284 observations for variable selection, 12,284 for downstream MLP fitting, and 16,379 for final testing; the remaining two observations produced by integer rounding are unused. The three subsets are mutually disjoint, and every selector receives the same selection subset within a repetition. Median imputation and standardization for feature selection are estimated using only the selection subset. The MambaPFN checkpoint was pretrained with , so its application to the 53 Facebook predictors also evaluates dimension extrapolation.
Downstream preprocessing and prediction. After variable selection, numeric predictors are median-imputed and standardized using only the downstream training subset, while the page-category predictor is one-hot encoded using levels observed in that subset. The response is standardized using the downstream training subset but is not log-transformed; all test metrics are computed on the original response scale. The downstream predictor is an MLP with hidden widths 256 and 128, GELU activations, and dropout 0.1. It is optimized by AdamW with learning rate , weight decay , and batch size 2,048 for at most 100 epochs. Within the downstream training subset, 15% of the observations are used for early stopping with patience 10; the selected number of epochs is then used to refit the MLP on the complete downstream training subset. Test is evaluated once per repetition, and Figure 4 reports means and standard errors across the 10 repetitions. The all-variable MLP follows the same preprocessing and fitting protocol.
Full-data descriptive analysis. To interpret the variables selected by MambaPFN, we separately apply it to all 40,949 observations after full-data median imputation and standardization. The observations are partitioned into balanced, nonoverlapping blocks of at most 1,000 rows, the raw logits are averaged across blocks, and variables with inclusion probability above 0.5 are selected. Figure 5 plots every observation using and overlays a linear fit and a cubic-spline ridge fit with eight quantile-spaced knots; the fitted curves are drawn over the central 99% of each predictor.