Transformers for Tabular Data: A Training Perspective of Self-Attention via Optimal Transport

Antonio Candelieri, Alessandro Quadrio
12/10/2025
stat.MLcs.LG

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

This thesis examines self-attention training through the lens of Optimal Transport (OT) and develops an OT-based alternative for tabular classification. The study tracks intermediate projections of the self-attention layer during training and evaluates their evolution using discrete OT metrics, including Wasserstein distance, Monge gap, optimality, and efficiency. Experiments are conducted on classification tasks with two and three classes, as well as on a biomedical dataset. Results indicate that the final self-attention mapping often approximates the OT optimal coupling, yet the training trajectory remains inefficient. Pretraining the MLP section on synthetic data partially improves convergence but is sensitive to their initialization. To address these limitations, an OT-based algorithm is introduced: it generates class-specific dummy Gaussian distributions, computes an OT alignment with the data, and trains an MLP to generalize this mapping. The method achieves accuracy comparable to Transformers while reducing computational cost and scaling more efficiently under standardized inputs, though its performance depends on careful dummy-geometry design. All experiments and implementations are conducted in R.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{candelieri2025transformers,
  title  = {Transformers for Tabular Data: A Training Perspective of Self-Attention via Optimal Transport},
  author = {Antonio Candelieri and Alessandro Quadrio},
  year   = {2025},
  eprint = {2512.09530},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.09530v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2512.09530.svg)](https://codeofpaper.com/paper/2512.09530)

Discussion