This Hamming loss is computed as the size of the symmetric difference between the set of constituents γ and γ G in the trees t and t G , respectively.
the loss function is defined as: and, according to the authors, it can be efficiently computed for a non-binary bottom-up transition system by counting the individually unreachable arcs from configuration c (|U(c, γ G )|) plus the erroneous constituents created so far (|γ c \ γ G |):  We adapt the latter to efficiently implement a loss function for the top-down and in-order strategies.