Pool Me Wisely: On the Effect of Pooling in Transformer-Based Models

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Ennadir, Sofiane, Zólyomi, Levente, Smirnov, Oleg, Wang, Tianze, Pertoft, John, Cornell, Filip, Cao, Lele
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866912626803474432
author Ennadir, Sofiane
Zólyomi, Levente
Smirnov, Oleg
Wang, Tianze
Pertoft, John
Cornell, Filip
Cao, Lele
author_facet Ennadir, Sofiane
Zólyomi, Levente
Smirnov, Oleg
Wang, Tianze
Pertoft, John
Cornell, Filip
Cao, Lele
contents Transformer models have become the dominant backbone for sequence modeling, leveraging self-attention to produce contextualized token representations. These are typically aggregated into fixed-size vectors via pooling operations for downstream tasks. While much of the literature has focused on attention mechanisms, the role of pooling remains underexplored despite its critical impact on model behavior. In this paper, we introduce a theoretical framework that rigorously characterizes the expressivity of Transformer-based models equipped with widely used pooling methods by deriving closed-form bounds on their representational capacity and the ability to distinguish similar inputs. Our analysis extends to different variations of attention formulations, demonstrating that these bounds hold across diverse architectural variants. We empirically evaluate pooling strategies across tasks requiring both global and local contextual understanding, spanning three major modalities: computer vision, natural language processing, and time-series analysis. Results reveal consistent trends in how pooling choices affect accuracy, sensitivity, and optimization behavior. Our findings unify theoretical and empirical perspectives, providing practical guidance for selecting or designing pooling mechanisms suited to specific tasks. This work positions pooling as a key architectural component in Transformer models and lays the foundation for more principled model design beyond attention alone.
format Preprint
id arxiv_https___arxiv_org_abs_2510_03339
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Pool Me Wisely: On the Effect of Pooling in Transformer-Based Models
Ennadir, Sofiane
Zólyomi, Levente
Smirnov, Oleg
Wang, Tianze
Pertoft, John
Cornell, Filip
Cao, Lele
Machine Learning
Artificial Intelligence
Transformer models have become the dominant backbone for sequence modeling, leveraging self-attention to produce contextualized token representations. These are typically aggregated into fixed-size vectors via pooling operations for downstream tasks. While much of the literature has focused on attention mechanisms, the role of pooling remains underexplored despite its critical impact on model behavior. In this paper, we introduce a theoretical framework that rigorously characterizes the expressivity of Transformer-based models equipped with widely used pooling methods by deriving closed-form bounds on their representational capacity and the ability to distinguish similar inputs. Our analysis extends to different variations of attention formulations, demonstrating that these bounds hold across diverse architectural variants. We empirically evaluate pooling strategies across tasks requiring both global and local contextual understanding, spanning three major modalities: computer vision, natural language processing, and time-series analysis. Results reveal consistent trends in how pooling choices affect accuracy, sensitivity, and optimization behavior. Our findings unify theoretical and empirical perspectives, providing practical guidance for selecting or designing pooling mechanisms suited to specific tasks. This work positions pooling as a key architectural component in Transformer models and lays the foundation for more principled model design beyond attention alone.
title Pool Me Wisely: On the Effect of Pooling in Transformer-Based Models
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2510.03339