NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Injective Domain Knowledge in Neural Networks for Transprecision Computing

Andrea Borghesi, Federico Baldo, Michele Lombardi, Michela Milano · DOI

Abstract

Machine Learning (ML) models are highly effective at extracting information from large datasets, yet they often struggle with complex functions or scarce data. This paper investigates the integration of prior domain knowledge into ML models to solve a non-trivial task: precision tuning in transprecision computing. By injecting domain information through additional features, ad-hoc graph-based topologies, and semantic regularization schemes, we demonstrate that knowledge-injected models significantly outperform purely data-driven approaches. Experimental results show an average accuracy improvement of approximately 38% across various numerical benchmarks.

Introduction

In high-performance computing, transprecision computing serves as a critical paradigm for energy efficiency. By reducing the bit-width of floating-point variables (e.g., from 64-bit to 32-bit), systems can drastically reduce power consumption. However, this reduction introduces numerical errors. Finding the optimal configuration—the minimum precision required to maintain an acceptable error bound—is a complex optimization problem. The relationship between bit-width and error is non-linear, non-smooth, and frequently non-monotonic, making it difficult for standard analytical or data-driven models to capture, especially when training data is expensive to generate.

Methodology: Injecting Domain Knowledge

To address these challenges, the authors propose three distinct methods for embedding computer science principles directly into Neural Network (NN) architectures:

1. Additional Feature Extraction

Programs possess inherent structures that can be represented as dependency graphs. By analyzing these graphs, the authors identified variable assignments (e.g., $V_1 = V_2 + V_3$) and created features representing the precision differences between source and destination variables. This provides the model with logical hints about where energy might be wasted or where error might propagate.

2. Ad-hoc Graph Topology (GCNN)

Rather than using a standard dense network, the researchers employed Graph Convolutional Neural Networks (GCNNs). In this approach, the program's dependency graph serves as the actual input structure for the network, allowing the learning process to respect the physical connections between variables.

A directed graph representing variable dependencies in a program, used to define the topology of a Graph Convolutional Neural Network.

3. Semantic Based Regularization (SBR)

This method modifies the loss function to enforce logical constraints, specifically monotonicity. Theoretically, increasing the precision of a variable should not increase the resulting error. SBR adds a penalty term during training that "punishes" the model if its predictions violate this rule, ensuring the model remains physically consistent even if the data is noisy.

Experimental Setup and Results

The methods were evaluated on six numerical micro-benchmarks: Fast Walsh Transform (FWT), generalized vector addition (saxpy), matrix convolution, discrete wavelet transform (dwt), correlation matrix computation, and BlackScholes option pricing. Data was generated using the FlexFloat library, with configurations sampled via Latin Hypercube Sampling (LHS) to ensure diversity in small datasets (up to 5,000 samples).

Key Findings

  • Significant Accuracy Gains: Knowledge-injected models outperformed purely data-driven baselines (such as AutoSklearn) by an average of 38% to 39.7%. In the BlackScholes benchmark, error reduction reached as high as 47.5%.
  • Data Efficiency: Models utilizing domain knowledge and trained on only 500 samples often outperformed "pure" models trained on 5,000 samples, demonstrating that domain knowledge can effectively substitute for large volumes of data.
  • The GCNN Paradox: Interestingly, the GCNN architecture performed worse than simpler dense networks in some cases. This suggests that while program structure is vital, standard graph layers may require further tuning to handle the specific "physics" of floating-point error propagation.
  • Logical Consistency: While SBR did not always yield the lowest Mean Absolute Error (MAE), it produced models that were more useful for optimization because they consistently respected the principle of monotonicity.

Conclusion

This research highlights that "pure" machine learning is often insufficient for specialized engineering tasks like transprecision computing. By informing models of the underlying program structure and logical constraints, we can achieve higher accuracy and better data efficiency. Future work will focus on hybridizing these injection methods and scaling the approach to larger, real-world applications with thousands of interdependent variables.

Summary updated

BibTeX
@inproceedings{borghesi2020injective,
  author = {Andrea Borghesi and Federico Baldo and Michele Lombardi and Michela Milano},
  title = {{Injective Domain Knowledge in Neural Networks for Transprecision Computing}},
  booktitle = {LOD},
  year = {2020},
  url = {https://openreview.net/forum?id=DCIKruRXJd},
}
Figure