TL;DR
Machine learning models typically ignore text metadata—such as feature names and descriptions—treating data as raw numbers and often overfitting or learning spurious correlations. LMPriors addresses this by using pre-trained large language models (LLMs) to automatically convert natural language metadata into task-specific inductive biases. Across feature selection, safe reinforcement learning, and causal discovery, LMPriors dramatically boosts performance and robustness in low-data or noisy regimes.
What Problem Does This Paper Address?
Standard statistical and deep learning pipelines operate under empirical risk minimization: given input vectors $x$ and targets $y$, algorithms learn an empirical mapping while throwing away the semantic meaning of the column headers (e.g., predicting commute time from "favorite color" vs. "distance from office").
Because purely data-driven algorithms lack common-sense grounding about the physical world, they are prone to shortcut learning, adversarial vulnerability, and catastrophic overfitting when data is scarce. While human practitioners manually inject prior beliefs (e.g., selecting relevant variables or shaping reward functions), doing so by hand is subjective, labor-intensive, and impossible to scale across hundreds or thousands of features.
Methods
The authors frame the approach as a functional transformation: $$\mathcal{P}(\mathcal{D}_{\text{meta}})(f) = \tilde{f}$$ where metadata $\mathcal{D}_{\text{meta}}$ (variable names, descriptions, and task context) transforms a base learner $f$ into a specialized learner $\tilde{f}$ endowed with domain-appropriate inductive biases.
The framework queries a frozen, black-box LLM (specifically GPT-3 davinci-instruct-beta, 175B parameters) using few-shot prompts that include task instructions, input-output examples, and explicit chain-of-thought explanations:
-
Feature Selection as Regularization: The LLM evaluates variable names and descriptions, computing a log-odds relevance score: $$\text{score}(c) = \log p_{\text{LM}}(\text{Y}|c) - \log p_{\text{LM}}(\text{N}|c)$$ Features falling below a threshold $\tau$ are filtered out prior to training.
-
Safe Reinforcement Learning via Reward Shaping: When pixel or state features are mapped to natural language descriptions, the LLM classifies state-action safety (e.g., evaluating robot distance from water as good, neutral, or bad). The expected token probabilities provide a shaping bonus $\tilde{r}(s, a) = r(s, a) + \mathbb{E}[1_{\text{good}} - 1_{\text{bad}}]$ to penalize unsafe behaviors without needing explicit human safety-reward engineering.
- Causal Discovery as Bayesian Prior: For pairwise cause-effect inference ($x \to y$ vs. $y \to x$), the LLM's log-probability ratio is added directly to the likelihood score of a data-driven causal model (RECI) to form a true posterior over causal direction.
Datasets
- UCI Benchmark Combinations (Semi-Synthetic Corruption): Artificially corrupted combinations pairing primary datasets with unrelated "nuisance" datasets (e.g., California Housing Prices mixed with Wine Quality or Adult Census Income; Breast Cancer Wisconsin mixed with Housing Prices or Wine Quality; Forest Cover Type mixed with Breast Cancer).
- US Census American Community Survey (ACS PUMS 2018): Real-world tabular data via the Folktables API (California 2018 cohort), predicting whether commute time exceeds 20 minutes across 281 demographic and economic features.
- AI Safety Gridworlds (Island Navigation): A gridworld environment where an agent must navigate to a goal while avoiding hazardous water squares that carry no explicit in-game penalty.
- Tübingen Cause-Effect Pairs (TCEP): Benchmark dataset of real-world bivariate observational pairs across varied domains (e.g., altitude vs. temperature, age vs. abalone width).
Key Insights and Ideas
- Metadata as an Untapped Modality: Feature names in tabular datasets contain vast amounts of world knowledge that typical statistical learners discard. LLMs offer a scalable bridge to turn unstructured text metadata into mathematical priors.
- Complementing, Not Replacing, Data: LMPriors shine brightest when combined with standard algorithms. In causal inference, adding the LLM prior to a relatively weak data-driven algorithm outperformed both components in isolation, surpassing the prior state-of-the-art.
- Semantically Rational "Failures": When LMPrior erroneously kept features from a corrupting dataset, it did so for sensible reasons (e.g., retaining "age" and "gender" from an income survey when predicting breast cancer), demonstrating genuine conceptual comprehension rather than surface-level keyword matching.
Key Results
- Robustness to Feature Corruption: When the Adult Census dataset was corrupted with breast cancer features, baseline classifier accuracy fell from 89.4% to 85.1%. LMPrior filtering filtered the nuisance features and restored test accuracy to 89.4%, substantially outperforming data-driven sparsity baselines like LassoNet.
- Real-World US Census Commute Prediction: LMPrior pared 281 features down to 59, outperforming or matching full-feature models and standard feature selection methods:
- Random Forest: Accuracy rose from 0.74 (all features) and 0.63 (random 59-feature subset) to 0.83 with LMPrior.
- SVM: Reached 0.96 with LMPrior vs. 0.65 for random selection.
- Safe RL: On Island Navigation, incorporating the LMPrior reward bonus allowed a DQN agent to reach the optimal policy while reducing training safety violations from $8278 \pm 1079$ down to $2917 \pm 85$.
- Causal Inference: On the TCEP benchmark:
- Purely data-driven baseline (RECI): 58.7% accuracy.
- LMPrior alone: 83.5% accuracy.
- Combined (RECI + LMPrior): 84.5% accuracy (exceeding the previous data-driven state-of-the-art of 83.3%).
Limitations and Future Work
- Reliance on Descriptive Metadata: The method strictly requires descriptive natural language column names and task descriptions; it cannot function on anonymized, encrypted, or poorly documented features ($X_1, X_2, \dots$).
- Prompt Sensitivity and Hallucination: Performance depends heavily on prompt design, context framing, and few-shot examples.
- Propagation of Social Biases: Pre-trained LLMs encode historical stereotypes and demographic prejudices from pretraining text. If left unchecked, LMPriors could inadvertently discard protected variables or bias downstream high-stakes decisions (e.g., credit, healthcare, criminal justice).
- Black-Box Access: The study primarily relied on OpenAI's proprietary GPT-3 API without examining internal embeddings or fine-tuning local open-source models.
Summary updated