Skip to content

jamylak/hnsw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HNSW Visual Explorer

This visualisation uses AI Generated code, finetuned for the best visualisation, not code quality

hnsw.mov

Interactive Raylib explorer for understanding hierarchical navigable small-world graphs: how the structure is built, how layer descent works, and why greedy graph routing can find strong ANN candidates quickly.

What This Visualisation Shows

  • Hierarchical layer construction and neighbor linking
  • Query descent from sparse upper layers to dense lower layers
  • Greedy graph routing and candidate refinement
  • 2D and 3D views of the graph, embeddings, and search state

Visual Map

flowchart LR
    A["Insert Points"]
    B["Assign Random Levels"]
    C["Connect Neighbors"]
    D["Upper-Layer Routing"]
    E["Lower-Layer Refinement"]
    F["Nearest Candidates"]

    A --> B
    B --> C
    C --> D
    D --> E
    E --> F
Loading

Controls

  • q: quit
  • space: pause or resume the current build/search animation
  • r: reset the current scene
  • left drag, mouse wheel, and right-click interactions are used on the embedding views as labeled in-app

Run

make run

About

HNSW VIsualiser

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors