I would like to use gradient descent to "randomly sample" solutions to a set of homogeneous polynomial equations. Because the equations are homogeneous, setting all variables to 0 is a valid solution. I'd like to somehow "bias" the search to finding solutions with many of the variables non-zero. Is there an easy way to do this?
My thoughts so far:
Because the polynomial constraints are homogeneous, solutions clearly have a scaling freedom. So if there is a solution with some variable $x_i$ non-zero, then there also exists a solution with this variable scaled to 1. If the resulting new polynomials still have no constant terms, then there is still a scaling freedom. I can continue "fixing" the remaining scaling freedom by choosing variables to scale to 1 until a constant term appears.
A related idea. I could "force" only considering solutions with some variables non-zero by choosing some term from one of the polynomials, and adding a new constraint: term = 1. Because if there is any solution with that term non-zero, I can scale the solution so that term is 1. This is kind of a weaker form of the scaling idea above.
However both of these ideas cause some problems. First, it requires fixing some variables as non-zero upfront. Depending on which ones I fix, I'll get different solutions (or maybe none at all). Should I just "randomly" make a choice of which variables to fix?
Another problem with these ideas is with the other variables. While searching for a solution there is a pressure to reduce the size of all terms in polynomials without a constant term. If most of the polynomials still have no constant term, this seems to push many variables to zero. So I haven't really solved the initial problem.
So... another approach:
Let's start by laying out the basics. Given a set of polynomial constraints $\{p_i\}$ in variables $\bar{x} = \{x_i\}$, if we want to find a solution we can define a "goal" scalar $$ E = \sum_i |p_i(\bar{x})|^2 $$ and try gradient descent from a random initial $\bar{x}$ to minimize $E$. This may get stuck in local minima (of which there are various strategies to handle if necessary, but hopefully the descent will just succeed with some reasonable probability), but if solutions exist, they will be at global minima of $E$.
Using this idea, we could also try to optimize for two goals by just summing them. Or if we just want to "encourage" a property, we could come up with a function $f(\bar{x}) \ge 1$ that is closer to 1 when near the encouraged property, and minimize the product $fE$ because solutions of $\{p_i\}$ will still be minimums of $fE$ but along the descent it will be encouraged for $f$ to be small as well. (These are likely very standard techniques since they seem like natural extensions of gradient descent solving of polynomial constraints, but I do not know what the names are for these techniques.)
So maybe there is some judicious choice of $f$ that would encourage as many variables to be non-zero as possible, but not cause the variables to explode in value while trying to solve via gradient descent?