Repository navigation
Authority values do not match authority values from other packages #2211
Description
Activity
- changed the title
[-]Authority values does not match authority values from other packages[/-][+]Authority values do not match authority values from other packages[/+]on Sep 10, 2020 A few remarks on @kaetze66 post:
- The exact paper used for our implementation is this one: https://www.cs.cornell.edu/home/kleinber/auth.pdf (FYI). NetworkX states the same reference.
- The square authority of line ~192 is not (or not alone) the cause of the discrepancy, as changing it gives results that are different from both the squared version and the iGraph/NX versions.
- I believe the line ~192 they mention is the following: https://github.com/gephi/gephi/blob/0.9.8/modules/StatisticsPlugin/src/main/java/org/gephi/statistics/plugin/Hits.java#L195 It corresponds to Kleinberg statement that "We maintain the invariant that the weights of each type are normalized so their
squares sum to 1" and seems correct to me. - I merged the two files into a GEXF for convenience. I checked that the Gephi version of their file is also what I obtain. Attached (zipped). _benchmark_HITS.zip
- I did not re-run the benchmark in NX or iGraph at this stage
- I observe inconsistent results in @kaetze66's file, that make me wonder if iGraph/NX use the same version of the algorithm. Example: node 817 has a single link, an inbound link from node 1781. Node 1781 is well embedded in the structure, having many inbound and outbound links (see image below). I expect node 1781 to have a non-null Hub score. Per Kleinberg's algorithm, node 817 should then have a non-null Auth score. Gephi's version of HITS indeed is non-null. Yet the Auth score is null in iGraph/NX. Why would it be?
The case requires further investigation into iGraph and NetworkX.
The reason for the difference is that the igraph results took weights into account, the Gephi results did not. If you recompute the measures without weights in igraph, you'll get very similar results to Gephi. The remaining difference is due to the low default precision used by Gephi (around
$10^{-4}$ ), but this can be increased.The case requires further investigation into iGraph and NetworkX.
igraph uses the standard mathematical definition as the leading eigenvectors of
$AA^T$ and$A^TA$ . More details at https://igraph.org/c/html/latest/igraph-Structural.html#igraph_hub_and_authority_scoresReacted by Mathieu Bastian- added a commit that references this issue
on Mar 14, 2026 Closing as the implementation is correct, but missing the "weighted" case. Thanks @szhorvat for the insight!
Expected Behavior
Authority values for nodes should match those of other packages or reasons for different calculation should be documented
Current Behavior
The authority values calculated for nodes in Gephi do not match those calculated in networkx and igraph (tested with those two). The authority values should be identical or if for some reason another algorithm is used, then this difference should be made clear. This is in relation to issue #620 where some fix was made but the results still don't match.
Possible Solution
My guess is that the issue is with line 192 in StatisticsPlugin/src/main/java/org/gephi/statistics/plugin/Hits.java. I'm not sure why the auth value is squared. This would be in line with the fact that the distribution of gephi authority values is flatter than those of other packages. However, the problem is not only the normalization because the order of nodes also changes between packages (s. attached file auth_comp_gephi.xlsx)
Steps to Reproduce
Attachments:
Edge file that was used to calculate the scores
Auth_comp file with the resulting Authority scores from different packages
Context
This issue makes HITS calculated in gephi not reproducible in other packages
Your Environment
edge_file_gephi.xlsx
auth_comp_gephi.xlsx