I am working on a problem where I have to model a graph topology, where the nodes are logic/arithmetic operations that can be applied to the input. The network receives a multi-dimensional input, and returns a multi-dimensional processed output with less dimensions. The only things I have to do this are a set of input/output pairs and a set of probable nodes.

The system itself follows a few constraints:

  • The nodes are unique, so there is a limited amount of possible subsets that can compose the graph.
  • The input must enter a single node, and the output must be returned from a single node, even if the path of the information branches within the network. In case multiple topologies are possible, the minimal is the answer.

There are also a few aggravants:

  • Since the nodes are a "probable list", there is no guarantee that the system is possible, but it is important to try to find the closest match possible, as a machine learning system uses the closeness to satisfaction to find new sets of probable nodes.
  • Nodes might receive multiple or just one input, and they might output one or multiple streams of output.

Given this system, I am wondering if anyone here knows of an existing algorithm that solves this problem(or something close that can be adapted).

My question thus is as follows:

Given a set of arithmetic and logical functions and a set of input/output pairs, is there an algorithm to find a graph of functions that satisfies all inputs/output pairs?

  • $\begingroup$ May be try bayesian networks. ... $\endgroup$ Commented Dec 29, 2019 at 15:28

1 Answer 1


That problem is commonly called dataflow programming, a directed graph of the data flowing between operations.

There are many options to find valid data flow graphs:

  1. Brute force - Enumerate all possible graphs, then evaluate them.
  2. Beam search - Create likely candidates, then evaluate them to explore the space.
  3. Architecture search - Since TensorFlow is a dataflow programming language, complete Neural Architecture Search (NAS) within its language to find valid graphs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.