Quantifying Behavioral Dissimilarity Between Mathematical Expressions

Sebastian Mežnar, Sašo Džeroski, Ljupčo Todorovski
8/21/2024
cs.AI

No confident code implementation found for this paper.

Abstract

Quantifying the similarity between mathematical expressions is a fundamental problem in computational mathematics, symbolic reasoning, and scientific discovery. While behavioral notions of similarity have previously been explored in the context of software and program analysis, existing measures for mathematical expressions rely primarily on syntactic form, assessing similarity through symbolic structure rather than actual behavior. Yet syntactically distinct expressions can exhibit nearly identical outputs, while structurally similar ones may behave very differently-especially when the expressions contain free parameters that define families of functions. To address these limitations, we introduce Behavior-aware Expression Dissimilarity (BED), a principled framework for quantifying behavioral distance between mathematical expressions with free parameters. BED represents expressions as joint probability distributions over their input-output pairs and applies the Wasserstein distance to measure behavioral dissimilarity. A computationally efficient stochastic approximation is proposed and shown to be consistent, robust, and capable of inducing a smoother, more meaningful structure over the space of expressions than syntax-based measures. The approach provides a foundation for behavior-based comparison, clustering, and learning of mathematical expressions, with potential direct applications in equation discovery, symbolic regression, and neuro-symbolic modeling.

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{menar2024quantifying,
  title  = {Quantifying Behavioral Dissimilarity Between Mathematical Expressions},
  author = {Sebastian Mežnar and Sašo Džeroski and Ljupčo Todorovski},
  year   = {2024},
  eprint = {2408.11515},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.11515v2}
}

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

Discussion