Skip to content

docs(graph): document synchronous LPA behavior in community detection #1267

@bug-ops

Description

@bug-ops

Context

Phase 5 Community Detection (epic #1222, issue #1228) implements label propagation for community detection.

Problem

The implementation uses synchronous (in-place) label propagation, where labels are updated immediately during iteration. This means node traversal order affects the result. Standard academic LPA uses asynchronous updates (all nodes update simultaneously based on previous iteration's labels).

The current behavior is deterministic for a given dataset and produces correct communities, but results may differ from standard LPA implementations.

Suggested Fix

Add a code comment in community.rs at the label propagation loop explaining:

  • This is synchronous (in-place) LPA, not async LPA
  • Node traversal order (insertion order from ORDER BY id ASC) affects results
  • Results are deterministic for a given dataset but may differ from academic LPA

Source

IC-SIG-01 from Phase 5 implementation critique.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions