Introduction
Probabilistic Graphical Models (PGMs) are essential for edge AI, excelling at handling missing data, modeling causal relationships, and providing confidence levels. However, deploying these models on battery-powered devices is challenging due to high computational costs. While low-precision arithmetic can reduce energy consumption, it introduces quantization errors. Previous research often focused on errors at the input (leaf nodes), but in large arithmetic circuits, errors in intermediate operations can accumulate significantly. ProbLP addresses this by providing a holistic framework to predict error propagation and automatically design hardware that balances energy efficiency with accuracy.
The ProbLP Framework
ProbLP automates the transition from high-level probabilistic models to custom hardware (Verilog). The framework's workflow is depicted below:
The core components include:
- Analytical Error Bounding: Recursive mathematical models track error propagation through an Arithmetic Circuit (AC) for both fixed-point and floating-point formats.
- Range Analysis: To prevent overflow/underflow, the framework determines the absolute maximum value of any node. Since ACs use non-negative numbers, this is achieved with a single inference pass using inputs set to 1.
- Energy-Aware Selection: Using models calibrated for 65nm CMOS, ProbLP compares fixed-point and floating-point representations to select the most energy-efficient option meeting the user's error tolerance.
- Hardware Generation: The tool generates a fully-pipelined hardware accelerator in Verilog based on the optimal precision found.
Key Insights
A critical finding is that internal rounding errors often dominate the total inaccuracy. Furthermore, the choice of number format is query-dependent. For conditional probability queries ($P(q|e)$), fixed-point arithmetic often fails because small denominators can lead to massive relative errors. Floating-point arithmetic, with its scaling precision, proves much more robust for such cases.
Experimental Results
The framework was validated on several benchmarks, including Human Activity Recognition (HAR) and the Alarm Bayesian network.
Key findings include:
- Tight Error Bounds: As shown in the figures above, the theoretical error bounds are highly accurate, consistently staying above the actual observed errors.
- Energy Efficiency: On the HAR dataset, ProbLP achieved a 50% reduction in energy (5.3 nJ vs. 10.8 nJ for 32-bit float) with negligible accuracy loss.
- Hardware Fidelity: The generated hardware's energy consumption closely matched the framework's predictions, confirming the tool's effectiveness in bridging theory and implementation.
Conclusion and Future Work
ProbLP demonstrates that choosing bit-widths for probabilistic inference can be transformed into a rigorous, automated optimization problem. Future work may involve extending energy models to other process nodes or FPGA architectures, utilizing more advanced optimization algorithms like Bayesian optimization for complex circuits, and exploring mixed-precision designs to further enhance efficiency.
Summary updated