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

TL;DR

This paper demonstrates that "pure" machine learning often struggles with the complex, non-linear nature of transprecision computing—where bit-widths are tuned to save energy. By "injecting" domain knowledge—such as program dependency graphs and logical constraints like monotonicity—into neural networks, the authors achieved a nearly 40% improvement in error prediction accuracy over purely data-driven models.

What Problem Does This Paper Address?

In the world of high-performance computing, energy is a finite resource. Transprecision computing is a paradigm that saves energy by reducing the number of bits used to represent floating-point variables (e.g., moving from 64-bit to 32-bit or even lower). However, there is a catch: reducing precision introduces errors.

Finding the "sweet spot"—the minimum precision required to stay within an acceptable error bound—is incredibly difficult. The relationship between bit-width and error is non-linear, non-smooth, and often non-monotonic due to numerical instabilities. Traditional analytical models can't capture this complexity, and standard Machine Learning (ML) models often fail because data is expensive to generate, leaving them with small, noisy datasets. The authors ask: Why should an ML model have to learn the basic laws of computer science from scratch when we already know them?

Methods

The authors propose three distinct ways to "inject" what we already know about a program into a Neural Network (NN):

  1. Additional Feature Extraction: Programs aren't just lists of variables; they have structure. The authors used the program's dependency graph to identify assignments (e.g., $V_1 = V_2 + V_3$). They created new features that represent the difference in precision between these variables. If a "source" variable has more bits than its "destination," it’s often a waste of energy—this is a logical hint the model can use.
  2. Ad-hoc Graph Topology (GCNN): Instead of a standard dense network, they employed Graph Convolutional Neural Networks (GCNNs). This architecture treats the program's dependency graph as the actual input structure, allowing the network to "feel" the connections between variables during the learning process.
  3. Semantic Based Regularization (SBR): This involves modifying the loss function. They added a penalty term that enforces monotonicity. In theory, increasing precision should never increase the error. SBR "punishes" the model during training if it makes a prediction that violates this logical rule.

Datasets

The researchers evaluated their methods on six numerical micro-benchmarks representing common computational tasks:

  • FWT: Fast Walsh Transform.
  • saxpy: Generalized vector addition.
  • convolution: Matrix convolution.
  • dwt: Discrete wavelet transform.
  • correlation: Correlation matrix computation.
  • BlackScholes: Option price estimation.

Data was generated using the FlexFloat library, with configurations sampled via Latin Hypercube Sampling (LHS) to ensure a diverse spread of precision settings. The datasets were relatively small (max 5,000 samples), reflecting the real-world cost of running these simulations.

Key Insights and Ideas

  • The "Structural Goldmine": The most significant gains didn't come from more complex math, but from simply telling the model how the variables were related. Feature engineering based on the dependency graph was the "MVP" of the study.
  • The GCNN Paradox: Surprisingly, the GCNN—the most sophisticated architecture tested—performed poorly, often worse than simple dense networks. This suggests that while program structure is important, standard GCNN layers might not be the right tool for the specific "physics" of floating-point error propagation without further tuning.
  • Logic over Raw Accuracy: While Semantic Based Regularization (SBR) didn't always lower the Mean Absolute Error (MAE) more than other methods, it produced models that were more "physically" consistent. For optimization tasks, a model that respects monotonicity is often more useful than one that is slightly more accurate but logically erratic.

Key Results

  • Massive Accuracy Boost: Models using injected domain knowledge outperformed purely data-driven baselines (like AutoSklearn) by an average of 38% to 39.7%.
  • Best Case Scenario: In some benchmarks, like the BlackScholes model, the error reduction reached as high as 47.5%.
  • Data Efficiency: The "knowledge-injected" models trained on just 500 samples often outperformed "pure" models trained on 5,000 samples, proving that domain knowledge acts as a powerful substitute for massive datasets.

Limitations and Future Work

  • GCNN Optimization: The authors acknowledge the disappointing performance of GCNNs and suggest that a more "careful exploration" of graph-based architectures is needed.
  • Hybrid Approaches: This paper tested the three injection methods separately to measure their individual impact. The next logical step is a "super-model" that combines feature engineering, graph topology, and SBR simultaneously.
  • Scaling Up: The study focused on micro-benchmarks. Future work will need to address whether these techniques hold up when applied to massive, 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},
}

Loading related content...

Figure