SymTorch: A Framework for Symbolic Distillation of Deep Neural Networks

Elizabeth S. Z. Tan, Adil Soubki, Miles Cranmer
2/24/2026
cs.LG

No confident code implementation found for this paper.

Abstract

Symbolic distillation replaces neural networks, or components thereof, with interpretable, closed-form mathematical expressions. This approach has shown promise in discovering physical laws and mathematical relationships directly from trained deep learning models, yet adoption remains limited due to the engineering barrier of integrating symbolic regression into deep learning workflows. We introduce SymTorch, a library that automates this distillation by wrapping neural network components, collecting their input-output behavior, and approximating them with human-readable equations via PySR. SymTorch handles the engineering challenges that have hindered adoption: GPU-CPU data transfer, input-output caching, model serialization, and seamless switching between neural and symbolic forward passes. We demonstrate SymTorch across diverse architectures including GNNs, PINNs and transformer models. Finally, we present a proof-of-concept for accelerating LLM inference by replacing MLP layers with symbolic surrogates, achieving an 8.3\% throughput improvement with moderate performance degradation.

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{tan2026symtorch,
  title  = {SymTorch: A Framework for Symbolic Distillation of Deep Neural Networks},
  author = {Elizabeth S. Z. Tan and Adil Soubki and Miles Cranmer},
  year   = {2026},
  eprint = {2602.21307},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.21307v1}
}

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

Discussion