# Efficient inversion of multidimensional non linear function

I have a function $$f:x\mapsto \vec{y}$$ with $$x \in [0,1]$$ and $$\vec{y}=(y_1,...,y_n) \in \mathbb{R}^n$$. $$n$$ is a small integer e.g. $$n=8$$. Each of the component functions in $$y_i(x)$$ "oscilate" up and down (roughly between -1.5 and 1.5). A snippet of two such component functions looks like this, I know that $$f$$ is invertible because it was designed to be bjective (using a numerical method). In other words, the vectors $$\vec{y}$$ are unique.

Edit: Another way to view this goes as follows. $$\vec{y}$$ is a set of codewords which encode each position $$x$$. The generating function $$f(x)$$ is designed so that these code words are unique.

I am searching for an efficient numerical inversion method for $$f$$. I.e., I am looking for $$f^{-1}: \vec{y} \mapsto x$$.

So far, I have tried a neural network (using sklearn.neural_network.MLPRegressor) with one hidden layer with 200 neurons. This works fine, but I am looking for a solution for which the evaluation of $$f^{-1}$$ is computationally cheaper. A solution which gives me a small number of possible candidates would be acceptable, too. How can I solve this problem?

• Isn't it enough to just find the inverse of any one component of $\vec{y}$ since you know it is unique ? – cfdlab Jan 28 '20 at 13:00
• sorry, maybe that was not clear. Each of the components of $\vec{y}$ is not unique. Quite the oposite, they "oscilate" up and down (see picture). – Patrick Dietrich Jan 28 '20 at 13:38
• Each of the components $y_1, ..., y_n$ is not unique. Only the combined vector $\vec{y}$ is unique. – Patrick Dietrich Jan 28 '20 at 13:44
• The immediate thing that comes to my mind is to construct an interpolant (chebyshev, or piecewise polynomial) $t \to \vec{y}=f(t)$ (perhaps you already have this) and solve a least squares problem for the inversion, given $\vec{y}$ solve $\min_{t \in [0,1]} \| f(t) - \vec{y} \|$. Without trying it out, I cannot say if this will be slower/faster than neural network approach. Another way is find all roots of each equation $f_i(t)=y_i$ and find the common one, see e.g., Chebfun examples here chebfun.org/examples/roots which can find all roots and very accurate too. – cfdlab Jan 30 '20 at 4:25
• I don't understand how $f$ can be invertible if the components of $y$ are oscillatory. It looks like $f$ is not injective. Am I missing something here? – Tihskirap Ayayhdapu Jan 31 '20 at 15:38