Max-info factorizations of a conditional distribution
Max-info factorizations of a conditional distribution
Setup
Let X,Y,Z be finite random variables taking values in finite spaces X,Y,Z. Let p(y∣x) be a fixed conditional law on Y given X. Let R be a class of conditionals r(z∣x), and G a class of conditionals g(y∣x,z).
Define the feasible factorization set
F(p):={(r,g)∈R×G:p(y∣x)=z∈Z∑r(z∣x)g(y∣x,z)∀x,y}.
For our setting with expressive router-generator classes (e.g., Transformer neural networks), there is not a unique factorization for a given LLM distribution p(y∣x). That is, ∣F(p)∣ is large. We will consider the following max-info factorization criterion:
arg(r,g)∈F(p)maxI(Y;Z∣X)
I.e., among all feasible factorizations, select on that maximizes the conditional mutual information between Y and Z given X. In other words, select a factorization that maximizes the information Z encodes about Ybeyond the input X.
To define I(Y;Z∣X) one must also fix an input law μ on X. Given (r,g)∈F(p), define the induced joint law
Pμ,r,g(x,y,z):=μ(x)r(z∣x)g(y∣x,z).
All entropies and mutual informations below are computed under Pμ,r,g. All pointwise statements hold for each x, and averaging with respect to μ yields the global statements.
Define the weighted generalized Jensen–Shannon divergence ("Divergence Measures Based on the Shannon Entropy", Lin 2002)
This acts as a measure of the separation or divergence between a collection of distributions {g(⋅∣x,z)}z.
Exact objective identity
The following result relates the conditional mutual information between Y and Z given X (how much information Z encodes about Y beyond X) to the separation between the collection of z-conditioned generators {g(⋅∣x,z)} as measured by the weighted generalized Jensen-Shannon divergence. In turn, this implies that maximizing the conditional mutual information among feasible factorizations, max(r,g)∈F(p)I(Z;Y∣X) is equivalent to maximizing the separation between the z-conditioned generators. This is the sense in which this selection of factorization is "disentangled".
because ∑zr(z∣x)g(⋅∣x,z)=p(⋅∣x). Averaging over x∼μ gives
I(Y;Z∣X)=EXJSDr(⋅∣X)({g(⋅∣X,z)}z).
\end{proof}
Another way to interpret this result is that the set of factorizations that maximize the conditional mutual information I(Y;Z∣X) are exactly the set of factorizations that minimizes the entropies of the z-conditioned generators H(g(⋅∣x,z)) in expectation of X,Z. That is, the max-info criterion finds a factorization that maximizes the concentration of the distribution of y after conditioning on the latent variable z.
\begin{proof}
Under Pμ,r,g, the conditional law of Y given (X,Z)=(x,z) is g(⋅∣x,z). Therefore
H(Y∣X,Z)=EX,ZH(g(⋅∣X,Z)),
and I(Y;Z∣X)=H(Y∣X)−H(Y∣X,Z).
\end{proof}
Max-info factorization as maximizing separation
For each x,
I(Y;Z∣X=x)=JSDr(⋅∣x)({g(⋅∣x,z)}z).
So max-info selects feasible decompositions whose active components are, on average, as far as possible from the barycenter p(⋅∣x), equivalently as low-entropy as possible.
However, it is not the same as maximizing an arbitrary pairwise notion of separation among the {g(⋅∣x,z)}z. Clones of the same component can be added without changing the objective.
invariance to cloning z
Suppose (r,g)∈F(p). Pick a latent state z0, replace it by two clones z0′,z0′′, keep the same decoder
g(⋅∣x,z0′)=g(⋅∣x,z0′′)=g(⋅∣x,z0),
and split the mass as
r(z0′∣x)=αr(z0∣x),r(z0′′∣x)=(1−α)r(z0∣x)
for some α∈[0,1]. Then the new factorization is feasible and has the same I(Y;Z∣X).
^cloning-invariance
\begin{proof}
Feasibility is unchanged since one mixture component was merely duplicated and its mass split. Also,
This already shows that even optimal solutions need not have pairwise-distinct decoders.
The basic upper bound and its optimizer set
Define the deterministic feasible factorization subset
Fdet(p):={(r,g)∈F(p):Hμ,r,g(Y∣X,Z)=0}.
Equivalently, for μ(x)r(z∣x)-almost every (x,z),
g(y∣x,z)=1{y=ϕ(x,z)}
for some map ϕ:X×Z→Y.
The following result states that if there exists a factorization with where the generator is deterministic once conditioned on z, then the max-info factorization criterion is exactly the set of all deterministic factorizations.
upper bound and characterization of maximizers
For every feasible factorization (r,g)∈F(p),
0≤I(Y;Z∣X)≤H(Y∣X).
Moreover,
I(Y;Z∣X)=H(Y∣X)⟺H(Y∣X,Z)=0⟺(r,g)∈Fdet(p).
Consequently, if Fdet(p)=∅, then
arg(r,g)∈F(p)maxI(Y;Z∣X)=Fdet(p)
up to zero-mass latent states.
^deterministic-maximizers
\begin{proof}
The bound follows from
I(Y;Z∣X)=H(Y∣X)−H(Y∣X,Z),
with H(Y∣X,Z)≥0. Equality holds if and only if H(Y∣X,Z)=0, which for discrete Y is equivalent to g(⋅∣x,z) being Dirac for μ(x)r(z∣x)-almost every (x,z).
\end{proof}
This result says two things:
The max-info factorization criterion selects deterministic generators when possible
The max-info criterion has no preference among deterministic generators. I.e., latent semantics may not be unique, and may not be consistent across different inputs. In this way, Z can act more like a random seed than a semantically-meaningful hidden cause.
Expressive classes: why the criterion is often degenerate
Here degenerate means that, in expressive classes, the optimization often attains the trivial upper bound H(Y∣X), and the argmax is a large non-identifiable family.
The following result says that deterministic factorizations are the max-info factorization if and only if the size of the latent space is large enough compared to the size of the support space.
deterministic components are available once ∣Z∣ is large enough
Assume:
R contains all conditionals r(z∣x);
G contains all deterministic kernels
gϕ(y∣x,z)=1{y=ϕ(x,z)}.
Let s∗ be the size of the support of p(⋅∣x) (maximized over inputs x)
s∗:=x:μ(x)>0max∣suppp(⋅∣x)∣.
Then
(r,g)∈F(p)supI(Y;Z∣X)=H(Y∣X)⟺∣Z∣≥s∗.
If ∣Z∣≥s∗, the maximizers are exactly the deterministic feasible factorizations.
\begin{proof}
If ∣Z∣≥s∗, then for each x with μ(x)>0, enumerate
Conversely, if ∣Z∣<s∗, then for some x0 with μ(x0)>0,
∣suppp(⋅∣x0)∣>∣Z∣.
Any deterministic factorization at x0 is a convex combination of at most ∣Z∣ Dirac masses, hence its support size is at most ∣Z∣, contradiction. Therefore no deterministic feasible factorization exists, so #^deterministic-maximizers forbids achieving H(Y∣X).
\end{proof}
canonical optimizer when ∣Z∣≥∣Y∣
If ∣Z∣≥∣Y∣ and R,G are unrestricted as above, one canonical optimizer is
r(z∣x)=p(y=z∣x),g(y′∣x,z)=1{y′=z},
after identifying Z with Y.
This is the trivial simulator Z≡Y in distribution given X.
Even imposing Z⊥X does not resolve the degeneracy
The following result states that when ∣Z∣ is (very) large, even imposing Z⊥X does not resolve the degeneracy.
independent-noise deterministic simulation
Assume X,Y are finite. Suppose R contains x-independent laws
r(z∣x)=q(z),
and G contains deterministic channels
g(y∣x,z)=1{y=fz(x)}
for arbitrary functions fz:X→Y.
Then, if ∣Z∣≥∣X∣(∣Y∣−1)+1, then every channel p(y∣x) admits such a factorization.
Consequently,
(r,g)∈F(p)supI(Y;Z∣X)=H(Y∣X).
\begin{proof}
Represent the channel p(y∣x) as a row-stochastic matrix
W=[p(y∣x)]x,y∈x∈X∏ΔY.
The set ∏x∈XΔY is a convex polytope of dimension ∣X∣(∣Y∣−1). Its extreme points are exactly the deterministic channels Df whose x-th row is the Dirac mass at f(x). Therefore,
W=i=1∑mqiDfi
for some deterministic maps fi:X→Y. By Carathéodory's theorem, every element of ∏x∈XΔY can be represented as a convex sum of at most ∣X∣(∣Y∣−1)+1 points. This implies that there exists (qi)i=1m,(fi)i=1m such that W can be written as W=∑i=1mqiDfi with m≤∣X∣(∣Y∣−1)+1.
Now let let ∣Z∣=m and Z∼q=(q1,…,qm) independently of X, and define Y=fZ(X). Then
p(y∣x)=z∑q(z)1{y=fz(x)},
so the factorization is feasible and deterministic given (X,Z). Hence H(Y∣X,Z)=0, and #^deterministic-maximizers yields I(Y;Z∣X)=H(Y∣X).
\end{proof}
This implies that, when ∣Z∣ is large-enough, even the strong restriction Z⊥X is not enough by itself if the decoder may depend on (X,Z) arbitrarily. One must impose additional structure such as small ∣Z∣, g(y∣x,z)=g(y∣z), parametric restrictions, or explicit penalties to get a more structured selection principle.
The structured regime g(y∣x,z)=g(y∣z): connection to nonnegative rank
Now impose the shared-decoder restriction
g(y∣x,z)=g(y∣z)=:gz(y).
This is implicitly assuming a type of information bottleneck where all y-relevant information about x is encoded into z by the router. We continue to assume that the router and generator classes are unrestricted subject to this constraint. I.e., R includes all r(z∣x) and G includes all g(y∣z).
Let W∈R+∣X∣×∣Y∣ be the channel matrix Wxy=p(y∣x), and let ∣Z∣=m.
We begin by recalling the definition of the non-negative rank.
Non-negative rank
Recall that the linear rank of a matrix is the smallest number of vectors such that every column can be written as linear combination of those vectors. For the nonnegative rank, it is required that the vectors must have non-negative entries and that the coefficients in the linear combinations are non-negative.
The following result states that if we restrict the generator class to depend only on z, then exact factorization of p(y∣x) is possible if and only if the nonnegative rank of the channel Wxy=p(y∣x) is at most ∣Z∣. Moreover, this is equivalent to a nonnegative matrix factorization problem, and the max-info criterion becomes a minimum-entropy nonnegative factorization problem.
exact factorization if and only if rank+(W)≤∣Z∣
Under the shared-decoder restriction g(y∣x,z)=g(y∣z), an exact factorization exists if and only if
rank+(W)≤∣Z∣,
where rank+ denotes nonnegative rank.
Equivalently, exact finite-latent factorization is exactly a nonnegative matrix (NMF) factorization problem. Moreover,
Thus max-info becomes a minimum-entropy nonnegative matrix factorization problem.
\begin{proof}
Let ∣Z∣=m. If there exists a factorization (r,g) of p(y∣x) such that p(y∣x)=∑zr(z∣x)g(y∣z), then the row-stochastic matrices R,G defined as
Rxz=r(z∣x),Gzy=gz(y),
form a nonnegative factorization W=RG with inner dimension m, so rank+(W)≤m.
Conversely, if rank+(W)≤m, there exist V∈R+∣X∣×m, U∈R+m×∣Y∣ such that
W=VU.
Let
sz:=y∑Uzy.
Discard any zero rows if needed, and define
Gzy:=szUzy,Rxz:=Vxzsz.
Then W=RG, each row of G sums to 1, and each row of R sums to
z∑Rxz=z∑Vxzsz=y∑Wxy=1.
So R and G are row-stochastic and define the required factorization.
This regime defines a restriction on the complexity of the generator class (or can also be read as defining a restriction on the size of Z). Unlike the fully expressive case, one cannot usually make Y deterministic given (X,Z) unless the channel matrix admits a sufficiently small deterministic or nonnegative-rank decomposition.
C. T. Li and A. El Gamal (2017/2018), Strong Functional Representation Lemma and Applications to Coding Theorems. Formalizes the independent-noise representation Y=ϕ(X,Z) with Z⊥X, connected to the independent-noise theorem above. URL: https://arxiv.org/pdf/1701.02827
S. Yang, R. Xu, J. Chen, J. Zhang (2017), Intrinsic Capacity. Discusses decompositions of a channel into deterministic channels and the induced non-uniqueness of intrinsic states, closely related to the degeneracy above. URL: https://arxiv.org/pdf/1706.06858