We solve this problem by heuristically defining the similarity function as follows: S(i, j) = 1 when i = j, S(i, j) = −1 when i = j, and also S(i, −) = S(−, i) = −1, where '−' is an indel.
the similarity function encourages the alignment between two identical function labels and discourages the alignment between two different function labels, regardless of the type of function labels.