Understanding which training examples drive a machine learning model's behavior is a fundamental challenge in AI safety, interpretability, and data curation. This paper introduces Tensor Network Datamodels (TNDMs), a novel framework that uses low-rank tensor decompositions to capture complex, non-additive interactions between training data points more accurately and efficiently than previous methods.
TL;DR
TNDMs leverage low-rank tensor networks to model non-linear dependencies—like redundancy and complementarity—among training data units. By treating the mapping from data subsets to model outcomes as a structured tensor completion problem, TNDMs significantly outperform linear and polynomial baselines in predicting model behavior from limited observations.
What Problem Does This Paper Address?
The field of Training Data Attribution (TDA) seeks to answer: "How much did this specific training example contribute to the model's final prediction?"
Most existing "datamodels" are linear. They assume each data point has a fixed, independent "score." However, data rarely acts in isolation. Two examples might be redundant (providing the same information, so removing one doesn't hurt) or complementary (only useful when both are present, like two facts needed for a multi-hop reasoning step).
Linear models fail to capture these joint effects. While non-linear models (like polynomial or kernel methods) exist, they often suffer from the "curse of dimensionality"—the number of possible interactions grows exponentially with the number of training units. The authors aim to find a compact representation that can handle high-order interactions without needing an astronomical amount of data.
Methods
The authors propose viewing the set of all possible training subsets and their corresponding model outcomes as a high-order value tensor. For $d$ training units, this is an order-$d$ tensor with $2^d$ entries.
To make this tractable, they introduce Tensor Network Datamodels (TNDMs), which approximate this massive tensor using low-rank factorizations:
- TNDM-CP: Based on the CANDECOMP/PARAFAC decomposition, representing the function as a sum of products of simple affine functions.
- TNDM-TT: Based on the Tensor Train decomposition, which is particularly good at capturing dependencies in ordered sequences.
Fitting a TNDM becomes a structured tensor completion task: you train the underlying model on a small number of subsets ($m \ll 2^d$), observe the outcomes, and use the low-rank prior to "fill in" the rest of the tensor. Crucially, the authors show that standard attribution metrics like Shapley and Banzhaf values can be computed directly and efficiently from the learned tensor factors using tensor contractions.
Datasets
The researchers evaluated TNDMs across several settings:
- Controlled Reasoning Task: A synthetic "relation-composition" task designed to have strong, known interactions (complementary chains and redundant providers).
- Sport-Music: Fine-tuning a large language model (Qwen2-7B) on factual associations.
- AG News: Text classification using RoBERTa fine-tuned with LoRA.
- Standard Benchmarks: UCI HAR (Human Activity Recognition) and in-context learning tasks (Coin-flip reasoning, GSM8K) with frozen models.
Key Insights and Ideas
- Rank vs. Degree: A major theoretical "aha" moment is the distinction between interaction degree (how many units interact) and tensor rank. The authors prove that common patterns like "pure complementarity" (needing all $k$ facts to answer a query) have a high interaction degree but a CP rank of only 1.
- Low-Rank as an Inductive Bias: Low tensor rank serves as a powerful prior. It allows the model to generalize from seeing a tiny fraction of possible training subsets because it assumes the underlying "utility function" of the data has a compact structure.
- Unified Attribution: Once a TNDM is fitted, it acts as a "surrogate" for the expensive retraining process. You can query it for many different attribution quantities (Shapley values, joint-removal effects, etc.) without ever having to retrain the original model again.
Key Results
- Massive Data Efficiency: On a 24-group reasoning task, TNDM-TT reduced prediction error (NMSE) by 89% compared to a linear model, despite seeing only 0.0061% of all possible training subsets.
- Better Fine-Tuning Attribution: In the Sport-Music task, a single TNDM-CP improved the $R^2$ of held-out subset predictions from 0.579 (linear) to 0.668.
- Superior Interaction Recovery: TNDMs were significantly better at identifying which specific groups of data were complementary compared to degree-bounded or kernel baselines.
- Accurate Attribution Scores: TNDM-CP achieved the lowest mean error for computing Shapley values and higher-order interactions on a modular retraining task.
Limitations and Future Work
- Retraining Cost: While TNDMs are more sample-efficient, they still require training the base model on hundreds of subsets, which is computationally expensive for very large models.
- Topology and Ordering: The performance of the Tensor Train (TT) model depends on the ordering of the training units. Finding the "right" order or the best tensor network topology (e.g., tree structures) for a given dataset remains an open research question.
- Hyperparameter Sensitivity: The gains depend on choosing the right tensor rank and regularization, which requires a validation set of retraining outcomes.
Overall, TNDMs provide a mathematically principled and practically effective way to move beyond the "independent data" assumption, opening new doors for more nuanced data valuation and model debugging.
Summary updated