Comparative Analysis of Pooling Mechanisms in LLMs: A Sentiment Analysis Perspective

Jinming Xing, Dongwen Luo, Chang Xue, Ruilin Xing
11/22/2024
cs.CLcs.AI

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

Abstract

Large Language Models (LLMs) have revolutionized natural language processing (NLP) by delivering state-of-the-art performance across a variety of tasks. Among these, Transformer-based models like BERT and GPT rely on pooling layers to aggregate token-level embeddings into sentence-level representations. Common pooling mechanisms such as Mean, Max, and Weighted Sum play a pivotal role in this aggregation process. Despite their widespread use, the comparative performance of these strategies on different LLM architectures remains underexplored. To address this gap, this paper investigates the effects of these pooling mechanisms on two prominent LLM families -- BERT and GPT, in the context of sentence-level sentiment analysis. Comprehensive experiments reveal that each pooling mechanism exhibits unique strengths and weaknesses depending on the task's specific requirements. Our findings underline the importance of selecting pooling methods tailored to the demands of particular applications, prompting a re-evaluation of common assumptions regarding pooling operations. By offering actionable insights, this study contributes to the optimization of LLM-based models for downstream tasks.

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!

Cite this paper

@article{xing2024comparative,
  title  = {Comparative Analysis of Pooling Mechanisms in LLMs: A Sentiment Analysis Perspective},
  author = {Jinming Xing and Dongwen Luo and Chang Xue and Ruilin Xing},
  year   = {2024},
  eprint = {2411.14654},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.14654v3}
}

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

Discussion