# How to calculate the conditional probabilities for a third-order restricted Boltzmann machine?

For a two-order restricted Boltzmann machine with visible layer $$\mathbf x$$ and hidden layer $$\mathbf h$$, the conditional distribution can be written as:

$$p(\mathbf h|\mathbf x)=sigmoid(\mathbf{Wx}+\mathbf b)$$ $$p(\mathbf x|\mathbf h)=sigmoid(\mathbf{W}^T\mathbf{h}+\mathbf c)$$

where $$\mathbf W$$ is the connection matrix, $$\mathbf b$$ and $$\mathbf c$$ are the bias vectors for $$\mathbf h$$ and $$\mathbf x$$.

How does the above conditional probability generalize to a thrid-order restricted Boltzmann machine with visible layers $$\mathbf x, \mathbf z$$ and hidden layer $$\mathbf h$$?

I have read some articles using a third-order restricted Boltzmann machine, and they usually use a diagram which has a triangle in the middle with each corner connecting to one layer to represent the third-order interactions, but none of the articles that I've read explicitly provide formula of the conditional probabilities (e.g. $$p(\mathbf h|\mathbf x,\mathbf z)$$). This makes me hard to understand how does the Boltzmann machine work in practice.