{"id":191,"date":"2026-11-13T12:34:05","date_gmt":"2026-11-13T04:34:05","guid":{"rendered":"https:\/\/hoho.live\/luda\/index.php\/2026\/11\/13\/how-hits-scores-hubs-and-authorities\/"},"modified":"2026-11-13T21:52:14","modified_gmt":"2026-11-13T13:52:14","slug":"how-hits-scores-hubs-and-authorities","status":"publish","type":"post","link":"https:\/\/hoho.live\/luda\/index.php\/2026\/11\/13\/how-hits-scores-hubs-and-authorities\/","title":{"rendered":"How HITS scores hubs and authorities"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Short answer:<\/strong> <strong>HITS<\/strong> gives every page two scores. The <strong>authority<\/strong> score is the sum of the hub scores of pages that link to it. The <strong>hub<\/strong> score is the sum of the authority scores of pages it links to. Iterating those two sums and normalizing is power iteration on A transpose A and on A A transpose, where A is the adjacency matrix of a directed link graph. Kleinberg computed it on a query neighborhood, not as a single ranking of the whole web. <strong>PageRank<\/strong> is a different one-score walk.<\/p>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n<h4 class=\"wp-block-heading\"><strong>What the problem actually asks<\/strong><\/h4>\n\n<p class=\"wp-block-paragraph\">A page can be useful because other careful pages point to it, and a page can be useful because it points to useful pages. Those two roles support each other. Writing them as a pair of vectors turns the definition into an eigenvector. On a query, the graph is the set of pages that match the query, expanded by pages that link to them or that they link to. The scores are relative to that neighborhood.<\/p>\n\n\n<p class=\"wp-block-paragraph\">A single global walk with a teleport, PageRank, answers a different question. It has one score per page and a damping term that makes the stationary distribution unique. HITS has no teleport. Its uniqueness depends on the spectral gap of A transpose A.<\/p>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n<h4 class=\"wp-block-heading\"><strong>What the algorithm guarantees<\/strong><\/h4>\n\n<p class=\"wp-block-paragraph\">If the largest eigenvalue of A transpose A is simple, repeated multiplication and normalization converge to the corresponding positive principal direction, up to sign, from a generic start. Each iteration is a sparse multiply by A and by A transpose, linear in the number of edges of the neighborhood. Extra memory is two score vectors. The usual normalization is the Euclidean norm after each half-step, so the vectors stay unit length.<\/p>\n\n\n<p class=\"wp-block-paragraph\">A repeated principal eigenvalue means more than one direction fits, and the limit can depend on the starting vector. A tightly linked community inside the neighborhood can capture both vectors even when the community is off the query&#8217;s topic. That capture is a property of the neighborhood graph, and shrinking or reweighting the neighborhood is part of using the algorithm on a real query.<\/p>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n<h4 class=\"wp-block-heading\"><strong>The working steps<\/strong><\/h4>\n\n<ol class=\"wp-block-list\">\n<li>Build the directed adjacency matrix A of the query neighborhood.<\/li>\n<li>Start the hub vector at a positive vector and normalize it.<\/li>\n<li>Replace the authority vector by A transpose times the hub vector, and normalize. Replace the hub vector by A times the authority vector, and normalize.<\/li>\n<li>Repeat until the angular change falls below a tolerance.<\/li>\n<li>Read the largest entries of the authority vector as the authoritative pages and the largest entries of the hub vector as the directories.<\/li>\n<\/ol>\n\n\n<p class=\"wp-block-paragraph\">Convergence to a unique pair of rankings needs a simple principal eigenvalue. PageRank is the damped single-vector walk. HITS is the hub and authority iteration on a link neighborhood.<\/p>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n<h4 class=\"wp-block-heading\"><strong>Approaches that look simpler and fail<\/strong><\/h4>\n\n<figure class=\"wp-block-table\">\n<table>\n<thead>\n<tr>\n<th>Approach<\/th>\n<th>Why it fails when the two updates are collapsed into one sum<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Set one score to the sum of the in-neighbors&#8217; scores and stop<\/td>\n<td>That is one step of a walk. HITS alternates in-links and out-links so hubs and authorities reinforce each other.<\/td>\n<\/tr>\n<tr>\n<td>Skip normalization<\/td>\n<td>The entries grow like the principal eigenvalue to the power of the iteration count. The ranking may survive and the numbers overflow.<\/td>\n<\/tr>\n<tr>\n<td>Run the iteration on a different graph than the query neighborhood and expect query-specific authorities<\/td>\n<td>The principal vector ranks the graph it is given. A whole-web matrix answers a different query.<\/td>\n<\/tr>\n<tr>\n<td>Treat a tie in the top eigenvalue as a rounding error<\/td>\n<td>A multiple eigenvalue is a real split in the model. Two runs can then emphasize different communities.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n<p class=\"wp-block-paragraph\">A damped stationary distribution is PageRank. The matrix iteration underneath HITS is power iteration. HITS is the paired hub and authority score.<\/p>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n<h4 class=\"wp-block-heading\"><strong>A working example<\/strong><\/h4>\n\n<p class=\"wp-block-paragraph\">This Python fragment alternates authority and hub scores and normalizes after each half-step. Vertex 1 points at vertex 0, so 0 is the authority and 1 is the hub. It prints the authority scores <code>1.00 0.00<\/code>.<\/p>\n\n<pre><code class=\"language-python\"># adjacency A[u][v] = 1 if u links to v\nA = [[0, 0], [1, 0]]\nhub = [1.0, 1.0]\nfor _ in range(10):\n    auth = [0.0, 0.0]\n    for u in range(2):\n        for v in range(2):\n            auth[v] += A[u][v] * hub[u]\n    norm = sum(x * x for x in auth) ** 0.5 or 1\n    auth = [x \/ norm for x in auth]\n    hub = [0.0, 0.0]\n    for u in range(2):\n        for v in range(2):\n            hub[u] += A[u][v] * auth[v]\n    norm = sum(x * x for x in hub) ** 0.5 or 1\n    hub = [x \/ norm for x in hub]\nassert auth[0] &gt; 0.9 and auth[1] &lt; 0.1\nprint(f&quot;{auth[0]:.2f}&quot;, f&quot;{auth[1]:.2f}&quot;)\n<\/code><\/pre>\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n<h4 class=\"wp-block-heading\"><strong>Where it is used<\/strong><\/h4>\n\n<p class=\"wp-block-paragraph\">HITS scores hubs and authorities on a link graph. It was the web-search alternative to PageRank and is still used in bibliometrics. <strong>PageRank<\/strong> is the damped walk that search engines shipped. The two scores answer different questions about the same links.<\/p>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n<h4 class=\"wp-block-heading\"><strong>When you can drop this algorithm<\/strong><\/h4>\n\n<p class=\"wp-block-paragraph\">Drop HITS when a single global importance score with a unique stationary distribution is the goal. Use PageRank. Keep HITS when a query neighborhood should yield both directories and the pages they agree on.<\/p>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n<h4 class=\"wp-block-heading\"><strong>Why this stays published<\/strong><\/h4>\n\n<p class=\"wp-block-paragraph\">We publish this so a search for HITS returns the alternating hub and authority updates and the eigenvector they compute. <strong>HITS ranks a link neighborhood by alternating hub and authority sums, which is power iteration for the principal vectors of A A transpose and A transpose A.<\/strong><\/p>\n\n\n<p class=\"wp-block-paragraph\">\u672c\u6587\u7531 HoHo \u8207 AI \u5354\u4f5c\u6574\u7406\uff0c\u6700\u5f8c\u66f4\u65b0\u65bc 2026 \u5e74 11 \u6708 13 \u65e5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Short answer: HITS gives every page two scores. The authority score is the sum of the hub scores of pages that link to it. The hub score is the sum of the authority scores of pages it links to. Iterating those two sums and normalizing is power iteration on&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,32],"tags":[],"class_list":["post-191","post","type-post","status-publish","format-standard","hentry","category-algorithms","category-graphs"],"_links":{"self":[{"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/posts\/191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/comments?post=191"}],"version-history":[{"count":2,"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/posts\/191\/revisions"}],"predecessor-version":[{"id":590,"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/posts\/191\/revisions\/590"}],"wp:attachment":[{"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/media?parent=191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/categories?post=191"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hoho.live\/luda\/index.php\/wp-json\/wp\/v2\/tags?post=191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}