Automatic Source Code Generation for Bayesian Network Inference

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current inference engines for Bayesian networks (BNs) face inefficiencies due to inherent overhead from being written in generic high-level programming languages and the need for rewriting or using inter-language communication protocols to compute probabilities across different programming languages, leading to time-consuming and error-prone processes.

Innovation Solution

A system and method that utilize partial evaluation to determine necessary probability calculations and automatic source code generation to output these calculations in a specific programming language, reducing overhead and enabling computation of probabilities without language restrictions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If inference engines are written in generic high-level programming languages, then they are easier to implement and maintain, but they incur inherent computational overhead and are not efficient

Engineering Contradiction:
Improveease of implementationVSAvoidcomputational efficiency
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The patent transforms the inference engine from a generic high-level program into a specialized low-level program by changing the level of abstraction parameter. This is achieved through automatic source code generation that translates generic inference algorithms into optimized, language-specific code, thereby reducing computational overhead while maintaining ease of implementation through the generation process.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent creates optimized copies of the inference engine in different programming languages through automatic source code generation. Instead of manually rewriting the engine for each language, the system automatically generates language-specific copies from a generic specification, eliminating the need for manual rewriting while achieving native performance in each target language.

Inventive Principle:
Principle #26Copying

2Adaptability or versatility

If inference engines are rewritten in different programming languages, then they can compute probabilities across different languages, but the process is time-consuming and error-prone

Engineering Contradiction:
Improvelanguage compatibilityVSAvoidtime for rewriting
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent creates a universal source code generation system that can produce inference engines for multiple programming languages from a single generic specification. This multi-functional approach allows the same generation process to output code in different languages, achieving language compatibility without requiring separate rewriting processes for each language.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The system enables self-service by automatically generating the necessary source code in different programming languages without requiring manual intervention. The automatic source code generation process handles the translation and adaptation to different languages autonomously, eliminating the time-consuming and error-prone manual rewriting process.

Inventive Principle:
Principle #25Self-service

3Productivity

If manual rewriting of inference engines is performed, then language-specific optimization is achieved, but the process is error-prone and requires significant effort

Engineering Contradiction:
Improvecomputational performanceVSAvoiderror rate
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system performs self-service by automatically generating optimized, language-specific inference engine code without manual intervention. The automatic source code generation process eliminates human errors associated with manual rewriting while maintaining the computational performance benefits of language-specific optimization.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent incorporates feedback mechanisms in the automatic source code generation process to ensure correctness and optimize performance. The generation system uses feedback from the generic specification and target language requirements to produce accurate, optimized code, thereby reducing errors while achieving computational performance.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS8510246B2Automatic source code generation for computing probabilities of variables in belief networks
Publication Date: 2013.08.13 CHARLES RIVER ANALYTICS INC
  • US8510246B2 patent drawing
  • US8510246B2 patent drawing
  • US8510246B2 patent drawing

AI summary

A system for computing probabilities of variables in a belief network includes a data acquisition interface configured to receive data representative of the belief network. The system further includes a partial evaluator configured to carry out a partial evaluation algorithm that determines the probability calculations that must be performed on the received data in order to compute the probabilities of the variables in the belief network. The system further includes a source code generator configured to output the probability calculations as a source code in a programming language.