In JAX, a tree is a state organized as a tuple, dictionary, list, or nested combination of these. It lets a loss function accept several state variables together while keeping other inputs separate. section 3.5.3
def compute_loss(state, x, y): #1 ... return loss grad_fn = jax.value_and_grad(compute_loss) state = (a, b, c) loss, grads_of_loss_wrt_state = grad_fn(state, x, y) #2
The example passes a three-variable tuple as one state argument to a loss function, then obtains gradients for that state. section 3.5.3






