Extremely ill-posed learning problems are common in image and spectral analysis. They are characterised by a vast number of highly correlated inputs, e.g. pixel or pin values, and a modest number of patterns, e.g. images or spectra. We show that it is possible to train neural networks to learn such patterns without using an excessive number of weights, and we devise a test to decide if new patterns should be included in the training set or whether they fall within the subspace already explored. The method is applied to the analysis of PET-images.