To get node marginals for hierarchical partitions; you need to project higher levels onto the lowest level and then calculate the marginals for each level separately. The PartitionModeState().get_marginal(g) function only returns marginals for level 0; so consider extending it / creating a new function to handle hierarchical projections.
Projecting is not a good idea, since the marginals are obtained over a different node set.
The problem is that in a set of hierarchical partitions the set of nodes at a given level is varying, and a node that is not present does not belong to any group. So, the proper definition of a marginal probability of a hierarchical partition would be: whenever a node (group) exists at a given level, with which probability does it belongs to a given group? This can be obtained easily by first obtaining the hierarchical consensus, and then aligning every partition in the set with it, and then computing the marginals as described.
This is not yet implemented in graph-tool. Please open a feature request issue in gitlab, and I will implement it in a future release.
The paper linked above has nothing to do whatsoever with SBMs or the calculation of node marginals.