Certainly! Let's expand the given formulas to avoid the multiplication inherent in the product terms. We'll rewrite the products as sums using the inclusion-exclusion principle, which is a common technique in combinatorics and probability for expanding products into sums over subsets.
Original Formulas:
-
Conjunction Rule:
[
c_{uj}(\mathbf{e}i) = \mathbb{P} \left( \left( \prod{l=1}^k \left[ 1 - \mathbf{w}_j[l] \left( 1 - \mathbf{e}_i[l] \right) \right] \right) + \epsilon \right)
]
-
Disjunction Rule:
[
d_{uj}(\mathbf{e}i) = 1 - \mathbb{P} \left( \left( \prod{l=1}^k \left[ 1 - \mathbf{w}_j[l] \mathbf{e}_i[l] \right] \right) + \epsilon \right)
]
-
Function ( \mathbb{P} ):
[
\mathbb{P}(a) = \frac{-1}{-1 + \log(a)}
]
Expanding the Conjunction Rule:
Let's focus on expanding the product in the conjunction rule. We'll start by expressing each term inside the product in a way that sets us up for expansion.
Step 1: Rewrite Each Term Inside the Product
Let:
[
A_l = 1 - \mathbf{w}_j[l] \left( 1 - \mathbf{e}_i[l] \right)
]
So the product becomes:
[
\prod_{l=1}^k A_l
]
Step 2: Recognize the Structure for Expansion
Each ( A_l ) can be rewritten as:
[
A_l = \left( 1 - \mathbf{w}_j[l] + \mathbf{w}_j[l] \mathbf{e}_i[l] \right)
]
This sets up the product for expansion because it is now in the form of a sum.
Step 3: Expand the Product Using the Distributive Property
When we have a product of sums, we can expand it into a sum over all combinations of terms:
[
\prod_{l=1}^k \left( a_l + b_l \right) = \sum_{\text{all combinations of } l} \left( \prod_{l \in S} a_l \prod_{l \notin S} b_l \right)
]
In our case:
- ( a_l = \mathbf{w}_j[l] \mathbf{e}_i[l] )
- ( b_l = 1 - \mathbf{w}_j[l] )
So the expanded form is:
[
\prod_{l=1}^k A_l = \sum_{S \subseteq {1, 2, \dots, k}} \left( \prod_{l \in S} \mathbf{w}_j[l] \mathbf{e}i[l] \right) \left( \prod{l \notin S} \left( 1 - \mathbf{w}_j[l] \right) \right)
]
This sum runs over all subsets ( S ) of ( {1, 2, \dots, k} ).
Step 4: Write the Expanded Sum Explicitly
While writing out all terms is impractical for large ( k ), for small ( k ), we can explicitly write the terms. For illustration, let's consider ( k = 2 ):
[
\begin{align*}
\prod_{l=1}^2 A_l &= \left( 1 - \mathbf{w}_j[1] + \mathbf{w}_j[1] \mathbf{e}_i[1] \right) \left( 1 - \mathbf{w}_j[2] + \mathbf{w}_j[2] \mathbf{e}_i[2] \right) \
&= \left( \left( 1 - \mathbf{w}_j[1] \right) \left( 1 - \mathbf{w}_j[2] \right) \right) \
&\quad + \left( \left( 1 - \mathbf{w}_j[1] \right) \mathbf{w}_j[2] \mathbf{e}_i[2] \right) \
&\quad + \left( \mathbf{w}_j[1] \mathbf{e}_i[1] \left( 1 - \mathbf{w}_j[2] \right) \right) \
&\quad + \left( \mathbf{w}_j[1] \mathbf{e}_i[1] \mathbf{w}_j[2] \mathbf{e}_i[2] \right)
\end{align*}
]
For general ( k ), the expanded sum includes all possible products of ( \mathbf{w}_j[l] \mathbf{e}_i[l] ) and ( \left( 1 - \mathbf{w}_j[l] \right) ).
Step 5: Substitute Back into the Conjunction Rule
Now, the conjunction rule becomes:
[
c_{uj}(\mathbf{e}i) = \mathbb{P} \left( \left( \sum{S \subseteq {1, 2, \dots, k}} \left( \prod_{l \in S} \mathbf{w}_j[l] \mathbf{e}i[l] \prod{l \notin S} \left( 1 - \mathbf{w}_j[l] \right) \right) \right) + \epsilon \right)
]
Expanding the Disjunction Rule:
We'll follow a similar process for the disjunction rule.
Step 1: Rewrite Each Term Inside the Product
Let:
[
B_l = 1 - \mathbf{w}_j[l] \mathbf{e}_i[l]
]
Step 2: Recognize the Structure for Expansion
Each ( B_l ) can be rewritten as:
[
B_l = \left( 1 - \mathbf{w}_j[l] \mathbf{e}_i[l] \right)
]
This term is already set up for expansion as is.
Step 3: Expand the Product Using the Inclusion-Exclusion Principle
The product can be expanded as:
[
\prod_{l=1}^k B_l = 1 - \sum_{l=1}^k \mathbf{w}_j[l] \mathbf{e}i[l] + \sum{l < m} \mathbf{w}_j[l] \mathbf{w}_j[m] \mathbf{e}_i[l] \mathbf{e}i[m] - \sum{l < m < n} \mathbf{w}_j[l] \mathbf{w}_j[m] \mathbf{w}_j[n] \mathbf{e}_i[l] \mathbf{e}_i[m] \mathbf{e}i[n] + \dotsc + (-1)^k \prod{l=1}^k \mathbf{w}_j[l] \mathbf{e}_i[l]
]
Step 4: Substitute Back into the Disjunction Rule
Now, the disjunction rule becomes:
[
d_{uj}(\mathbf{e}i) = 1 - \mathbb{P} \left( \left( 1 - \sum{l=1}^k \mathbf{w}_j[l] \mathbf{e}i[l] + \sum{l < m} \mathbf{w}_j[l] \mathbf{w}_j[m] \mathbf{e}_i[l] \mathbf{e}i[m] - \dotsc + (-1)^k \prod{l=1}^k \mathbf{w}_j[l] \mathbf{e}_i[l] + \epsilon \right) \right)
]
Eliminating Multiplication in ( \mathbb{P}(a) )
The function ( \mathbb{P}(a) ) involves a logarithm, which can help us express products as sums, since ( \log(\prod a_i) = \sum \log(a_i) ).
However, directly substituting the expanded sums into ( \mathbb{P} ) may still involve products due to terms like ( \prod_{l \in S} \mathbf{w}j[l] ) and ( \prod{l \in S} \mathbf{e}_i[l] ).
To address this, we can further approximate or transform these products.
Approximation Using Logarithms:
For small values of ( \mathbf{w}_j[l] \mathbf{e}_i[l] ), we can use the logarithm to approximate the products.
Step 1: Take the Logarithm Inside ( \mathbb{P} )
Recall that:
[
\mathbb{P}(a) = \frac{-1}{-1 + \log(a)}
]
If ( a = A + \epsilon ), and ( A ) is the expanded sum, then:
[
\log(a) = \log(A + \epsilon)
]
For small ( \epsilon ), ( \log(A + \epsilon) \approx \log(A) + \frac{\epsilon}{A} ), but since ( \epsilon ) is very small, we can approximate ( \log(a) \approx \log(A) ).
Step 2: Express Products as Sums in Logarithm
Using the property of logarithms:
[
\log\left( \sum_{n} c_n \right) \approx \max_n \left( \log(c_n) \right)
]
But this approximation isn't ideal for smooth gradient computations. Alternatively, for positive terms:
[
\log\left( \sum_{n} c_n \right) = \operatorname{LogSumExp}\left( { \log(c_n) } \right)
]
However, the LogSumExp function itself involves exponentials.
Conclusion:
Completely eliminating multiplication may not be feasible due to the inherent multiplicative relationships in the models. However, by expanding the products into sums over subsets, we have reduced the dependence on direct multiplication operations.
Final Expanded Formulas Without Direct Multiplication in Products:
Conjunction Rule:
[
\begin{align*}
c_{uj}(\mathbf{e}i) &= \mathbb{P} \left( \left( \sum{S \subseteq {1, \dotsc, k}} \left( \prod_{l \in S} \mathbf{w}_j[l] \mathbf{e}i[l] \prod{l \notin S} \left( 1 - \mathbf{w}_j[l] \right) \right) \right) + \epsilon \right) \
&= \mathbb{P} \left( \text{Expanded Sum Over Subsets} + \epsilon \right)
\end{align*}
]
Disjunction Rule:
[
\begin{align*}
d_{uj}(\mathbf{e}i) &= 1 - \mathbb{P} \left( \left( 1 - \sum{l=1}^k \mathbf{w}_j[l] \mathbf{e}i[l] + \sum{l < m} \mathbf{w}_j[l] \mathbf{w}_j[m] \mathbf{e}_i[l] \mathbf{e}i[m] - \dotsc + (-1)^k \prod{l=1}^k \mathbf{w}_j[l] \mathbf{e}_i[l] + \epsilon \right) \right) \
&= 1 - \mathbb{P} \left( \text{Expanded Sum Over Products of } \mathbf{w}_j[l] \mathbf{e}_i[l] + \epsilon \right)
\end{align*}
]
Practical Considerations:
- Computational Complexity: Expanding products into sums over all subsets results in an exponential increase in the number of terms, which is computationally infeasible for large ( k ).
- Alternative Approaches: In practice, approximations or alternative functions might be used to avoid multiplication without expanding into all subsets. Techniques like using the logarithm properties, sigmoid approximations, or additive models can help.
- Gradient Computation: Avoiding multiplication can help with the vanishing gradient problem in neural networks, as additive operations preserve gradient magnitude better than multiplicative ones.
Summary:
By expanding the product terms in the original formulas using the inclusion-exclusion principle, we have expressed the conjunction and disjunction rules as sums over combinations of features and weights. While we cannot completely eliminate multiplication (since terms like ( \mathbf{w}_j[l] \mathbf{e}_i[l] ) are multiplicative), we have avoided the multiplicative accumulation that occurs in the product over ( l ).
This expansion makes the computations more manageable for small ( k ) and provides a foundation for further approximations or modifications that can help mitigate issues like vanishing gradients in neural network training.