I have a hierarchical model that I’m not sure how to deal with and wanted to ask for some tips.

Below is a graphical model showing the gist. I would like to learn about alpha and beta. There is an individual per-object parameter y_i that is related to alpha and beta, and another parameter z_i that is unrelated to alpha and beta. By related, I mean the relationship between x_ij and y_i is dependent on alpha and beta.

The problem is that my model for how alpha, beta, and y_i generates x_ij is not analytic and expensive to compute. I only have it for certain values and need to interpolate between values (based on the assumption that it should vary continuously).

Once alpha and beta are fixed, I can approximate my model as e.g., spline and I think I can code up the things inside j plate in stan. Any thoughts would be appreciated.