Skip to content

Authority values do not match authority values from other packages #2211

Description

@kaetze66

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

  1. Load attached edges file and calculate HITS in gephi
  2. Calculate HITS in another package of choice
  3. Compare values for Authority and Hubs (I also attached a file documenting the differences)

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

  • Version used: Gephi 0.9.2
  • Java version: 1.8.0_261
  • Operating System: Ubuntu 20.04

edge_file_gephi.xlsx
auth_comp_gephi.xlsx

Activity

  1. 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
  2. self-assigned this
    on Sep 16, 2020
  3. added this to the 0.9.3 milestone on Sep 16, 2020
  4. modified the milestones: 0.9.3, 0.9.4 on Mar 1, 2022
  5. modified the milestones: 0.9.4, 0.10.0 on Apr 11, 2022
  6. jacomyma commented on Jan 2, 2023

    @jacomyma
    Member

    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?
      image

    The case requires further investigation into iGraph and NetworkX.

  7. modified the milestones: 0.10.0, 0.11.0 on Jan 17, 2023
  8. szhorvat commented on Apr 26, 2024

    @szhorvat

    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_scores

  9. added a commit that references this issue on Mar 14, 2026
  10. mbastian commented on Mar 14, 2026

    @mbastian
    Member

    Closing as the implementation is correct, but missing the "weighted" case. Thanks @szhorvat for the insight!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions