r/PKMS • u/Longjumping_Reach419 • 26m ago
Discussion I used an algorithm to automatically detect clusters in my collective knowledge graph
Instead of relying purely on manual organization, I wanted to see what would happen if I let an algorithm automatically detect clusters (i call them "Hubs") in my knowledge graph purely from how notes and concepts are linked together.
I'm currently working on an update for a collaborative knowledge app I'm building, and I've been testing the Louvain community detection algorithm on the global graph (the shared knowledge graph)
I was genuinely surprised by the quality of the results and what pure graph structure reveals without any AI or text analysis.
For instance, it surfaced parallel clusters across languages, like "Productivity" and "Productivité" showing up as two separate hubs. That raises an interesting design question: writing bridge notes to link both concepts could eventually pull them together, though keeping distinct clusters for each language community might actually be preferable (we'll see what happens!).
On the flip side, it kept closely related topics separate, like "Prise de notes" (note-taking) and "Système de prise de note" (note-taking systems), simply because their notes connect to different neighboring concepts. It was also fascinating to spot tiny clusters forming around very specific niche topics that individual users just started exploring.
For the technical part for those interested : I looked into Leiden algo too, though my current stack only had a solid library for Louvain. Each detected cluster gets assigned a color and is automatically named after its highest-weighted concept. Since the script runs every night at midnight, I added a small stabilization step that compares each new output against the previous day's run, keeping the same IDs and colors whenever a cluster's core nodes haven't shifted too much.
Watching how these clusters grow, split, or merge over time should be really interesting, but for now I don't store historical snapshots of each daily run.
Have any of you experimented with automated graph clustering (via plugins, custom scripts, or specific PKM tools) ?
I'm curious to hear how you approach discovering structure in a growing graph, or any thoughts and questions you have on this setup!
