Rather than iterating over all possible graphs, we adopt a beam search to approximate the best graph.
for each partially constructed graph, we only consider the top-K concepts obtaining the best single-step probability (a product of the corresponding concept, arc, and relation label probability), where K is the beam size.