First, the subgraph S to be replaced has to be identified in the DMRS graph G. This is done via a form of exact subgraph matching, where nodes in S are associated with corresponding nodes in G and all links in this subgraph of G match the ones in S (see §4.1).
matching nodes exactly would be very inflexible and would require writing all possible concrete instantiations of a mapping pattern.