Information Retrieval · Ranking

Static Rank Priors and Their Effect on Ranking

How document-level signals that ignore the query accumulate into a prior, how that prior is combined with query-dependent scores, and why it can dominate a weak match.

Every query-dependent score answers a question about a specific pairing of query and document. A static signal answers a question about the document alone: how many independent sources link to it, how long it has existed, whether it is a landing page or an article, whether its host has a history of serving content that survives. These signals do not change between queries, which makes them cheap: they can be computed once, offline, and stored alongside the document. It also makes them dangerous, because a term that is constant across queries can quietly decide the ordering of documents whose query-dependent scores are nearly equal.

Why a query-independent signal belongs in ranking at all

The argument for including static rank is an argument about sufficiency of the query match. Two documents both mention “linear regression” ten times in similar-length bodies. BM25 cannot separate them, because it only sees the match. A human would separate them on the grounds that one is a statistics course page and the other is a page about a software package that happens to mention the phrase in a changelog. That distinction is not visible in term statistics; it is visible in what links to the page, what the page links to, and what the page’s surroundings look like.

Link analysis is the classical member of this family. PageRank models a random walk over the link graph: with probability $d$ the walker follows a random outlink, and with probability $1-d$ it jumps to a uniformly chosen page. The stationary distribution of that walk assigns each page a score proportional to the probability of being at it.

$$PR(p) = \frac{1-d}{N} + d \sum_{q \to p} \frac{PR(q)}{L(q)}$$

where $L(q)$ is the number of outlinks from $q$. The damping factor $d$ is conventionally 0.85, which is worth pausing on: it means the walker follows links 85 percent of the time, so the influence of any single page decays as roughly $0.85^{\text{path length}}$ and a chain of ten links contributes about 20 percent of the original weight. The constant is what makes the computation converge in a manageable number of iterations and what limits the reach of distant link chains.

The computation is a fixed point, and the fixed point is the point

PageRank is defined as the stationary distribution of the walk, which means the score of a page depends on the scores of the pages linking to it, which depend on theirs. The practical consequence is that the graph must be iterated to convergence, not evaluated in one pass over the link list.

Power iteration is the standard method: initialize all scores equally, apply the update repeatedly, and stop when the largest change falls below a threshold. Convergence rate is governed by the damping factor: the error shrinks by a factor related to $d$ each iteration, so $d = 0.85$ needs on the order of a hundred iterations for high precision while $d = 0.5$ converges much faster. That is an axis of trade: smaller $d$ is cheaper and more local, larger $d$ gives more weight to distant structure and costs more iterations.

def pagerank(edges, n, damping=0.85, tol=1e-8, max_iter=100):
    out = [[] for _ in range(n)]
    for src, dst in edges:
        out[src].append(dst)
    pr = [1.0 / n] * n
    for _ in range(max_iter):
        new = [(1.0 - damping) / n] * n
        dangling = sum(pr[i] for i in range(n) if not out[i])
        # dangling mass is redistributed uniformly
        for i in range(n):
            share = damping * pr[i] / len(out[i]) if out[i] else 0.0
            for j in out[i]:
                new[j] += share
        for i in range(n):
            new[i] += damping * dangling / n
        if max(abs(a - b) for a, b in zip(new, pr)) < tol:
            return new
        pr = new
    return pr

Dangling nodes, pages with no outlinks, are not an edge case to be handled lazily. In a web graph they are common, and if their mass is not redistributed, the total score leaks away over iterations and the vector no longer sums to one. The redistribution policy is a modeling decision: uniform redistribution is the standard, but it treats the dangling set as if it were a random sample of the graph, which it is not.

Hubs, authorities, and why the second eigenvector matters

PageRank assigns one score per page. Kleinberg’s HITS assigns two: a hub score, high for pages that link to good authorities, and an authority score, high for pages that good hubs link to. The scores are the principal eigenvectors of $A^TA$ and $AA^T$ respectively, where $A$ is the adjacency matrix.

The difference matters for ranking. A directory page that links to fifty good resources has high hub score but low PageRank relative to the resources; an authority has high PageRank. If the intent is “find the best page about X”, the authority score is the right one. If the intent is “find a page that collects resources about X”, the hub score is.

HITS is computed over a query-specific neighborhood graph, consisting of pages matching the query plus their in- and out-neighbours, which makes it query-dependent rather than static. That is both its strength, since it adapts to the topic, and its weakness, since the graph changes per query and the computation does not amortize. PageRank’s query-independence is what makes it a usable prior at web scale.

How a prior enters the ordering without erasing the match

The naive combination is multiplication: final score equals query score times prior raised to some exponent. That is defensible if both quantities are probabilities of the same event, which they are not. BM25 is not a probability and PageRank’s stationary value is a probability of being at a page during a random walk, not a probability of relevance. Multiplying them produces a number with no interpretation.

The common arrangement is additive in a log domain, or a weighted sum after each component is mapped to a comparable scale. If the query score is $s_q$ and the prior is $p$, a ranker might compute $\alpha \log s_q + \beta \log p$ and then order by the result. The ratio $\beta/\alpha$ controls how much a strong prior can compensate for a weak match, and that ratio is the knob that determines whether the system behaves like a relevance engine or like a popularity engine.

A multiplicative form is the special case that makes the trade-off explicit: $s_q \cdot p^\gamma$. As $\gamma$ grows, the prior dominates and the ordering becomes mostly query-independent, with the query score acting as a tiebreaker among equally popular documents. At $\gamma = 0$ the prior vanishes. There is no universally correct $\gamma$; it depends on how much of the collection is genuinely relevant to a typical query, which is a property of the corpus and the query mix rather than of the scoring function.

The failure modes a prior introduces

The first is topic insensitivity. A globally high prior applies to every query. A large, heavily linked homepage will be pushed upward for queries it has nothing to do with, because its prior survives when the match is weak. The usual mitigation is to condition the prior on the query’s topic rather than using a single global value, which turns the static prior into a set of per-topic priors and increases storage by the number of topics.

The second is manipulation. Any signal computed from content that authors control is a signal authors will optimize for. Link-based scores are vulnerable to link farms, reciprocal link rings, and purchased links; the classical defenses involve discounting links from pages with few outlinks, from pages whose link targets are unrelated to their own content, and from clusters that link to each other disproportionately. Each defense is itself a heuristic, and each cost is a false positive on legitimate link structures, such as a documentation site linking to related projects.

The third is staleness. A prior computed offline on a graph snapshot is wrong as soon as the graph changes. A new page has no links and therefore the minimum prior, which means newly created good content is unrankable until it accumulates links. This is the cold-start problem, and it is why fresh-content signals are usually computed separately and allowed to override the prior for a bounded period.

The fourth is that the prior’s magnitude depends on the graph’s size and connectivity in a way that does not normalize away. Scores are a probability distribution summing to one, so adding a million pages lowers every existing page’s score. Comparisons across graph snapshots require renormalizing, and a system that stores absolute PageRank values and compares them across snapshots will see spurious drift.

Link analysis is the visible member of the family, but most static rank in a mature system comes from cheaper, less glamorous signals.

Document-level quality classifiers assign a score to the document’s content independent of the query: the proportion of the page that is boilerplate, the presence of a clear title structure, the ratio of navigation elements to prose. These are computed by a model over the document’s features and stored as a number.

Engagement aggregates, where available, are another: an aggregate click-through rate over a long window for a document across many queries is a query-independent measurement of whether people found the document useful. It is not a pure prior, since it is conditioned on the fact that the document was shown, so it carries the position bias described in Click Features and Position Bias. Treating it as though it were query-independent is a common source of feedback loops, where a document that ranks high gets clicks and its high engagement keeps it ranking high.

Host-level and site-level aggregates are a middle ground: a signal per host, inherited by its pages. This reduces the sparsity problem, since a host accumulates far more observations than any single page, at the cost of not distinguishing a good page on a mediocre host.

Where the prior stops being a prior

The clean conceptual boundary is that a prior is a distribution over documents that does not depend on the query. In practice, the boundary erodes. A prior computed per query class is query-dependent. A prior computed from the query’s own history, such as how often a document was clicked for similar queries, is query-dependent and circular. And a prior that is itself the output of a model trained on relevance labels is a ranker, not a prior.

Keeping the distinction matters because the two have different evaluation stories. A static prior can be evaluated on its own by checking whether it orders documents correctly within a topic-independent sample. A learned ranker must be evaluated end to end. Mixing them makes it impossible to attribute a ranking regression to either component, which is why systems that carry both usually keep them as separate features with separate names rather than collapsing them into one score. The feature pipeline that would hold them separately is the subject of Query-Document Feature Extraction.

References

  1. The PageRank Citation Ranking: Bringing Order to the Web — Page, Brin, Motwani & Winograd, Stanford InfoLab Technical Report, 1999
  2. The Anatomy of a Large-Scale Hypertextual Web Search Engine — Brin & Page, Computer Networks, 1998
  3. Authoritative Sources in a Hyperlinked Environment — Kleinberg, Journal of the ACM, 1999