update similarity graph