Directional Sign Loss: A Topology-Preserving Loss Function that Approximates the Sign of Finite Differences

Harvey Dam, Tripti Agarwal, Ganesh Gopalakrishnan
4/5/2025
cs.LG

No confident code implementation found for this paper.

Abstract

Preserving topological features in learned latent spaces is a fundamental challenge in representation learning, particularly for topology-sensitive data. This paper introduces directional sign loss (DSL), an efficient, differentiable loss function that approximates the number of mismatches in the signs of finite differences between corresponding elements of two arrays. By penalizing discrepancies in critical points between input and reconstructed data, DSL encourages autoencoders and other learnable compressors to retain the topological features of the original data. We present the formulation and complexity analysis of DSL, comparing it to other non-differentiable topological measures. Experiments on multidimensional array data show that combining DSL with traditional loss functions preserves topological features more effectively than traditional losses alone. DSL serves as a differentiable, efficient proxy for common topology-based metrics, enabling topological feature preservation on previously impractical problem sizes and in a wider range of gradient-based optimization frameworks.

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!

Similar Papers

Cite this paper

@article{dam2025directional,
  title  = {Directional Sign Loss: A Topology-Preserving Loss Function that Approximates the Sign of Finite Differences},
  author = {Harvey Dam and Tripti Agarwal and Ganesh Gopalakrishnan},
  year   = {2025},
  eprint = {2504.04202},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.04202v3}
}

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/2504.04202.svg)](https://codeofpaper.com/paper/2504.04202)

Discussion