Pooling a Text

Comparing whole sentences often requires one vector per sentence. Pooling combines their token vectors into a fixed-size representation, but the choice of combination determines which details we can still recover.

14 sections · 14 questions · 3 coding challenges

1 / 14

How Much Can We Learn from a Simple Summary of the Words?

BOTIE

Texts have different lengths, while many downstream models expect a fixed number of inputs. Before building a complicated sequence model, we can ask whether a simple summary of the token vectors already captures enough for our task.

Iyyer and colleagues' 2015 work on deep averaging networks showed that unordered combinations of word embeddings could support effective text classification. It provided a practical reminder that modelling detailed syntax is not necessary for every useful baseline.

Mean pooling averages the available vectors, sum pooling accumulates them, and max pooling keeps the largest value in each coordinate. Each produces a fixed-size representation while retaining different information about length and repeated evidence. Ignoring order can work for some broad topics, but it can also confuse statements whose meanings depend on who did what or where a negation appeared.

Sources for this history