hierarchical_leiden

Generic Description

A multi-level Leiden variant that exposes community structure at more than one resolution.

Simple example:

CALL nexyron.hierarchical_leiden()

Community detection procedures partition or group nodes by structural affinity. They are useful for segmentation, fraud-ring analysis, recommendation features, and exploratory graph profiling.

Consumer-Level Explanation

Use this when one flat partition is too crude and your users need both broad clusters and finer sub-clusters. Different community algorithms optimize different objectives and assumptions. Modularity methods, label propagation, block models, overlapping memberships, and partition-quality metrics should be chosen for the question, not swapped blindly.

Conceptual Explanation

Many real graphs have nested structure: enterprise divisions contain teams; interest groups contain subcultures; fraud rings contain specialized roles. Hierarchical Leiden preserves that nested shape so analysis can move from overview to drill-down without rerunning a completely different algorithm.

How It Differs From Nearby Algorithms

Compared with plain Leiden, this is for analysts who need multiple resolutions. Compared with stochastic block variants, the emphasis remains community hierarchy rather than probabilistic block interaction. Compared with overlap algorithms, a node still belongs to one branch at each level.

When To Choose It

More Detailed Explanation

This is especially valuable when the argument in the room is not whether a cluster exists, but at what scale it should be reported. The same run can support a board-level summary and an operator-level breakdown.

Advanced Example

The advanced example keeps hierarchical_leiden in a named Cypher pipeline so the procedure output shape, downstream filters, and returned columns are visible to planner tooling.

CALL nexyron.hierarchical_leiden() YIELD node_id, level, community_id, modularity
RETURN node_id, level, community_id, modularity
LIMIT 10

Real Use Cases

Real Limitations And Tradeoffs