Abstract:
In a data processing system, a method for implementing a factor graph having variable nodes and function nodes connected to each other by edges includes implementing a first function node and a on a first computer system, the first computer system being in network communication with a second computer system; establishing a network connection to each of a plurality of processing systems; receiving, at the first function node, soft data from a variable node implemented on one of the processing systems, the soft data including an estimate of a value and information representative of an extent to which the estimate is believed to correspond to a correct value; and transmitting, from the first function node to the one of the processing systems, soft data representing an updated estimate of the value.

Description:
CROSS REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application claims the benefit of U.S. Provisional Application No. 61/306,876, titled “DISTRIBUTED FACTOR GRAPH SYSTEM,” filed on Feb. 22, 2010. The contents of which are incorporated herein by reference 
     
    
     STATEMENT AS TO FEDERALLY SPONSORED RESEARCH 
       [0002]    This invention was made with government support under FA8750-07-C-0231 awarded by the Defense Advanced Research Projects Agency (DARPA). The government has certain rights in the invention. 
     
    
     FIELD OF DISCLOSURE 
       [0003]    This disclosure relates to data-processing systems, and in particular, to data-processing systems for probabilistic computation. 
       BACKGROUND 
       [0004]    Today, substantial amounts of computer time are used essentially implementing Bayes formula to compute probabilities. For example, there exist on-line content distribution services that execute applications for predicting content that a consumer is likely to rate highly given content that the consumer has previously rated. Similarly, there exist retailing services that execute applications for predicting what products a consumer is likely to want to purchase given what that consumer has purchased before. Then, there exist search engines that attempt to predict what links might be relevant on the basis of search history. These applications essentially compute conditional probabilities, i.e. the probability of an event given the occurrence of prior events. 
         [0005]    Other probabilistic applications include procedures for guessing how to translate a webpage from one language to another, and large-scale Bayesian inference, including synthetic aperture reconstruction in radar imaging, image reconstruction in medical tomography, and predicting nucleic acid sequences associated with diseases. 
         [0006]    In the communications area, probabilistic computation arises when embedded and mobile applications in, for example, a cell phone, predict what bits were originally transmitted based on a received noisy signal. In robotics, there exist applications for predicting the most likely optimal path across difficult terrain. 
       SUMMARY 
       [0007]    The invention is based on the recognition that a distributed computer system can be used to implement a graph to be used for probabilistic computations with soft data. As used herein, soft data refers to an extent to which an estimate of a value is believed to be the correct value. In a factor graph, these beliefs concerning how likely an estimate conforms to a correct value propagate from one node to another. In so doing, the beliefs become progressively stronger until it approaches near-certainty. The process of ascertaining values in this way is often called “belief propagation.” 
         [0008]    The propagation of beliefs from one node to another can be carried out across a distributed computer system connected by a local area network, a wide area network, or even a global network such as the internet. Beliefs can be made to propagate from one node to another by pulling a message from a node, or by having a node push its messages to other nodes. In the case of the internet, beliefs can be pushed by adapting the existing RSS feed mechanism, and pulled by adapting the existing hyperlink mechanism. 
         [0009]    In one aspect, the invention features a method for implementing a factor graph having variable nodes and function nodes connected to each other by edges includes implementing a first function node and a on a first computer system, the first computer system being in network communication with a second computer system; establishing a network connection to each of a plurality of processing systems; receiving, at the first function node, soft data from a variable node implemented on one of the processing systems, the soft data including an estimate of a value and information representative of an extent to which the estimate is believed to correspond to a correct value; and transmitting, from the first function node to the one of the processing systems, soft data representing an updated estimate of the value. 
         [0010]    In some practices, receiving the soft data includes receiving the information from a soft equals node. 
         [0011]    Other practices include providing, to the variable node, information for generating a new estimate of the value of the variable associated with the variable node. 
         [0012]    Alternative practices include those in which edges are implemented by a network connection, those in which the variable node includes an equals gate, and those in which a unique identifier is assigned to the variable node. 
         [0013]    In yet other practices, receiving the soft data includes activating a hyperlink corresponding to the first function node, and transmitting the soft data includes activating a hyperlink corresponding to the first variable node. 
         [0014]    Other aspects of the invention include a computer-readable medium having encoded thereon software for implementing any of the foregoing methods, as well as a data processing system including a server configured to execute any computer-readable media having encoded thereon software for implementing any of the foregoing methods. 
         [0015]    In another aspect, the invention features a distributed computer system for implementing a factor graph. Such a system includes: first computer systems implementing function nodes of the factor graphs; and second computer systems implementing variable nodes of the factor graphs. The first and second computer systems are in data communication over a network. 
         [0016]    These and other features will be apparent from the accompanying detailed description and the figures, in which: 
     
    
     
       DESCRIPTION OF THE DRAWINGS 
         [0017]      FIG. 1  shows exemplary DMPL code for implementing a Sudoku factor graph; 
           [0018]      FIG. 2  shows a Sudoku array during an iteration of the process implemented by  FIG. 1 ; 
           [0019]      FIGS. 3-5  show exemplary applications of a web solver; 
           [0020]      FIGS. 6A-6B  show DMPL code for implementing a factor graph corresponding to the example in  FIG. 5 ; 
           [0021]      FIGS. 7A-7B  show estimates of locations of phones in the example of  FIG. 5 ; 
           [0022]      FIGS. 8A-8E  show successive probability distributions for estimating the locations of phones in the example of  FIG. 5 ; 
           [0023]      FIG. 9  shows a soft equals gate used for implementing a factor graph; 
           [0024]      FIG. 10  shows two factor graphs connected to form a larger factor graph by having an edge that spans a network; 
           [0025]      FIG. 11  shows replication of a variable between two factor graphs connected to each other via a network; and 
           [0026]      FIG. 12  shows two factor graphs, each of which is connected to a common equals node of a third factor graph via a network. 
       
    
    
     DETAILED DESCRIPTION 
       [0027]    Standard programming languages like C and C++ are ideal for writing code intended to be compiled to and run on a standalone computer such as a PC or even on a super-computer cluster. Similarly, existing probability programming languages are good for writing probabilistic graphical models or generative models to be solved on a standalone computer or even on a standalone super-computer such as the Amazon cloud. 
         [0028]    Because of the growing importance of probabilistic programming, an academic renaissance has emerged in probability programming languages. An early example of a probability programming language is IBAL, which was created by Avi Pfeffer in 1997. Known languages include Alchemy, Bach, Blaise, Church, CILog2, CP-Logic, Csoft, DBLOG, Dyna, Factorie, Infer.NET, PyBLOG, IBAL, PMTK, PRISM, ProbLog, ProBT, R, and S+. Most of the other languages in this list have been created in the last 5 years. The first conference on Probability Programming Language was the NIPS 2008 Conference, which was held beginning Dec. 13, 2008 in Whistler, Canada. 
         [0029]    One such probability programming language is the Distributed Mathematical Programming Language (DMPL), which is described in U.S. Provisional Application 61/294,740, filed Jan. 13, 2010, and entitled “Implementation of Factor Graph Circuitry.” 
         [0030]    DMPL has been used to create a number of interesting demos.  FIG. 1  shows exemplary DMPL source code for implementing a Sudoku solver. The DMPL source code essentially describes the rules of the game. During execution, a solver iteratively anneals to a satisfying solution of the constraints.  FIG. 2  is a snapshot of a solution at an intermediate point in the annealing process. Note that the guesses in some squares are still in superposition. 
         [0031]    However, there has been no web-based probability programming language suitable for carrying out probabilistic computation between processors connected across a network, such as the internet. Nor does there exist a web service for carrying out probabilistic computations, hereafter referred to as a “web solver.” 
         [0032]    A web solver can be viewed as implementing a factor graph in which constraint nodes and variable nodes are connected by edges. Typically, the constraint nodes would reside in a cloud, and the variable nodes would reside on local devices. Factor graphs provide a known way to determine the most likely combination of variables given constraints among the variables. Such factor graphs operate by beginning with an initial set of variables, and allowing the variables to converge to their most likely values after multiple iterations. 
         [0033]    A number of practical applications exist for a web service that implements a factor graph for probabilistic computations. For example, in such a service, mobile devices could collect sensor streams, such as audio and video data, and perform low-level inference to extract statistics for transmission to a cloud. These statistics could include the probability of certain events occurring. The cloud would receive streams of data from multiple devices, as shown in  FIG. 3 , and perform inferences jointly across those streams. Such inferences can include activity clustering and categorization. The cloud would then transmit marginal probabilities to the mobile devices as factor graph messages to prime further inference. 
         [0034]    Another example would involve the prediction of engine failure in an automobile, as shown in  FIG. 4 . In such a case, each user would register his automobile&#39;s year, make and model with the cloud. Mobile devices would then collect engine noise audio and information from the vehicle computer. The mobile devices would use this data to extract statistics for transmission to the cloud. The cloud would then cluster automobiles on the basis of their condition, and transmit marginal probabilities to the mobile devices as factor graph messages. These messages would prime the devices to look for specific signatures in the data. 
         [0035]    Another example is that of enabling a plurality of suitably equipped mobile devices, such as personal digital assistants or cell phones, to mutually triangulate their relative positions by emitting ultrasound and measuring the amplitude of received sounds from neighboring devices, as shown in  FIG. 5 . Exemplary DMPL code for carrying out this function is shown in  FIGS. 6A-6B . 
         [0036]      FIGS. 7A-7B  shows the solution progressing from an estimate after two iterations in  FIG. 7A  to an improved estimate after five iterations in  FIG. 7B . The actual positions of the devices are shown as blue crosses, and the solver&#39;s estimates of location are shown as green circles. The solver&#39;s successive estimates are in fact probability distributions with two spatial variables. The variances of these distributions decrease with each iteration of the solver. Five successive estimates are shown in  FIGS. 8A-8E . 
         [0037]    In all of these examples, the mobile devices or other client devices (such as laptops, PC&#39;s, or embedded processors) have sensors or other I/O devices that enable them to interact with the physical world. 
         [0038]    The preceding examples also involve a computing “cloud.” The computing cloud is commonly understood to be a set of server farms that are accessible over the web, for example over the internet and/or a wireless network. However, a computing cloud could also be a less elaborate arrangement, such as that described in connection with  FIG. 5 , in which the “cloud” could simply be a laptop near the phones that has more processing power than the phones. The clients and the cloud can therefore communicate to one another via a communication protocol such as the http protocol. 
         [0039]    Various other relationships can exist between the cloud and the client devices. For example, in one embodiment, communication is one-way: clients only communicate to the cloud, but the cloud does not communicate to the client. In another embodiment, communication is bi-directional or multi-directional. In another embodiment, there is no “cloud” or “server” at all, but rather a “mesh” or “ad hoc” network of devices that are in communication with each other. 
         [0040]    In one embodiment, a probability programmer(s) would create a Bayesian model (such as a probabilistic graphical model or generative model) that relates variables to one another. For example, in the cell phone acoustic location example described in connection with  FIG. 5 , the model would be a set of trigonometric constraints that enforce consistency on the allowable locations of a set of phones given (noisy) information about their relative distances from one another. This model could be hosted on the cloud. In this example, the cloud might just be a laptop that is in communication over a network with the phones. 
         [0041]    Another way to implement the procedure described in  FIG. 5  is for each client (i.e., each phone) to have a probabilistic graphical model with just a single variable representing the client&#39;s position in Euclidean space. Associated with this variable would be a prior estimate of the client&#39;s position from its GPS receiver subsystem. For convenience, we refer to the variable representing the first phone&#39;s location as “1”. The second and third phones will have variables named “2” and “3” respectively to identify their locations. 
         [0042]    In one of the most popular species of probabilistic graphical models (Forney factor graphs), a variable node is also known as an equals gate. However, regardless of what it is called, a variable node&#39;s function is the same: to aggregate various estimates for a value of a variable and redistribute a new estimate for that value. For example for a binary variable, X in {0,1}, the equals gate would be of the form shown in  FIG. 9 . 
         [0043]    Each client has a model for its position. This model is embodied in a single variable node or equals gate. This node can estimate the position of the client, and send outgoing messages (marginal probabilities) for the position of the client. The node can also receive messages that will influence its estimate for the position of the client. 
         [0044]    In a conventional probabilistic graphical model, each of these client position nodes  1 ,  2  . . . would be connected by edges to one or more constraint nodes (also known as “function nodes”) in the model. In the client location example of  FIG. 5 , the constraint nodes would enforce consistency on the allowable locations of the clients by enforcing trigonometric identities that hold true for clients existing in Euclidean space. Exemplary DMPL source code for implementing these constraints is shown in  FIGS. 6A-6B . 
         [0045]    Given the factor graph and prior information for some or all of the variables, a solver algorithm (such as the sum-product algorithm) can then perform iterative message passing across edges in the graph to produce estimates for the clients&#39; positions. This all generally happens on one computer. In the past, algorithms like the sum-product have been parallelized on multi-core computers or super-computers by multi-threading, batch queuing, or the like. 
         [0046]    However, in client localization example of  FIG. 5 , a client location node is stored and computed on the client with which it is associated, while constraint nodes are stored and calculated on a cloud, which could be implemented on nearby laptop. The cloud could also store and compute other variable nodes that rely on a priori knowledge of other constraints. In the specific example show, one constraint might be that all clients are on a table having a known size and shape. In that case, there would be constraints on how far apart all the clients could be from one another. 
         [0047]    There is no easy way to implement this system with existing probability programming languages, in part because there is no easy way to pass messages between the clients and the cloud, or from one client to another. One generally has to go outside of the probability programming language and send probabilities to separate software that handles web communications. 
         [0048]    The foregoing disadvantage is overcome by having the edges in the graph be network connections. In this scheme, each variable receives a URL or other unique identifier. The probability program itself is like an .XML or .HTML document, in that it is hosted on a web solver. The web solver re-computes this variable upon receiving a request for its value, i.e. a request for that URL. Alternatively, the variable node can be regularly recomputed and syndicated by, for example, an RSS feed. 
         [0049]    This web-based probability programming and probability solving infrastructure makes possible large distributed networks of modelers and solvers. For example, climate modelers on different continents could each build a model of the weather dynamics on their continent. They could then link their models to other models using soft-equals-hyperlinks. If they hosted their models on a server, and syndicated their current weather predictions, the other servers would have this information made available to them over the soft-equals-hyperlinks These other servers could, in turn, update their own forecasts. In this way probabilistic messages (marginals, particles, parameters, etc.) can be seamlessly passed over the network, and all parts of the model can be updated appropriately, despite being hosted on different computers in different locations. 
         [0050]      FIG. 10  illustrates first and second factor graphs in which a variable node on one factor graph connects to a constraint node on another factor graph, with the connecting edge traversing a network. Message passing between these two nodes is conveniently carried out by hyperlink or RSS feed. The net effect is a larger factor graph whose existence arises as a result of a network connection. 
         [0051]      FIG. 11  illustrates first and second factor graphs, each of which implemented on different clients connected to each other via a network. One variable node in the first factor graph is effectively made common to both factor graphs via a network connection between the two clients. While the example shown in  FIG. 10  is simple, it is apparent that the architecture shown in  FIG. 10  can readily be extended to multiple hyperlinks between multiple factor graphs. 
         [0052]      FIG. 12  illustrates a similar configuration, in which two clients are connected to a server, with the common variable node now residing on the server rather than on the clients. The variable node in  FIG. 12  is accessible via a hyperlink from any client. 
         [0053]    In certain algorithms, such as Gibbs sampling, there is no equals gate. Nevertheless, there are variable nodes that receive updates from neighboring constraint nodes. In a Gibbs sampling web solver (and in similar embodiments), variable nodes are hyperlinked to constraint nodes and constraint nodes are hyperlinked to variable nodes without the need for equals gates. 
         [0054]    In certain solver algorithms, such as the sum-product algorithm, the order in which messages are updated in the graph can make a difference to the final answer that is computed for a given graph. In conventional implementations, the message update schedule is under global control by the solver algorithm on a single computer. However, in a distributed factor graph, it can be difficult to maintain global control over which particular messages are updated and which order. 
         [0055]    The flooding schedule is the most well known schedule for the sum-product algorithm. In a flooding schedule, initial messages from equals gates to function nodes are computed. Then once this is completed, messages are passed from the constraint nodes to the equals gates. 
         [0056]    Another approach to the scheduling problem described above is to have a centralized server that synchronizes all message passing, as described in connection with  FIG. 5 . 
         [0057]    A centralized server can have a number of drawbacks when used in connection with a larger and less centrally organized system. Even if it were possible to keep track of all messages in a huge network and to somehow guarantee that they obeyed the flooding schedule, such a protocol might lead the entire network to lockup if one server were down or unable to deliver the messages from its variables to their destination constraints, or its constraints are unable to deliver their messages to their corresponding variables. 
         [0058]    Another approach to the scheduling problem described above is a randomized schedule in which messages in the graph are updated randomly. This kind of schedule seems more amenable to distributed message passing over the network as described herein.