Inverting Non-Injective Functions with Twin Neural Network Regression
Sebastian J. Wetzel · 2026
Read Inverting Non-Injective Functions with Twin Neural Network Regression by Sebastian J. Wetzel (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2601-05378.txt.
Introduction
Sebastian J. Wetzel's 2026 paper reframes how to run a function back-wards when the way back is not one road but more than one. A non-injective function sends more than one input to the same end, so it has no one true inverse. But a slice of its range can be one-to-one, and on that slice the way back is clean. In more than one task, a best pick can be made from the roads back, even when the counts of in and out do not match.
Wetzel casts the task as a pack of such clean local tasks. His twin-net method learns the small fix that takes a known near point to the true pre-image of a new end. Tasks of this kind span scans, design, and bench work. A sound local way back widens what learned tools can soundly un-do.
Catalog record
| CREATOR | Sebastian J. Wetzel |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 43 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2601-05378
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Inverting Non-Injective Functions with Twin Neural Network Regression Sebastian J. Wetzel Abstract Non-injective functions are not invertible. However, non-injective functions can be restricted to sub-domains on which they are locally injective and surjective and thus invertible if the dimensionality between input and output spaces are the same. Further, even if the dimensionalities do not match it is often possible to choose a preferred solution from many possible solutions. Twin neural network regression is naturally capable of incorporating these properties to invert non-injective functions. Twin neural network regression is trained to predict adjustments to well known input variables 𝐱 anchor \mathbf{x}^{\text{anchor}} to obtain an estimate for an unknown 𝐱 new \mathbf{x}^{\text{new}} under a change of the target variable from 𝐲 anchor \mathbf{y}^{\text{anchor}} to 𝐲 new \mathbf{y}^{\text{new}} . In combination with k-nearest neighbor search, I propose a deterministic framework that finds input parameters to a given target variable of non-injective functions. The method is demonstrated by inverting non-injective functions describing toy problems and robot arm control that are a) defined by data or b) known as mathematical formula. Keywords : Artificial Neural Networks, k-Nearest Neighbors, Regression, Inverse Problems, Inverse Kinematics 1 Introduction Inverse problems are common in science and engineering whenever it is necessary to deduce the input for a given output. Examples include inverse problems in physics [ 25 ] , chemistry [ 33 ] , engineering [ 34 ] , computer graphics [ 4 ] or inverse kinematics [ 29 ] . In many such settings, the forward mapping is known or can be approximated reliably from data, while the inverse mapping is ill-posed or there does not exist a unique solution. A common obstacle in inverse problems is non-injectivity which means that a forward function maps multiple distinct inputs to the same output. In these cases, there is no unique inverse. Traditional regression algorithms are not suitable for providing solutions in these cases. When they are trained to approximate the inverse mapping, they are forced to average over incompatible solutions, often yielding predictions that do not correspond to a valid preimage of the target output. Inverse problems are often solvable in practice by taking into account additional structure. Smooth non-injective functions are typically locally injective when restricted to suitable sub-domains. Hence, solutions can be obtained restricting the input space. In this work, I propose a method that can naturally circumvent the problem of non-injectivity. This method is deterministic, does not rely on random sampling of solutions, and can learn approximations to non-linear non-injective continuous functions. It is important to emphasize the deterministic nature, as many probabilistic inversion methods such as mixture models [ 9 ] suffer from distinct limitations. Although probabilistic inversion can resolve multimodality, many practical and theoretical settings require deterministic inverse mappings that are stable, reproducible, interpretable, computationally efficient and compatible with other elements in deterministic pipelines. A common example for these requirements is inverse kinematics. The framework is based on Twin Neural Network Regression [ 41 ] (TNNR) combined with k-nearest neighbor (k-NN) search [ 40 ] . Rather than learning an explicit inverse function, the proposed method predicts local adjustments to known anchor points that share similar output values. This reformulation automatically selects regions of local invertibility and avoids averaging across incompatible branches of the inverse. By anchoring predictions in the vicinity of known solutions, the method can recover multiple valid preimages of a target output. TNNR is a machine learning method that learns to predict differences between target values instead of the targets themselves. It was originally introduced to improve the regression accuracy in small data problems. TNNR produces an ensemble of predictions from a single trained model by anchoring the prediction to multiple known data points. This property is particularly well suited for inverse problems since different anchors implicitly define different locally injective regions of a non-injective function, enabling the recovery of multiple inverse branches without requiring separate models or explicit branch labels. By combining TNNR with k-nearest neighbor (kNN) search, the proposed framework selects anchors that define locally consistent inversion regions. In each of these regions, TNNR learns how to translate changes in the target variable into corresponding changes in the input space. The proposed method can be applied to approximate pseudoinverses of problems that are (1) defined purely by measured data and to problems where (2) the formula of the forward function is known. In the latter case, the forward function can be used to rank possible candidate solutions, while in the former case the forward functions need to be approximated by a traditional neural network first. 1.1 Outline This paper is organized as follows: Section 2 reviews prior work on twinned regression methods and related approaches to inverse problems. Section 3 provides a review of Twin Neural Network Regression. Section 4 introduces the proposed inversion framework and its variants. Section 5 presents experimental results when applying the method to problems defined by data or mathematical functions. Section 6 discusses the results and proposes future directions for application and research. 2 Prior Work The Twin Neural Network Regression (TNNR or input doubling or pairwise difference) framework is a regression technique that is based on learning the differences between target values instead of the regression targets themselves. A regression problem can be solved by aggregating these differences anchored at different known data points. The neural network formulation of this approach was initially introduced in 2020 as Twin Neural Network Regression [ 41 ] (Submission: 29 Dec 2020, arXiv publication: 29 Dec 2020, Journal publication 04 October 2022). Independently, the same method was introduced as Input Doubling Method for radial basis function (RBF) neural networks [ 22 ] (Submission: 29 November 2020, Conference Publication: 21 July 2021). Following these initial developments, the approach was subsequently applied to decision trees as Pairwise Difference Regression [ 35 ] (Submission: 14 June 2021, Journal Publication: August 4, 2021). This framework has been extended by several conceptual developments. Belaid et al. proposed a systematic way to identify the best anchors [ 7 ] . Izonin et al. proposed a method to optimize training time with clustering [ 23 ] . A general examination of the reasons for the outperformance of this framework can be found in [ 39 ] . The mismatch of predictions and the violation of consistency conditions give rise to several uncertainty estimates [ 41 , 35 , 5 ] . The same consistency conditions can also be employed during training to transform TNNR into a semi-supervised regression algorithm [ 38 ] . Furthermore, the overall framework can be employed for classification problems, too [ 20 , 6 ] . Important to note is that TNNR can naturally be combined with k-nearest neighbor (k-NN) search [ 40 ] to increase performance in specific problems. This variant of TNNR forms the basis of the method proposed in this article This framework has been applied in various forms to a wide range of problems. It has shown incredible performance, especially in scenarios with scarce training data, sometimes cutting error measures compared to previous state-of-the-art methods by more than 50\% . These applications include medicine [ 18 , 19 ] , energy efficiency of buildings [ 21 ] , bridge damage estimation [ 17 ] , natural