Harmonic Loss Trains Interpretable AI Models
Not on the map. Why?
Abstract (arXiv)
In this paper, we introduce harmonic loss as an alternative supervisory signal for training neural networks and large language models (LLMs). Harmonic loss differs from standard cross-entropy loss by (a) replacing the usual SoftMax normalization with a scale-invariant HarMax function and (b) computing logits via Euclidean distance rather than a dot product. Harmonic loss enables improved interpretability and faster convergence, owing to its scale invariance and finite convergence point by design, which can be interpreted as a class center. We first validate the performance of harmonic models across algorithmic, vision, and language datasets. Through extensive experiments, we demonstrate that models trained with harmonic loss perform better than standard models by: (a) enhancing interpretability, (b) requiring less data for generalization, and (c) reducing grokking. Moreover, we compare a GPT-2 model trained with harmonic loss to the standard GPT-2, illustrating that the harmonic model develops more interpretable representations. Looking forward, we believe harmonic loss may become a valuable tool in domains with limited data availability or in high-stakes applications where interpretability and reliability are paramount, paving the way for more robust and efficient neural network models.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 34 of its 54 references that are in the map. First posted on arXiv 3 Feb 2025.
Builds on
34 of 54 references.
References · 34
- 2020Supervised Contrastive Learningcited by 2,803
- 2018Neural Network Acceptability Judgmentscited by 952
- 2018This Looks Like That: Deep Learning for Interpretable Image Recognitioncited by 731
- 2023The Linear Representation Hypothesis and the Geometry of Large Language Modelscited by 679
- 2023The Geometry of Truth: Emergent Linear Structure in Large Language Model Representations of True/False Datasetscited by 673
- 2017Generalised Dice overlap as a deep learning loss function for highly unbalanced segmentationscited by 614
- 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 599
- 2021Towards Out-Of-Distribution Generalization: A Surveycited by 431
- 2024Mechanistic Interpretability for AI Safety -- A Reviewcited by 415
- 2017A PAC-Bayesian Approach to Spectrally-Normalized Margin Bounds for Neural Networkscited by 309
- 2023Language Models Represent Space and Timecited by 306
- 2023Function Vectors in Large Language Modelscited by 292
22 more
- 2022Towards Understanding Grokking: An Effective Theory of Representation Learningcited by 229
- 2017Tversky loss function for image segmentation using 3D fully convolutional deep networkscited by 228
- 2018Sensitivity and Generalization in Neural Networks: an Empirical Studycited by 187
- 2021Implicit Representations of Meaning in Neural Language Modelscited by 179
- 2023The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural Networkscited by 153
- 2024The Geometry of Categorical and Hierarchical Concepts in Large Language Modelscited by 151
- 2022Omnigrok: Grokking Beyond Algorithmic Datacited by 142
- 2023Patch Diffusion: Faster and More Data-Efficient Training of Diffusion Modelscited by 131
- 2021Can Language Models Encode Perceptual Structure Without Grounding? A Case Study in Colorcited by 118
- 2024The Geometry of Concepts: Sparse Autoencoder Feature Structurecited by 52
- 2024ICLR: In-Context Learning of Representationscited by 49
- 2023Seeing is Believing: Brain-Inspired Modular Training for Mechanistic Interpretabilitycited by 38
- 2024Opening the AI black box: program synthesis via mechanistic interpretabilitycited by 19
- 2024Monotonic Representation of Numeric Properties in Language Modelscited by 15
- 2022DeepSpeed Data Efficiency: Improving Deep Learning Model Quality and Training Efficiency via Efficient Data Sampling and Routingcited by 13
- 2023Topology-Aware Focal Loss for 3D Image Segmentationcited by 12
- 2015A review of learning vector quantization classifierscited by 11
- 2021Learning with Smooth Hinge Lossescited by 9
- 2024Survival of the Fittest Representation: A Case Study with Modular Additioncited by 7
- 2023Learning Prototype Classifiers for Long-Tailed Recognitioncited by 6
- 2023Inverse distance weighting attentioncited by 4
- 2024Predicting O-GlcNAcylation Sites in Mammalian Proteins with Transformers and RNNs Trained with a New Loss Functioncited by 2
Built on by
Citing papers per year: 2025: 3; 2026: 1.
4 papers.
- 2025Towards Understanding Distilled Reasoning Models: A Representational Approachcited by 26
- 2025I-Con: A Unifying Framework for Representation Learningcited by 15
- 2025Multi-task GINN-LP for Multi-target Symbolic Regressioncited by 0
- 2026Rethinking the Harmonic Loss via Non-Euclidean Distance Layerscited by 0
- 2026Rethinking the Harmonic Loss via Non-Euclidean Distance Layers10 Mar 2026
- 2025Multi-task GINN-LP for Multi-target Symbolic Regression17 Nov 2025
- 2025I-Con: A Unifying Framework for Representation Learning23 Apr 2025
- 2025Towards Understanding Distilled Reasoning Models: A Representational Approach5 Mar 2025