Skip to content

Search old graphs during HNSW merging new graph building #15504

@benwtrent

Description

@benwtrent

Description

When merging HNSW indexed segments, we attempt to improve the incremental nature of HNSW's indexing algorithm by re-using already calculated statistics.

This includes:

  • Utilizing the biggest graph (after repairing deletes)
  • Optimizing the entry points for smaller graph merging (MergingHnswGraphBuilder)

However, we still ultimately do incremental building of the graph. I think another good optimization would be to reuse the previously calculated graphs to further augment our bulk building of HNSW graphs.

The idea is as follows. When gathering the potential connections for a given node, instead of only searching the NEW graph (or the largest one), every graph is searched directly.

This is means:

  • Nodes no longer need to worry about backlinks as ALL nodes were considered on indexing
  • It makes parallel building even faster as backlinks aren't required and all existing graphs can be searched in parallel

This idea should be applicable even to the MergingHnswGraphBuilder.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions