We know there is a necessary condition for the non-negativity of multivariate polynomials in the paper "Sum of Squares Decompositions of Polynomials over their Gradient Ideals with Rational Coefficients" by V. Magron, M. Safey El Din, and T.-H. Vu.
That is if $f$ is a non-negative multivariate polynomial with rational coefficients, then $f$ is a sum of squares over the quotient ring $\mathbb{Q}[x_1,\dotsc, x_n]/I_\text{grad}(f)$ where $I_\text{grad}(f)$ is the ideal generated by all the partial derivatives of $f$. But to prove the converse, we need an assumption that $f$ attain its infimum, so the extreme will be on the gradient variety.
So my question is do we really need the assumption that $f$ attain its infimum? i.e. is there any counter-example that $f$ is a sum of squares over the quotient ring $\mathbb{Q}[x_1,\dotsc, x_n]/I_\text{grad}(f)$ but not non-negative, i.e. $f(s_1,\dotsc, s_n) <0$ for some $(s_1,\dotsc, s_n) \in \mathbb{R}^n$?