Discover smarter parameter handling with Parax for JAX and Equinox.

Introducing Parax, an innovative Python project designed to enhance parameter-first modeling in JAX through the Equinox library.

3 min readMachine Learning

When you build scientific models in JAX, the friction often isn't the math. It is the bookkeeping. Parax, an add-on to the Equinox library, directly addresses that pain by putting parameters first. The project, created by Gary Callen, gives researchers a more intuitive way to attach metadata to parameters, mark them as fixed, or assign prior distributions, all while respecting Equinox's immutable design. That is not a small convenience. It is a meaningful step toward making complex hierarchies feel manageable.

The core insight here is that parameters are not just tensors. They carry context, whether that means a constraint, a prior, or a flag that says "do not train me." Standard tools like `eqx.tree_at` work, but they can get unwieldy when you are navigating deep, nested structures. Parax introduces `parax.Parameter` and `parax.Module` to give you a more object-oriented way to inspect and manipulate those structures. The result is code that reads closer to the mental model you already have of your own work, rather than forcing you to translate that model into low-level tree operations.

What stands out is the restraint. Parax does not try to reinvent JAX or Equinox. It layers a practical abstraction on top of existing principles, which means you are not locked into a new paradigm. You are simply getting a better handle on the one you already use. For anyone who has spent an afternoon chasing down a nested parameter update, that is a tangible win. It is the kind of tool that does not need hype because it solves a real problem you have likely already felt.

The documentation and examples are there, and the package is open for anyone to try. That is the right way to introduce a tool like this. Start small, see if it fits your workflow, and let the design speak for itself. If you have ever wished your parameter objects carried more meaning, or that deep hierarchy manipulation felt less like guesswork, Parax is worth a look. It will not change your science overnight, but it might make the path to it a little clearer.

From Machine Learning

Just wanted to share my Python project Parax - an add-on on top of the Equinox library catering for parameter-first modeling in JAX.

For our scientific applications, we found that we often needed to attach metadata to our parameter objects, such as marking them as fixed or attached a prior probability distribution. Further, we often needed to manipulate these parameters in very deep hierarchies, which sometimes can be unintuitive using eqx.tree_at.

Read the original at Machine Learning