Shear rate calculation in LBM

I want to calculate the shear rate magnitude in LBM. The individual components of the shear rate tensor can be calculated in LBM as given below in the first equation. Now I am confused about how to calculate the magnitude? I have seen 3 different formulae (as shown in Equations 2, 3, and 4).

is the second invariant of the tensor. Please suggest which one is the correct formula with proper explanation.

To my knowledge it’s the first variant. I also think that’s the way it’s computed in Palabos.