Finding Feature Representation Such That Two Samples Are Similar in Feature Space
I think you're looking for metric learning or Manifold learning. At a very high level, the idea behind both of these approaches is to learn the space (or transform) over which a set of (labeled) examples are close to one another.