Reverting (dis)similarity calculations