Compositional Function Networks: A High-Performance Alternative to Deep Neural Networks with Built-in Interpretability

Fang Li · DOI

Abstract

Deep Neural Networks (DNNs) deliver impressive performance but their black-box nature limits deployment in high-stakes domains requiring transparency. We introduce Compositional Function Networks (CFNs), a novel framework that builds inherently interpretable models by composing elementary mathematical functions with clear semantics. Unlike existing interpretable approaches that are limited to simple additive structures, CFNs support diverse compositional patterns -- sequential, parallel, and conditional -- enabling complex feature interactions while maintaining transparency. A key innovation is that CFNs are fully differentiable, allowing efficient training through standard gradient descent. We demonstrate CFNs' versatility across multiple domains, from symbolic regression to image classification with deep hierarchical networks. Our empirical evaluation shows CFNs achieve competitive performance against black-box models (96.24% accuracy on CIFAR-10) while outperforming state-of-the-art interpretable models like Explainable Boosting Machines. By combining the hierarchical expressiveness and efficient training of deep learning with the intrinsic interpretability of well-defined mathematical functions, CFNs offer a powerful framework for applications where both performance and accountability are paramount.

Introduction

The machine learning community has long faced a frustrating trade-off: high performance typically requires opaque Deep Neural Networks (DNNs), while transparency is reserved for simpler models like linear regression or decision trees. While post-hoc explainability tools like SHAP or LIME attempt to interpret black-box models, they often provide mere approximations. Compositional Function Networks (CFNs) bridge this gap by constructing models from transparent, semantically meaningful building blocks that retain the hierarchical power of deep learning.

Methodology: The CFN Framework

CFNs replace standard linear transformations and generic activations with a library of Function Nodes. These nodes represent elementary mathematical operations with interpretable parameters, such as Gaussians (learning center and width) and Sinusoidal waves (learning frequency and phase).

The CFN architecture hierarchy: from elementary Function Nodes to complex Architectural Patterns.

To build complexity, these nodes are organized via Composition Layers:

  • Sequential: Chaining functions layer-by-layer.
  • Parallel: Processing inputs through multiple functions simultaneously to capture non-linear feature interactions.
  • Conditional: A mixture-of-experts approach where gating nodes route inputs to specialized function nodes.

Crucially, every component is fully differentiable, enabling end-to-end training via standard gradient descent (e.g., Adam).

Experimental Evaluation and Results

CFNs were evaluated across synthetic benchmarks, tabular data, and computer vision tasks.

Tabular and Vision Performance

On standard tabular benchmarks like the Breast Cancer Wisconsin dataset, CFNs achieved 99.12% accuracy, matching or exceeding state-of-the-art black-box models like XGBoost. In computer vision, a "Hybrid DeepCFN" reached 96.24% accuracy on CIFAR-10, rivaling highly-optimized models like WideResNet while maintaining a more transparent compositional structure.

Symbolic Regression and Physics-Informed Learning

A key advantage of CFNs is their ability to recover underlying physical equations. In a Simple Harmonic Motion (SHM) task, the CFN perfectly recovered the physical constants from noisy data.

CFN performance on Simple Harmonic Motion, demonstrating the model's ability to learn exact physical constants.

As illustrated in the figure above, the learned SHM (blue) aligns almost perfectly with the true SHM (dashed grey), recovering an amplitude of 1.9988 (true = 2.0) and a frequency of 1.4999 (true = 1.5).

Discussion and Limitations

While CFNs offer a powerful alternative to DNNs, they require a stronger inductive bias; practitioners must select the appropriate function nodes for their specific domain. If the necessary mathematical primitives are missing from the library, performance may suffer. Future work aims to address this via Automated Architecture Search to automatically discover optimal CFN layouts and the integration of Bayesian variants for uncertainty quantification.

By combining the efficiency of differentiable optimization with the clarity of mathematical functions, CFNs provide a robust framework for high-stakes applications where both accuracy and accountability are essential.

Summary updated

BibTeX
@misc{li2025compositional,
  author = {Fang Li},
  title = {{Compositional Function Networks: A High-Performance Alternative to Deep Neural Networks with Built-in Interpretability}},
  year = {2025},
  eprint = {2507.21004},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.21004},
}
Figure