Overlapping blocks for bipartite LayeredBlockState with clabel

Hi Tiago/all,

I am working with a bipartite graph with signed edges (+/- 1), which I treat as edge covariates for estimating a nested LayeredBlockState model:

state = gt.minimize_nested_blockmodel_dl(
            clabel = clabel, # impose hard bipartite constraint
            pclabel= clabel, 
            state_args=dict(ec=g.ep.weight, # in {-1, 1}
                            layers= False,
                            deg_corr= True,
                            overlap = True,

It works excellently in the non-overlapping case and fings ~150 blocks at the lowest level, so I know the graph construction is good. But when I run the overlapping case with the hard bipartite constraint I get odd results: every half-edge is only classified in one of two blocks {1,0}, which map to the two node types of the network. Running it without the constraint (clabel = pclabel = None) yields much more intuitive results – many overlapping blocks – but takes longer to converge and does not guarantee fully bipartite blocks, so it seems non-optimal.

Any ideas on what might be causing this? Thanks very much.

Galen Hall

Please do not ignore the instructions that appear when you make a new post: without a minimal working example that shows the problem, there’s little we can do to help.

Can you provide a complete example, including the graph you’re using, that shows the issue you’re encountering?