Similarity-Distance-Magnitude Activations

Allen Schmaltz
9/16/2025
cs.LGcs.CL

No confident code implementation found for this paper.

Abstract

We introduce the Similarity-Distance-Magnitude (SDM) activation function, a more robust and interpretable formulation of the standard softmax activation function, adding Similarity (i.e., correctly predicted depth-matches into training) awareness and Distance-to-training-distribution awareness to the existing output Magnitude (i.e., decision-boundary) awareness, and enabling interpretability-by-exemplar via dense matching. We further introduce the SDM estimator, based on a data-driven partitioning of the class-wise empirical CDFs via the SDM activation, to control the class- and prediction-conditional accuracy among selective classifications. When used as the final-layer activation over pre-trained language models for selective classification, the SDM estimator is more robust to co-variate shifts and out-of-distribution inputs than existing calibration methods using softmax activations, while remaining informative over in-distribution data.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{schmaltz2025similaritydistancemagnitude,
  title  = {Similarity-Distance-Magnitude Activations},
  author = {Allen Schmaltz},
  year   = {2025},
  eprint = {2509.12760},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.12760v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2509.12760.svg)](https://codeofpaper.com/paper/2509.12760)

Discussion