performance tuning:
1. optimize FWBW complexity
2. decrease time called of FWBW. For every instance, we only need to calculate once for derivatives of all weights.