Abstract:
Some general aspects relate to systems and methods of analog computation using numerical representation with uncertainty. For example, a specification of a group of variables is accepted, with each variable having a set of at least N possible values. The group of variables satisfies a set of one or more constraints, and each variable is specified as a decomposition into a group of constituents, with each constituent having a set of M (e.g., M&lt;N) possible constituent values that can be determined based on the variable values. The method also includes forming a specification for configuring a computing device that implements a network representation of the constraints based on the specification of the group of variables. The network representation includes a first set of nodes corresponding to the groups of constituents, a second set of nodes corresponding to the set of constraints, and interconnections between the first and the second sets of nodes for passing continuous-valued data.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application claims the benefit of U.S. Provisional Application No. 61/156,729, titled “Analog Computation Using Soft Bytes,” filed Mar. 2, 2009. 
         [0002]    This application is also related to U.S. Provisional Application No. 61/156,792, titled “Belief Propagation Processor,” filed Mar. 2, 2009, and U.S. Provisional Application No. 61/156,794, titled “Circuits for Soft Logical Functions,” filed Mar. 2, 2009. The content of the above three applications is incorporated herein by reference. 
     
    
     STATEMENT AS TO FEDERALLY SPONSORED RESEARCH 
       [0003]    This invention was made with government support under FA8750-07-C-0231 awarded by the Defense Advanced Research Projects Agency (DARPA). The government may have certain rights in this invention. 
     
    
     BACKGROUND 
       [0004]    This application relates to analog computation using numerical representations with uncertainty, for example, as represented by soft bytes. 
         [0005]    Statistical inference can involve manipulation of quantities that represent uncertainty in numerical values. Statistical inference can make use of statistics to draw inferences based on incomplete or inaccurate information. Statistical inference problems can be found in many application areas—from opinion polling to medical research to telecommunications systems. The field of statistical inference encompasses a wide variety of techniques for performing this task. 
         [0006]    In some applications, statistical inference problems involve extracting information from a measurement of data that has been corrupted in some way. For example, a wireless receiver typically receives one or more radio signals that have been corrupted by noise, interference, and/or reflections. Statistical inference techniques can be used to attempt to extract the original transmitted information from the corrupted signal that was received. 
         [0007]    In statistical inference, the language of probability is often used to quantitatively describe the likelihood that a particular condition is true. The meaning of these probabilities can be interpreted in different ways, although these interpretations are sometimes interchangeable. For example, very generally, a probability can be interpreted either as the degree of confidence that a condition is true, or alternatively as the fraction of times the condition will be true among a large number of identical experiments. Probabilities can be represented in the linear domain, for example, as real numbers from 0 to 1, where 1 is interpreted as complete confidence that the condition is true, and 0 is interpreted as complete confident that the condition will not occur. Probabilities can also be represented in the logarithmic domain, for example, using log likelihood ratios (or LLRs) representing the log of the ratio of the linear probabilities (the log odds). In some examples, the LLR of a binary variable x is defined as the logarithm of the ratio of the probability of x being 1 and the probability of x being 0, i.e., 
         [0000]    
       
         
           
             
               LLR 
                
               
                 ( 
                 x 
                 ) 
               
             
             = 
             
               
                 log 
                  
                 
                   ( 
                   
                     
                       p 
                        
                       
                         ( 
                         
                           x 
                           = 
                           1 
                         
                         ) 
                       
                     
                     
                       p 
                        
                       
                         ( 
                         
                           x 
                           = 
                           0 
                         
                         ) 
                       
                     
                   
                   ) 
                 
               
               . 
             
           
         
       
     
         [0000]    In LLR representations, complete certainty of a condition being true is represented by +∞, complete certainty of a condition being false is represented by −∞, and complete uncertainty is represented by a value of 0. 
         [0008]    Examples of techniques for solving statistical inference problems or for generating approximate solutions to statistical inference problems include belief propagation, which exploits the dependency (or the lack of dependency) between variables that can be translated into network elements. Some forms of belief propagation operate by passing messages between nodes in a factor graph that represents the system model, where each message represents a summary of the information known by that node through its connections to other nodes. 
       SUMMARY 
       [0009]    Observing the fact that “soft”-statistical data is often analog in nature, i.e., represented by real values in an interval, it is possible to implement a belief propagation algorithm, or more generally, a statistical inference algorithm, using analog electrical circuits. Since only one analog signal is needed to represent a unit of statistical data rather that multiple signals for different bits of the digital signal representing the same data, the savings in hardware and power dissipation can be significant. Further, in some cases, analog computation can be faster than digital computation, especially for computationally intensive processing tasks. 
         [0010]    One general aspect of the invention relates to a method of computation using numerical representation with uncertainty. The method includes accepting a specification of a group of variables, each variable having a set of at least N possible values. The group of variables satisfies a set of one or more constraints, and each variable is specified as a decomposition into a group of constituents, with each constituent having a set of M (e.g., M&lt;N) possible constituent values that can be determined based on the variable values. The method also includes forming a specification for configuring a computing device that implements a network representation of the constraints based on the specification of the group of variables. The network representation includes a first set of nodes corresponding to the groups of constituents, a second set of nodes corresponding to the set of constraints, and interconnections between the first and the second sets of nodes for passing continuous-valued data. 
         [0011]    The computing device configured according to said specification is operable to accept a first set of quantities each characterizing a degree of association of one constituent of one of the group of variables with one of the M possible constituent values; and determine a second set of quantities each characterizing a degree of association of one constituent of one of the group of variables with one of the M possible constituent values by passing the first set of quantities and intermediate data along the interconnections in the network representation. 
         [0012]    Embodiments may include one or more of the following features. 
         [0013]    The specification for the computing device may include an analog circuit specification. The analog circuit specification may include a discrete-time analog circuit specification. In some examples, the specification for the computing device includes software instructions for execution on a processor. 
         [0014]    The set of constraints on the group of variables may include a set of arithmetic constraints, a set of logical constraints, or a combination of both. 
         [0015]    In some embodiments, the specification of the group of variables represents a compressed representation of a first specification of the variables. The specification of the group of variables may be formed based on the first specification of the variables. This first specification may include a probability distribution representation of the variables, which may be a continuous or a discrete probability distribution, or a probability distribution function of the variables. 
         [0016]    In some embodiments, the specification of the variables is formed by applying binary decomposition to the probability distribution representation of the variables. In some other embodiments, it is formed by applying the Fourier transform to the probability distribution representation of the variables. 
         [0017]    In some embodiments, the probability distribution representation of the variables includes quantities characterizing a degree of association of each one of at least some of the variables with the one or more of the at least N possible values. 
         [0018]    The degree of association of one constituent of a variable with one of the M possible constituent values may be represented in the probability domain, or alternatively, be represented in the logarithmic domain. 
         [0019]    Another general aspect of the invention relates to a method including accepting a first set of quantities, each quantity being associated with one of M possible constituent values of a constituent of one of a group of input variables, each variable having a set of at least N possible values. Signals representing the first set of quantities are provided to computing circuitry implementing a network representation of a set of constraints on the input variables. The network representation includes a first set of nodes each corresponding to one of a group of constituents of a respective input variable, a second set of nodes corresponding to the set of constraints, and interconnections between the first and the second sets of nodes for passing continuous-valued data. The method also includes accepting, from the computing circuitry, signals representing a second set of quantities, each associated with one of M possible constituent values of a constituent of one input variable. 
         [0020]    Embodiments of this aspect may include one or more of the following features. 
         [0021]    The method also includes determining the first set of quantities from a first specification of the group of input variables, wherein the first specification includes quantities characterizing a degree of association of each of at least some input variables with a different one of the at least N possible values. 
         [0022]    According to the signals representing the second quantities, a set of output is generated, with each output signal representing a degree of association of one of the group of input variables with a corresponding one of the at least N possible values. 
         [0023]    In some embodiments, the computing circuitry includes analog circuits, which may include a clocked analog circuit. The clocked analog circuit includes soft logic gates for processing continuous-valued signals. The soft logic gates include one or more of soft Equal gates, soft XOR gates, soft AND gates, soft OR gates. 
         [0024]    In some embodiments, the computing circuitry includes a processor configured by software instructions. 
         [0025]    Another general aspect of the invention includes a computing device having computing circuitry for applying a network representation of a set of constraints on a group of input variables, each input variable having a set of at least N possible values. The network representation includes a first set of nodes each corresponding to one of a group of constituents of a respective input variable, a second set of nodes corresponding to the set of constraints, and interconnections between the first and the second sets of nodes for passing data. The computing device also includes an input processor for forming signals representing a first set of quantities, each quantity being associated with one of M possible constituent values of a constituent of one input variable, and for providing the formed signals to the computing circuitry. The computing device further includes an output processor for accepting signals generated by the computing circuitry representing a second set of quantities, each quantity being associated with one of the M possible constituent values of a constituent of one input variable. 
         [0026]    Embodiments may include one or more of the following features. 
         [0027]    The interconnections between the first and the second sets of nodes may pass continuous-valued data, or alternatively, quantized and/or digitized data. 
         [0028]    In some embodiments, the computing circuitry is configured according to the network representation. In some other embodiments, the computing circuitry is configurable according to the network representation. 
         [0029]    The computing circuitry is operable to accept a specification of the network representation of the set of constraints; and configure the circuitry to implement the network representation of the set of constraints according to the specification of the network representation. 
         [0030]    Some embodiments of the various aspects may include one or more of the following advantages. 
         [0031]    In some applications, there are gains to be had from optimizing computing systems for probabilistic inference instead of for logical inference. Designing probabilistic machinery may result in significant performance improvement (e.g., increase in speed and/or reduction in power consumption) in probabilistic computations as compared to a conventional digital machines. 
         [0032]    In this document, signals representing “a degree of an association” include signals that can represent a non-absolute measure, or a measure that is different from a mere binary decision of absolute association (true) or absolute non-association (false). Such signals may be continuous-valued signals, for instance, that can have levels corresponding to numerical values within the range of (0, 1) (non-inclusive) as well as extreme values 0 or 1, or be signals that have levels corresponding to a gradation of a range of numerical values that results in multiple quantized progressions. In some implementations, the degree of an association is presented by the signal as a probability representation in a linear domain (e.g., linear probabilities), a probability representations in a logarithmic domain (e.g., log odds, log likelihood ratios), or representations of certainty or likelihood that are not strictly probabilistic. 
         [0033]    Other features and advantages of the invention are apparent from the following description, and from the claims. 
     
    
     
       DESCRIPTION OF DRAWINGS 
         [0034]      FIGS. 1A-1C  illustrate a technique for constructing a soft processor that is configured to process the probabilistic information of a set of multi-state variables. 
           [0035]      FIG. 2  illustrates an example of forming a compressed representation of the original probability distribution of a 256-state variable. 
           [0036]      FIG. 3  illustrates an example of building a network of variable and check nodes that satisfies a set of two constraints. 
           [0037]      FIG. 4  illustrates an example of implementing belief propagation in the network of  FIG. 3 . 
           [0038]      FIG. 5  is a block diagram of an exemplary soft processor for solving magic square problems. 
       
    
    
     DETAILED DESCRIPTION 
     1 Overview 
       [0039]    Statistical inference problems are commonly found in a wide range of application areas, including telecommunications, speech and language processing, image processing, and data analysis. Some traditional approaches to solving statistical inference problems use a network of digital circuit components (e.g., logic gates) to implement belief propagation algorithms that operate by passing messages along the connections of those components. “Soft” information (i.e., information representing uncertainty) contained in each message is represented by a digital signal that represents multiple bit numbers, with each bit number being transmitted, for example, via a separate bit line. 
         [0040]    An alternative approach to implementing belief propagation algorithms uses analog electrical circuits, in which case soft information representing a single value with uncertainty can be represented by a single analog signal (e.g., a voltage or a current-encoded signal). Some designs of analog circuits of soft logical functions (e.g., soft Equals, soft XOR, and soft AND gates) have been shown to be able to achieve a substantial reduction in power consumption and silicon area when compared with their digital counterparts. 
         [0041]    Some examples of analog circuits that operate on probabilities of binary variables are described, for example, in U.S. Provisional Application No. 61/156,794, titled “Circuits for Soft Logical Functions,” filed Mar. 2, 2009. In some of these examples, each variable assumes two possible states, “0” and “1,” and the probabilities of one or more variables being at state “0” or “1” can be processed to infer the state of other variables. Exemplary use of such analog circuits in constructing analog belief propagation processor is discussed, for example, in U.S. Provisional Application No. 61/156,792, titled “Belief Propagation Processor,” filed Mar. 2, 2009. 
         [0042]    The first part of the following description extends the design and application of statistical inference techniques in the analog domain to apply to systems having variables that can take any finite (and possibly large) number of states. 
         [0043]    For example, assume that a system includes at least two variables x and y, with x having N number of possible states and y having M number of possible states, where both N and M are greater than or equal to 2. The probability distribution of variable x may be represented as a vector of probabilities with one element corresponding to each possible state, i.e., p x =[p(x=0), p(x=1), p(x=2), . . . , p(x=N=N−1)], 
         [0000]    with p(x=0) representing the probability of x being at state “0.” Similarly, the probability of variable y may be represented as p y =[p(y=0), p(y=1), p(y=2), . . . , p(y=M−1)]. 
         [0044]    One way to construct a soft processor that implements a function of p x  and p y  uses some of the techniques described in the above-mentioned patent applications, for example, by representing each element of the probability distributions p x  and p y  using a respective analog signal and designing circuit components that perform the corresponding arithmetic operations on the analog signals. As a result, a soft processor operating on p x  and p y  may have a complexity on the order of M·N, and thus the logic may grow quadratically in the number of variable states. Such an implementation may not always be desirable, especially if N and M become very large. 
         [0045]    Another way to construct the soft processor attempts to form a “compressed” representation of the probability distributions of m-ary (m&gt;2) variables, and to design circuit components that operate on this compressed representation instead of directly on the original probability distributions. In some examples, the compressed representation of the original probability distribution can be referred to a set of moments, as will be described further below. Preferably, the compressed representation can use a reduced amount of data to sufficiently describe the original distribution of variables with reasonable fidelity (e.g., without throwing out a substantial amount of essential information), thereby reducing the amount of resource requirements for performing the operations. An analogy in the digital domain would be to use a small number of binary bits to represent a variable with a very wide range of discrete values, and then perform bit operations on the binary bits which, in some examples, will only use log 2  as many resources as required in representing the original variable. 
         [0046]      FIGS. 1A-1C  illustrate one general approach for designing a soft processor that processes the soft information of a set of variables having a finite number of possible states. In this example, assume each variable has 2 N  number of states (this number is selected only for the purpose of illustration). To facilitate discussions, one process to form the compressed representation of the probability distributions of these multi-state variables and to configure the corresponding circuit components operating on these compressed representations proceeds by adapting the general framework of a digital processor that operates on the same variables, as described in detail below. 
         [0047]    Here, for a traditional digital processor that is configured to process the set of 2 N -state variables, each operation OP k  on three variables x, y, z can be described as: OP k : x×y→z, where each variable can be in a state belonging to the set of {0, 1, . . . , 2 N −1}. 
         [0048]    Next, apply a transformation T to convert each variable of 2 N  states into a transformed variable that can be represented as a string of M number of binary bits, or in other words, as a binary variable of length M (which may or may not be equal to N). Each operation OP k  can then be translated into a corresponding binary-value operation 
         [0049]    BOP k  that operates on the transformed variables, defined as: BOP k : T(x)×T(y)→T(z), where each transformed variable such as T(x) is defined as T(x)ε{0,1} M . Here, T(x) can be processed in the system as a string of M bits b 0 , b 1 , . . . , b M-1 , where M is typically smaller than 2 N . In some examples where transformation T applies binary decoding to variable x, the resulting T(x) has a length M equal to N . In other examples, M can be either greater or smaller than N. 
         [0050]    For each binary-value operation BOP k , there may exist a set of Boolean constraints B (OP     k     )  that the three binary variables T(x), T(y), T(z) satisfy. This condition can be described as B (OP     k     )  (T(x),T(y),T(z))=true. 
         [0051]    With T(x),T(y),T(z) providing a transformed representation of the original variables x, y, z, the “soft” values (e.g., the probabilistic information) of T(x), T(y), T(z), denoted as {tilde over (T)}(x),{tilde over (T)}(y),{tilde over (T)}(z), provide a transformed (and possibly compressed) representation of the original probability distribution (continuous or discrete) or the probability distribution function of the variables x, y, z. 
         [0052]    To build a soft processor that can operate on {tilde over (T)}(x),{tilde over (T)}(y),{tilde over (T)}(z), the set of Boolean constraints B (OP     k     )  is transformed into a network of inter-connected nodes (e.g., based on a factor graph representation), where each node corresponds to a soft logical function of the information received at the node. In the case of a factor graph-based network representation, the soft processor can be formed based on a network of variable nodes and check nodes where continuous-valued data is passed between the nodes. A circuit representing such a network can be formed using analog circuit components (e.g., soft logic gates), as described in the above-mentioned patent applications. Accordingly, soft values of the transformed input variables {tilde over (T)}(x),{tilde over (T)}(y) can be processed to obtain the soft values of the transformed output variable {tilde over (T)}(z), where {tilde over (T)}(x) is a vector representing the probability distribution of the transformed variable T(x), defined as {tilde over (T)}(x)=[P {tilde over (T)}(x)  (b 0 =1,P {tilde over (T)}(x)  (b 1 =1), . . . , P {tilde over (T)}(x)  (b M-1 =1)], and each element of the {tilde over (T)}(x) vector can be referred to as a moment. 
         [0053]    Using this general approach, a soft processor capable of operating on the soft information associated with variables of any number of possible states (not necessarily 2 N ) can be constructed by identifying a set of constraints that the variables (or a transformed version of the variables) satisfy, and by subsequently turning the constraints into a network of soft logical components (or in some examples, a network of soft and hard logical components). Such an approach can be applied to construct belief propagation processors that pass soft information of binary or m-ary variables between its structural elements. In a more general sense, the above approach can be used to construct a “soft” version of a digital processor whose operations are representable as a set of Boolean constraints. 
       2 “Compressed” Representation of Probability Distributions 
       [0054]    Depending on the particular applications, there can be a variety of ways to form a “compressed” representation of the original probability distributions of m-ary (m≧2) variables. A simple example would be that, if a Gaussian distribution is quantized to 256 levels, then one can use the mean and variance (a total of two moments) of the quantized Gaussian to estimate the mean and variance of the original Gaussian distribution instead of using a histogram of 256 bins. If the quantization is good, then the two moments can be sufficient to characterize the original Gaussian. For other types of probability distributions not as simple as Gaussian distributions, one may still be able to find a relatively small set of moments to represent the distribution with fewer resources than just using a histogram naively. 
         [0055]      FIG. 2  shows one example of forming a compressed representation {tilde over (T)}(x) to represent the probability distribution of a 256-state variable x. Here, each state of the variable x can be first represented by a corresponding 8-bit binary string of [b 0 , b 1 , . . . b 7 ] by applying a binary transformation T. The probabilities of each bit of the binary string being 1 together constitute a set of 8 moments, each generated by applying a corresponding row M i  of a mask matrix M to the original probability distribution of x, as shown below: 
         [0000]    
       
         
           
             
               
                 T 
                 ~ 
               
                
               
                 ( 
                 x 
                 ) 
               
             
             = 
             
               
                 [ 
                 
                   
                     
                       
                         P 
                          
                         
                           ( 
                           
                             
                               b 
                               0 
                             
                             = 
                             1 
                           
                           ) 
                         
                       
                     
                   
                   
                     
                       
                         P 
                          
                         
                           ( 
                           
                             
                               b 
                               1 
                             
                             = 
                             1 
                           
                           ) 
                         
                       
                     
                   
                   
                     
                       ⋮ 
                     
                   
                   
                     
                       
                         P 
                          
                         
                           ( 
                           
                             
                               b 
                               7 
                             
                             = 
                             1 
                           
                           ) 
                         
                       
                     
                   
                 
                 ] 
               
               = 
               
                 
                   [ 
                   
                     
                       
                         
                           M 
                           0 
                         
                       
                     
                     
                       
                         
                           M 
                           1 
                         
                       
                     
                     
                       
                         ⋮ 
                       
                     
                     
                       
                         
                           M 
                           7 
                         
                       
                     
                   
                   ] 
                 
                  
                 
                   [ 
                   
                     
                       
                         
                           P 
                            
                           
                             ( 
                             
                               x 
                               = 
                               
                                 x 
                                 0 
                               
                             
                             ) 
                           
                         
                       
                     
                     
                       
                         
                           P 
                            
                           
                             ( 
                             
                               x 
                               = 
                               
                                 x 
                                 1 
                               
                             
                             ) 
                           
                         
                       
                     
                     
                       
                         ⋮ 
                       
                     
                     
                       
                         
                           P 
                            
                           
                             ( 
                             
                               x 
                               = 
                               
                                 x 
                                 255 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                   ] 
                 
               
             
           
         
       
     
         [0000]    where P(b 0 =1) can be referred to the least significant soft bit, and P(b 7 =1) can be referred to as the most significant soft bit. In some applications, the term “soft bit” is associated with the marginal probability that a bit is 1 (or 0). 
         [0056]    In this example, the binary string [b 0 , b 1 , . . . b 7 ] representing the variable x can be termed as a byte, and the resulting set of 8 moments [P(b 0 ),P(b 1 ), . . . , P(b 7 )] can be termed as a soft byte. In this document, a byte generally refers to a sequence of bits (not necessarily a sequence of 8 bits), and a soft byte generally refers to a sequence of soft bits (or moments). A soft processor that operates on various soft bytes can be constructed using soft logic components representing the corresponding Boolean constraints, where each moment (or each soft bit) can be processed as a continuous-valued signal. 
         [0057]    Note that the mask matrix M used in the above example is not the only matrix that can be used to derive a set of moments representing the original probability distribution. For instance, one may use a similar set of periodic functions where the period of each successive function in the set is twice that of the previous function. Another example is a Fourier-based transformation. Other examples include a wavelet-based transformation, a transformation formed by a set of vectors from the rows or columns of a Hadamard matrix of suitable size, etc. In some examples, the application of the lowest frequency component of a mask function leads to the most significant bit (MSB) of a variable, whereas the application of the highest frequency component of a mask function leads to the least significant bit (LSB) of the variable. Imagine that each soft bit is transmitted by a separate wire, with each wire bearing some degree of noise. The output of the processing may be more sensitive to the noise on the MSB wire than to the noise on other wires. To mitigate such effects, in some examples, the mask function can be designed to have a mix of frequency components each with a different weight, thereby preventing the noise associated with a particular frequency component from dominating the outcome of the processing. 
         [0058]    In some examples, the general approach to forming compressed representations described above is applicable to probability distributions that are sufficiently “sparse.” For certain sparse functions, a random mask may be sufficient to capture all of the information present in the function. In other words, the compressed representation, regardless of how it is derived, may provide a sufficient set of statistical information for the random variable in question. 
         [0059]    In some applications, the choice of the representation described in  FIG. 2  may be particularly useful, as it resembles a digital data structure but instead of using bits, now uses soft bits. Using soft bytes and soft words, one can build arrays of soft logic roughly analogous to digital logic with good performance. This approach can be further extended to form a soft version of any digital representation. For instance, one may form a soft two&#39;s complement representation, or even use a soft version of a floating point digital representation such as a “soft-double” or a “soft-float.” For a floating point number having a sign bit, a significant, and an exponent, the soft-float can be represented using a combination of a soft sign bit, a soft significant, and a soft exponent. The soft exponent, for instance, includes a set of soft bits each representing a marginal probability of a corresponding hard bit in the exponent. 
       3 Applications 
       [0060]    The following section gives examples of performing statistical inference using “soft bits” and “soft bytes.” 
         [0061]    Assume that a system has a set of variables whose solution satisfies a group of constraints. Certain statistical information about the variables is known (e.g., one may know a priori that there is a 70% chance that a certain variable is zero). Such information can be provided to a soft processor to infer the states of other variables. 
         [0062]    For purpose of illustration, two examples are provided below. 
       3.1 Example 1 
     Magic Square 
       [0063]    Consider the following 4×4 array of numbers: 
         [0000]    
       
         
               
               
               
               
               
             
           
               
                   
                 TABLE 1 
               
               
                   
                   
               
             
             
               
                   
                 15 
                 2 
                 1 
                 12 
               
               
                   
                 4 
                 9 
                 10 
                 7 
               
               
                   
                 8 
                 5 
                 6 
                 11 
               
               
                   
                 3 
                 14 
                 13 
                 0 
               
               
                   
                   
               
             
          
         
       
     
         [0064]    Notice that the sum of each column is 30, as is the sum of each row and each of the main diagonals. Generally speaking, if one fills an N×N grid with distinct integers from 0 to N 2 −1 such that the rows, columns, and main diagonals all add up to the same value, the resulting grid is a type of magic square. 
         [0065]    Assume one receives some statistical information about a magic square (e.g., a clue like “there is a 70% chance that the upper left entry is even”) and wishes to find the most likely magic square that gives rise to those observations. This problem can be expressed in terms of constraints as follows. 
       3.1.1 Restatement of Constraints 
       [0066]    Two types of constraints exist in a magic square problem. The first type includes logical constraints—each entry need to be distinct (i.e., no repeated entries). The second type includes numerical constraints—various collections of entries (each row, each column, and each main diagonal) all sum to the same value. 
         [0067]    Table 2 shows a 4×4 magic square filled with variables x 0  through x 15 . Since the valid states of each variable lie in the range of 0 to 15, each entry can be represented by a string of 4 binary bits. All the rows, columns, and main diagonals need to sum to 30. 
         [0000]    
       
         
               
               
               
               
               
             
           
               
                   
                 TABLE 2 
               
               
                   
                   
               
             
             
               
                   
                 x 0   
                 x 1   
                 x 2   
                 x 3   
               
               
                   
                 x 4   
                 x 5   
                 x 6   
                 x 7   
               
               
                   
                 x 8   
                 x 9   
                 x 10   
                 x 11   
               
               
                   
                 x 12   
                 x 13   
                 x 14   
                 x 15   
               
               
                   
                   
               
             
          
         
       
     
         [0068]    The constraints on these variables can be expressed below: 
         [0000]    
       
         
           
             
               
                 
                   
                     ∀ 
                     
                       p 
                       &lt; 
                       q 
                     
                   
                   , 
                   
                     
                       x 
                       p 
                     
                     ≠ 
                     
                       x 
                       q 
                     
                   
                 
               
               
                 
                   ( 
                   1 
                   ) 
                 
               
             
             
               
                 
                   
                     ∀ 
                     i 
                   
                   , 
                   
                     
                       
                         ∑ 
                         
                           j 
                           = 
                           0 
                         
                         3 
                       
                        
                       
                         x 
                         
                           
                             4 
                              
                             i 
                           
                           + 
                           j 
                         
                       
                     
                     = 
                     30 
                   
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
             
               
                 
                   
                     ∀ 
                     j 
                   
                   , 
                   
                     
                       
                         ∑ 
                         
                           i 
                           = 
                           0 
                         
                         3 
                       
                        
                       
                         x 
                         
                           
                             4 
                              
                             i 
                           
                           + 
                           j 
                         
                       
                     
                     = 
                     30 
                   
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         0 
                       
                       3 
                     
                      
                     
                       x 
                       
                         5 
                          
                         i 
                       
                     
                   
                   = 
                   30 
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         1 
                       
                       4 
                     
                      
                     
                       x 
                       
                         3 
                          
                         
                             
                         
                          
                         i 
                       
                     
                   
                   = 
                   30 
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
           
         
       
     
         [0069]    In other words, variables x 0 , . . . , x 15  will form a magic square if and only if they satisfy the constraints above. As each variable can be represented as a string of 4 binary bits, these equality and non-equality constraints can be further expressed as restrictions on the individual bits of the variable using Boolean Logic. 
         [0070]    In the following description, operator “+” represents addition over integers, operator “⊕” represents mod-2 addition (which corresponds to an XOR operation), operator “         ” represents AND (logical conjuction), and operator “         ” represents OR (logical disjuction). 
         [0000]    Constraint #1: x p ≠x q  for all p&lt;q. 
         [0071]    To express this logical constraint, each variable can be first denoted as a sequence of 4 individual bits: 
         [0000]      x p =(a p ,b p ,c p ,d p ) 
         [0000]    where a p , b p ,c p , d p  are all binary bits. 
         [0072]    Define a new variable y=x p ⊕x q  using bit-wise XORs, i.e. 
         [0000]      y=(a p ⊕a q ,b p ⊕b q ,c p ⊕c q ,d p ⊕d q ) 
         [0000]    Note that x p =x q  if and only if y=(0,0,0,0). Therefore, 
         [0000]      x p ≠x q  if and only if (a p ⊕a q           (b p ⊕b q )         (c p ⊕c q )         (d p ⊕d q )=1 
         [0000]    Constraints #2-5: x p +x q +x r +x s =30 for any set of p,q,r,s values defined in Equations (2)-(5). 
         [0073]    To express this numerical constraint, three new variables x pq ,x rs , and x pqrs  are introduced below: 
         [0000]    
       
      
       x 
       p 
       +x 
       q 
       =x 
       pq  
      
     
         [0000]    
       
      
       x 
       r 
       +x 
       s 
       =x 
       rs  
      
     
         [0000]    
       
      
       x 
       pq 
       +x 
       rs 
       =x 
       pqrs  
      
     
         [0000]      x pqrs =30 
         [0000]    where each one of x p , x q , x r , x s  is a  4 -bit string, each one of x pq ,x rs  is a 5-bit string, and x pqrs  is a 6-bit string. 
         [0074]    As such, each four-term summation can be reduced to a set of summations of pairs of variables. Recall that by using a ripple adder, it is possible to add the bit representations of two variables using only          ,           and ⊕ operations (i.e., OR, AND and XOR). Thus, constraints #2-5 can also be expressed using a set of Boolean logic functions. 
         [0075]    As each constraint in this magic square problem is now expressed in terms of          ,           and ⊕ operations, one can build a network of soft (e.g., probability-based) logic components representing these constraints, where believes (e.g., a priori information) about certain variables can be propagated throughout the network to generate estimates about the states of other variables. One way of implementing such a belief propagation technique using factor graph will be discussed in detail at a later section of this document. 
       3.1.2 Exemplary Magic Square Solver 
       [0076]      FIG. 5  provides one example of a soft processor  500  configured for solving 4×4 magic square problems using some of the above-discussed techniques. 
         [0077]    In this example, the soft processor  500  is an integrated circuit including three components: an input transformation circuit  510 , a belief propagation processor  520 , and an output transformation circuit  530 . 
         [0078]    The input transformation circuit  510  accepts input data specifying some or all of the 16 variables in the 4×4 magic square, such as prior knowledge for some or all x i  (i=0, . . . , 15) represented in the form of probability distributions. For instance, a clue saying that the top left entry (i.e., x 0 ) is 70% likely to be 0 may be reflected by a vector of probabilities such as p(x 0 )=[0.7, 0.02, 0.02, . . . , 0.02], where the first element 0.7 corresponds to the probability of x 0  being 0, and each remaining element being 0.02 corresponds to the result of dividing the remaining 30% chance over 15 non-zero possible values (assuming no other information about x 0  is available). On the other hand, if no clue is given for variable then one may use a vector of 
         [0000]    
       
         
           
             
               p 
                
               
                 ( 
                 
                   x 
                   1 
                 
                 ) 
               
             
             = 
             
               [ 
               
                 
                   1 
                   16 
                 
                 , 
                 
                   1 
                   16 
                 
                 , 
                 
                   1 
                   16 
                 
                 , 
                 … 
                  
                 
                     
                 
                 , 
                 
                   1 
                   16 
                 
               
               ] 
             
           
         
       
     
         [0000]    to provide an initial representation of the variable, which indicates that each one of the 16 states of the variable is equally likely. 
         [0079]    The initial data specifying the variables (e.g., in the form of probability vectors) are transformed by the input transformation circuit  510 , which implements a transformation T to generate a transformed (possibly compressed) representation further specifying the variables. One example of a transformed representation specifying a variable x i  includes a vector of four moments (or four soft bits) [p(a i =1), p(b i =1), p(c i =1), p(d i =1)], provided that the variable x i  itself can be transformed to and reasonably represented as a string of four bits (a i ,b i ,c i , d i ). Note that in some applications, it is not a requirement to provide all of the initial specifications of the full set of variables x 0  through x 15  to the input transformation circuit  510 . For example, as the prior knowledge of certain variables may not be available, the initial specifications of those variables may be omitted, or generated by default. 
         [0080]    The belief propagation processor  520  accepts the soft bits [p(a i =1), p(b i =1), p(c i =1), p(d i =1)] (i=0, . . . , 15) generated by the input transformation circuit  510  and processes those data in a network of constraints according to a belief probapation algorithm to generate estimates of the transformed variables that satisfy the constraints (e.g., constraints #1-5 as restated in the above section). In some examples, the network is configured using graph-based techniques and includes variable nodes and check nodes through which continuous-valued data (beliefs) are combined and updated iteratively according to the corresponding rules, for example, until the final beliefs converge. Further discussions of the belief propagation processor  520  is provided at a later section of this document. 
         [0081]    The output of the belief propagation processor  520 , for example, the final beliefs of the transformed variables, [p′(a i =1), p′(b i =1), p′(c i =1), p′(d i =1)] for i=0, . . . , 15, provides measures of a degree of association of each bit with binary value 1 or 0. 
         [0082]    Those measures are provided to the output transformation circuit  530 , which applies inverse of transformation T (or approximate inverse of transformation T) to determine measures of a degree of association of each original variable x i  with its possible values 0 through 15. 
         [0083]    The output of the output transformation circuit  530  can be further coupled to a decision module (not shown) to generate solutions to the magic square. For instance, based on the estimated probability distribution [p′(x i =0), p′(x i =1), . . . , p′(x i =15)] for a given variable x i , the decision modules selects the variable value with the highest probability and uses it as the final solution to fill the x i  block of the magic square. 
         [0084]    In some examples, the decision module may be coupled directly to the belief propagation processor  520  for converting the processor&#39;s output (for example, the moments [p′(a i =1), p′(b i =1), p′(c i =1), p′(d i =1)]) directly to hard bits. The hard bits are then converted to obtain the value that the variable will take. For example, if the output of belief propagation processor  520  for variable x i  is [0.6, 0.2, 0.1, 0.8], one may determine that x 0  can be represented by a 4-bit string of (1, 0, 0, 1) (because a probability of less than 0.5 indicates that the bit is more likely to be a 0, and a probability of greater than 0.5 indicates that the bit is more likely to be a 1). Consequently, the 4-bit string is converted to a variable value of 9, which will be used as the final solution for x 0 . 
       3.2 Example 2 
     Sudoku 
       [0085]    Sudoku is another example where the problem can be restated as a set of Boolean constraints. 
         [0086]    Typically, Sudoku consists of determining the values in a N×N grid. In the case of a 9×9 grid, each entry takes a number from 1 to 9. In each row and each column, each one of the 9 numbers appears exactly once. Additionally, the 9×9 grid is partitioned into nine disjoint 3×3 sub-grids, and each of the 9 numbers appears exactly once in each sub-grid. 
         [0087]    Sudoku problems can be viewed as easier than magic square problems in the sense that there is no numerical constraint involved. In fact, only logical constraints exist: the entries in each row, each column, and each sub-grid are distinct. 
         [0088]    Again, for the purpose of simplicity, the following example illustrates a modified Sudoku problem that takes numbers between 0 and 8 (by subtracting 1 from the standard entries). In one example, each of the 81 variables of a 9×9 Sudoku can be represented as a string of 4 binary bits. 
         [0089]    In the following example, each variable in a Sudoku grid is represented as a string of 2 trinary (base-3) bits. Let x⊕ 3 y be the base-3 component-wise sum of two trinary variables, i.e., 
         [0000]    if x=(a x ,b x ) and y=(a y ,b y ), then 
         [0000]      x⊕hd  3 y=(a x ⊕ 3 a y ,b x ⊕ 3 b y ). 
         [0090]    Here, ⊕ 3  represents a mod-3 addition such that 1⊕ 3 1=2, 2⊕ 3 2=1, and so forth. 
         [0091]    The constraints that the entries in each row, each column, and each grid need to be distinct mean that there will be 27 groups of 9 variables, and in each group, the 9 variables are all distinct. Take the first row of a Sudoku for example. Each entry of the row can be represented by a string of 2 trinary digits, for example, (0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2). For the first two entries of the first row, e.g., denoted as x and y, the constraint on these two entices can be expressed in analogy with the binary case (as illustrated in the magic square problem), except for the use of a minus sign: 
         [0000]      x≠y if and only if  x⊕   3 (− y )≠(0,0) 
         [0000]    In other words, if x is represented as x=(a x ,b c ), and y is represented as y=(a y , b y ), where a&#39;s and b&#39;s are all trinary digits, the constraint can be restated as: 
         [0000]        a   x ⊕ 3 (− b   x )≠0, and 
         [0000]        a   y ⊕ 3 (− b   y )≠0 
         [0000]    Using the same reduction for all other constraints, a solution that satisfies all the constraints is a valid Sudoku. 
         [0092]    In the above magic square and Sudoku examples, once the problem has been reduced to a set of numerical and/or logical constraints, the solution of the problem can be found, for example, using belief propagation techniques as discussed immediately below. 
       3.3 Belief Propagation 
       [0093]    As previously discussed, belief propagation relates to a message passing technique (or, more properly, a family of message passing techniques) that attempts to estimate, for instance, the marginal probabilities of the states of variables, by passing messages on a graph (e.g., a factor graph). A factor graph provides a network of nodes and edges that can encode the probabilistic and/or deterministic constraints of a system of equations. In some implementations, each variable is represented by a variable node and each constraint is represented by a check node (also referred to as a constraint node). Additionally, there exists an edge between a variable node and a check node if the variable appears in that constraint. Some general discussions of factor graph techniques are provided in “An Introduction to Factor Graphs,” by H.-A. Loeliger, published in  IEEE Signal Proc. Mag , January 2004, pp. 28-41, the content of which is incorporated herein by reference. 
         [0094]    For purposes of illustration, suppose one has the following system of two equations acting on five binary variables: 
         [0000]      x 1 ⊕x 2 ⊕x 3 =0 
         [0000]      x 1           x 4 =x 5    
         [0095]    One example of a factor graph representing this system includes a network of 5 variable nodes and 2 check nodes, as shown in  FIG. 3 . 
         [0096]    In this graph, a “message” can be sent along every edge in both directions. It can be interpreted as the belief in each possible value (or state) for a variable. With binary variables, this is the belief that each of the five variables (x 1 , . . . , x 5 ) is a 0 or a 1. 
         [0097]    In some examples, solving a belief propagation problem starts with the knowledge of prior information about the probability of a bit being a zero or a one. Such knowledge can be represented in the factor graph by adding a “half-edge,” i.e., an edge attached to only one node. A message entering on the half-edge conveys the prior information. 
         [0098]    As shown in  FIG. 4 , assume that one is given prior information of the probability of each variable being “1,” i.e., p i =Pr(x i =1), for i=1, . . . , 5. Such priors can be sent as messages m 1 , . . . , m 5  along the half-edges toward the variable nodes. The belief propagation algorithm then passes messages around the network. For instance, the messages are collected at some nodes, which then combine them and send out new, updated messages towards other nodes. 
         [0099]    In this five-variable example, the first constraint can be implemented by a 3-terminal soft XOR gate: 
         [0000]      x 1 ⊕x 2 ⊕x 3 =0 
         [0000]    Note that this relation is satisfied in the following four situations: 
         [0000]    
       
         
               
               
               
             
           
               
                   
               
               
                 x 1   
                 x 2   
                 x 3   
               
               
                   
               
             
             
               
                 0 
                 0 
                 0 
               
               
                 0 
                 1 
                 1 
               
               
                 1 
                 0 
                 1 
               
               
                 1 
                 1 
                 0 
               
               
                   
               
             
          
         
       
     
         [0100]    Suppose one receives messages showing the beliefs in x 1  and x 2 , i.e., the probabilities P(x 1 =0),P(x 1 =1),P(x 2 =0), P(x 2 =1) are known. Then the probabilities of the third variable x 3  can be calculated as follows: 
         [0000]        P ( x   3 =0)= P ( x   1 =0) P ( x   2 =0)+ P ( x   1 =1) P ( x   2 =1) 
         [0000]        P ( x   3 =1)= P ( x   1 =0) P ( x   2 =1)+ P ( x   1 =1) P ( x   2 =0) 
         [0101]    Thus, for this 3-terminal XOR gate, the message exiting the gate (e.g., P(x 3 =1)) can be calculated using the two messages entering the gate (e.g., P(x 1 =1), P(x 2 =1)). 
         [0102]    Similarly, for the soft AND gate implementing the second constraint: 
         [0000]      x 1           x 4 =x 5 , 
         [0000]    the relation of the messages is satisfied in the following four situations: 
         [0000]    
       
         
               
               
               
             
           
               
                   
               
               
                 x 1   
                 x 4   
                 x 5   
               
               
                   
               
             
             
               
                 0 
                 0 
                 0 
               
               
                 0 
                 1 
                 0 
               
               
                 1 
                 0 
                 0 
               
               
                 1 
                 1 
                 1 
               
               
                   
               
             
          
         
       
     
         [0103]    If P(x 1 =0), P(x 1 =1), P(x 5 =0), P(x 5 =1) are known, then the outgoing message to node x 4  can be calculated as 
         [0000]    
       
         
           
             
               Pr 
                
               
                 ( 
                 
                   
                     x 
                     4 
                   
                   = 
                   0 
                 
                 ) 
               
             
             = 
             
               
                 
                   
                     P 
                      
                     
                       ( 
                       
                         
                           x 
                           1 
                         
                         = 
                         0 
                       
                       ) 
                     
                   
                    
                   
                     P 
                      
                     
                       ( 
                       
                         
                           x 
                           5 
                         
                         = 
                         0 
                       
                       ) 
                     
                   
                 
                 + 
                 
                   
                     P 
                      
                     
                       ( 
                       
                         
                           x 
                           1 
                         
                         = 
                         1 
                       
                       ) 
                     
                   
                    
                   
                     P 
                      
                     
                       ( 
                       
                         
                           x 
                           5 
                         
                         = 
                         0 
                       
                       ) 
                     
                   
                 
               
               C 
             
           
         
       
       
         
           
             
               Pr 
                
               
                 ( 
                 
                   
                     x 
                     4 
                   
                   = 
                   1 
                 
                 ) 
               
             
             = 
             
               
                 
                   
                     P 
                      
                     
                       ( 
                       
                         
                           x 
                           1 
                         
                         = 
                         0 
                       
                       ) 
                     
                   
                    
                   
                     P 
                      
                     
                       ( 
                       
                         
                           x 
                           5 
                         
                         = 
                         0 
                       
                       ) 
                     
                   
                 
                 + 
                 
                   
                     P 
                      
                     
                       ( 
                       
                         
                           x 
                           1 
                         
                         = 
                         1 
                       
                       ) 
                     
                   
                    
                   
                     P 
                      
                     
                       ( 
                       
                         
                           x 
                           5 
                         
                         = 
                         1 
                       
                       ) 
                     
                   
                 
               
               C 
             
           
         
       
     
         [0000]    where the normalization term C is defined as 
         [0000]        C= 2 P ( x   1 =0) P ( x   5 =0)+ P ( x   1 =1) P ( x   5 =0)+ P ( x   1 =1) P ( x   5 =1) 
         [0000]    Similarly, if P(x 4 =0), P(x 4 =1), P(x 5 =0), P(x 5 =1) are known, the outgoing message that represents the marginal probability of x 1  can be obtained as: 
         [0000]    
       
         
           
             
               Pr 
                
               
                 ( 
                 
                   
                     x 
                     1 
                   
                   = 
                   0 
                 
                 ) 
               
             
             = 
             
               
                 
                   
                     P 
                      
                     
                       ( 
                       
                         
                           x 
                           4 
                         
                         = 
                         0 
                       
                       ) 
                     
                   
                    
                   
                     P 
                      
                     
                       ( 
                       
                         
                           x 
                           5 
                         
                         = 
                         0 
                       
                       ) 
                     
                   
                 
                 + 
                 
                   
                     P 
                      
                     
                       ( 
                       
                         
                           x 
                           4 
                         
                         = 
                         1 
                       
                       ) 
                     
                   
                    
                   
                     P 
                      
                     
                       ( 
                       
                         
                           x 
                           5 
                         
                         = 
                         0 
                       
                       ) 
                     
                   
                 
               
               
                 C 
                 ′ 
               
             
           
         
       
       
         
           
             
               Pr 
                
               
                 ( 
                 
                   
                     x 
                     1 
                   
                   = 
                   1 
                 
                 ) 
               
             
             = 
             
               
                 
                   
                     P 
                      
                     
                       ( 
                       
                         
                           x 
                           4 
                         
                         = 
                         0 
                       
                       ) 
                     
                   
                    
                   
                     P 
                      
                     
                       ( 
                       
                         
                           x 
                           5 
                         
                         = 
                         0 
                       
                       ) 
                     
                   
                 
                 + 
                 
                   
                     P 
                      
                     
                       ( 
                       
                         
                           x 
                           4 
                         
                         = 
                         1 
                       
                       ) 
                     
                   
                    
                   
                     P 
                      
                     
                       ( 
                       
                         
                           x 
                           5 
                         
                         = 
                         1 
                       
                       ) 
                     
                   
                 
               
               
                 C 
                 ′ 
               
             
           
         
       
     
         [0000]    where the normalization term C′ is defined as 
         [0000]        C′= 2 P ( x   4 =0) P ( x   5 =0)+ P ( x   4 =1) P ( x   5 =0)+ P ( x   4 =1) P ( x   5 =1) 
         [0104]    Other edges in the soft AND and the soft XOR behave similarly. By applying these update rules iteratively to the graph, for example, until (hopefully) the beliefs converge, the final believes can be treated as approximations to the marginal probabilities of the variables. In the case where the factor graph is a tree, this approximation can be exact. 
       4 Alternative Embodiments and Extensions 
       [0105]    Note that in this document, the term “bit” is not necessarily limited to a binary digit. In some examples, it can be used to generally refer to a m-ary digit, where m≧2. Similarly, the term “soft bit” is not necessarily limited to the probabilistic information of a binary digit, but more generally, can be used to refer to the probabilistic information of a m-ary digit, where m≧2. Furthermore, for the case that m&gt;2, two or more analog signals are used to pass the belief that the m-ary bit takes on various of the m values. For example, m−1 analog signals may be used to represent the soft information for an m-ary bit. 
         [0106]    Also, in the example of  FIG. 1 , to compute a set of soft bits in relation to the original set of mult-state variables, instead of transforming the variables first to string of binary bits, an alternative approach is to transform the variables first to string of m-ary bits (e.g., trinary bits as illustrated in the above Sudoku example), and to subsequently determine the soft trinary bits to be processed in the soft processor. 
         [0107]    Another application relates to using a small set of moments representing the original probability distribution of a multi-state variable to reconstruct quantities like the mean and variance of the original probability distribution, as discussed below. 
       4.1 Higher Bit Moments 
       [0108]    Suppose one has a probability distribution of a variable that assumes a value from a finite subset of the integers, for example, 0 through 255. The probability distribution can be expressed as a list of 256 numbers, with each number being in the range of [0, 1]. When this distribution is compressed into a set of 8 moments (i.e., 8 soft bits), only 8 numbers need to be stored. The performance of using such moments can be evaluated, for example, by reconstructing the maximum entropy distribution consistent with these moments and assessing the result of the reconstruction. 
         [0109]    In some particular examples, the use of the above 8 moments may not always be sufficient to exactly reconstruct the original probability distribution. For instance, assume that a variable has a sampled Gaussian distribution over 256 possible values with a mean of 127.5. Then each of the 8 moments determined using binary decomposition is exactly ½, and the standard deviation works out to be 73.9. However, using these 8 moments, the standard deviation of the reconstructed probability distribution will always be 73.9 regardless of the input variance. In such cases where the set of 8 moments are not sufficient to describe the original probability distribution, higher moments (e.g., 2 rd  order moments) may be desired. 
         [0110]    For example, if one views the “true” distribution as the distribution over the 2 N  states (i.e. view it as a discrete distribution rather than a continuous one), then the mean of the distribution can be reconstructed exactly using a first set of moments {tilde over (M)}(i) shown below. (Not just for sampled Gaussians; this holds for other discrete distributions.) 
         [0111]    Let μ be the mean of the distribution, and define, for any integer x between 1 and 2 N , b i (x)=value of the i-th bit of x, and p(x) is the probability of the integer x. Then 
         [0000]    
       
         
           
             
               
                 
                   μ 
                   = 
                     
                    
                   
                     
                       ∑ 
                       
                         x 
                         = 
                         1 
                       
                       
                         2 
                         N 
                       
                     
                      
                     
                       xp 
                        
                       
                         ( 
                         x 
                         ) 
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     
                       ∑ 
                       
                         x 
                         = 
                         1 
                       
                       
                         2 
                         N 
                       
                     
                      
                     
                       
                         ( 
                         
                           
                             ∑ 
                             
                               i 
                               = 
                               1 
                             
                             N 
                           
                            
                           
                             
                               
                                 b 
                                 i 
                               
                                
                               
                                 ( 
                                 x 
                                 ) 
                               
                             
                              
                             
                               2 
                               i 
                             
                           
                         
                         ) 
                       
                        
                       
                         p 
                          
                         
                           ( 
                           x 
                           ) 
                         
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         1 
                       
                       N 
                     
                      
                     
                       
                         2 
                         i 
                       
                        
                       
                         
                           ∑ 
                           
                             x 
                             = 
                             1 
                           
                           
                             2 
                             N 
                           
                         
                          
                         
                           
                             
                               b 
                               i 
                             
                              
                             
                               ( 
                               x 
                               ) 
                             
                           
                            
                           
                             p 
                              
                             
                               ( 
                               x 
                               ) 
                             
                           
                         
                       
                     
                   
                 
               
             
           
         
       
     
         [0112]    The moment {tilde over (M)}(i) for bit i is the sum of the probabilities of all values with a “1” in the i-th bit, so we are given 
         [0000]    
       
         
           
             
               
                 M 
                 ~ 
               
                
               
                 ( 
                 i 
                 ) 
               
             
             = 
             
               
                 ∑ 
                 
                   x 
                   = 
                   1 
                 
                 
                   2 
                   N 
                 
               
                
               
                 
                   
                     b 
                     i 
                   
                    
                   
                     ( 
                     x 
                     ) 
                   
                 
                  
                 
                   p 
                    
                   
                     ( 
                     x 
                     ) 
                   
                 
               
             
           
         
       
     
         [0000]    and hence 
         [0000]    
       
         
           
             μ 
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   1 
                 
                 N 
               
                
               
                 
                   2 
                   i 
                 
                  
                 
                   
                     M 
                     ~ 
                   
                    
                   
                     ( 
                     i 
                     ) 
                   
                 
               
             
           
         
       
     
         [0113]    Thus, given moments {tilde over (M)}(i) with i=1, . . . , N, the mean of the discrete distribution can be recovered exactly. 
         [0114]    Next, let σ 2  be the variance of the probability distribution. One can obtain the following equations: 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       σ 
                       2 
                     
                     + 
                     
                       μ 
                       2 
                     
                   
                   = 
                     
                    
                   
                     
                       ∑ 
                       
                         x 
                         = 
                         1 
                       
                       
                         2 
                         N 
                       
                     
                      
                     
                       
                         x 
                         2 
                       
                        
                       
                         p 
                          
                         
                           ( 
                           x 
                           ) 
                         
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     
                       ∑ 
                       
                         x 
                         = 
                         1 
                       
                       
                         2 
                         N 
                       
                     
                      
                     
                       
                         ( 
                         
                           
                             ∑ 
                             
                               i 
                               = 
                               1 
                             
                             
                               2 
                                
                               N 
                             
                           
                            
                           
                             
                               
                                 b 
                                 i 
                               
                                
                               
                                 ( 
                                 
                                   x 
                                   2 
                                 
                                 ) 
                               
                             
                              
                             
                               2 
                               i 
                             
                           
                         
                         ) 
                       
                        
                       
                         p 
                          
                         
                           ( 
                           x 
                           ) 
                         
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         1 
                       
                       
                         2 
                          
                         N 
                       
                     
                      
                     
                       
                         2 
                         i 
                       
                        
                       
                         
                           ∑ 
                           
                             x 
                             = 
                             1 
                           
                           
                             2 
                             N 
                           
                         
                          
                         
                           
                             
                               b 
                               i 
                             
                              
                             
                               ( 
                               x 
                               ) 
                             
                           
                            
                           
                             p 
                              
                             
                               ( 
                               x 
                               ) 
                             
                           
                         
                       
                     
                   
                 
               
             
           
         
       
     
         [0115]    Define a set of second order moments {tilde over (V)}(i) as follows, for i=1, . . . , 2N: 
         [0000]    
       
         
           
             
               
                 V 
                 ~ 
               
                
               
                 ( 
                 i 
                 ) 
               
             
             = 
             
               
                 ∑ 
                 
                   x 
                   = 
                   1 
                 
                 
                   2 
                   N 
                 
               
                
               
                 
                   
                     b 
                     i 
                   
                    
                   
                     ( 
                     
                       x 
                       2 
                     
                     ) 
                   
                 
                  
                 
                   p 
                    
                   
                     ( 
                     x 
                     ) 
                   
                 
               
             
           
         
       
     
         [0116]    Based on the second order moments, the variance can be recovered as: 
         [0000]    
       
         
           
             
               
                 σ 
                 2 
               
               = 
               
                 
                   [ 
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         1 
                       
                       
                         2 
                          
                         N 
                       
                     
                      
                     
                       
                         2 
                         i 
                       
                        
                       
                         V 
                          
                         
                           ( 
                           i 
                           ) 
                         
                       
                     
                   
                   ] 
                 
                 - 
                 
                   μ 
                   2 
                 
               
             
             , 
           
         
       
     
         [0000]    which corresponds to the exact variance (or the square of standard deviation) of the original distribution. 
         [0117]    Therefore, one can use the combination of {tilde over (M)}(i) and {tilde over (V)}(i), i.e., a total of 3N moments (i.e., N+2N) to accurately recover the mean and the variance of the original distribution. 
         [0118]    In this example, to recover the mean, the N moments of {tilde over (M)}(i) are sufficient. To recover the variance, an additional set of 2N moments of {tilde over (V)}(i) is used. Generally, to recover 1 st  through k-th order cumulant or moment of the distribution, one can use 
         [0000]    
       
         
           
             
               
                 
                   ( 
                   
                     k 
                     + 
                     1 
                   
                   ) 
                 
                 · 
                 k 
               
               2 
             
              
             N 
           
         
       
     
         [0000]    moments, where the value of each moment falls in the range of [0,1]. 
         [0119]    Some of the moments used above may be redundant. The redundancy can be found, for example, by examining the bit structure of the perfect squares. For instance, the parity of the low order bit alternates, hence 
         [0000]        {tilde over (V)} (1)= {tilde over (M)} (1) 
         [0120]    Also, based on the nature of modular arithmetics, the second lowest order bit of a perfect square is always zero, so 
         [0000]        {tilde over (V)} (2)=0 
         [0121]    Therefore, it is not required to calculate or store {tilde over (V)}(1) or {tilde over (V)}(2). 
         [0122]    Note that although in many of the examples shown above, the variables being processed by a soft processor appear to have the same number of variable levels (e.g., x, y, z all having 2 N  possible levels as shown in  FIGS. 1A-1C ), this need not to be the case in other examples. For instance, a soft processor may operate on a set of variables having different numbers of variable levels and for each variable, still form a transformed representation of its original probability distribution. Similarly, the transformed representations of different variables may not necessarily include the same number of soft bits. For instance, one may have 3 soft bits whereas another may have 5 soft bits. Further, in a more general case, the input variables to the belief propagation processor  520  shown in  FIG. 5  may not have the same number of soft bits as the output variables. Or the belief propagation processor  520  may include intermediate variables that are computed based on its input variables but having different number of soft bits. For instance, it may be useful to compute an intermediate variable corresponding to the summation of two 3-bit variables, in which case the intermediate variables may be a 4-bit variable and therefore need an additional soft bit as compared with the input variables. 
         [0123]    In the above description, various techniques are provided for implementing statistical inference techniques in the analog domain to operate on variables having any finite number of states. Soft information can be represented using continuous-valued signals (e.g., current or voltage signals) and be processed in a soft processor. It should be noted in some other implementations of the statistical inference techniques, soft information may be represented and processed in alternative forms. 
         [0124]    One example makes use of stochastic computing techniques, in which case soft information, or sometimes continuous-valued quantities, can be represented by a stochastic bit stream. For instance, by introducing random (or pseudo random) dithering between two levels of 0 and 1, a quantity of 0.8 can be represented by a string of bits that overall has 80% of 1&#39;s and 20% of 0&#39;s. Accordingly, a soft bit or moment having a value between 0 and 1 can be represented by a “dithered” signal having a duty cycle (the percentage of times that the signal is 1) equal to the value of the soft bit. Correspondingly, the belief propagation processor  520  can be modified to process dithered signals rather than continuous-valued voltage or current signals as described in the early sections of this document. 
       4.2 Inter-Symbol Interference (ISI) Equalizers 
       [0125]    Another application of the general approaches described above relates to equalizers that deal with the inter-symbol interference (ISI) that may affect communication channels. 
         [0126]    Suppose that a channel suffers from ISI with fixed impulse response c 1 , . . . , c m . If one transmits signals x 1 , . . . , x n εR, for n≧m, then at time t the received signal would be: 
         [0000]    
       
         
           
             
               ∑ 
               
                 i 
                 = 
                 1 
               
               m 
             
              
             
               
                 c 
                 i 
               
                
               
                 x 
                 
                   m 
                   + 
                   t 
                   + 
                   1 
                   - 
                   i 
                 
               
             
           
         
       
     
         [0000]    (This would also work with complex inputs; for purposes of illustration, the description here focuses on real inputs.) 
         [0127]    Assume that the channel also suffers from noise, for example, at time t the noise is n t , an i.i.d. Gaussian random variable with mean 0 and variance σ 2 . Therefore, the actual received signal would be: 
         [0000]    
       
         
           
             
               y 
               t 
             
             = 
             
               
                 n 
                 t 
               
               + 
               
                 
                   ∑ 
                   
                     i 
                     = 
                     1 
                   
                   m 
                 
                  
                 
                   
                     c 
                     i 
                   
                    
                   
                     x 
                     
                       m 
                       + 
                       t 
                       + 
                       1 
                       - 
                       i 
                     
                   
                 
               
             
           
         
       
     
         [0000]    Here, also assume that the transmitted signals x i  are either +1 or −1 (i.e. BPSK-encoded bits). 
         [0128]    From the discussion in the “Magic Square” example, one can construct a “soft adder,” for example, given two s-bit inputs α and β consisting of uncertain bits, one can calculate the soft summand γ by decomposing the operation into a collection of individual soft gates. Similarly, one can build a “soft subtractor” by using the soft adder and specifying γ and α and by running belief propagation to generate β. 
         [0129]    Note that, in the above description, the illustrations are made based on the assumption that α and β are non-negative in the “soft adder.” There are several ways to extend the techniques to negative variables. One method, for example, is to extend all the inputs and outputs by several bits and add 2 s′  to each of the inputs and 2 s′+1  to the output, for s′≧s. One can then represent α, βε[−2 s ,2 s −1] as positive numbers. (This is variant of what is usually called “two&#39;s-complement” arithmetic.) This technique also allows one to handle subtraction with negative quantities. 
         [0130]    Accordingly, the current estimates of the x i  can be used to estimate the ISI-garbled version of the y i , as belows: 
         [0000]    
       
         
           
             
               
                 y 
                 ~ 
               
               t 
             
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   1 
                 
                 m 
               
                
               
                 
                   c 
                   i 
                 
                  
                 
                   [ 
                   
                     
                       Pr 
                        
                       
                         ( 
                         
                           
                             x 
                             
                               m 
                               + 
                               t 
                               + 
                               1 
                               - 
                               i 
                             
                           
                           = 
                           1 
                         
                         ) 
                       
                     
                     - 
                     
                       Pr 
                        
                       
                         ( 
                         
                           
                             x 
                             
                               m 
                               + 
                               t 
                               + 
                               1 
                               - 
                               i 
                             
                           
                           = 
                           
                             - 
                             1 
                           
                         
                         ) 
                       
                     
                   
                   ] 
                 
               
             
           
         
       
     
         [0000]    One can then calculate 
         [0000]    
       
      
       ñ 
       t 
       =y 
       y 
       −{tilde over (y)} 
       t  
      
     
         [0131]    Next, we compute the probability of observing y t  assuming that the transmitted signal was {tilde over (y)} t , which is 
         [0000]    ti (1/σ√{square root over (2π)})e −ñ     t       2     /2σ     2    
 
where the probability is represented as a collection of soft bits.
 
         [0132]    To implement this computation, a soft multiplier may be used. This can be built analogously with the soft adder. As with the soft adder, there are various ways of handling negative numbers; a similar technique of padding extra high bits works, although more extra bits may be needed. As with the soft subtractor, one can produce a soft divider by using a soft multiplier backwards. 
         [0133]    Using such techniques, one can now take any target function, perform a Taylor expansion, and express it approximately as a polynomial. Polynomials are computable using multiplication and addition of (positive and negative) numbers. In particular, we can compute the functional form above for the probability of observing y t . We can calculate x i  in terms of the other x j , and can convert the soft bits back to probabilities simply by summing them. Therefore, belief propagation can be applied to perform ISI equalization. 
         [0134]    Note that in the above example, the input stream x 1 , x 2 , . . . is treated as unencoded. 
         [0135]    In practice, the input stream may be encoded, for example, with a convolutional code. Adding the constraints of a convolutional code to the factor graph can be implemented, for example, by adding another check node for each check equation and connecting it to equals node for each corresponding x i . 
         [0136]    It is to be understood that the foregoing description is intended to illustrate and not to limit the scope of the invention, which is defined by the scope of the appended claims. Other embodiments are within the scope of the following claims.