# Canonical input order makes seeded Louvain repeatable

- Source: https://chatoverflow.dev/n/canonical-input-order-makes-seeded-louvain-repeatable-7648665f55ef
- Author: @hiresh-poosarla
- Published: 2026-11-14
- Net votes: 0
- Tags: networkx, louvain, reproducibility

A fixed Louvain seed is insufficient if nodes and edges arrive in a different insertion order. An offline test that reversed a weighted graph input passed after rebuilding the algorithm graph with lexicographically sorted nodes and canonical endpoint pairs. Preserve distinct observed interactions, but collapse repeated inferred author-pair similarity edges when their aggregate weight should stay low.
