Skip to main content
QUICK REVIEW

[Paper Review] An Inductive Bias for Distances: Neural Nets that Respect the Triangle Inequality

Silviu Pitis, Harris Chan|arXiv (Cornell University)|Feb 14, 2020
Domain Adaptation and Few-Shot LearningComputer Science36 references4 citations
TL;DR

This paper proposes Deep Norms, Wide Norms, and Neural Metrics—novel neural network architectures that enforce the triangle inequality for both symmetric and asymmetric distances, enabling accurate modeling of non-Euclidean metrics like graph shortest-path distances. The models universally approximate norm-induced metrics and outperform standard Euclidean metric learning in low-data multi-goal reinforcement learning and graph distance modeling.

ABSTRACT

Distances are pervasive in machine learning. They serve as similarity measures, loss functions, and learning targets; it is said that a good distance measure solves a task. When defining distances, the triangle inequality has proven to be a useful constraint, both theoretically--to prove convergence and optimality guarantees--and empirically--as an inductive bias. Deep metric learning architectures that respect the triangle inequality rely, almost exclusively, on Euclidean distance in the latent space. Though effective, this fails to model two broad classes of subadditive distances, common in graphs and reinforcement learning: asymmetric metrics, and metrics that cannot be embedded into Euclidean space. To address these problems, we introduce novel architectures that are guaranteed to satisfy the triangle inequality. We prove our architectures universally approximate norm-induced metrics on $\mathbb{R}^n$, and present a similar result for modified Input Convex Neural Networks. We show that our architectures outperform existing metric approaches when modeling graph distances and have a better inductive bias than non-metric approaches when training data is limited in the multi-goal reinforcement learning setting.

Motivation & Objective

  • To address the limitations of Euclidean metric learning in deep metric networks, which cannot model asymmetric or non-Euclidean distances.
  • To develop neural network architectures that intrinsically satisfy the triangle inequality as an inductive bias, avoiding post-hoc constraints or penalties.
  • To enable universal approximation of norm-induced metrics on R^n, including asymmetric and non-Euclidean ones, through architectural design.
  • To evaluate the proposed models on metric learning tasks, including graph distance modeling and value function learning in multi-goal reinforcement learning.
  • To demonstrate improved generalization and inductive bias in low-data regimes compared to non-metric or Euclidean metric baselines.

Proposed method

  • Proposes Deep Norms and Wide Norms as feedforward networks that parameterize norms via ReLU-activated, concave units and pooling layers to ensure subadditivity and triangle inequality.
  • Uses MaxReLU activation in Deep Norms and a wide architecture with shared weights in Wide Norms to enforce subadditivity and symmetry.
  • Applies modified Input Convex Neural Networks (ICNNs) to model convex functions, enabling universal approximation of semi-norms and metrics.
  • Employs a norm-based distance function d(x,y) = ||φ(x) - φ(y)||_N, where ||·||_N is a learned norm, ensuring the triangle inequality by construction.
  • Trains models using Temporal Difference (TD) loss with target networks and Adam optimization, with evaluation on MSE, success rate, and SPL in RL environments.
  • Visualizes learned norm balls and value functions to demonstrate geometric consistency and expressiveness of the models.

Experimental results

Research questions

  • RQ1Can neural networks be designed to inherently satisfy the triangle inequality for both symmetric and asymmetric distances?
  • RQ2Can such architectures universally approximate norm-induced metrics on R^n, including non-Euclidean ones?
  • RQ3Do these architectures provide a better inductive bias than standard Euclidean metric learning in low-data reinforcement learning settings?
  • RQ4Can they effectively model graph-based shortest-path distances that cannot be embedded in Euclidean space?
  • RQ5How do they compare to non-metric or penalty-based approaches in terms of generalization and training stability?

Key findings

  • Deep Norms and Wide Norms achieve near-zero MSE (0.000) on norm approximation tasks, outperforming the Euclidean baseline (0.057) on the same task.
  • The models successfully embed graph distances that violate the Euclidean embedding theorem, as demonstrated in the 4-node graph example where Euclidean distance fails due to geometric constraints.
  • In multi-goal reinforcement learning, despite higher MSE than baselines, Deep Norms and Wide Norms achieve better policy success and SPL due to stronger inductive bias.
  • The models generalize well under low-data regimes, with SPL performance improving as training fraction increases, outperforming MLP and ICNN baselines in asymmetric environments.
  • Visualizations confirm that learned norm balls in Deep Norms and Wide Norms preserve geometric structure and respect the triangle inequality, while Euclidean models fail on non-Euclidean graphs.
  • Theoretical results show that Deep Norms and Wide Norms universally approximate norm-induced metrics on R^n, and modified ICNNs can approximate semi-norms.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.