English

Neural Networks Learn Distance Metrics

Machine Learning 2025-02-05 v1 Artificial Intelligence Machine Learning

Abstract

Neural networks may naturally favor distance-based representations, where smaller activations indicate closer proximity to learned prototypes. This contrasts with intensity-based approaches, which rely on activation magnitudes. To test this hypothesis, we conducted experiments with six MNIST architectural variants constrained to learn either distance or intensity representations. Our results reveal that the underlying representation affects model performance. We develop a novel geometric framework that explains these findings and introduce OffsetL2, a new architecture based on Mahalanobis distance equations, to further validate this framework. This work highlights the importance of considering distance-based learning in neural network design.

Keywords

Cite

@article{arxiv.2502.02103,
  title  = {Neural Networks Learn Distance Metrics},
  author = {Alan Oursland},
  journal= {arXiv preprint arXiv:2502.02103},
  year   = {2025}
}

Comments

14 pages, 1 figures. Code and additional resources available at https://github.com/alanoursland/neural_networks_learn_distance_metrics

R2 v1 2026-06-28T21:31:47.370Z