In the paper "Quantum Field Theory and Jones Polynomial", (equation 2.16, page 359), as well as in "Global Symmetries, Counterterms, and Duality in Chern-Simons Matter Theories with Orthogonal Gauge Groups" (equation 4.2 in page 33), the authors used a formula which is derived from the APS index theorem.

For example, in Witten's paper, equatin 2.16 says that

$$\frac{1}{4}\left(\eta(A)-\eta(0)\right)=\frac{c_{2}(G)}{2\pi}I[A]$$

(the eta invariant in Witten's paper is half of the usual eta invariant) where $G$ is a compact simple gauge group, $c_{2}(G)$ is its quadratic Casimir element, $\eta(A)$ is the APS eta-invariant of a Dirac type operator twisted by the gauge field $A$, $\eta(0)$ is the APS eta-invariant of trivial gauge $A=0$, and $I[A]$ is the Chern-Simons action on a three dimensional manifold $Y$. i.e.

$$I[A]=\frac{1}{4\pi}\int_{Y}\mathrm{Tr}(A\wedge dA+\frac{2}{3}A\wedge A\wedge A)$$

However, the APS index theorem is saying that

$$\frac{-1}{8\pi^{2}}\int_{M}\mathrm{Tr}\left(F\wedge F\right)+\frac{\dim E}{192\pi^{2}}\int_{M}\mathrm{Tr}\left(R\wedge R\right)-\frac{1}{2}\eta(A)$$

is a topological invariant, where $M$ is a compact four dimensional manifold such that $\partial M=Y$, $F=dA+A\wedge A$ is the curvature $2$-form on the $G$-bundle $E$ over $M$, and $R$ is the Riemann tensor on $M$.

I want to prove Witten's formula (2.16). Let me assume a simple case when $M$ is flat so that $R=0$. By using the Stoke's theorem, the APS index theorem implies that

$$-\frac{1}{2\pi}I[A]-\frac{1}{2}\eta(A)$$

is a topological invariant. Therefore, I expect that

$$\frac{1}{4}(\eta(A)-\eta(0))=-\frac{1}{4\pi}I[A]$$

**Question: Where does the second order Casimir element come from?**