Ask HN: What are the best environments for differential programming?

4 points by pc2g4d ↗ HN
I want to incorporate an algebra solver into a neural network. Crazy idea, I know. I'm trying to generate algebra problems that are actually solvable, and the best way I can think to do that would be to have a solver implemented in-network. That's a complex piece of code, thus the interest in differentiable programming.

Julia? Python? Swift? Something else?

My experience has been that the autogradient in TensorFlow would be way too finicky to implement something complex in. Maybe I'm wrong?

2 comments

[ 2.1 ms ] story [ 14.5 ms ] thread
Algebra solver, as in solving algebraic equations numerically? The Julia SciML ecosystem has libraries like DeepEquilibiurmNetworks.jl for building neural networks with nonlinear algebraic equation solving as part of the networks (https://deepequilibriumnetworks.sciml.ai/stable/manual/nlsol...).
Interesting. I had in mind a symbolic algebra solver. More like Maxima's `solve` and similar. But maybe a numeric solver could serve a similar purpose? Probably not, since the existence of a numerical solution does not imply that the equation is solvable analytically.

The actual domain is an elementary algebra course---can we use a neural network to generate algebra problems that have solutions? Using GPT-3 will produce algebra-esque math/text, but not guarantee that the problems are solvable.

Another possibility I'm considering is using a neural network to generate transformations of a solved equation. Start with `x = 5`, then apply operations to both sides until getting to the problem form e.g. `x + 2 = 7`

Gets tricky when the solution has more than one element, like when squaring / taking roots.