SlowGuess/NeurIPS_2023_OCR huggingface dataset:
$^{22}$ https://community.fico.com/s/blog-post/a5Q2E0000001czyUAA/fico1670  
 $^{23}$ https://collegescorecard.ed.gov  
 $^{24}$ The data dictionary for the College Scorecard is available at https://collegescorecard.ed.gov/ assets/CollegeScorecardDataDictionary.xlsx  
 $^{25}$ https://carnegieclassifications.acenet.edu  
 $^{26}$ https://carnegieclassifications.acenet.edu
B.15 ASSISTments Tutoring System Correct Answer Prediction
Background: Machine learning systems are increasingly being adopted in digital learning tools for students of all ages. The ASSISTments tutoring platform<sup>27</sup> is a free, web-based, data-driven tutoring platform for students in grades 3-12. As of 2020, ASSISTments has been used by approximately 60,000 students with over 12 million problems solved [27]. ASSISTments also periodically releases open-source data snapshots from their platform to support educational research.
Data Source: We use the open-source ASSISTments 2012-2013 dataset. This is a dataset from school year 2012-2013 which contains submission-level features (each row in the dataset represents one submission by a student attempting to answer a problem on the ASSISTments tutoring platform). In addition to containing student-, problem-, and school-level features, the dataset also contains affect predictions for students based on an experimental affect detector implemented in ASSISTments. (These affect predictions are intended to be useful in identifying affective states such as boredom, confusion, frustration, and engaged problem-solving behavior).
Distribution Shift: We partition the datasets by school. Approximately 700 schools are in the training set, and 10 schools are used as the target distribution. This simulates the process of deploying ASSISTments at a new school.
C Dataset Availability
All datasets in TABLESHIFT meet the definition of "available and accessible" as described in [65]; namely, the data can be obtained without a personal request to the PI. All datasets are obtained from reliable, high-quality sources (United States government agencies, UCI Machine Learning Repository, Kaggle). We selected high-quality data sources which we expect to ensure keep the relevant data available for the foreseeable future. We provide a single script that can be used to download and preprocess TABLESHIFT data for all tasks in the git repository.
The data sources used to construct the TABLESHIFT benchmark datasets vary, and necessarily so do the restrictions or agreements required to access this data. All data sources have an established credentialization procedure that is open to the public, provides rapid access to the data, and is expected to be maintained for many years. An overview of the restrictions for each dataset is given below. A link to the data use agreement or credentialization procedure for each dataset marked "open credentialized access" is available in the README of our github repo; we will maintain this list over time if the access agreements change.
Table 2: Dataset availability.
Task	Public Access	Open Credentialized Access	Source
ASSISTments	✓	Kaggle
College Scorecard	✓	Department of Education
ICU Hospital Mortality	✓	MIMIC Clinical Database
Hospital Readmission	✓	UCI Machine Learning Repository
Diabetes	✓	Centers for Disease Control/BRFSS
ICU Length of Stay	✓	MIMIC Clinical Database
Voting	✓	American National Election Survey
Food Stamps	✓	American Community Survey
Unemployment	✓	American Community Survey
Income	✓	American Community Survey
FICO HELOC	✓	FICO
Public Health Ins.	✓	American Community Survey
Sepsis	✓	PhysioNet
Childhood Lead	✓	Centers for Disease Control/NHANES
Hypertension	✓	Centers for Disease Control/BRFSS
$^{27}$ https://new.assistments.org
D Related Work
D.1 Distribution/Domain Shift
The (non)robustness of modern machine learning models to distribution shift has been extensively studied, but primarily in non-tabular domains, such as vision and language [62, 61]. Through the use of diverse and high-quality benchmarking suites, several recent works have demonstrated that many existing robust learning or domain generalization methods do not outperform standard supervised training such as SGD [38, 50]. Recent evidence has also suggested that in-distribution (ID) test performance is a very strong predictor of out-of-distribution (OOD) test performance in the domains of image classification [62], language modeling [55], and question answering [9], but whether these relationships hold for tabular data is unknown.
Several families of methods have been proposed to address this sensitivity to distribution shifts, including methods for distributional robustness [76, 53] and domain generalization [1, 6, 90, 89, 54, 46]. However, these methods are largely evaluated in non-tabular domains, and several "standard" domain generalization methods have never been applied to tabular data, to our knowledge. Formal analyses of robustness to any kind of shift in the tabular domain have been lacking [33].
D.2 Tabular Data Modeling
Tabular data – data defined by structured, heterogeneous features – is common in many real-world applications, including medical diagnosis, finance, social science, and recommender systems [15, 46, 78]. In many respects, tabular data is different from the other modalities where deep learning models have had great success in the past decade. In contrast to these other modalities, where deep learning is the undisputed state of the art, deep learning-based models have tended to underperform on tabular data, and the state of the art is often considered to be tree-based ensemble models, such as XGBoost, LightGBM, or CatBoost [15, 36, 78, 33].
Deep learning-based models have been proposed for tabular data modeling, including carefully-regularized deep multilayer perceptrons (MLPs) [46], tabular variants of ResNet [36] and Transformer architectures [43, 36, 79], and differentiable tree-inspired models [70]. However, it is unclear whether there is any benefit from these sophisticated architectures, which are often derived from models which were designed for non-tabular tasks. Subsequent evaluations of deep learning-based tabular data models have often shown tree-based models to achieve superior performance [78, 15, 33]. However, their robustness to distribution shift has not been thoroughly evaluated (a notable exception is [33], which strictly evaluates subgroup robustness).
D.3 Benchmarking for Machine Learning
Benchmarking – the use of standardized, publicly-available, high-quality datasets to evaluate performance on one or more tasks – is a critical practice contributing to progress the machine learning [56]. Distribution shift benchmarks in particular have been critical in assessing progress in the robustness of vision and language models, e.g. [50, 38, 80]. Because these benchmarks often require interfacing with many distinct data sources, successful and widely-used benchmarks also typically include a lightweight software API for interfacing with benchmarking datasets in a consistent manner[28]. In the IID setting, benchmark datasets have also been crucial to assessing and driving progress, such as ImageNet [29] for vision, LibriSpeech [69] for speech, AudioSet [34] for audio classification, or GLUE for NLP [86]. Critically, evaluations have shown that reuse of these high-quality benchmarks such as CIFAR-10, ImageNet, and even widely-used Kaggle datasets has not led to “overfitting” to performance on the benchmarks [75], and, in fact, progress on these benchmarks generalizes beyond the benchmark tasks [73].
High-quality benchmarks for tabular data are lacking, as has been noted in many previous works [36, 15, 33, 37, 78, 57, 35]. Existing datasets used for de facto tabular data "benchmarking" are often of low quality. For example, the German Credit dataset contains only  $1k$  observations; the COMPAS and Adult datasets have data quality and bias issues [11, 12, 24]. While a small number of general tabular benchmarks have been proposed [15, 37], they have not seen widespread adoption, do not
28e.g. DomainBed https://github.com/facebookresearch/DomainBed, WILDS https://wilds.stanford.edu/, BIG-bench https://github.com/google/BIG-bench
(a) Out-of-Distribution Accuracy vs. Shift Gap  $\Delta_{\mathrm{Acc}}$  across all TABLESHIFT tasks.
(b) Percentage of Maximum In-Distribution Accuracy (PMA-ID) across all TABLESHIFT tasks.
Figure 6: Additional results.
Figure 7: Pairwise scatterplots of shifts. Each point represents one dataset. Metrics are computed according to the domain split for each dataset (ID test vs. OOD test) according to the metric definitions for  $\Delta_x$ ,  $\Delta_{y|x}$ ,  $\Delta_y$  in Section E. (a) left: Covariate shift  $\Delta_x$  (computed via Optimal Transport Data Distance) vs. concept shift  $\Delta_{y|x}$  (computed via Frechet Dataset Distance);  $\rho = 0.99$ . (b) center: Covariate shift  $\Delta_x$  vs. label shift  $\Delta_y$ ;  $\rho = -0.20$ . (c) left: Concept shift  $\Delta_{y|x}$  vs. label shift  $\Delta_y$ ;  $\rho = -0.20$ .
include the software utilities that have driven adoption of benchmarks in language and vision [50, 38], and do not contain distribution shifts (we make more detailed comparisons between TableShift and existing benchmarks in Section G). Critically, these tabular benchmarks also often lack feature-level documentation, which can be critical for tabular data.
Thus, while limited individual benchmarks do exist for tabular data modeling (without distribution shift) or for distribution shift (without tabular data), there is no existing benchmark that provides a high-quality set of tabular datasets and associated distribution shifts.
Figure 8: Domain shift metrics vs. (absolute) shift gap. Each point represents a tuned model on a given dataset. Only Label shift shows a strong correlation with shift gap  $(\rho = 0.73)$ .
Average ID vs. OOD Accuracy Across TableShift Benchmark Tasks
Figure 9: TableShift benchmark results, mean per model (left: non-domain generalization tasks,  $\rho = 0.834$ ; right: domain generalization tasks,  $\rho = 963$ ). In-domain and out-of-domain accuracy show a general linear trend. Baseline models (blue) consistently match or outperform domain robustness and domain generalization methods.
E Additional Dataset Details and Results
In this section we provide a brief tour of exploratory results regarding the domain shift datasets in TableShift, and additional experimental results.
E.1 Domain Split Selection
For many tasks in TableShift, there exist clear motivations for selecting certain splitting variables, and for selecting which values of these variables to use as out-of-domain value(s) for our benchmarks. However, for oehters, there might be multiple plausible splitting variables, or no obvious way to choose which specific value(s) to use as out of domain (e.g., any geographic region in ACS might be equally plausible as a holdout domain for the Feed Stamps task).
For tasks where there were known domain splits that were likely to induce performance gaps that matches a real-world domain shift scenario, we began by selecting these. When tuned baselines (LightGBM and XGBoost) showed a shift gap  $\Delta_{\mathrm{Acc}}$  of at least  $1\%$ , we used that split. However, for tasks without a clear domain split or where multiple plausible splitting values exist, we do the following. First, we identified a variable(s) that was likely to contribute to an actual shift in a real-world production through reviewing the relevant literature. Then, for each value  $d \in \{d_1, \ldots, d_D\} =$
Table 3: Summary of tasks in the TableShift benchmark and their associated distribution shifts.
Task	Δx(Eqn. (2))	Δy|x (Eqn (3))	Δy (Eqn (3))
Food Stamps	14.20	640.82	0.0008
Income	30.60	1.40	0.0060
Public Health Ins.	5.79	4.06	0.1701
Unemployment	75.47	13,389,512.51	0.0003
ANES	13.60	2.23	0.0025
Diabetes	12.28	0.10	0.0332
Hypertension	4.69	0.04	0.0022
Hospital Readmission	42.37	1.30	0.0060
Childhood Lead	1.30	0.01	0.0026
Sepsis	6609.73	8.44	0.0040
ICU Length of Stay	56,439,324,672.00	47,042,729,585.25	0.0033
ICU Hospital Mortality	64,479,092,736.00	42,639,188,407.47	0.0015
FICO HELOC	19.35	0.73	0.0983
ASSISTments	24,054.59	1137.42	0.0670
College Scorecard	43,566.39	2116.63	0.0337
$\mathcal{D}$ , we train on  $\{\mathcal{D} \setminus d\}$  and evaluate on  $d$ . We select the split(s) that induced the highest performance gap in our baseline tree methods). We repeat this process for each dataset until a split that is both real-world relevant and also leads to a shift gap is found.
E.2 Domain Shift Metrics (Covariate, Concept, and Label Shift)
As noted above, the domain shift  $\Delta_{\mathrm{Acc}}$  incurred when training a classifier is comprised of three distinct forms of shift: changes in  $p(x)$  ("covariate shift"), changes in  $p(y|x)$  ("concept shift"), and changes in  $p(y)$  ("label shift"). It is not possible to measure the true shifts for any given dataset, because doing so would require knowing the true (ID, OOD) distributions. As a result, in order to still explore the influence of these various forms of shift on tabular data models, we propose metrics to approximately measure each form of shift.
We propose these metrics while noting that each is only an approximation of the actual degree of a certain form of shift in our dataset; measuring the actual underlying shift (e.g. the true change in  $p(x)$  for covariate shift) is not possible from a finite sample. Thus, while these metrics can provide exploratory evidence of the relationship between a given type of shift (covariate, concept, label) and model performance, they cannot provide direct evidence that any given shift type is (not) causing changes in model performance.
Table 13 gives the exact In- and Out-of-Distribution label proportions for each task, which are used to compute the label shift  $\Delta_y$ .
Measuring covariate shift with OTDD: We propose to use the following measure to approximate the degree of covariate shift between the (ID, OOD) test sets of a given task:
$$
\Delta_ {x} = \operatorname {O T D D} \left(\mathcal {D} ^ {\text {t r a i n}}, \mathcal {D} ^ {\text {t e s t}}\right) \tag {2}
$$
where  $\mathcal{D}^{\mathrm{train}}$ ,  $\mathcal{D}^{\mathrm{test}}$  are the holdout (test) sets from the source and target domains, respectively. Here OTDD represents the Optimal Transport Dataset Distance with the Gaussian approximation as described in [2].
Measuring concept shift with Frechet Dataset Distance (FDD): We propose a straightforward measure of the change in  $p(y|x)$  across two distributions. Inspired by measures of distributional difference widely used in the machine learning (Frechet Inception Distance, [41]) which leverage changes in the intermediate representations of a reference classifier for comparing distributions, we propose 'Frechet dataset distance' (FDD) for comparing two distributions.
This metric is computed as follows: First, we train a classifier on the source domain using the best tuned hyperparameters from our hyperparameter sweep to obtain a fixed classifier  $f_{\theta}$ . Then, for each
domain, we compute  $\tilde{x} \coloneqq f_{\theta[i]}(x)$ , for each  $x \in \mathcal{D}$ , where  $i$  indicates that we compute the activations at the  $i^{\text{th}}$  layer of the model (this is sometimes referred to as the coding vector or feature vector for an input). Finally, we compute the Frechet dataset distance, which measures the distance between these two distributions (also called the Wasserstein-2 distance), as:
$$
\mathrm {D F D} \left(\mathcal {D} ^ {\text {t r a i n}}, \mathcal {D} ^ {\text {t e s t}}\right) = \left\| \mu_ {\mathcal {D} ^ {\text {t r a i n}}} \check {\mu} _ {\mathcal {D} ^ {\text {t e s t}}} \right\| ^ {2} + T r \left(\Sigma_ {\mathcal {D} ^ {\text {t r a i n}}} + \Sigma_ {\mathcal {D} ^ {\text {t e s t}}} \check {2} * \sqrt {\Sigma_ {\mathcal {D} ^ {\text {t r a i n}}} * \Sigma_ {\mathcal {D} ^ {\text {t e s t}}}}\right)
$$
where  $\mu_{\mathcal{D}}$  indicates the set of feature vectors from dimain  $\mathcal{D}$  and  $\Sigma_{\mathcal{D}}$  indicates the covariance matrix of  $\mu_{\mathcal{D}}$ . We refer to this measure as  $\Delta_{y|x}$  below. A lower FDD score indicates a smaller distance between  $x_{i}: x_{i} \in \mathcal{D}^{\mathrm{train}}$  and  $x_{j}: x_{j} \in \mathcal{D}^{\mathrm{test}}$ .
We parameterize the models used for FDD as MLPs. For each dataset, we use the MLP hyperparameters associated with the best validation accuracy for that model over our experiments; the model trained using these parameters is used for computing the feature activations for FDD.
Measuring label shift: We propose a simple measure of label shift. While label shift is clearly one factor influencing shift gaps and is perhaps the most straightforward to empirically estimate, it receives surprisingly little attention in existing literature on domain shift. We use the following measure to quantify the label shift between the source and target distributions:
$$
\Delta_ {y} = \left\| \bar {y} _ {\mathcal {D} ^ {\text {t r a i n}}} - \bar {y} _ {\mathcal {D} ^ {\text {t e s t}}} \right\| ^ {2} \tag {3}
$$
where  $\bar{y}_{\mathcal{D}} = \frac{1}{|\mathcal{D}|}\sum_{i\in \mathcal{D}}y_{i}$  is the empirical sample mean of a given domain. Since all tasks in TableShift are binary classification tasks, this measures the  $L_{2}$  difference in the base rates across the two domains.
Using these metrics, we provide one perspective on the amount of each respective form of shift in Table 3. Additionally, we provide scatter plots showing the pairwise relationships between these metrics in Figure 7, and scatter plots showing the relationship between each individual metric and the shift gap in Figure 8 (see also Figure 5 discussed in Section 5).
E.3 Detailed Results Per Task
We provide detailed task-specific results and data in this section. In particular, we list the complete set of main results for the (In-Distribution, Out-Of-Distribution) scatter plots shown in Figures 1, 2, 3, along with the  $95\%$  Clopper-Pearson confidence intervals for these results, in Tables 4, 5, 6, 8, 9, 7, 10, 11. We also give summary metrics describing the size of each dataset split in Table 12.
Table 4: Best (In-Distribution and Out-Of-Distribution) accuracy pair observed on each benchmark task. Note that domain generalization models can only be trained on datasets with more than one training subdomain (see Table 1 for domain generalization datasets and Section 4.1 for a list of domain generalization models).  $\star$ : domain generalization models cannot be trained when only one training subdomain is present. See also Figures 1, 2,3.  $\diamond$ : the large number of training subdomains (over 700 for ASSISTments) makes training domain generalization models impractical.  $\square$ : the large dataset size makes training adversarial label DRO models impractical (since per-example gradients must be computed). We leave these experiments to future work.
Estimator	ASSISTments	Childhood Lead
ID Acc. (95% CI)	OOD Acc. (95% CI)	ID Acc. (95% CI)	OOD Acc. (95% CI)
Adv. Label DRO	□	□	□	□	0.971	(0.961, 0.979)	0.92	(0.915, 0.925)
CatBoost	0.943	(0.942, 0.944)	0.584	(0.562, 0.607)	0.971	(0.961, 0.979)	0.92	(0.914, 0.925)
DRO	0.932	(0.931, 0.933)	0.583	(0.561, 0.606)	0.971	(0.961, 0.979)	0.92	(0.915, 0.925)
FT-Transformer	0.939	(0.938, 0.94)	0.592	(0.569, 0.614)	0.971	(0.961, 0.979)	0.92	(0.915, 0.925)
Label Group DRO	0.928	(0.927, 0.929)	0.574	(0.551, 0.596)	0.971	(0.961, 0.979)	0.92	(0.915, 0.925)
LightGBM	0.936	(0.935, 0.937)	0.591	(0.568, 0.613)	0.971	(0.961, 0.979)	0.92	(0.915, 0.925)
MLP	0.933	(0.932, 0.934)	0.583	(0.561, 0.606)	0.971	(0.961, 0.979)	0.92	(0.915, 0.925)
NODE	0.935	(0.934, 0.936)	0.583	(0.561, 0.606)	0.971	(0.961, 0.979)	0.92	(0.915, 0.925)
ResNet	0.933	(0.932, 0.934)	0.583	(0.561, 0.606)	0.971	(0.961, 0.979)	0.92	(0.915, 0.925)
SAINT	0.935	(0.934, 0.936)	0.584	(0.562, 0.607)	0.971	(0.961, 0.979)	0.92	(0.915, 0.925)
TabTransformer	0.93	(0.929, 0.93)	0.551	(0.529, 0.574)	0.971	(0.961, 0.979)	0.92	(0.915, 0.925)
XGBoost	0.93	(0.929, 0.931)	0.591	(0.568, 0.613)	0.971	(0.961, 0.979)	0.92	(0.914, 0.925)
CORAL	◇	◇	◇	◇	★	★	★	★
DANN	◇	◇	◇	◇	★	★	★	★
Group DRO	◇	◇	◇	◇	★	★	★	★
IRM	◇	◇	◇	◇	★	★	★	★
MMD	◇	◇	◇	◇	★	★	★	★
MixUp	◇	◇	◇	◇	★	★	★	★
VREX	◇	◇	◇	◇	★	★	★	★
Table 5: Best (In-Distribution and Out-Of-Distribution) accuracy pair observed on each benchmark task. Note that domain generalization models can only be trained on datasets with more than one training subdomain (see Table 1 for domain generalization datasets and Section 4.1 for a list of domain generalization models).  $\star$ : domain generalization models cannot be trained when only one training subdomain is present. See also Figures 1, 2,3.
Estimator	College Scorecard	Diabetes
ID Acc. (95% CI)	OOD Acc. (95% CI)	ID Acc. (95% CI)	OOD Acc. (95% CI)
Adv. Label DRO	0.937	(0.933, 0.942)	0.826	(0.805, 0.846)	0.877	(0.875, 0.878)	0.832	(0.83, 0.833)
CatBoost	0.957	(0.954, 0.961)	0.885	(0.866, 0.901)	0.877	(0.876, 0.879)	0.833	(0.831, 0.835)
DRO	0.95	(0.946, 0.954)	0.862	(0.842, 0.88)	0.876	(0.875, 0.878)	0.832	(0.83, 0.834)
FT-Transformer	0.948	(0.944, 0.952)	0.859	(0.839, 0.877)	0.877	(0.875, 0.879)	0.832	(0.831, 0.834)
Label Group DRO	0.928	(0.924, 0.933)	0.817	(0.796, 0.838)	0.876	(0.874, 0.878)	0.831	(0.83, 0.833)
LightGBM	0.939	(0.935, 0.943)	0.822	(0.8, 0.841)	0.876	(0.874, 0.878)	0.833	(0.831, 0.835)
MLP	0.947	(0.942, 0.95)	0.845	(0.825, 0.864)	0.877	(0.875, 0.879)	0.832	(0.83, 0.833)
NODE	0.944	(0.939, 0.948)	0.844	(0.823, 0.863)	0.877	(0.875, 0.879)	0.833	(0.832, 0.835)
ResNet	0.947	(0.943, 0.951)	0.854	(0.834, 0.872)	0.874	(0.872, 0.876)	0.829	(0.828, 0.831)
SAINT	0.936	(0.931, 0.94)	0.814	(0.792, 0.834)	0.877	(0.875, 0.879)	0.833	(0.831, 0.834)
TabTransformer	0.942	(0.938, 0.946)	0.845	(0.825, 0.864)	0.875	(0.873, 0.877)	0.83	(0.829, 0.832)
XGBoost	0.942	(0.938, 0.946)	0.83	(0.809, 0.85)	0.877	(0.875, 0.879)	0.832	(0.83, 0.834)
CORAL	0.922	(0.917, 0.926)	0.795	(0.773, 0.816)	0.874	(0.872, 0.875)	0.832	(0.83, 0.834)
DANN	0.894	(0.889, 0.9)	0.78	(0.757, 0.802)	0.873	(0.871, 0.875)	0.826	(0.824, 0.827)
Group DRO	0.944	(0.939, 0.948)	0.829	(0.808, 0.849)	0.877	(0.875, 0.879)	0.832	(0.83, 0.833)
IRM	0.879	(0.873, 0.885)	0.746	(0.721, 0.769)	0.873	(0.871, 0.875)	0.826	(0.824, 0.827)
MMD	0.925	(0.92, 0.929)	0.795	(0.773, 0.816)	0.873	(0.871, 0.875)	0.826	(0.825, 0.828)
MixUp	0.912	(0.907, 0.917)	0.746	(0.721, 0.769)	0.873	(0.871, 0.875)	0.826	(0.824, 0.827)
VREX	0.907	(0.902, 0.912)	0.754	(0.731, 0.777)	0.873	(0.871, 0.875)	0.826	(0.824, 0.827)