179 questions
No questions match those filters.
Can you use a Transformer's attention weights as a meas...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansAttention weights do pass through a softmax and do sum to one, which makes it tempting to read them as a probability distribution over “where the model is looking” — and by extension, how confident it is. That reasoning conflates two different mathematical objects. Softmax output is a set of mixing coefficients used to compute a weighted average of value vectors; it’s deterministic given the input, with no sampling step anywhere in a standard forward pass. Entropy over those weights measures how concentrated the model’s attention is across tokens, not how likely the model’s final answer is to be correct. A model can attend almost entirely to one specific token and still produce a confidently wrong output — the sharp peak tells you attention was concentrated, not that the reasoning built on top of it was sound.
Treating attention entropy as a safety-relevant confidence signal is dangerous precisely because it fails silently: it looks like a principled uncertainty estimate while carrying no actual information about correctness. To get real uncertainty you need genuine stochasticity in the computation — running several forward passes with dropout left active at inference time and measuring the variance across outputs, or building a model with an explicit latent variable whose posterior variance reflects epistemic uncertainty. Either approach costs extra compute, but it measures something attention weights structurally cannot.