liveBook · Manning

Pmi2

As explained in AI-Powered Search

PMI2 is a k=2 variation of pointwise mutual information that normalizes association scores to reduce sensitivity to word-frequency differences.

PMI2 is a k=2 variation of pointwise mutual information for scoring semantic association between query terms. It compares how often two keywords are searched by the same users with how often each appears individually; higher scores indicate stronger relatedness and reduce sensitivity to frequency differences. section 6.3.1

Compute PMI2 as log(users_cooc² / (users_occ1 × users_occ2)). Build keyword–user pairs, count distinct users for each keyword and pair, then filter weak pairs such as co-occurrences at five or fewer users. PMI2 can still amplify sparse noise, so combining it with co-occurrence ranking provides a practical compromise. section 6.3.1

Query-log associations

Pairs such as “kenwood” and “alpine” or “green lantern” and “captain america” receive useful association scores, while “wireless mouse” and “godfather” illustrates noise from sparse co-occurrence.

How AI-Powered Search covers it

How deep it goes
Explains user-based counts, the SQL formula, filtering, ranking, and sparse-data noise, but not statistical derivation.
Examples
Uses electronics, entertainment, and product-query pairs, including both meaningful associations and sparse-data noise.
What it assumes
Assumes query logs with user identifiers and teaches occurrence and co-occurrence counts before calculating PMI2.
What you can do after
Apply it via SQL to rank related query pairs and combine the result with co-occurrence ranking.
How it connects
Connects pointwise mutual information, query logs, co-occurrence counts, and composite ranking.

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.