OT-Transformer: A Continuous-time Transformer Architecture with Optimal Transport Regularization

Kelvin Kan, Xingjian Li, Stanley Osher
1/30/2025
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

Transformers have achieved state-of-the-art performance in numerous tasks. In this paper, we propose a continuous-time formulation of transformers. Specifically, we consider a dynamical system whose governing equation is parametrized by transformer blocks. We leverage optimal transport theory to regularize the training problem, which enhances stability in training and improves generalization of the resulting model. Moreover, we demonstrate in theory that this regularization is necessary as it promotes uniqueness and regularity of solutions. Our model is flexible in that almost any existing transformer architectures can be adopted to construct the dynamical system with only slight modifications to the existing code. We perform extensive numerical experiments on tasks motivated by natural language processing, image classification, and point cloud classification. Our experimental results show that the proposed method improves the performance of its discrete counterpart and outperforms relevant comparing models.

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. Any repos shown below are weak matches — 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{kan2025ottransformer,
  title  = {OT-Transformer: A Continuous-time Transformer Architecture with Optimal Transport Regularization},
  author = {Kelvin Kan and Xingjian Li and Stanley Osher},
  year   = {2025},
  eprint = {2501.18793},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.18793v1}
}

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/2501.18793.svg)](https://codeofpaper.com/paper/2501.18793)

Discussion