Expanding Expressivity in Transformer Models with MöbiusAttention

Anna-Maria Halacheva, Mojtaba Nayyeri, Steffen Staab
9/8/2024
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

Attention mechanisms and Transformer architectures have revolutionized Natural Language Processing (NLP) by enabling exceptional modeling of long-range dependencies and capturing intricate linguistic patterns. However, their inherent reliance on linear operations in the form of matrix multiplications limits their ability to fully capture inter-token relationships on their own. We propose MöbiusAttention, a novel approach that integrates Möbius transformations within the attention mechanism of Transformer-based models. Möbius transformations are non-linear operations in spaces over complex numbers with the ability to map between various geometries. By incorporating these properties, MöbiusAttention empowers models to learn more intricate geometric relationships between tokens and capture a wider range of information through complex-valued weight vectors. We build and pre-train a BERT and a RoFormer version enhanced with MöbiusAttention, which we then finetune on the GLUE benchmark. We evaluate empirically our approach against the baseline BERT and RoFormer models on a range of downstream tasks. Our approach compares favorably against the baseline models, even with smaller number of parameters suggesting the enhanced expressivity of MöbiusAttention. This research paves the way for exploring the potential of Möbius transformations in the complex projective space to enhance the expressivity and performance of foundation 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{halacheva2024expanding,
  title  = {Expanding Expressivity in Transformer Models with MöbiusAttention},
  author = {Anna-Maria Halacheva and Mojtaba Nayyeri and Steffen Staab},
  year   = {2024},
  eprint = {2409.12175},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.12175v1}
}

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

Discussion