Pool Me Wisely: On the Effect of Pooling in Transformer-Based Models
This work addresses the problem of selecting pooling mechanisms for Transformer-based models in various domains, providing practical guidance for model design, though it is incremental as it builds on existing attention-focused research.
The paper tackles the underexplored role of pooling in Transformer models by introducing a theoretical framework that derives closed-form bounds on representational capacity and empirically evaluates pooling strategies across computer vision, natural language processing, and time-series analysis tasks, revealing consistent trends in accuracy, sensitivity, and optimization behavior.
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.