AIToday
Large Language ModelsQiita 機械学習Published: Oct 18, 2026, 22:00 JST

Pooling vs output query: choosing how models form predictions

Pooling vs output query: choosing how models form predictions

3 Key Points

  1. What happened

    Three designs for turning encoded inputs into predictions: pooling all inputs into one shared vector, applying a shared head to each input element, and using output queries with cross-attention. It notes these differ mainly in where each output gathers its information.

  2. Why it matters

    Designers can pick a starting point by output meaning — whole-input predictions suit pooling, per-element predictions suit shared heads, and outputs at a different unit than inputs may need output queries. Output queries do not automatically beat the other options; ease of training and compute cost also need comparing.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

This sits between two earlier discussions: how outputs depend on each other (parallel versus sequential generation) and how variable-length inputs are represented (aggregated features or entity tokens). Its focus is the layer in between — how an encoded set of representations H=(h_1,...,h_n) is converted into predictions.

It separates the unit of input from the unit of output. A model may predict one property for an entire input, a prediction per input element, or predictions for a separate set of output slots that need not match the input tokens one-to-one. The three designs map onto these cases, and increasing input tokens does not force a matching number of outputs.

Exchanging information among output queries is distinct from autoregressive conditioning. With query self-attention but independent sampling per output, the joint distribution factorizes as a product of per-output distributions given the input. Autoregressive generation instead conditions each output on previously chosen outputs, a separate design axis from how representations are read out.

FAQ
Does using output queries always improve performance?
No. Adding queries does not guarantee higher performance, and training ease and computational cost must also be compared.
What is the computational cost of output queries?
With n inputs and K queries, the cross-attention part is O(Kn) and self-attention among queries is O(K^2), assuming a fixed embedding dimension.
How does PMA relate to attention pooling and output queries?
PMA from Set Transformer uses learnable seed vectors as queries. With one seed it acts as attention pooling; with multiple seeds it produces multiple output-side representations.
Qiita 機械学習Read Original Article

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleDiffusion models: why restoration-like training still generates new images