batch bias_diff calculation