SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2002.05825 · ICLR · 2020

An Inductive Bias for Distances: Neural Nets that Respect the Triangle Inequality

Silviu Pitis, Harris Chan, Kiarash Jamali, Jimmy Ba

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 5 functions out of this paper's own repositories and ran 5 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
spitis/deepnorms canonical 5 of 5
FunctionStatusWhere it lives
ConcaveActivation Ran spitis/deepnorms/metrics_pytorch.py
pointer only (licence: NONE) · get_code("d356f206af8c8a7e")
ConstrainedLinear Ran spitis/deepnorms/metrics_pytorch.py
pointer only (licence: NONE) · get_code("574f170004331292")
DeepNormMetric Ran spitis/deepnorms/metrics_pytorch.py
pointer only (licence: NONE) · get_code("0c110e699b49fc04")
MaxAvgGlobalActivation Ran spitis/deepnorms/metrics_pytorch.py
pointer only (licence: NONE) · get_code("b15d3c00b0bc4cbc")
ReduceMetric Ran spitis/deepnorms/metrics_pytorch.py
pointer only (licence: NONE) · get_code("4b2e75177b4118d0")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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 guaranteesand 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 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. 1

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2002.05825")
get_code_for_paper("2002.05825")
have("2002.05825")

Connect an agent — have() is free.