The previous section showed how to implement specific boolean gates as analog circuits. In this section, the same technique will be applied to circuits that implement the sum-product algorithm as described in section 4. These circuits will have to implement the following two equations for any number of variables:
as described in section 4.1.
Recall that we used a specific case of the second equation to build the
boolean logic gates. The equation described the behavior of the variable
in light of some apriori knowledge about the behavior the gate.
That apriori knowledge was presented as an enumeration and the
calculation was simple because the gate was boolean. In contrast, the
function
in a sum-product message-passing computation may
evaluate to any real number between 0 and 1. Thus, no terms may be
eliminated from our equations as we no longer necessarily multiply by a 0
or a 1.
Function-to-variable messages are the more complicated of the two types
of messages required to implement the sum-product message-passing
algorithm over a factor graph. These circuits must implement the type of
marginalization described by equation 2 over all of their
inputs. As we will see, this type of calculation becomes exponentially
more complex with additional inputs. To start, we examine the
implementation of a circuit with two inputs and one output. This circuit
is described by equation 26, where
and
are inputs and
is an output.
Similar to the boolean logic gates, we can enumerate the possible values
of
,
,
, and their corresponding function
. The only
difference is that now the value of
is a real number between 0
and 1 that represents a probability. Equation 26 tells us
that each
is multiplied by a corresponding
. In
function-to-variable circuits, this second level of multiplication will
be accomplished by current scaling. Scaling by some fixed number can be
done by scaling the sizes of the transistors in the train of a current
mirror in relation to the size of its input transistor. The behavior of
this scaling is given by equation 16.
The equations that result from expanding equation 26 are:
and
The four
terms are computed only once and shared between the
two equations, but the
terms may all be different. Just as in
the boolean OR gate circuit, we will make copies of the
terms
as we need them need--two of each in this case--and then scale them
according to an appropriate value,
. The schematic for this
specific case of the function-to-variable circuit is shown in figure
12 where
-
are the
terms and
-
are the
terms that are summed to
generate the output.
|
As mentioned before, the complexity of this circuit grows exponentially
with the number of inputs. A three-input function-to-variable circuit
must compute all eight cases of the term
, where
,
,
and
are the inputs. This is accomplished by adding a second layer of
four differential pairs. Each differential pair takes as its base
current,
, the value of
or
from one of the two
differential pairs below it. Each of the eight
terms
needs to be copied twice and scaled according to its corresponding
. The addition of outputs only involves duplicating the
existing single output. This is be accomplished by adding two current
mirrors, one built from NFETs and one from PFETs such that the magnitude
and direction of current flow is maintained. The train of the PFET
current mirror can then generate as many duplicate outputs as needed.
The circuits that implement the variable-to-function messages of the sum-product message-passing algorithm are simpler than the function-to-variable circuits described in the previous section. Variables in a factor graph do not store any apriori knowledge, so the calculation that they need to perform does not require multiplication by a function. The variable essentially combines the messages that are passed to it from its neighboring functions, as described by equation 3.
For a two-input, one-output circuit, as shown in figure
13, we need only perform one multiplication. This circuit
is similar to the OR gate in that the unused terms must be computed
because of the requirement that the two inputs to the differential pair
must sum to one. Again we tie the unused branches of the differential
pair to
. Each additional input will add two additional
differential pairs whose base current is the product of the previous
inputs, so the complexity increases linearly with additional inputs.
Additional outputs are generated by copying the computed value with two
current mirrors, the same as with the function-to-variable circuits.
|