Composite Edge Weighting for Leiden Community Detection in a GraphRAG-Style Knowledge Graph: Frequency, Relationship Strength and Semantic Similarity

Graph-based Retrieval-Augmented Generation (GraphRAG) organizes a corpus as a knowledge graph of entities and relationships, partitions it into communities with the Leiden algorithm, and summarizes each community to answer corpus-level questions. The partition depends on the edge weights supplied to the clustering step, yet the weighting scheme is usually a single heuristic, namely the sum of LLM-assigned relationship strengths. This paper presents a reproducible experimental framework that compares edge-weighting signals for Leiden community detection. Three normalized features are derived for each edge: a log-normalized distinct-evidence frequency (F), a normalized mean LLM relationship strength (S), and an embedding-based similarity of the endpoint entity descriptions (C). Nine weighting variants are evaluated: a sum-of-strengths baseline, three single-feature weights, a frequency-plus-strength weight, the proposed composite W = 0.4F + 0.4S + 0.2C, and three leave-one-component-out ablations. The pipeline uses a locally hosted LLM (Qwen2.5-3B via Ollama) for evidence-grounded extraction, sentence-transformer embeddings (all- MiniLM-L6-v2), and weighted Leiden clustering with controlled seeds, and it reports NMI, ARI, seed stability, singleton share, connectivity and weighted modularity. A Streamlit dashboard exposes the same weighting logic for interactive, query-time exploration. On a small synthetic institutional-policy corpus (16 graph nodes, 14 undirected edges), all nine variants yielded the identical partition (3 communities, NMI = 0.901, ARI = 0.789, seed-stability ARI = 1.0); only the weighted modularity diagnostic differed, within a range of 0.0058. We trace this result to a lack of signal diversity in the graph: every edge had exactly one evidence instance, so F was constant, and S and C varied only narrowly. We therefore report no evidence that the composite weighting improves community quality at this scale, and we discuss the conditions under which the comparison becomes informative.

Authors

Publication Details

Journal
Preprints.org
Published
2026-11-13
DOI
https://doi.org/10.20944/preprints202611.1401.v1
Primary Topic
Topic Modeling
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Composite Edge Weighting for Leiden Community Detection in a GraphRAG-Style Knowledge Graph: Frequency, Relationship Strength and Semantic Similarity

Bhuvanesh D, Akash Kumar A
1 links
Preprints.org
Topic Modeling
preprint

Composite Edge Weighting for Leiden Community Detection in a GraphRAG-Style Knowledge Graph: Frequency, Relationship Strength and Semantic Similarity

Bhuvanesh D, Akash Kumar A
preprint en

Abstract

Graph-based Retrieval-Augmented Generation (GraphRAG) organizes a corpus as a knowledge graph of entities and relationships, partitions it into communities with the Leiden algorithm, and summarizes each community to answer corpus-level questions. The partition depends on the edge weights supplied to the clustering step, yet the weighting scheme is usually a single heuristic, namely the sum of LLM-assigned relationship strengths. This paper presents a reproducible experimental framework that compares edge-weighting signals for Leiden community detection. Three normalized features are derived for each edge: a log-normalized distinct-evidence frequency (F), a normalized mean LLM relationship strength (S), and an embedding-based similarity of the endpoint entity descriptions (C). Nine weighting variants are evaluated: a sum-of-strengths baseline, three single-feature weights, a frequency-plus-strength weight, the proposed composite W = 0.4F + 0.4S + 0.2C, and three leave-one-component-out ablations. The pipeline uses a locally hosted LLM (Qwen2.5-3B via Ollama) for evidence-grounded extraction, sentence-transformer embeddings (all- MiniLM-L6-v2), and weighted Leiden clustering with controlled seeds, and it reports NMI, ARI, seed stability, singleton share, connectivity and weighted modularity. A Streamlit dashboard exposes the same weighting logic for interactive, query-time exploration. On a small synthetic institutional-policy corpus (16 graph nodes, 14 undirected edges), all nine variants yielded the identical partition (3 communities, NMI = 0.901, ARI = 0.789, seed-stability ARI = 1.0); only the weighted modularity diagnostic differed, within a range of 0.0058. We trace this result to a lack of signal diversity in the graph: every edge had exactly one evidence instance, so F was constant, and S and C varied only narrowly. We therefore report no evidence that the composite weighting improves community quality at this scale, and we discuss the conditions under which the comparison becomes informative.

Preprints.org
Topic Modeling
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon