liveBook · Manning

Probability mass function

As explained in AI-Powered Search

A probability mass function assigns probabilities to the possible values of a discrete random variable.

A probability mass function (PMF) assigns a probability to each possible value of a discrete random variable. In extractive question answering, tokens are discrete values, so a model can estimate the probability that each token starts or ends an answer span. section 14.1.1

A question-answering model uses PMFs to turn token-level scores into an answer:

  • Compute one PMF over context tokens for possible answer starts. section 14.1.1
  • Compute a second PMF over context tokens for possible answer ends. section 14.1.1
  • Choose the most likely start and end tokens to extract the answer span. section 14.1.1

Extracting an answer span

Given the question “What are minimalist shoes?” and a context describing them, the model assigns start and end probabilities across the tokenized context. Selecting the strongest boundaries produces an answer such as “shoes intended to closely approximate barefoot running conditions.” section 14.1.1

How AI-Powered Search covers it

How deep it goes
Defines PMFs, contrasts discrete and continuous values, and applies two PMFs without deriving their mathematical training.
Examples
Uses a minimalist-shoes question, tokenized context, and separate start and end probability outputs.
What it assumes
Assumes tokens can represent discrete values and teaches the PMF definition before applying it to question answering.
What you can do after
Apply it via an extractive question-answering model to select an answer span from token-level start and end probabilities.
How it connects
Connects discrete random variables, continuous probability distributions, beta distributions, tokens, and answer spans.

Also explained in

Compare how 3 books explain probability mass function →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI-Powered Search. The section links point to the parts of the book it draws on.