Yang-Mills vs Einstein-Hilbert Action

In Yang-Mills, the gauge connection plays the role of a potential and the curvature form plays the role of a "field strength".

In GR, the metric tensor plays the role of a potential, and the connection plays the role of a field strength.

This is why, in particular, the gravitational force is not a real force, as the connection is not gauge-covariant. Of course, we say that there is nonzero gravity somewhere, if the curvature is nonzero there, but that's because the curvature tensor obstructs the trivialization of the connection.

Furthermore, you should look into Ostrogradskij-instability. Because in YM, the gauge connection is the potential, and the curvature is the field strength, a lagrangian containing any function of the field strength will procude second order field equations at most.

But for gravity, the curvature tensor contains second derivatives of the metric, so if you don't restrict the curvature expression's form, Ostrogradskij instability will kick in. A lagrangian that is linear in the second metric derivatives avoids this issue.


Your are raising a legitimate question, as from an effective field theory point of view, all symmetry-permitting action terms should be included.

However, there is a catch when it comes to an action linear in Yang-Mills curvature $F$: you can't possibly contract the Lorentz indices of antisymmetric $F$ with symmetric metric $g$.

For special unitary group related YM fields there is another hindrance: $Tr\langle F\rangle $ is identically zero since special unitary groups are traceless, while the YM action (with two Fs) does not experience the said issue.

The action you mentioned with two Riemann curvature $R$ tensors is perfectly allowed, only that this term is highly suppressed at low energies so that it is not relevant under normal circumstances. Note that these high order $R$ terms play an important role at the embryonic stage of our universe, which is usually overlooked for the prevalent cosmological models.