nested_stochastic_block_partition

Generic Description

A hierarchical block-model procedure that reveals structural roles at multiple levels.

Simple example:

CALL nexyron.nested_stochastic_block_partition()

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 role structure itself is hierarchical, such as sectors that contain sub-roles or domains that contain operational subdomains. 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

Just as hierarchical Leiden gives you community levels, nested block partition gives you levels of structural roles. This is valuable when the graph contains layered organization rather than one clean role taxonomy.

How It Differs From Nearby Algorithms

Compared with flat stochastic block partition, this reveals several block layers. Compared with hierarchical Leiden, the hierarchy is about connection patterns and roles, not dense communities. Compared with degree-corrected nested block partition, it does not explicitly compensate for degree heterogeneity in the same way.

When To Choose It

More Detailed Explanation

Nested block structure is useful when analysts need to say both “these are the main role families” and “inside that family, these are the sub-roles.”

In practical queries, start by deciding the row grain you want after the call: one row per node, one row per path, one row per registry object, one row per artifact, or one row per summary. Then keep that grain explicit with YIELD and named projections. That is the difference between a useful planner-facing example and a vague call that downstream tooling cannot safely compose. For contract-driven procedures, the executable examples on these pages intentionally inspect procedure metadata unless the required named artifacts are created in the same example.

Advanced Example

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

CALL nexyron.nested_stochastic_block_partition() YIELD node_id, level, block_id, description_length
RETURN node_id, level, block_id, description_length
LIMIT 10

Real Use Cases

Real Limitations And Tradeoffs