Skip to main content
QUICK REVIEW

[Paper Review] Self-Attention Between Datapoints: Going Beyond Individual Input-Output Pairs in Deep Learning

Jannik Kossen, Neil Band|arXiv (Cornell University)|Jun 4, 2021
Anomaly Detection Techniques and ApplicationsComputer Science74 references43 citations
TL;DR

The paper introduces Non-Parametric Transformers (NPTs) that take the entire dataset as input and use self-attention between datapoints to learn inter-point relationships, enabling cross-datapoint lookup and improved prediction on tabular and image data.

ABSTRACT

We challenge a common assumption underlying most supervised deep learning: that a model makes a prediction depending only on its parameters and the features of a single input. To this end, we introduce a general-purpose deep learning architecture that takes as input the entire dataset instead of processing one datapoint at a time. Our approach uses self-attention to reason about relationships between datapoints explicitly, which can be seen as realizing non-parametric models using parametric attention mechanisms. However, unlike conventional non-parametric models, we let the model learn end-to-end from the data how to make use of other datapoints for prediction. Empirically, our models solve cross-datapoint lookup and complex reasoning tasks unsolvable by traditional deep learning models. We show highly competitive results on tabular data, early results on CIFAR-10, and give insight into how the model makes use of the interactions between points.

Motivation & Objective

  • Question the parametric-dependence assumption in supervised learning.
  • Propose a general architecture (NPTs) that uses the entire dataset for prediction.
  • Enable learning inter-datapoint interactions end-to-end via attention mechanisms.
  • Demonstrate cross-datapoint lookup and reasoning on tabular and image datasets.

Proposed method

  • Input the entire dataset (X) and a masking matrix (M) to NPTs, enabling reconstruction of masked values p(X^M | X^O).
  • Apply alternating Attention Between Datapoints (ABD) and Attention Between Attributes (ABA) to model inter-datapoint relations and per-datapoint transformations.
  • Use multi-head self-attention with residual connections and layer norm, following Transformer-style architectures.
  • Train with a masked objective inspired by BERT, combining a target loss with an auxiliary feature-masking loss: L^NPT = (1-λ)L^Targets + λL^Features.
  • Handle large datasets via minibatching, keeping training/test data in the same batch to allow cross-point attention.

Experimental results

Research questions

  • RQ1Can NPTs achieve competitive performance on standard supervised benchmarks?
  • RQ2Can NPTs learn to predict by leveraging attention between datapoints in idealized cross-point lookup tasks?
  • RQ3Do NPTs actually rely on inter-datapoint interactions for real-world data prediction?
  • RQ4What kinds of datapoints are most relevant for predictions when using NPTs?

Key findings

  • NPTs achieve the highest average ranking on binary and multi-class classification tasks on UCI benchmarks, outperforming several boosting methods.
  • On regression tasks, NPTs tie for best average rank with XGBoost and are outperformed only by CatBoost.
  • CIFAR-10 achieves 93.7% test accuracy with a CNN+ABD architecture; MNIST reaches 98.3% with linear patching.
  • In a semi-synthetic Protein regression task, NPTs can look up target values from duplicated rows, attaining near-perfect correlation (r = 99.9%).
  • Corruption experiments show loss of predictive performance when other datapoints are randomized, indicating reliance on inter-datapoint interactions on real data (varies by dataset).

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.