Interpolation and differentiation of alchemical degrees of freedom in machine learning interatomic potentials