Interaction Asymmetry: A General Principle for Learning Composable Abstractions

## Abstract

Abstract Learning disentangled representations of concepts and re-composing them in unseen ways is crucial for generalizing to out-of-domain situations. However, the underlying properties of concepts that enable such disentanglement and compositional generalization remain poorly understood. In this work, we propose the principle of interaction asymmetry which states: “Parts of the same concept have more complex interactions than parts of different concepts”. We formalize this via block diagonality conditions on the ( n + 1 ) 𝑛 1 (n+1) ( italic_n + 1 ) th order derivatives of the generator mapping concepts to observed data, where different orders of “complexity” correspond to different n 𝑛 n italic_n . Using this formalism, we prove that interaction asymmetry enables both disentanglement and compositional generalization. Our results unify recent theoretical results for learning concepts of objects, which we show are recovered as special cases with n = 0 𝑛 0 n\!=\!0 italic_n = 0 or 1 1 1 1 . We provide results for up to n = 2 𝑛 2 n\!=\!2 italic_n = 2 , thus extending these prior works to more flexible generator functions, and conjecture that the same proof strategies generalize to larger n 𝑛 n italic_n . Practically, our theory suggests that, to disentangle concepts, an autoencoder should penalize its latent capacity and the interactions between concepts during decoding. We propose an implementation of these criteria using a flexible Transformer-based VAE, with a novel regularizer on the attention weights of the decoder. On synthetic image datasets consisting of objects, we provide evidence that this model can achieve comparable object disentanglement to existing models that use more explicit object-centric priors.

### 1 Introduction

A core feature of human cognition is the ability to use abstract conceptual knowledge to generalize far beyond direct experience (Tenenbaum et al., , Behrens et al., , Mitchell, , Murphy, ).
For example, by applying abstract knowledge of the concept “chair”, we can easily infer how to use a “chair on a beach”, even if we have not yet observed this combination of concepts.
This feat is non-trivial and requires solving two key problems. Firstly, one must acquire an abstract, internal model of different concepts in the world. This implies learning a *separate* internal representation of each concept from sensory observations. Secondly, these representations must remain valid when observations consist of novel compositions of concepts, e.g., “chair” and “beach”. In machine learning, these two problems are commonly referred to as learning *disentangled representations* (Bengio et al., , Higgins et al., , Schölkopf et al., ) and *compositional generalization* (Fodor and Pylyshyn, , Lake et al., , Greff et al., , Goyal and Bengio, ).

Both problems are known to be challenging due to the issue of *non-identifiability* (Hyvärinen et al., ). Namely, many models can explain the same data equally well, but only some will learn representations of concepts which are disentangled and generalize compositionally. To guarantee *identifiability* with respect to (w.r.t.) these criteria, it is necessary to incorporate suitable inductive biases into a model (Hyvärinen and Pajunen, , Locatello et al., , Lachapelle et al., ). These inductive biases, in turn, must reflect some underlying properties of the concepts which give rise to observed data. This raises a fundamental question: What properties of concepts enable learning models which provably achieve disentanglement and compositional generalization?

Many works aim to answer this question by studying properties enabling either disentanglement or compositional generalization *in isolation*. This is insufficient, however, as disentanglement alone does not imply compositional generalization (Montero et al., , Schott et al., , Montero et al., ), while compositional generalization requires first disentangling the concepts to be composed. Only a few studies investigate properties enabling *both* disentanglement and compositional generalization (Lachapelle et al., , Brady et al., , Wiedemer et al., ). Yet, the properties proposed in these works are rather restrictive and specific to objects in simple visual scenes. There is growing evidence, however, that the principles humans use to learn conceptual knowledge are not concept-specific, but shared across different concepts (objects, attributes, events, etc.) (Constantinescu et al., , Behrens et al., , Hawkins et al., ). This suggests there exist some *general* properties of concepts which enable both disentanglement and compositional generalization.

Figure: Figure 1: Illustration of Interaction Asymmetry. (Left) Observations $\mathbf{x}$ result from a generator $\mathbf{f}$ applied to latent slots $\mathbf{z}_{B_{k}}$ that represent separate concepts. As indicated by the reflection of the cylinder upon the cube, slots can interact during generation. Our key assumption, interaction asymmetry, states that these interactions across slots must be less complex than interactions within the same slot. (Right) This is formalized by assuming block-diagonality *across* but not *within* slots for the $(n\!+\!1)$^th order derivatives of the generator, i.e., $D^{n+1}\mathbf{f}$.
Refer to caption: x1.png

In this work, we seek to formulate such a general property for disentangling and composing concepts. We begin by aiming to deduce, from first principles, properties which are fundamental to concepts (§ 3). From this, we arrive at the guiding principle of *interaction asymmetry* (Principle 3.1) stating: “Parts of the same
concept have more complex interactions than parts of different concepts”.
As illustrated in Fig. 1 (left), we define concepts as distinct groups, or *slots*, of latent variables which generate the observed data (§ 2).
Interaction asymmetry is then formalized as a block-diagonality condition *across* but *not within* slots for the tensor of $(n+1)$^th order partial derivatives of the generator function (Asm. 3.5), where $n$ determines the complexity of interactions, see Fig. 1 (right).

Theory.
Using this formulation, we prove that interaction asymmetry dually enables *both* disentanglement (Thm. 4.3) and compositional generalization (Thm. 4.4). We also show that our formalism provides a unifying framework for prior results of Brady et al. () and Lachapelle et al. (), by proving that the properties studied in these works for visual objects are special cases of our assumptions for $n\!=\!0$ and $1$, respectively. We provide results for up to $n\!=\!2$, thus extending these prior works to more general function classes, and conjecture that our results generalize to arbitrary $n\!\geq\!0$.

Method.
Our theory suggests that to disentangle concepts, a model should (i) enforce invertibility, without using more latent dimensions than necessary, and (ii) penalize interactions across slots during decoding.
To translate these insights into a practical method, we leverage a VAE loss (Kingma and Welling, ) for (i), and observe that the Transformer architecture (Vaswani et al., ) offers an approximate means to achieve (ii) since interactions are determined by the attention weights of the model.
To this end, we introduce an inexpensive interaction regularizer for a cross-attention mechanism, which we incorporate, with the VAE loss, into a flexible Transformer-based model (§ 5).

Empirical Results.
We test this model’s ability to disentangle concepts of visual objects on a Sprites dataset (Watters et al., ) and on CLEVR6 (Johnson et al., ). We find that the model reliably learns disentangled representations of objects, improving performance over an unregularized Transformer (§ 6). Furthermore, we provide preliminary evidence that our regularized Transformer can achieve comparable performance to models with more explicit object-centric priors such as Slot Attention (Locatello et al., ) and Spatial Broadcast Decoders (Watters et al., ).

Notation.
We write scalars in lowercase ($z$), vectors in lowercase bold ($\mathbf{z}$), and matrices in capital bold ($\mathbf{M}$). $[K]$ stands for $\{1,2,...,K\}$. $D_{i}$ and $D^{2}_{i,j}$ stand for the first- and second-order partial derivatives with respect to (w.r.t.) $z_{i}$ and $(z_{i},z_{j})$, respectively. If $B\subseteq[n]$ and ${\bm{z}}\in{\mathbb{R}}^{n}$, $\mathbf{z}_{B}$ denotes the subvector $(z_{i})_{i\in B}$ indexed by $B$. A function is $C^{n}$ if it is $n$-times continuously differentiable.

### 2 Background

We start by formalizing the core ideas of concepts, disentanglement, and compositional generalization, mostly following the setup of Lachapelle et al. (). To begin, we assume that the observed data $\mathbf{x}\in\mathcal{X}\subset\mathbb{R}^{d_{x}}$ results from applying a diffeomorphic generator $\mathbf{f}:\mathcal{Z}\to\mathcal{X}$ to latent vectors $\mathbf{z}\in\mathcal{Z}:=\mathbb{R}^{d_{z}}$, sampled from some distribution $p_{\mathbf{z}}$. Concepts underlying $\mathbf{x}$ (objects, attributes, events, etc.) are then modelled as $K$ disjoint groups or *slots* of latents $\mathbf{z}_{B_{k}}$ such that $\mathbf{z}=(\mathbf{z}_{B_{1}},...,\mathbf{z}_{B_{K}})$, where $B_{k}\subseteq[d_{z}]$. We assume that $p_{\mathbf{z}}$ is only supported on a subset $\mathcal{Z}_{\textnormal{supp}}\subseteq\mathcal{Z}$ which gives rise to observed data $\mathcal{X}_{\textnormal{supp}}:=\mathbf{f}(\mathcal{Z}_{\textnormal{supp}})$.
This generative process can be summarized as:

$$ $\mathbf{x}=\mathbf{f}(\mathbf{z}),\qquad\mathbf{z}\sim p_{\mathbf{z}},\qquad \operatorname{supp}(p_{\mathbf{z}})=\mathcal{Z}_{\textnormal{supp}}\,.$ (2.1) $$

Next, consider a model $\hat{\mathbf{f}}:\mathcal{Z}\to\mathbb{R}^{d_{x}}$
trained to be invertible from $\mathcal{X}_{\textnormal{supp}}$ to $\hat{\mathcal{Z}}_{\textnormal{supp}}:=\hat{\mathbf{f}}^{-1}(\mathcal{X}_{
\textnormal{supp}})$, whose inverse $\hat{\mathbf{f}}^{-1}$ maps to a representation $\hat{\mathbf{z}}\in\hat{\mathcal{Z}}_{\textnormal{supp}}\subseteq\mathcal{Z}$. This model is said to learn a *disentangled* representation of $\mathbf{z}\in\mathcal{Z}_{\textnormal{supp}}$ if each model slot $\hat{\mathbf{z}}_{B_{j}}$ captures exactly one concept $\mathbf{z}_{B_{k}}$.

###### Definition 2.1 (Disentanglement) .

Let $\mathbf{f}:\mathcal{Z}\to\mathcal{X}$ be a diffeomorphism and $\bar{\mathcal{Z}}\subseteq\mathcal{Z}$. A model $\hat{\mathbf{f}}$ *disentangles $\mathbf{z}$ on $\bar{\mathcal{Z}}$ w.r.t. $\mathbf{f}$* if there exist a permutation $\pi$ of $[K]$ and slot-wise diffeomorphism $\mathbf{h}=(\mathbf{h}_{1},\dots,\mathbf{h}_{K})$ with $\mathbf{h}_{k}:{\mathbb{R}}^{|B_{\pi(k)}|}\to{\mathbb{R}}^{|B_{k}|}$ and such that for all $\mathbf{z}\in\bar{\mathcal{Z}}$:

$$ $\hat{\mathbf{f}}\left(\mathbf{h}_{1}\left(\mathbf{z}_{B_{\pi(1)}}\right),\dots ,\mathbf{h}_{K}\left(\mathbf{z}_{B_{\pi(K)}}\right)\right)=\mathbf{f}(\mathbf{ z})\,.$ (2.2) $$

In other words, a representation is disentangled if the model inverts the generator up to permutation and reparametrization of the slots. For compositional generalization, we would like this to hold not only on $\mathcal{Z}_{\textnormal{supp}}$ but also for arbitrary combinations of the slots therein. Namely, also on the set

$$ $\mathcal{Z}_{\mathrm{CPE}}:=\mathcal{Z}_{1}\times\mathcal{Z}_{2}\times\dots \times\mathcal{Z}_{K}\,,\qquad\text{with}\qquad\mathcal{Z}_{k}:=\{\mathbf{z}_{ B_{k}}\mid\mathbf{z}\in\mathcal{Z}_{\textnormal{supp}}\}$ (2.3) $$

where $\mathcal{Z}_{k}$ denote the marginal supports of $p_{\mathbf{z}}$ and $\mathcal{Z}_{\mathrm{CPE}}$ the *Cartesian-product extension* (Lachapelle et al., ) of $\mathcal{Z}_{\textnormal{supp}}$.
In general, $\mathcal{Z}_{\textnormal{supp}}$ is a subset of $\mathcal{Z}_{\mathrm{CPE}}$.
Thus, to generalize compositionally, a model must also achieve disentanglement “out-of-domain” on novel compositions of slots in $\mathcal{Z}_{\mathrm{CPE}}$.

###### Definition 2.2 (Compositional Generalization) .

Let $\mathbf{f}:\mathcal{Z}\to\mathcal{X}$ be a diffeomorphism. A model $\hat{\mathbf{f}}$ that disentangles $\mathbf{z}$ on $\mathcal{Z}_{\textnormal{supp}}$ w.r.t. $\mathbf{f}$ (Defn. 2.1) *generalizes compositionally* if it also disentangles $\mathbf{z}$ on $\mathcal{Z}_{\mathrm{CPE}}$ w.r.t. $\mathbf{f}$.

On the Necessity of Inductive Biases.
It is well known that only a small subset of invertible models achieve disentanglement on $\mathcal{Z}_{\textnormal{supp}}$ (Locatello et al., , Hyvärinen and Pajunen, ) or generalize compositionally to $\mathcal{Z}_{\mathrm{CPE}}$ (Lachapelle et al., ).
To provably achieve these goals (without explicit supervision), we thus need to further restrict the space of permissible models, i.e., place additional assumptions on the generative process in Eq. 2.1.
Such assumptions then translate into inductive biases on a model. To this end,
the core challenge is formulating assumptions on $p_{\mathbf{z}}$ or $\mathbf{f}$ which faithfully reflect properties of concepts, while sufficiently restricting the problem.

Assumptions on $p_{\mathbf{z}}$.
To guarantee disentanglement, several assumptions on $p_{\mathbf{z}}$ have been proposed, such as conditional independence given an auxiliary variable (Hyvärinen et al., , Khemakhem et al., ); particular temporal  (Hyvärinen and Morioka, ; , Hälvä and Hyvarinen, , Klindt et al., ),
spatial (Hälvä et al., ; ),
or other latent structures (Kivva et al., , Kori et al., );
multiple views (Locatello et al., , Gresele et al., , Zimmermann et al., , von Kügelgen et al., , Yao et al., , Brehmer et al., , Ahuja et al., );
or interventional information (Lippe et al., ; , Lachapelle et al., ; , Buchholz et al., , von Kügelgen et al., , Wendong et al., , Varici et al., ).
While sufficient for disentanglement, such assumptions do not ensure compositional generalization.
The latter requires the behavior of the generator on $\mathcal{Z}_{\mathrm{CPE}}$ to be determined solely by its behavior on $\mathcal{Z}_{\textnormal{supp}}$ (see Defn. 2.2).
In the most extreme case, where the values of each slot $\mathbf{z}_{B_{k}}$ are seen only once, $\mathcal{Z}_{\textnormal{supp}}$ will be a one-dimensional manifold embedded in $\mathcal{Z}$, while $\mathcal{Z}_{\mathrm{CPE}}$ is always $d_{z}$-dimensional. This highlights that generalizing from $\mathcal{Z}_{\textnormal{supp}}$ to $\mathcal{Z}_{\mathrm{CPE}}$ is only possible if the form of the generator $\mathbf{f}$ is restricted.

Assumptions on $\mathbf{f}$.
Restrictions on $\mathbf{f}$ which enable compositional generalization have been proposed by Dong and Ma (), Wiedemer et al. (), Lippl and Stachenfeld (), Ahuja and Mansouri (). Yet, these results rely on quite limited function classes and do not address disentanglement, assuming it to be solved a priori. Conversely, several works explore restrictions on $D\mathbf{f}$ such as orthogonality (Gresele et al., , Buchholz et al., , Buchholz and Schölkopf, , Horan et al., ) or sparsity (Moran et al., , Zheng and Zhang, , Leemann et al., , Lachapelle et al., )
which address disentanglement but not compositional generalization. More recently, Brady et al. () and Lachapelle et al. () proposed assumptions on $\mathbf{f}$ which enable both disentanglement and compositional generalization (Wiedemer et al., ). Yet, these assumptions are overly restrictive such that $\mathbf{f}$ can only model limited types of concepts, e.g., non-interacting objects, and not more general concepts. We discuss these two works further in § 4.3.

###### Definition 2.1 (Disentanglement) .

###### Definition 2.2 (Compositional Generalization) .

### 3 The Interaction Asymmetry Principle

In this section, we attempt to formulate assumptions that enable disentanglement and compositional generalization, while capturing more general properties of concepts. To approach this, we take a step back and try to understand what are the defining properties of concepts. Specifically, we
consider the question: Why are some structures in the world recognized as different concepts (e.g., apple vs. dog) and others as part of the same concept? We propose an answer to this
for concepts grounded in sensory data, such as objects (e.g., “car”), events (e.g., “making coffee”), or attributes (e.g., “color”).

Sensory-grounded concepts correspond to reoccurring visual or temporal patterns that follow an abstract template. They tend to be modular, such that independently changing one concept generally leaves the structure of other concepts intact (, , § 4.1.1; , ).
For example, a car can change position without affecting the structure of the street, buildings, or people around it. Thus, different concepts appear, in some sense, to not interact.

On the other hand, parts of the same concept do not seem to possess this modularity. Namely, arbitrarily changing one part of a concept without adjusting other parts is generally not possible without destroying its inherent structure. For example, it is not possible to change the position of the front half of a car, while maintaining something we would still consider a car, without also
changing the back half’s position. Thus, parts of the same concept seem to interact.

This may then lead us to answer our initial question with: Parts of the same concept interact, while different concepts do not. However, this is an oversimplified view, as parts of different concepts can, in fact, interact. For example, in Fig. 1 we see the purple cylinder reflects upon and thus interacts with the golden cube. However, such interactions across concepts appear somehow simpler than interactions within a concept: whereas the latter can alter the concept’s structure, the former generally will not. In other words, the complexity of interaction within and across concepts appears to be asymmetric. We formulate this as the following principle (see § G.1 for related principles).

###### Principle 3.1 (Interaction Asymmetry) .

Parts of the same concept have more complex interactions than parts of different concepts.

To investigate the implications of Principle 3.1 for disentanglement and compositional generalization, we must first give it a precise formalization. To this end, we need a mathematical definition of the “complexity of interaction” between parts of concepts, i.e., groups of latents from the same or different slots. This can be formalized either through assumptions on the latent distribution $p_{\mathbf{z}}$ or on the generator $\mathbf{f}$. Since the latter are essential for compositional generalization, this is our focus.

Let us start by imagining what it would mean if two groups of latents $\mathbf{z}_{A}$ and $\mathbf{z}_{B}$ interact with *no complexity*, i.e., have *no interaction* within $\mathbf{f}$. A natural way to formalize this is that $\mathbf{z}_{A}$ and $\mathbf{z}_{B}$ affect distinct output components $f_{l}$. Mathematically, this is captured as follows.

###### Definition 3.2 (At most 0 0 th order/No interaction) .

Let $\mathbf{f}:\mathcal{Z}\to\mathcal{X}$ be $C^{1}$, and let $A,B\subseteq[d_{z}]$ be non-empty. $\mathbf{z}_{A}$ and $\mathbf{z}_{B}$
have *no interaction* within $\mathbf{f}$ if for all $\mathbf{z}\in\mathcal{Z}$, and all $i\in A,j\in B$:

$$ $D_{i}\mathbf{f}(\mathbf{z})\odot D_{j}\mathbf{f}(\mathbf{z})=\mathbf{0}\,.$ (3.1) $$

To define the next order of interaction complexity, we assume that $\mathbf{z}_{A}$ and $\mathbf{z}_{B}$ *do interact*, i.e., they affect the same output $f_{l}$
such that $D_{i}f_{l}(\mathbf{z})$ and $D_{j}f_{l}(\mathbf{z})$ are non-zero for some $i\in A$, $j\in B$. This interaction, however, should have the lowest possible complexity. A natural way to capture this is to say that $z_{i}$ can affect the same output $f_{l}$ as $z_{j}$ but cannot affect *the way in which $f_{l}$ depends on $z_{j}$*. Since the latter is captured by $D_{j}f_{l}(\mathbf{z})$, this amounts to a question about the $2$^nd order derivative $D^{2}_{i,j}f_{l}$. We thus arrive at the following definition for the next order of interaction complexity.

###### Definition 3.3 (At most $1$ st order interaction) .

Let $\mathbf{f}:\mathcal{Z}\to\mathcal{X}$ be $C^{2}$, and let $A,B\subseteq[d_{z}]$ be non-empty. $\boldsymbol{z}_{A}$ and $\boldsymbol{z}_{B}$ have *at most $1$^st order interaction* within $\mathbf{f}$ if for all $\mathbf{z}\in\mathcal{Z}$, and all $i\in A,j\in B$:

$$ $D^{2}_{i,j}\mathbf{f}(\mathbf{z})=\mathbf{0}\,.$ (3.2) $$

Using the same line of reasoning, we can continue to define interactions at increasing orders of complexity. For example, for *at most $2$^nd order interaction*, $z_{i}$ can affect the derivative $D_{j}f_{l}$, such that $D^{2}_{i,j}f_{l}(\mathbf{z})\neq 0$, but cannot affect the way in which $D_{j}f_{l}$ depends on any other $z_{k}$, i.e., $D^{3}_{i,j,k}f_{l}(\mathbf{z})=0$. This leads to a general definition of interactions with *at most $n$^th order* complexity.

###### Definition 3.4 (At most $n$ th order interaction) .

Let $n\geq 1$ be an integer.
Let $\mathbf{f}:\mathcal{Z}\to\mathcal{X}$ be $C^{n+1}$.
Let $A,B\subseteq[d_{z}]$ be non-empty.
$\mathbf{z}_{A}$ and $\mathbf{z}_{B}$ have *at most $n$^th order interaction* within $\mathbf{f}$ if for all $\mathbf{z}\in\mathcal{Z}$, all $i\in A,j\in B$, and all multi-indices(^†^†A *multi-index* is an ordered tuple $\bm{\alpha}=(\alpha_{1},\alpha_{2},...,\alpha_{d})$ of non-negative integers $\alpha_{i}\in\mathbb{N}_{0}$, with operations $|\bm{\alpha}|:=\alpha_{1}+\alpha_{2}+...+\alpha_{d}$, $\mathbf{z}^{\bm{\alpha}}:=z_{1}^{\alpha_{1}}z_{2}^{\alpha_{2}}...\,z_{d}^{ \alpha_{d}}$, and $D^{\bm{\alpha}}:=\frac{\partial^{\alpha_{1}}}{\partial z_{1}^{\alpha_{1}}} \frac{\partial^{\alpha_{2}}}{\partial z_{2}^{\alpha_{2}}}...\,\frac{\partial^{ \alpha_{d}}}{\partial z_{d}^{\alpha_{d}}}$, see Appx. B for details.)
$\bm{\alpha}\in\mathbb{N}_{0}^{d_{z}}$ with $|\bm{\alpha}|=n+1$ and $1\leq\alpha_{i},\alpha_{j}$:

$$ $D^{\bm{\alpha}}\mathbf{f}(\mathbf{z})=\mathbf{0}\,.$ (3.3) $$

In other words, $\mathbf{z}_{A}$ and $\mathbf{z}_{B}$ have at most $n$^th order interaction within $\mathbf{f}$ if all higher-than-$n$^th order cross partial derivatives w.r.t. at least one component of $\mathbf{z}_{A}$ and of $\mathbf{z}_{B}$ are zero everywhere. Otherwise, if the statement in Defn. 3.4 does not hold for some $\mathbf{z}\in\mathcal{Z}$, $i\in A$, and $j\in B$, we say that $\mathbf{z}_{A}$ and $\mathbf{z}_{B}$ have *$(n{+}1)$^th order interaction at $\mathbf{z}$* (and similarly for $1$^st order interaction if Defn. 3.2 does not hold). With these definitions, we can now provide a precise formalization of Principle 3.1.

###### Assumption 3.5 (Interaction asymmetry (formal)) .

There exists $n\!\in\!\mathbb{N}_{0}$ such that (i) any two distinct slots $\mathbf{z}_{B_{i}}$ and $\mathbf{z}_{B_{j}}$ have at most $n$^th order interaction within $\mathbf{f}$; and (ii) for all $\mathbf{z}\in\mathcal{Z}$, all slots $\mathbf{z}_{B_{k}}$ and all non-empty $A,B$ with $B_{k}={A}\cup{B}$,
$\boldsymbol{z}_{A}$ and $\boldsymbol{z}_{B}$ have $(n{+}1)$^th order interaction within $\mathbf{f}$ at $\mathbf{z}$.

We emphasize that Asm. 3.5 (ii) does not state that all subsets of latents within a slot must have $(n{+}1)$^th order interaction, but only that
a slot cannot be split into
two parts with at most $n$^th order interaction, see Fig. 1 (right). In the special case of one-dimensional slots, this means that each component $z_{i}$ has $(n{+}1)$^th order interaction w.r.t. itself.
We also note that condition (ii) must hold uniformly over ${\mathcal{Z}}$, which resembles the notion of “uniform statistical dependence” among latents introduced by Hyvärinen and Morioka (, Defn. 1). For further discussions of Asm. 3.5,
see § H.1.

###### Principle 3.1 (Interaction Asymmetry) .

###### Definition 3.2 (At most 0 0 th order/No interaction) .

###### Definition 3.3 (At most 1 1 1 1 st order interaction) .

###### Definition 3.4 (At most n 𝑛 n italic_n th order interaction) .

###### Assumption 3.5 (Interaction asymmetry (formal)) .

### 4 Theoretical Results

We now explore the theoretical implications of Asm. 3.5 for disentanglement on $\mathcal{Z}_{\textnormal{supp}}$ and compositional generalization to $\mathcal{Z}_{\mathrm{CPE}}$. We provide our results for up to at most $2$^nd order interaction across slots. All results—i.e., at most 0 0^th (no interaction), at most $1$^st, and at most $2$^nd order interaction—use a unified proof strategy. Thus, we conjecture this strategy can also be used to obtain results for $n\!\geq\!3$. This, however, would require taking $(n+1)\!\geq\!4$ derivatives of compositions of multivariate functions, which becomes very tedious as $n$ grows. General $n$^th order results are thus left for future work.

#### 4.1 Disentanglement

We start by proving disentanglement on $\mathcal{Z}_{\textnormal{supp}}$ for which we will need two additional assumptions.

Basis-Invariant Interactions.
First, one issue we must address is that our formalization of interaction asymmetry (Asm. 3.5) is not *basis invariant*. Specifically, it is possible that all splits of a slot $\boldsymbol{z}_{B_{k}}$ have $(n{+}1)$^th order interactions while for $\boldsymbol{M}_{k}\boldsymbol{z}_{B_{k}}$, with $\boldsymbol{M}_{k}$ a slot-wise change of basis matrix, they have at most $n$^th order interactions.
Since $\boldsymbol{M}_{k}$ need not affect interactions across slots, interaction asymmetry may no longer hold in the new basis. This makes it ambiguous whether interaction asymmetry is truly satisfied, as $\boldsymbol{z}_{B_{k}}$ and $\boldsymbol{M}_{k}\boldsymbol{z}_{B_{k}}$ contain the same information. To address this, we assume interaction asymmetry holds for all slot-wise basis changes, or *equivalent generators*.

###### Definition 4.1 (Equivalent Generators) .

A function ${\boldsymbol{\bar{f}}}:\mathbb{R}^{d_{z}}\rightarrow\mathbb{R}^{d_{x}}$ is said to be equivalent to a generator $\boldsymbol{f}$ if for all $k\in[K]$ there exists an invertible matrix $\boldsymbol{M}_{k}\in\mathbb{R}^{|B_{k}|\times|B_{k}|}$ such that

$$ $\forall\boldsymbol{z}\in\mathbb{R}^{d_{z}}:\qquad{\boldsymbol{\bar{f}}}\left( \boldsymbol{M}_{1}\boldsymbol{z}_{B_{1}},\dots,\boldsymbol{M}_{K}\boldsymbol{z }_{B_{K}}\right)=\boldsymbol{f}(\boldsymbol{z}_{B_{1}},\dots,\boldsymbol{z}_{B _{K}}).$ (4.1) $$

Sufficient Independence.
We require one additional assumption on $\mathbf{f}$ which we call *sufficient independence*. This assumption amounts to a linear independence condition on blocks of higher-order derivatives of $\mathbf{f}$. Its main purpose is to remove redundancy in the derivatives of $\mathbf{f}$ across slots, which can be interpreted as further constraining the interaction across slots during generation. In the case of $n\!=\!0$ (i.e., no interaction across slots), sufficient independence reduces to linear independence between slot-wise Jacobians of $\mathbf{f}$ (Defn. A.8). This is satisfied automatically since $\mathbf{f}$ is a diffeomorphism. When $n\!>\!0$, we require an analogous linear independence condition on higher order derivatives of $\mathbf{f}$. Below, we present this for the case $n\!=\!2$, while for $n\!=\!1$, it is presented in Defn. A.9.

###### Definition 4.2 (Sufficient Independence ( $2$ nd Order)) .

A $C^{3}$ function $\boldsymbol{f}:\mathbb{R}^{d_{z}}\rightarrow\mathbb{R}^{d_{x}}$ with at most $2$^nd order interactions across slots is said to have *sufficiently independent* derivatives if
$\forall\boldsymbol{z}\in\mathbb{R}^{d_{z}}$:

$$ $\displaystyle\text{rank}\Biggl{(}\biggl{[}\bigl{[}D_{i}\boldsymbol{f}( \boldsymbol{z})\bigr{]}_{i\in B_{k}}\ [D^{2}_{i,i^{\prime}}\boldsymbol{f}( \boldsymbol{z})]_{i\in B_{k},i^{\prime}\in[d_{z}]}\ [D^{3}_{i,i^{\prime},i^{ \prime\prime}}\boldsymbol{f}(\boldsymbol{z})]_{(i,i^{\prime},i^{\prime\prime}) \in B^{3}_{k}}\biggr{]}_{k\in[K]}\Biggr{)}$ $\displaystyle=$ $\displaystyle\ \sum_{k\in[K]}\left[\text{rank}\left(\left[[D_{i}\boldsymbol{f} (\boldsymbol{z})]_{i\in B_{k}}\ [D^{2}_{i,i^{\prime}}\boldsymbol{f}( \boldsymbol{z})]_{i\in B_{k},i^{\prime}\in[d_{z}]}\right]\right)+\text{rank} \left([D^{3}_{i,i^{\prime},i^{\prime\prime}}\boldsymbol{f}(\boldsymbol{z})]_{( i,i^{\prime},i^{\prime\prime})\in B^{3}_{k}}\right)\right]\,.$ $$

With Defns. 4.1 and 4.2,
we can now state our theoretical results;
see Appx. A for complete proofs.

###### Theorem 4.3 (Disentanglement on $\mathcal{Z}_{\textnormal{supp}}$ ) .

Let $n\in\{0,1,2\}$. Let $\mathbf{f}:\mathcal{Z}\rightarrow\mathcal{X}$ be a $C^{n+1}$ diffeomorphism satisfying interaction asymmetry (Asm. 3.5) for all equivalent generators (Defn. 4.1) and sufficient independence (§ A.2). Let $\mathcal{Z}_{\textnormal{supp}}$ be regular closed (Defn. A.3), path-connected (Defn. A.14) and aligned-connected (Defn. A.16). A model ${\hat{\mathbf{f}}}:\mathcal{Z}\rightarrow\mathbb{R}^{d_{x}}$ disentangles $\mathbf{z}$ on $\mathcal{Z}_{\textnormal{supp}}$ w.r.t. ${\mathbf{f}}$ (Defn. 2.1) if it is *(i)* a $C^{n+1}$ diffeomorphism between $\hat{\mathcal{Z}}_{\textnormal{supp}}$ and $\mathcal{X}_{\textnormal{supp}}$ with *(ii)* at most n^th order interactions across slots (Defn. 3.4) on $\hat{\mathcal{Z}}_{\textnormal{supp}}$.

Intuition.
Assume for a contradiction that $\mathbf{h}:=\hat{\mathbf{f}}^{-1}\circ\mathbf{f}$ *entangles* a ground-truth slot $\mathbf{z}_{B_{k}}$, i.e., $D_{B_{k}}\mathbf{h}(\mathbf{z})$ has multiple non-zero blocks. Because $\mathbf{f}$ and $\hat{\mathbf{f}}$ are invertible, $\mathbf{h}$ must encode all of $\mathbf{z}_{B_{k}}$ in $\hat{\mathbf{z}}:=\mathbf{h}(\mathbf{z})$. Further, because $\mathbf{f}$ satisfies interaction asymmetry, $\mathbf{z}_{B_{k}}$ cannot be split into two parts with less than $(n{+}1)\textsuperscript{th}$ order interaction. Taken together, this implies that if $\mathbf{h}$ entangles $\mathbf{z}_{B_{k}}$, then there exist parts $\mathbf{z}_{A}$ and $\mathbf{z}_{B}$ of $\mathbf{z}_{B_{k}}$, with $(n{+}1)\textsuperscript{th}$ order interaction, encoded in different model slots. Since the model $\hat{\mathbf{f}}$ is constrained to have at most $n$^th order interactions across slots, it cannot capture this interaction. Thus, the only way that $\hat{\mathbf{f}}$ can satisfy (i) and (ii) without achieving disentanglement is if reparametrizing $\mathbf{z}$ via $\mathbf{h}$ removed the interaction between $\mathbf{z}_{A}$ and $\mathbf{z}_{B}$. This situation is prevented by assuming sufficient independence and that Asm. 3.5 holds for all equivalent generators.

Conditions on $\mathcal{Z}_{\textnormal{supp}}$. The regular closed condition on $\mathcal{Z}_{\textnormal{supp}}$ in Thm. 4.3 ensures that equality between two functions on ${\mathcal{Z}}_{\text{supp}}$ implies equality of their derivatives, while the path-connectedness condition prevents the one-to-one correspondence between the slots of $\mathbf{z}$ and those of $\hat{\mathbf{z}}$ from changing across different
$\mathbf{z}$ (Lachapelle et al., ). The aligned-connectedness condition is novel and allows one to take integrals to go from local to global disentanglement (see § A.3 for details).

###### Definition 4.1 (Equivalent Generators) .

###### Definition 4.2 (Sufficient Independence ( 2 2 2 2 nd Order)) .

###### Theorem 4.3 (Disentanglement on 𝒵 supp subscript 𝒵 supp \mathcal{Z}_{\textnormal{supp}} caligraphic_Z start_POSTSUBSCRIPT supp end_POSTSUBSCRIPT ) .

#### 4.2 Compositional Generalization

We now show how Asm. 3.5 also enables learning a model that generalizes compositionally (Defn. 2.2), i.e., that equality of $\mathbf{f}$ and $\hat{\mathbf{f}}\circ\mathbf{h}$ on $\mathcal{Z}_{\textnormal{supp}}$ also implies their equality on $\mathcal{Z}_{\mathrm{CPE}}$. As discussed in § 2, such generalization is non-trivial and requires specific restrictions on a function class. A key restriction imposed by interaction asymmetry is that interactions across slots are limited to at most $n$^th order. In Thm. 4.3, this prevents $\hat{\mathbf{f}}\circ\mathbf{h}$ from modelling interactions between parts of the same ground-truth slot in different model slots. We now aim to show that limiting the interactions across slots serves the dual role of making $\mathbf{f}$ and $\hat{\mathbf{f}}\circ\mathbf{h}$ sufficiently “predictable”, such that their behavior on $\mathcal{Z}_{\mathrm{CPE}}$ can be determined from $\mathcal{Z}_{\textnormal{supp}}$. To do this, we will require a characterization of the form of functions with at most $n$^th order interactions across slots, which we prove in Thm. C.2 to be:

$$ $\mathbf{f}(\mathbf{z})=\sum_{k=1}^{K}\mathbf{f}^{k}\left(\mathbf{z}_{B_{k}} \right)+\sum_{\bm{\alpha}:|\bm{\alpha}|\leq n}\mathbf{c}_{\bm{\alpha}}\mathbf{ z}^{\bm{\alpha}}\,.$ (4.2) $$

where $\mathbf{c}_{\bm{\alpha}}\in\mathbb{R}^{d_{x}}$.
In the first sum, slots are processed *separately* by functions $\mathbf{f}^{k}$, while in the second, they can interact more explicitly via polynomial functions of components from different slots, with degree determined by the order of interaction, $n$. With this, we can now state our result.

###### Theorem 4.4 (Compositional Generalization) .

Let $n\in\{0,1,2\}$.
Let $\mathcal{Z}_{\textnormal{supp}}$ be regular closed (Defn. A.3).
Let $\mathbf{f}:\mathcal{Z}\rightarrow\mathcal{X}$ and ${\hat{\mathbf{f}}}:{\mathcal{Z}}\rightarrow\mathbb{R}^{d_{x}}$ be $C^{3}$ diffeomorphisms
with at most n^th order interactions across slots on $\mathcal{Z}$.
If $\hat{\mathbf{f}}$ disentangles $\mathbf{z}$ on $\mathcal{Z}_{\textnormal{supp}}$ w.r.t. $\mathbf{f}$ (Defn. 2.1), then it generalizes compositionally (Defn. 2.2).

Figure: Figure 2: See intuition for Theorem 4.4.
Refer to caption: x2.png

Intuition.
Consider the red dotted line in Fig. 2 (left) corresponding to $\{{\bm{z}}\in{\mathbb{R}}^{2}~{}|~{}z_{1}=z_{1}^{*}\}$. To generalize compositionally, the behavior of the partial derivative $\frac{\partial f_{l}}{\partial z_{1}}(z^{*}_{1},z_{2})$ on this line must be predictable from the behavior of $\mathbf{f}$ on $\mathcal{Z}_{\textnormal{supp}}$, and similarly for $\hat{\mathbf{f}}\circ\mathbf{h}$. Because $\mathbf{f}$ and, as we show, $\hat{\mathbf{f}}\circ\mathbf{h}$ have at most $n$^th order interactions across slots on $\mathbb{R}^{d_{z}}$, the form of this derivative is constrained to be a fixed-degree polynomial, see Eq. 4.2 and Fig. 2 (right).
Thus, its global behavior on the dotted line in $\mathbb{R}^{d_{z}}$ can be determined from its derivative locally in a region in $\mathcal{Z}_{\textnormal{supp}}$. Applying this reasoning to all such line segments intersecting $\mathcal{Z}_{\textnormal{supp}}$, we can show that the behavior of $\mathbf{f}$ and $\hat{\mathbf{f}}\circ\mathbf{h}$ on $\mathcal{Z}_{\textnormal{CPE}}$ can be determined from $\mathcal{Z}_{\textnormal{supp}}$.

###### Theorem 4.4 (Compositional Generalization) .

#### 4.3 Unifying and Extending Prior Results

We now show that our theory also recovers the results of Brady et al. () and Lachapelle et al. () as special cases for $n\!=\!0$ and $n\!=\!1$, and extends them to more flexible generative processes.

At most 0 0^th Order Interaction.
Brady et al. ()
proposed two properties on $\mathbf{f}$, which enable disentanglement and compositional generalization (Wiedemer et al., ): *compositionality* (Defn. E.1) and *irreducibility* (Defn. E.2). Compositionality states that different slots affect distinct output components such that $D\mathbf{f}(\mathbf{z})$ has a block-like structure. This is equivalent to $\mathbf{f}$ having at most 0 0^th order interaction across slots (Defn. 3.2). Irreducibility is a rank condition on $D_{B_{k}}\mathbf{f}(\mathbf{z})$ which Brady et al. () interpreted as parts of the same object sharing information. In Thm. E.3, we show that irreducibility is equivalent to $\mathbf{f}$ having 1^st order interaction within slots for all equivalent generators. Thus, the assumptions in Brady et al. () are equivalent to interaction asymmetry for all equivalent generators when $n=0$. Further, we recover their disentanglement result using a novel proof strategy, unified with proofs for at most $1$^st  / $2$^nd order interaction across slots (Thm. A.20).

At most $1$^st Order Interaction.
Lachapelle et al. () also proposed two assumptions on $\mathbf{f}$ for disentanglement and compositional generalization: *additivity* (Defn. E.4) and *sufficient nonlinearity* (Defn. E.5).
Additivity is equivalent to $f_{l}$ having a block-diagonal Hessian for all $l\in[d_{x}]$ (Lachapelle et al., ). This is the same as $\mathbf{f}$ having at most $1$^st order interaction across slots (Defn. 3.4). Sufficient nonlinearity is a linear independence condition on columns of $1$^st and $2$^nd derivatives of $\mathbf{f}$. In Thm. E.6, we show that sufficient nonlinearity implies that $\mathbf{f}$ satisfies sufficient independence for $n=1$ and has 2^nd order interaction within slots for all equivalent generators. Further, we conjecture that the reverse implication does not hold. Thus, the assumptions of Lachapelle et al. () imply, and are conjectured to be stronger than, our assumptions when $n=1$. We also recover their same disentanglement result using a unified proof strategy (Thm. A.22).

Allowing More Complex Interactions.
Our theory not only unifies but also extends these prior results to more general function classes. This is clear from considering the form of functions with at most $n$^th order interactions across slots in Eq. 4.2.
For at most 0 0^th (Brady et al., ) or $1$^st order interactions (Lachapelle et al., ), the sum of polynomials on the RHS of (4.2) vanishes. Consequently, $\mathbf{f}$ reduces to an *additive* function. Such generators can only model concepts with trivial interactions such as non-occluding objects. In contrast, we are able to go beyond additive interactions via the polynomial terms in (4.2). This formally corroborates the “generality” of interaction asymmetry, in that it enables more flexible generative processes where concepts can explicitly interact.

### 5 Method: Attention-Regularized Transformer-VAE

We now explore how our theoretical results in § 4 can inform the design of a practical estimation method.
Our theory puts forth two key properties that a model should satisfy: (i) invertibility and (ii) limited interactions across slots of at most $n$^th order. To achieve disentanglement on $\mathcal{Z}_{\textnormal{supp}}$, (i) and (ii) must hold only “in-domain” on $\hat{\mathcal{Z}}_{\textnormal{supp}}$ and $\mathcal{X}_{\textnormal{supp}}$ (Thm. 4.3), while for compositional generalization, they must also hold out-of-domain, on all of $\mathcal{Z}$ and $\mathcal{X}$ (Thm. 4.4).
We will focus on approaches for achieving (i) and (ii) in-domain. Achieving them out-of-domain
requires addressing separate practical challenges, which are out of the scope of this work. We discuss this in detail in § H.3.

On Scalability. Approaches that enforce (i) and (ii) exactly will generally only be computationally tractable in low-dimensional settings.
Such computational issues are typical when translating a disentanglement result into an empirical method, often resulting in methods which directly adhere to theory but cannot scale beyond toy data (e.g., Gresele et al., , Brady et al., ).
Our core motivation, however, is learning representations of concepts underlying high-dimensional
sensory data, such as images.
Thus, to formulate a method which scales to such settings, we do not restrict ourselves to approaches which exactly enforce (i) and (ii) but explore approximate approaches.

(i) Invertibility.
Our theory requires invertibility between $\mathcal{X}_{\textnormal{supp}}\subseteq\mathbb{R}^{d_{x}}$ and $\hat{\mathcal{Z}}_{\textnormal{supp}}\subseteq\mathcal{Z}=\mathbb{R}^{d_{z}}$. For most settings of interest,
the observed dimension $d_{x}$ exceeds the ground-truth latent dimension $d_{z}$.
Thus, we generally cannot use models which are invertible by construction such as normalizing flows (Papamakarios et al., ). An alternative is to use an *autoencoder* in which $\hat{\mathbf{f}}^{-1}$ and $\hat{\mathbf{f}}$ are parameterized separately by an *encoder* $\hat{\mathbf{g}}:\mathbb{R}^{d_{x}}\to\mathbb{R}^{d_{\hat{z}}}$ and a *decoder* $\hat{\mathbf{f}}:\mathbb{R}^{d_{\hat{z}}}\to\mathbb{R}^{d_{x}}$, which are trained to invert each other (on $\hat{\mathcal{Z}}_{\textnormal{supp}}$ and $\mathcal{X}_{\textnormal{supp}}$) by minimizing a reconstruction loss
$\mathcal{L}_{\text{rec}}:=\mathbb{E}\|\mathbf{x}-{\hat{\mathbf{f}}}({\hat{
\mathbf{g}}}(\mathbf{x}))\|^{2}$. Minimizing $\mathcal{L}_{\text{rec}}$ alone, however,
does not suffice unless the inferred latent dimension $d_{\hat{z}}$ equals the ground-truth $d_{z}$. Yet, in practice $d_{z}$ is unknown. Moreover, choosing $d_{\hat{z}}>d_{z}$ is important for scalability (Sajjadi et al., ). A viable alternative is thus to employ a soft constraint where $d_{\hat{z}}>d_{z}$, but the model is encouraged to encode $\mathbf{x}$ using minimal latent dimensions. To achieve this, we leverage the well known VAE loss (Kingma and Welling, ), which couples $\mathcal{L}_{\text{rec}}$ with a KL-divergence loss $\mathcal{L}_{\textsc{kl}}$ between a factorized posterior $\mathbf{q}(\hat{\mathbf{z}}|\mathbf{x})$ and prior distribution $\mathbf{p}(\hat{\mathbf{z}})$, i.e., $\mathcal{L}_{\textsc{kl}}:=\sum_{i\in[d_{\hat{z}}]}{D_{\textsc{kl}}\left(
\mathbf{q}(\hat{z}_{i}|\mathbf{x})\|\mathbf{p}(\hat{z}_{i})\right)}$. This loss encourages each $\hat{z}_{i}$ to be insensitive to changes in $\mathbf{x}$ such that unnecessary dimensions should contain no information about $\mathbf{x}$ (Rolinek et al., ).

(ii) At Most $n$^th Order Interactions.
One approach to enforce at most $n$^th order interactions across slots would be to parameterize the decoder ${\hat{\mathbf{f}}}$ to match the form of such functions (see Thm. C.2) for some fixed $n$. However, this can result in an overly restrictive inductive bias and limit scalability. Moreover, $n$ is generally unknown. Thus, a more promising approach is to *regularize* interactions to be *minimal*. Doing this naively though using gradient descent would require computing gradients of high-order derivatives, which is intractable beyond toy data. This leads to the question:
Is there a scalable architecture which permits efficient regularization of the interactions across slots?

Transformers for Interaction Regularization.
We make the observation that the *Transformer* architecture (Vaswani et al., ) provides an efficient means to approximately regularize interactions. In a Transformer, slots are only permitted to interact via an *attention mechanism*. We will focus on a *cross-attention* mechanism, which maps a latent $\hat{\mathbf{z}}$ to an output $\hat{x}_{l}$ (e.g., a pixel) via:

$$ $\displaystyle\mathbf{K}$ $\displaystyle=\mathbf{W}^{K}[\hat{\mathbf{z}}_{B_{1}}\ \cdots\ \hat{\mathbf{z} }_{B_{K}}],$ $\displaystyle\mathbf{V}$ $\displaystyle=\mathbf{W}^{V}[\hat{\mathbf{z}}_{B_{1}}\ \cdots\ \hat{\mathbf{z} }_{B_{K}}],$ $\displaystyle\mathbf{Q}$ $\displaystyle=\mathbf{W}^{Q}[\boldsymbol{o}_{1}\ \cdots\ \boldsymbol{o}_{d_{x} }],$ (5.1) $\displaystyle\mathbf{A}_{l,k}$ $\displaystyle=\frac{\exp\big{(}\mathbf{Q}_{:,l}^{\top}\mathbf{K}_{:,k}\big{)}} {\sum_{i\in[K]}\exp\big{(}\mathbf{Q}_{:,l}^{\top}\mathbf{K}_{:,i}\big{)}},$ $\displaystyle\bar{\mathbf{x}}_{l}$ $\displaystyle=\mathbf{A}_{l,:}\mathbf{V}^{\top},$ $\displaystyle{\hat{x}_{l}}$ $\displaystyle=\psi(\bar{\mathbf{x}}_{l})\,.$ (5.2) $$

In Eq. 5.1, all slots are assumed to have equal size, and key $\mathbf{K}_{:,k}$ and value $\mathbf{V}_{:,k}$ vectors are computed for each slot $k\!\in\![K]$. Query vectors are computed for output dimensions $l\in[d_{x}]$ (e.g., pixel coordinates) and each $l$ is assigned a fixed vector $\boldsymbol{o}_{l}$. In Eq. 5.2, queries and keys
are used to compute attention weights $\mathbf{A}_{l,k}$. These weights determine the slots pixel $l$ “attends” to when generating pixel token $\bar{\mathbf{x}}_{l}$, which is mapped to a pixel $\hat{x}_{l}$ by nonlinear function $\psi$; see Appx. F for further details.

Within cross-attention, interactions across slots occur if the query vector for a pixel $l$ attends to multiple slots, i.e., if $\mathbf{A}_{l,k}$ is non-zero for more than one $k$. Conversely, if $\mathbf{A}_{l,k}$ is non-zero for only one $k$, then, intuitively, no interactions should occur. This intuition can be corroborated formally by computing the Jacobian of cross-attention w.r.t. each slot (see § F.1). Thus, an approximate means to minimize interactions across slots is to regularize $\mathbf{A}$ towards having only one non-zero entry for each row $\mathbf{A}_{l,:}$. To this end, we propose to minimize the sum of all pairwise products $\mathbf{A}_{l,j}\mathbf{A}_{l,k}$, where $j\neq k$ (see Fig. 4).
This quantity is non-negative and will only be zero when each row of $\mathbf{A}$ has exactly one non-zero entry. This resembles the *compositional contrast* of Brady et al. (), but computed on $\mathbf{A}$, which can be efficiently optimized, as opposed to the Jacobian of $\hat{\mathbf{f}}$ which is intractable to optimize. We refer to this regularizer as $\mathcal{L}_{\text{interact}}$, see Eq. F.9. For further discussions of $\mathcal{L}_{\text{interact}}$ and its limitations, see § F.2.

Model. Combining these different objectives leads us to the following weighted three-part-loss:

$$ $\mathcal{L}_{\text{disent}}({\hat{\mathbf{f}}},{\hat{\mathbf{g}}},{\mathbf{x}} )=\mathcal{L}_{\text{rec}}+\alpha\mathcal{L}_{\text{interact}}+\beta\mathcal{L }_{\text{KL}}.$ (5.3) $$

We apply this loss to a flexible Transformer-based autoencoder, similar to the models of Jaegle et al. (), Sajjadi et al. (), Jabri et al. (). For the encoder $\hat{\mathbf{g}}$, we first map data $\mathbf{x}$ to features using the CNN of Locatello et al. (). These features are processed by a Transformer, which has both self- and cross-attention at every layer, yielding a representation $\hat{\mathbf{z}}$. Our decoder ${\hat{\mathbf{f}}}$ then maps $\hat{\mathbf{z}}$ to an output $\hat{\mathbf{x}}$ using a cross-attention Transformer regularized with $\mathcal{L}_{\text{interact}}$,
see Appx. I for details.

Relationship to Models In Object-Centric Learning.
Existing models for learning disentangled representations of concepts, particularly for disentangling objects without supervision, typically rely on architectural priors rather than regularization (Greff et al., , Locatello et al., , Singh et al., , Traub et al., ). While such priors promote disentanglement, they are often too restrictive.
For example,
Spatial Broadcast Decoders (Watters et al., ) decode slots separately and only allow for weak interaction through a softmax function, which
prevents modelling
real-world data where objects exhibit more complex interactions (Singh et al., ). While some works have shown success in disentangling objects using more powerful Transformer decoders (Singh et al., , Sajjadi et al., , Singh et al., ), they rely on encoders that use Slot Attention (Locatello et al., ) as an architectural component, which differs from current large-scale models, typically based on Transformers (Anil et al., ).
In contrast, we explore the more flexible
approach of starting with a very general Transformer-based model and regularizing it towards a more constrained model.

### 6 Experiments

Figure: Figure 3: (A) Sprites Normalized slot-wise Jacobians for an unregularized ($\alpha=0,\beta=0$) and a regularized ($\alpha>0,\beta>0$) Transformer and a Spatial Broadcast Decoder (SBD). The unregularized model encodes objects across multiple slots, while the regularized model matches the disentanglement of the SBD. (B) CLEVR6 Slot-wise Jacobians for a regularized Transformer and a SBD on objects in CLEVR6 which interact via reflections. As can be seen in reconstructions and Jacobians, the regularized Transformer models reflections, while mostly removing unnecessary interactions, while the SBD fails to model reflections due to its restricted architecture.
Refer to caption: x3.png

We now apply our attention-regularized Transformer-VAE (§ 5) for learning representations of concepts. Since this model is designed to enforce the criteria outlined in Thm. 4.3 for disentanglement on $\mathcal{Z}_{\textnormal{supp}}$, we focus on evaluating disentanglement, as opposed to compositional generalization. To this end, we focus on disentangling objects in visual scenes, and leave an empirical study of a wider range of concepts (e.g., attributes, object-parts, events) for future work (see Appx. I for more details).

Data.
We consider two multi-object datasets in our experiments. The first, which we refer to as Sprites (Watters et al., , Brady et al., , Wiedemer et al., ), consist of images with $2$–$4$ objects set against a black background. The second is the CLEVR6 dataset (Johnson et al., ), consisting of images with $2$–$6$ objects. In Sprites, objects do not have reflections and rarely occlude such that slots have essentially have no interaction. In CLEVR6, however, objects can cast shadows and reflect upon each other (see Fig. 1 for an example), introducing more complex interactions.

Metrics.
A common metric for object disentanglement is the Adjusted-Rand Index (ARI; Hubert and Arabie, ). The ARI measures the similarity between the set of pixels encoded by a model slot, and the set of ground-truth pixels for a given object in a scene, yielding an optimal score if each slot corresponds to exactly one object. To assign a pixel to a unique model slot, prior works typically choose the slot with the largest attention score (from, e.g., Slot Attention) for that pixel (Seitzer et al., ). However, using attention scores can make model comparisons challenging and is also somewhat unprincipled (see § I.2). We thus consider an alternative and compute the ARI using the Jacobian of a decoder (J-ARI). Specifically, we assign a pixel $l$ to the slot with the largest $L_{1}$ norm for the slot-wise Jacobian $D_{B_{k}}\hat{f}_{l}(\hat{\mathbf{z}})$ (see Figs. 3 and 6 for a visualization of these Jacobians).

While J-ARI indicates which slots are most responsible for encoding each object, it does not indicate if additional slots affect the same object, i.e., $\|D_{B_{k}}\hat{f}_{l}(\hat{\mathbf{z}})\|_{1}\neq 0$ for more than one $k$. To measure this, we also introduce the Jacobian Interaction Score (JIS). JIS is computed by taking the maximum of $\|D_{B_{k}}\hat{f}_{l}(\hat{\mathbf{z}})\|_{1}$ across slots after normalization, averaged over all pixels. If each pixel is affected by only one slot, JIS is $1$. For datasets where objects essentially do not interact like Sprites, JIS should be close to $1$, whereas for CLEVR6, it should be as high as possible while maintaining invertibility.

#### 6.1 Results

$\mathcal{L}_{\text{disent}}$ Enables Object Disentanglement.
In Tab. 1, we compare the J-ARI and JIS of our regularized Transformer-based model ($\alpha\!>\!0,\beta\!>\!0$) trained with $\mathcal{L}_{\text{disent}}$ (Eq. 5.3) to the same model trained without regularization ($\alpha\!=\!0,\beta\!=\!0$), i.e., with only $\mathcal{L}_{\text{rec}}$. On Sprites,
the regularized model achieves notably higher scores for both J-ARI and JIS. This is corroborated by visualizing the slot-wise Jacobians in Fig. 3A, where we see the regularized model cleanly disentangles objects, whereas the unregularized model often encodes objects across multiple slots. Similarly, on CLEVR6, the regularized model achieves superior disentanglement, as indicated by the higher values for both metrics.

Comparison to Existing Object-Centric Autoencoders. In Tab. 1, we also compare our model to existing models using encoders with Slot Attention and Spatial Broadcast Decoders (SBDs). On Sprites, our model achieves higher J-ARI and JIS than these models, despite using a weaker architectural prior. On CLEVR6, our model outperforms Slot Attention with a Transformer decoder in terms of J-ARI and JIS. Models using a SBD, however, achieve a higher and nearly perfect JIS, i.e., the learned slots essentially never affect the same pixel. In Fig 3B, we see this comes at the cost of SBDs failing to model reflections between objects, while our model captures this interaction. This highlights that regularizing a flexible architecture with $\mathcal{L}_{\text{disent}}$ can enable a better balance between restricting interactions and model expressivity.

**Table 1: Empirical Results. We show the mean $\pm$ std. dev. for J-ARI and JIS (in %) over 3 seeds for different choices of encoders and decoders and weights of the loss terms in Eq. 5.3 on Sprites and CLEVR6.**
| Model |  | Sprites | CLEVR6 |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| Encoder | Decoder | Loss | J-ARI ($\uparrow$) | JIS ($\uparrow$) | J-ARI ($\uparrow$) | JIS ($\uparrow$) |
| Slot Attention | Spatial-Broadcast | $\alpha=0,\beta=0$ | $89.2\pm 1.2$ | $91.4\pm 0.6$ | $\mathbf{97.0}\pm\mathbf{0.1}$ | $\mathbf{95.3}\pm\mathbf{0.6}$ |
| Slot Attention | Transformer | $\alpha=0,\beta=0$ | $90.1\pm 1.2$ | $73.6\pm 1.2$ | $95.4\pm 0.8$ | $63.1\pm 0.8$ |
| Transformer | Transformer | $\alpha=0,\beta=0$ | $80.5\pm 3.4$ | $57.0\pm 6.5$ | $92.7\pm 2.7$ | $54.8\pm 2.9$ |
| Transformer | Transformer | $\alpha>0,\beta=0$ | $82.8\pm 2.9$ | $73.8\pm 3.3$ | $79.2\pm 10.4$ | $51.6\pm 4.8$ |
| Transformer | Transformer | $\alpha=0,\beta>0$ | $92.6\pm 1.6$ | $92.8\pm 0.7$ | $96.6\pm 0.3$ | $80.3\pm 0.3$ |
| Transformer | Transformer | $\alpha>0,\beta>0$ (Ours) | $\mathbf{93.6}\pm\mathbf{0.5}$ | $\mathbf{95.0}\pm\mathbf{1.7}$ | $96.5\pm 0.3$ | $83.8\pm 1.0$ |

Ablation Over Losses.
Lastly, in Tab. 1, we ablate the impact of the regularizers in $\mathcal{L}_{\text{disent}}$. Training without $\mathcal{L}_{\text{KL}}$ ($\alpha\!>\!0,\beta\!=\!0$) can in some cases give improvements in J-ARI and JIS over an unregularized model ($\alpha\!=\!0,\beta\!=\!0$). However, across datasets this loss yields worse disentanglement than $\mathcal{L}_{\text{disent}}$ ($\alpha\!>\!0,\beta\!>\!0$). This highlights that penalizing latent capacity via $\mathcal{L}_{\text{KL}}$ is important for object disentanglement. Training without $\mathcal{L}_{\text{interac}}$ ($\alpha\!=\!0,\beta\!>\!0$) generally yields a drop across both metrics compared to $\mathcal{L}_{\text{disent}}$, though on CLEVR6 this loss achieves a comparable J-ARI. We found that training with $\mathcal{L}_{\text{KL}}$ can, in some cases, implicitly minimize $\mathcal{L}_{\text{interac}}$, explaining this result (Fig. 5).

### 7 Conclusion

In this work, we proposed interaction asymmetry as a general principle for learning disentangled and composable representations.
Formalizing this idea led to a constraint on the partial derivatives of the generator function, which unifies assumptions from prior efforts and extends their results to a more flexible class of generators that allow for non-trivial interactions.
These theoretical insights inspired the development of a flexible estimation method based on the Transformer architecture with a novel cross-attention regularizer, which can be efficiently implemented at scale, and which shows promising results on object-centric learning datasets.
Future work should seek to further extend our theoretical results, address the empirical challenges for achieving compositional generalization, and test our
method on more large-scale data involving not only objects but also other types of concepts.

#### Acknowledgements

JB would like to thank Nicoló Zottino for providing the initial idea (expressed in Fig. 2) that compositional generalization could be extended to functions with at most $n$^th order interactions. The authors thank Luigi Gresele and the Robust Machine Learning Group for helpful discussions.

This work was supported by the German Federal Ministry of Education and Research (BMBF): Tübingen AI Center, FKZ: 01IS18039A, 01IS18039B. WB acknowledges financial support via an Emmy Noether Grant funded by the German Research Foundation (DFG) under grant no. BR 6382/1-1 and via the Open Philantropy Foundation funded by the Good Ventures Foundation. WB is a member of the Machine Learning Cluster of Excellence, EXC number 2064/1 – Project number 390727645. This work utilized compute resources at the Tübingen Machine Learning Cloud, DFG FKZ INST 37/1057-1 FUGG. Part of this work was done while JvK was affiliated with the Max Planck Institute for Intelligent Systems, Tübingen.

#### Author Contributions

JB initiated and led the project. JB wrote the manuscript in close collaboration with JvK, and with feedback from all authors. JB conceived of the framework of interaction asymmetry and then formalized it together with SL and JvK. JB proved the disentanglement results in Appx. A in collaboration with SL, who improved the clarity of several results and simplified some arguments. SL extended these results from local to global disentanglement in § A.3. SB proved the characterization of functions with at most $n$^th order interactions in Appx. C, based on an earlier weaker result for analytic functions by JvK. SB proved the compositional generalization results in Appx. D after discussions with JB. JB proved the results for unifying prior works in Appx. E. SB carried out the Jacobian computation in § F.1. JB conceived of the regularizers and method in § 5 and implemented and executed all experiments in § 6 with advising from TK. WB created Fig. 1 and Fig. 3 with insight from JB and feedback from JvK. SL created Fig. 2 based on an outline provided by JB.

## Appendices

### Appendix A Disentanglement Proofs

#### A.1 Additional Definitions and Lemmas

###### Definition A.1 ( $C^{k}$ -diffeomorphism) .

Let $A\subseteq{\mathbb{R}}^{n}$ and $B\subseteq{\mathbb{R}}^{m}$. A map ${\bm{f}}:A\rightarrow B$ is said to be a $C^{k}$-diffeomorphism if it is bijective, $C^{k}$ and has a $C^{k}$ inverse.

###### Remark A.2 .

The property of being differentiable is usually defined only for functions with an open domain of ${\mathbb{R}}^{n}$. Note that, in the definition above, both $A$ and $B$ might not be open sets in their respective topologies. For an arbitrary domain $A\subseteq{\mathbb{R}}^{n}$, we say that a function ${\bm{f}}$ is $C^{k}$ if it can be extended to a $C^{k}$ function defined on an open set $U$ containing $A$. More precisely, ${\bm{f}}:A\rightarrow B$ is $C^{k}$ if there exists a function ${\bm{g}}:U\rightarrow{\mathbb{R}}^{m}$ such that 1) $U$ is an open set containing $A$, 2) ${\bm{g}}$ is $C^{k}$, and 3) ${\bm{g}}({\bm{a}})={\bm{f}}({\bm{a}})$ for all ${\bm{a}}\in A$. See p.199 of Munkres () for details about such constructions.

###### Definition A.3 (Regular closed sets) .

A set $\mathcal{Z}_{\textnormal{supp}}\subseteq\mathbb{R}^{d_{z}}$ is regular closed if $\mathcal{Z}_{\textnormal{supp}}=\overline{\mathcal{Z}_{\textnormal{supp}}^{
\circ}}$, i.e. if it is equal to the closure of its interior (in the standard topology of $\mathbb{R}^{n}$).

###### Lemma A.4 ( Lachapelle et al. ( 2023b ) ) .

Let $A,B\subset{\mathbb{R}}^{n}$ and suppose there exists an homeomorphism ${\bm{f}}:A\rightarrow B$. If $A$ is regular closed in ${\mathbb{R}}^{n}$, we have that $B\subseteq\overline{B^{\circ}}$.

The way we defined $C^{k}$ functions with arbitrary domain is such that a function can be differentiable without having a uniquely defined derivative everywhere on its domain. This happens when the derivative of two distinct extensions differ.(^†^†A simple example of such a situation is the trivial function $f:\{0\}\rightarrow\{0\}$ which is differentiable at 0 0 but does not have a well defined derivative because $g(x)=x$ and $h(x)=-x$ are both differentiable extensions of $f$ but have different derivatives at $x=0$.) The following Lemma states that the derivative of a $C^{k}$ function is uniquely defined on the closure of the interior of its domain.

###### Lemma A.5 ( Lachapelle et al. ( 2023b ) ) .

Let $A\subseteq{\mathbb{R}}^{n}$ and ${\bm{f}}:A\rightarrow{\mathbb{R}}^{m}$ be a $C^{k}$ function. Then, its $k$ first derivatives are uniquely defined on $\overline{A^{\circ}}$ in the sense that they do not depend on the specific choice of $C^{k}$ extension.

###### Definition A.1 ( C k superscript 𝐶 𝑘 C^{k} italic_C start_POSTSUPERSCRIPT italic_k end_POSTSUPERSCRIPT -diffeomorphism) .

###### Remark A.2 .

###### Definition A.3 (Regular closed sets) .

###### Lemma A.4 ( Lachapelle et al. ( 2023b ) ) .

###### Lemma A.5 ( Lachapelle et al. ( 2023b ) ) .

##### Notation

For a subset $S\subseteq[d_{z}]$ and a matrix $\boldsymbol{A}\in\mathbb{R}^{m\times n}$, $\boldsymbol{A}_{S}$ will denote the sub-matrix consisting of the columns in $\boldsymbol{A}$ indexed by $S$ i.e. $\boldsymbol{A}_{S}=\begin{bmatrix}\boldsymbol{A}_{.,i}\end{bmatrix}_{i\in S}$. Similarly, for a vector $\boldsymbol{z}$, $\boldsymbol{z}_{S}$ will denote the sub-vector of $\boldsymbol{z}$ consisting of components indexed by $S$ i.e. $\boldsymbol{z}_{S}:=(z_{i})_{i\in S}$.

###### Lemma A.6 .

Let $\boldsymbol{A}\in\mathbb{R}^{m\times n}$ and let $\mathcal{B}$ be a partition of $[n]$. If

$$ $\text{rank}(\boldsymbol{A})=\sum_{S\in\mathcal{B}}\text{rank}(\boldsymbol{A}_{ S})$ (A.1) $$

Then $\forall\boldsymbol{z}\in\mathbb{R}^{n}$ s.t. $\boldsymbol{A}\boldsymbol{z}={\bf 0}$, $\boldsymbol{A}_{S}\boldsymbol{z}_{S}=\bf{0}$, for any $S\in\mathcal{B}$.

###### Proof.

Assume for a contradiction that there exist a $\boldsymbol{z}\in\mathbb{R}^{n}$, s.t. $\boldsymbol{A}\boldsymbol{z}={\bf 0}$, and there exist $S_{1}\in\mathcal{B}$ s.t. $\boldsymbol{A}_{S_{1}}\boldsymbol{z}_{S_{1}}\neq\bf{0}$.

Now construct the matrix, denoted, $\boldsymbol{A}_{-S_{1}}$ consisting of all columns in $\boldsymbol{A}$ except those indexed by $S_{1}$, i.e.

$$ $\boldsymbol{A}_{-S_{1}}:=\begin{bmatrix}\begin{bmatrix}\boldsymbol{A}_{.,i} \end{bmatrix}_{i\in S}\end{bmatrix}_{S\in\mathcal{B}\setminus S_{1}}$ (A.2) $$

By using (A.1) and the property that $\text{rank}([\boldsymbol{B},\boldsymbol{C}])\leq\text{rank}(\boldsymbol{B})+
\text{rank}(\boldsymbol{C})$, we get

$$ $\displaystyle\text{rank}(\boldsymbol{A})$ $\displaystyle=\sum_{S\in\mathcal{B}\setminus S_{1}}\text{rank}(\boldsymbol{A}_ {S})+\text{rank}(\boldsymbol{A}_{S_{1}})$ (A.3) $\displaystyle\geq\text{rank}(\boldsymbol{A}_{-S_{1}})+\text{rank}(\boldsymbol{ A}_{S_{1}})$ (A.4) $\displaystyle\geq\text{rank}(\boldsymbol{A})\,.$ (A.5) $$

Consequently, we have that:

$$ $\text{rank}(\boldsymbol{A})=\text{rank}(\boldsymbol{A}_{-S_{1}})+\text{rank}( \boldsymbol{A}_{S_{1}})$ (A.6) $$

This implies that the column spaces of both matrices denoted $\text{range}(\boldsymbol{A}_{-S_{1}}),\text{range}(\boldsymbol{A}_{S_{1}})$ respectively, do not intersect, except at the zero vector.
Now we know that at $\boldsymbol{z}$

$$ $\displaystyle{\bf 0}$ $\displaystyle=\boldsymbol{A}\boldsymbol{z}$ (A.7) $\displaystyle=\boldsymbol{A}_{-S_{1}}\boldsymbol{z}_{-S_{1}}+\boldsymbol{A}_{S _{1}}\boldsymbol{z}_{S_{1}}$ (A.8) $$

Consequently,

$$ $\displaystyle\boldsymbol{A}_{-S_{1}}\boldsymbol{z}_{-S_{1}}=-\boldsymbol{A}_{S _{1}}\boldsymbol{z}_{S_{1}}$ (A.9) $$

and by our assumed contradiction we know that at $\boldsymbol{z}$:

$$ $\displaystyle\boldsymbol{A}_{S_{1}}\boldsymbol{z}_{S_{1}}\neq{\bf 0}$ (A.10) $$

This implies that the column spaces of $\boldsymbol{A}_{-S_{1}},\boldsymbol{A}_{S_{1}}$ must intersect at a point other than the zero vector, which is a contradiction.
∎

###### Lemma A.7 .

Let ${\bm{A}}\in\mathbb{R}^{d\times d}$ be an invertible matrix and $\{B_{1},\dots,B_{K}\}$ be a partition of $[d]$. Assume there are $k_{1},k_{2},k\in[K]$ such that:

$$ ${\bm{A}}_{B_{k},B_{k_{1}}}\not=0\not={\bm{A}}_{B_{k},B_{k_{2}}}$ (A.11) $$

Then there exists a subset $S\subset[d]$ with cardinality $|B_{k}|$ that has the following properties:

- 1.
The sub-block ${\bm{A}}_{B_{k},S}$ is invertible.
- 2.
$S\not\subseteq B_{k^{\prime}}$, for any $k^{\prime}\in[K]$

###### Proof.

We first prove that there must exists an $S$ satisfying point 1. Since ${\bm{A}}$ is invertible, each subset of rows is linearly independent and thus $\text{rank}({\bm{A}}_{B_{k},:})=|B_{k}|$. This implies that there exist a set $S\subset[d]$ with cardinality $|B_{k}|$ such that $\forall i\in S,{\bm{A}}_{B_{k},i}$ are linearly independent, and thus form a basis of $\mathbb{R}^{|B_{k}|}$.

If $S\not\subseteq B_{k^{\prime}}$ for all $k^{\prime}\in[K]$, we are done.

We consider the case where there exists a $k^{\prime}$ such that $S\subseteq B_{k^{\prime}}$. We will show that we can construct a different $S^{*}$ from $S$ which satisfies both conditions.

We know by (A.11) that there exist a second block $k^{*}\neq k^{\prime}$ such that for some $j^{*}\in B_{k^{*}}$, ${\bm{A}}_{B_{k},j^{*}}\not=0$. Since $\{{\bm{A}}_{B_{k},i}\}_{i\in S}$ forms a basis of $\mathbb{R}^{|B_{k}|}$, the vector ${\bm{A}}_{B_{k},j^{*}}$ can be represented uniquely as

$$ $\displaystyle{\bm{A}}_{B_{k},j^{*}}=\sum_{i\in S}a_{i}{\bm{A}}_{B_{k},i}\,,$ (A.12) $$

where $a_{i}\in\mathbb{R}$ for all $i$. Because ${\bm{A}}_{B_{k},j^{*}}\not=0$, there exists $j\in S$ such that $\boldsymbol{a}_{j}\not=0$. Because this representation is unique, we know that ${\bm{A}}_{B_{k},j^{*}}$ is outside the span of $\{{\bm{A}}_{B_{k},i}\}_{i\in S\setminus\{j\}}$. This means that, by taking $S^{*}:=(S\setminus\{j\})\cup\{j^{*}\}$, we have that $\{{\bm{A}}_{B_{k},i}\}_{i\in S^{*}}$ is a basis for $\mathbb{R}^{|B_{k}|}$ or, in other words, ${\bm{A}}_{B_{k},S^{*}}$ is invertible. Also, $S^{*}$ is not included in a single block since $S\setminus\{j\}\subseteq B_{k^{\prime}}$ and $j^{*}\in B_{k^{*}}$ with $k^{\prime}\not=k^{*}$.
∎

###### Lemma A.6 .

###### Proof.

###### Lemma A.7 .

###### Proof.

#### A.2 Sufficient Independence Assumptions

###### Definition A.8 (Sufficient Independence (0 th Order)) .

Let $\boldsymbol{f}:\mathbb{R}^{d_{z}}\rightarrow\mathbb{R}^{d_{x}}$ be a $C^{1}$ function with 0^th order interactions between slots (Def. 3.2). The function $\boldsymbol{f}$ is said to have *sufficiently independent* derivatives if $\forall\boldsymbol{z}\in\mathbb{R}^{d_{z}}$:

$$ $\text{rank}\left(\left[\left[D_{i}\boldsymbol{f}(\boldsymbol{z})\right]_{i\in B _{k}}\right]_{k\in[K]}\right)=\sum_{k\in[K]}\text{rank}\left(\left[D_{i} \boldsymbol{f}(\boldsymbol{z})\right]_{i\in B_{k}}\right)$ (A.13) $$

###### Definition A.9 (Sufficient Independence (1 st Order)) .

Let $\boldsymbol{f}:\mathbb{R}^{d_{z}}\rightarrow\mathbb{R}^{d_{x}}$ be a $C^{2}$ function with *at most* $1$^st*order interactions* between slots (Def. 3.3). The function $\boldsymbol{f}$ is said to have *sufficiently independent* derivatives if $\forall\boldsymbol{z}\in\mathbb{R}^{d_{z}}$:

$$ $\displaystyle\text{rank}\Biggl{(}\biggl{[}\bigl{[}D_{i}\boldsymbol{f}( \boldsymbol{z})\bigr{]}_{i\in B_{k}}$ $\displaystyle\bigl{[}D^{2}_{i,i^{\prime}}\boldsymbol{f}(\boldsymbol{z})\bigr{] }_{(i,i^{\prime})\in B^{2}_{k}}\biggr{]}_{k\in[K]}\Biggr{)}$ $\displaystyle=\sum_{k\in[K]}\left[\text{rank}\left(\left[D_{i}\boldsymbol{f}( \boldsymbol{z})\right]_{i\in B_{k}}\right)+\text{rank}\left(\left[D^{2}_{i,i^{ \prime}}\boldsymbol{f}(\boldsymbol{z})\right]_{(i,i^{\prime})\in B^{2}_{k}} \right)\right]$ $$

See 4.2

###### Definition A.8 (Sufficient Independence (0 th Order)) .

###### Definition A.9 (Sufficient Independence (1 st Order)) .

#### A.3 From Local to Global Disentanglement

This section takes care of technical subtleties when one has to go from local to global disentanglement. The disentanglement guarantee of this work is proven by first showing that $D{\bm{h}}$, i.e. the Jacobian of ${\bm{h}}:={\bm{f}}^{-1}\circ\hat{{\bm{f}}}$, has a block-permutation structure everywhere, and from there showing that ${\bm{h}}$ can be written as ${\bm{h}}({\bm{z}})=({\bm{h}}_{1}({\bm{z}}_{B_{\pi(1)}}),{\bm{h}}_{2}({\bm{z}}_
{B_{\pi(2)}}),\dots,{\bm{h}}_{K}({\bm{z}}_{B_{\pi(K)}}))$ (see Defintion 2.1). Lachapelle et al. () refers to the first condition on $D{\bm{h}}$ as local disentanglement and the second condition on ${\bm{h}}$ as global disentanglement, the latter of which corresponds to the definition of disentanglement employed in the present work. The authors also show that going from local to global disentanglement requires special care when considering very general supports $\mathcal{Z}_{\textnormal{supp}}$, like we do in this work, as opposed to the more common assumption that $\mathcal{Z}_{\textnormal{supp}}:=\mathbb{R}^{d_{z}}$ which makes this step more direct (e.g., see Hyvärinen et al. ()). This section reuses definitions and lemmata taken from Lachapelle et al. () and introduces a novel sufficient condition on the support of the latent factors, we named aligned-connectedness, to guarantee that the jump from local to global disentanglement can be made.

###### Definition A.10 (Partition-respecting permutations) .

Let ${\mathcal{B}}:=\{B_{1},B_{2},\dots,B_{K}\}$ be a partition of $\{1,...,d\}$. A permutation $\pi$ over $\{1,...,d\}$ respects ${\mathcal{B}}$ if, for all $B\in{\mathcal{B}},\ \pi(B)\in{\mathcal{B}}$.

###### Definition A.11 ( ${\mathcal{B}}$ -block permutation matrices) .

A matrix ${\bm{A}}\in{\mathbb{R}}^{d\times d}$ is a ${\mathcal{B}}$-block permutation matrix if it is invertible and can be written as ${\bm{A}}={\bm{C}}{\bm{P}}_{\pi}$ where ${\bm{P}}_{\pi}$ is the matrix representing the ${\mathcal{B}}$-respecting permutation $\pi$ (Definition A.10), i.e. $P_{\pi}{\bm{e}}_{i}={\bm{e}}_{\pi(i)}$, and ${\bm{C}}\in{\mathbb{R}}^{d\times d}$ is such that for all distinct blocks $B,B^{\prime}\in{\mathcal{B}}$, ${\bm{C}}_{B,B^{\prime}}=0$.

###### Proposition A.12 .

The inverse of a ${\mathcal{B}}$-block permutation matrix is also a ${\mathcal{B}}$-block permutation matrix.

###### Proof.

First note that ${\bm{C}}$ must be invertible, otherwise ${\bm{A}}$ is not. Also, ${\bm{C}}^{-1}$ must also be such that $({\bm{C}}^{-1})_{B,B^{\prime}}=0$ for all distinct blocks $B,B^{\prime}\in{\mathcal{B}}$. This is because, without loss of generality, we can assume the blocks of ${\mathcal{B}}$ are contiguous which implies that ${\bm{C}}$ is a block diagonal matrix so that ${\bm{C}}^{-1}$ is also block diagonal. Since $\pi$ preserves ${\mathcal{B}}$, we have that ${\bm{P}}_{\pi}^{\top}{\bm{C}}^{-1}{\bm{P}}_{\pi}$ is also block diagonal since, for all distinct $B,B^{\prime}\in{\mathcal{B}}$, $({\bm{P}}_{\pi}^{\top}{\bm{C}}^{-1}{\bm{P}}_{\pi})_{B,B^{\prime}}=({\bm{C}}^{-
1})_{\pi(B),\pi(B^{\prime})}=0$, where we used the fact that the blocks $\pi(B)$ and $\pi(B^{\prime})$ are in ${\mathcal{B}}$, because $\pi$ is ${\mathcal{B}}$-preserving, and are distinct, because $\pi$ is a bijection. We can thus see that

$$ $\displaystyle{\bm{A}}^{-1}$ $\displaystyle={\bm{P}}_{\pi}^{\top}{\bm{C}}^{-1}$ $\displaystyle={\bm{P}}_{\pi}^{\top}{\bm{C}}^{-1}{\bm{P}}_{\pi}{\bm{P}}_{\pi}^{\top}$ $\displaystyle=\tilde{{\bm{C}}}{\bm{P}}_{\pi}^{\top}$ $\displaystyle=\tilde{{\bm{C}}}{\bm{P}}_{\pi^{-1}}\,,$ $$

where $\tilde{{\bm{C}}}:={\bm{P}}_{\pi}^{\top}{\bm{C}}^{-1}{\bm{P}}_{\pi}$ is block diagonal and $\pi^{-1}$ is block-preserving.
∎

###### Definition A.13 (Local disentanglement; Lachapelle et al. ( 2023b ) ) .

A learned decoder $\hat{\bm{f}}:{\mathbb{R}}^{d_{z}}\rightarrow{\mathbb{R}}^{d_{x}}$ is said to be locally disentangled w.r.t. the ground-truth decoder ${\bm{f}}$ when $\hat{\bm{f}}\circ{\bm{h}}({\bm{z}})={\bm{f}}({\bm{z}})$ for all ${\bm{z}}\in\mathcal{Z}_{\textnormal{supp}}$ where the mapping ${\bm{h}}$ is a diffeomorphism from ${\mathcal{Z}}_{\text{supp}}$ onto its image satisfying the following property: for all ${\bm{z}}\in{\mathcal{Z}}_{\textnormal{supp}}$, $D{\bm{h}}({\bm{z}})$ is a block-permutation matrix respecting ${\mathcal{B}}:=\{B_{1},\dots,B_{K}\}$.

Note that, in the above definition, the permutation of the blocks might change from one ${\bm{z}}$ to another (see Example 5 in Lachapelle et al. ()). To prevent this possibility, we will assume that $\mathcal{Z}_{\textnormal{supp}}$ is path-connected:

###### Definition A.14 (Path-connected sets) .

A set $\mathcal{Z}_{\textnormal{supp}}\subseteq\mathbb{R}^{d_{z}}$ is path-connected if for all pairs of points $\mathbf{z}^{0},\mathbf{z}^{1}\in\mathcal{Z}_{\textnormal{supp}}$, there exists a continuous map $\bm{{\phi}}:[0,1]\rightarrow\mathcal{Z}_{\textnormal{supp}}$ such that $\bm{\phi}(0)=\mathbf{z}^{0}$ and $\bm{\phi}(1)=\mathbf{z}^{1}$. Such a map is called a path between $\mathbf{z}^{0}$ and $\mathbf{z}^{1}$.

The following Lemma from Lachapelle et al. () can be used to show that when ${\bm{h}}$ is a diffeomorphism and $\mathcal{Z}_{\textnormal{supp}}$ is path-connected, the block structure cannot change. This is due to the fact that $D{\bm{h}}({\bm{z}})$ is invertible everywhere and a continuous function of ${\bm{z}}$. We restate the Lemma without proof.

###### Lemma A.15 ( Lachapelle et al. ( 2023b ) ) .

Let ${\mathcal{C}}$ be a path-connected(^†^†This lemma also holds if ${\mathcal{C}}$ is connected.) topological space and let ${\bm{M}}:{\mathcal{C}}\rightarrow{\mathbb{R}}^{d\times d}$ be a continuous function. Suppose that, for all $c\in{\mathcal{C}}$, ${\bm{M}}(c)$ is an invertible ${\mathcal{B}}$-block permutation matrix (Definition A.11). Then, there exists a ${\mathcal{B}}$-respecting permutation $\pi$ such that for all $c\in{\mathcal{C}}$ and all distinct $B,B^{\prime}\in{\mathcal{B}}$, ${\bm{M}}(c)_{\pi(B^{\prime}),B}=0$.

It turns out that, in general, having that $D{\bm{h}}$ has a constant block-permutation structure across its support ${\mathcal{Z}}_{\text{supp}}$ is not enough to make the jump to global disentanglement. See Example 7 from Lachapelle et al. (). We now propose a novel condition on the support ${\mathcal{Z}}_{\text{supp}}$ and will show it is sufficient to guarantee global disentanglement in Lemma A.18.

###### Definition A.16 (Aligned-connected sets) .

A set ${\mathcal{A}}\subseteq\mathbb{R}^{d}$ is said to be aligned-connected w.r.t. a partition $\{B_{1},B_{2},\dots,B_{K}\}$ if, for all $k\in[K]$ and all ${\bm{a}}^{\prime}\in{\mathcal{A}}$, the set $\{{\bm{a}}\in{\mathcal{A}}\mid{\bm{a}}_{B_{k}}={\bm{a}}^{\prime}_{B_{k}}\}$ is path-connected.

###### Remark A.17 (Relation to path-connectedness) .

There exist sets that are path-connected but not aligned-connected and vice-versa. Example 7 from Lachapelle et al. () presents a “U-shaped” support that is path-connected but not aligned-connected. Moreover, the set ${\mathcal{A}}:={\mathcal{A}}^{(1)}\cup{\mathcal{A}}^{(2)}$ where ${\mathcal{A}}^{(1)}:=\{{\bm{a}}\in{\mathbb{R}}^{2}\mid a_{1}\geq 1,a_{2}\geq 1\}$ and ${\mathcal{A}}^{(2)}:=\{{\bm{a}}\in{\mathbb{R}}^{2}\mid a_{1}\leq-1,a_{2}\leq-1\}$ is aligned-connected w.r.t. the partition ${\mathcal{B}}=\{\{1\},\{2\}\}$ but not path-connected.

We now show how aligned-connectedness combined with path-connectedness is enough to guarantee global disentanglement from local disentanglement.

###### Lemma A.18 (Local to global disentanglement) .

Suppose ${\bm{h}}$ is a diffeomorphism from ${\mathcal{Z}}_{\textnormal{supp}}\subseteq{\mathbb{R}}^{d_{z}}$ to its image and suppose $D{\bm{h}}({\bm{z}})$ is a ${\mathcal{B}}$-block permutation matrix for all ${\bm{z}}\in{\mathcal{Z}}_{\textnormal{supp}}$ (local disentanglement). If ${\mathcal{Z}}_{\textnormal{supp}}$ is path-connected (Defn. A.14) and aligned-connected set (Defn. A.16), then ${\bm{h}}({\bm{z}})=({\bm{h}}_{1}({\bm{z}}_{B_{\pi(1)}}),\dots,{\bm{h}}_{1}({
\bm{z}}_{B_{\pi(K)}}))$ for all ${\bm{z}}\in{\mathcal{Z}}_{\textnormal{supp}}$ where the ${\bm{h}}_{k}$ are diffeomorphisms (global disentanglement).

###### Proof.

Since ${\bm{h}}$ is a diffeomorphism, $D{\bm{h}}$ is continuous and $D{\bm{h}}({\bm{z}})$ is invertible for all ${\bm{z}}\in\mathcal{Z}_{\textnormal{supp}}$. Since we also have that $\mathcal{Z}_{\textnormal{supp}}$ is path-connected, we can apply Lemma A.15 to get that there exists a permutation $\pi:[K]\rightarrow[K]$ such that, for all ${\bm{z}}\in{\mathcal{Z}}_{\textnormal{supp}}$ and all distinct $k,k^{\prime}\in[K]$, we have $D{\bm{h}}({\bm{z}})_{B_{k},B_{\pi(k^{\prime})}}=0$. In other words, $D_{B_{\pi(k^{\prime})}}{\bm{h}}_{B_{k}}({\bm{z}})=0$.
We must now show that ${\bm{h}}_{B_{k}}({\bm{z}})$ depends solely on ${\bm{z}}_{B_{\pi(k)}}$. Consider another point ${\bm{z}}^{\prime}\in{\mathcal{Z}}_{\textnormal{supp}}$ such that ${\bm{z}}_{B_{\pi(k)}}={\bm{z}}^{\prime}_{B_{\pi(k)}}$. We will now show that ${\bm{h}}_{B_{k}}({\bm{z}})={\bm{h}}_{B_{k}}({\bm{z}}^{\prime})$, i.e. changing ${\bm{z}}_{B^{c}_{\pi(k)}}$ does not influence ${\bm{h}}_{B_{k}}({\bm{z}})$.

Because ${\mathcal{Z}}_{\textnormal{supp}}$ is aligned-connected, there exists a continuous path $\phi:[0,1]\rightarrow{\mathcal{Z}}_{\textnormal{supp}}$ such that $\phi(0)={\bm{z}}^{\prime}$, $\phi(1)={\bm{z}}$ and $\phi_{B_{\pi(k)}}(t)={\bm{z}}_{B_{\pi(k)}}={\bm{z}}^{\prime}_{B_{\pi(k)}}$ for all $t\in[0,1]$. By the fundamental theorem of calculus, we have that

$$ $\displaystyle{\bm{h}}_{B_{k}}({\bm{z}})-{\bm{h}}_{B_{k}}({\bm{z}}^{\prime})$ $\displaystyle=\int_{0}^{1}({\bm{h}}_{B_{k}}\circ\phi)^{\prime}(t)dt$ $\displaystyle=\int_{0}^{1}D{\bm{h}}_{B_{k}}(\phi(t))\phi^{\prime}(t)dt$ $\displaystyle=\int_{0}^{1}\left(D_{B_{\pi(k)}}{\bm{h}}_{B_{k}}(\phi(t))\phi^{ \prime}_{B_{\pi(k)}}(t)+\sum_{k^{\prime}\not=k}D_{B_{\pi(k^{\prime})}}{\bm{h}} _{B_{k}}(\phi(t))\phi^{\prime}_{B_{\pi(k^{\prime})}}(t)\right)dt$ $\displaystyle=\int_{0}^{1}\left(D_{B_{\pi(k)}}{\bm{h}}_{B_{k}}(\phi(t))\bm{0}+ \sum_{k^{\prime}\not=k}\bm{0}\phi^{\prime}_{B_{\pi(k^{\prime})}}(t)\right)dt$ $\displaystyle=\bm{0}\,,$ $$

where we used the fact that $\phi_{B_{\pi(k)}}(t)$ is a constant function of $t$ and $D_{B_{\pi(k^{\prime})}}{\bm{h}}_{B_{k}}({\bm{z}})=0$ for distinct $k,k^{\prime}$.

We conclude that, for all $k$, we can write ${\bm{h}}_{B_{k}}({\bm{z}})={\bm{h}}_{B_{k}}({\bm{z}}_{B_{\pi(k)}})$, which is the desired result.

Additionally, the functions ${\bm{h}}_{B_{k}}({\bm{z}}_{B_{\pi(k)}})$ are diffeomorphisms because their Jacobians must be invertible otherwise the Jacobian of ${\bm{h}}$ (which is block diagonal) would not be invertible (which would violate the fact that it is a diffeomorphism).
∎

Contrasting with Lachapelle et al. (). Instead of assuming aligned-connectedness, Lachapelle et al. () assumed that the block-specific decoders, which would correspond to the ${\bm{f}}^{k}({\bm{z}}_{B_{k}})$ in (4.2), are injective which, when combined with path-connectedness, is also enough to go from local to global disentanglement in the context of additive decoders ($n=1$). Whether a similar strategy could be adapted for more general decoders with at most $n$th order interactions is left as future work.

###### Definition A.10 (Partition-respecting permutations) .

###### Definition A.11 ( ℬ ℬ {\mathcal{B}} caligraphic_B -block permutation matrices) .

###### Proposition A.12 .

###### Proof.

###### Definition A.13 (Local disentanglement; Lachapelle et al. ( 2023b ) ) .

###### Definition A.14 (Path-connected sets) .

###### Lemma A.15 ( Lachapelle et al. ( 2023b ) ) .

###### Definition A.16 (Aligned-connected sets) .

###### Remark A.17 (Relation to path-connectedness) .

###### Lemma A.18 (Local to global disentanglement) .

###### Proof.

#### A.4 Disentanglement (At Most 0 0 th Order/No Interaction)

###### Lemma A.19 .

Let $\mathcal{Z}_{\textnormal{supp}}\subseteq\mathcal{Z}$ be a regular closed set (Defn. A.3). Let $\mathbf{f}:\mathcal{Z}\rightarrow\mathcal{X}$ be $C^{1}$ and $\mathbf{h}:\hat{\mathcal{Z}}_{\textnormal{supp}}\rightarrow\mathcal{Z}_{
\textnormal{supp}}$ be a diffeomorphism. Let $\hat{\mathbf{f}}:=\mathbf{f}\circ\mathbf{h}$. If $\mathbf{f}$ has no interaction (Definition 3.4 with $n=0$), then, for all $j,j^{\prime}\in[d_{z}]$ and $\mathbf{z}\in\hat{\mathcal{Z}}_{\textnormal{supp}}$, we have

$$ $\displaystyle D_{j}\hat{\mathbf{f}}(\mathbf{z})\odot D_{j^{\prime}}\hat{ \mathbf{f}}(\mathbf{z})=\mathbf{W}^{\mathbf{f}}(\mathbf{h}(\mathbf{z})){\bm{m} }^{\mathbf{h}}(\mathbf{z},(j,j^{\prime}))\,,$ (A.14) $$

where

$$ $\displaystyle\mathbf{W}^{\mathbf{f}}(\mathbf{z})$ $\displaystyle:=[\mathbf{W}^{\mathbf{f}}_{k}(\mathbf{z})]_{k\in[K]}$ $\displaystyle{\bm{W}}^{\mathbf{f}}_{k}(\mathbf{z})$ $\displaystyle:=[D_{i_{1}}\mathbf{f}(\mathbf{z})\odot D_{i_{2}}\mathbf{f}( \mathbf{z})]_{(i_{1},i_{2})\in B^{2}_{k}}$ $\displaystyle{\bm{m}}^{{\bm{h}}}(\mathbf{z},(j,j^{\prime}))$ $\displaystyle:=[{\bm{m}}^{\mathbf{h}}_{k}(\mathbf{z},(j,j^{\prime}))]_{k\in[K]}$ $\displaystyle{\bm{m}}^{\mathbf{h}}_{k}(\mathbf{z},(j,j^{\prime}))$ $\displaystyle:=[D_{j^{\prime}}\mathbf{h}_{i_{1}}(\mathbf{z})D_{j}\mathbf{h}_{i _{2}}(\mathbf{z})]_{(i_{1},i_{2})\in B^{2}_{k}}\,.$ $$

###### Proof.

We have that

$$ $\displaystyle\hat{\mathbf{f}}({\bm{z}})=\mathbf{f}\circ\mathbf{h}({\bm{z}}),\ \forall{\bm{z}}\in\hat{\mathcal{Z}}_{\textnormal{supp}}\,.$ $$

Following the same line of argument as Lachapelle et al. (), we can use Lemma A.5 to say that the function $\hat{\mathbf{f}}({\bm{z}})=\mathbf{f}\circ\mathbf{h}({\bm{z}})$ has well-defined derivatives on $\overline{(\hat{\mathcal{Z}}_{\textnormal{supp}})^{\circ}}$. Since ${\bm{h}}^{-1}$ is a diffeomorphism from $\mathcal{Z}_{\textnormal{supp}}$ (which is regular closed) to $\hat{\mathcal{Z}}_{\textnormal{supp}}$, Lemma A.4 implies that $\hat{\mathcal{Z}}_{\textnormal{supp}}\subseteq\overline{(\hat{\mathcal{Z}}_{
\textnormal{supp}})^{\circ}}$. This means that the function $\hat{\mathbf{f}}({\bm{z}})=\mathbf{f}\circ\mathbf{h}({\bm{z}})$ has well-defined derivatives for all ${\bm{z}}\in\hat{\mathcal{Z}}_{\textnormal{supp}}$.

By taking the derivative w.r.t. $\mathbf{z}_{j}$ on both sides of $\hat{\mathbf{f}}(\mathbf{z})=\mathbf{f}\circ\mathbf{h}(\mathbf{z})$, we get

$$ $D_{j}\hat{\mathbf{f}}(\mathbf{z})=\sum_{k\in[K]}\sum_{i\in B_{k}}D_{i}\mathbf{ f}(\mathbf{h}(\mathbf{z}))D_{j}\mathbf{h}_{i}(\mathbf{z})$ (A.15) $$

We thus have that

$$ $\displaystyle D_{j}\hat{\mathbf{f}}(\mathbf{z})D_{j^{\prime}}\hat{\mathbf{f}}( \mathbf{z})$ $\displaystyle=\left(\sum_{k_{1}\in[K]}\sum_{i_{1}\in B_{k_{1}}}D_{i_{1}} \mathbf{f}(\mathbf{h}(\mathbf{z}))D_{j}\mathbf{h}_{i_{1}}(\mathbf{z})\right) \odot\left(\sum_{k_{2}\in[K]}\sum_{{i_{2}}\in B_{k_{2}}}D_{i_{2}}\mathbf{f}( \mathbf{h}(\mathbf{z}))D_{j^{\prime}}\mathbf{h}_{i_{2}}(\hat{\mathbf{z}})\right)$ $\displaystyle=\sum_{k_{1}\in[K]}\sum_{i_{1}\in B_{k_{1}}}\sum_{k_{2}\in[K]} \sum_{i_{2}\in B_{k_{2}}}D_{i_{1}}\mathbf{f}(\mathbf{h}(\mathbf{z}))\odot D_{i _{2}}\mathbf{f}(\mathbf{h}(\mathbf{z}))D_{j}\mathbf{h}_{i_{1}}(\mathbf{z})D_{j ^{\prime}}\mathbf{h}_{i_{2}}(\mathbf{z})$ $\displaystyle=\sum_{k_{1}\in[K]}\sum_{i_{1}\in B_{k_{1}}}\sum_{i_{2}\in B_{k_{ 1}}}D_{i_{1}}\mathbf{f}(\mathbf{h}(\mathbf{z}))\odot D_{i_{2}}\mathbf{f}( \mathbf{h}(\mathbf{z}))D_{j}\mathbf{h}_{i_{1}}(\mathbf{z})D_{j^{\prime}} \mathbf{h}_{i_{2}}(\mathbf{z})\,,$ $$

where the last equality used the fact that $\mathbf{f}$ has no interaction (Definition 3.2). We conclude by noticing

$$ $\displaystyle D_{j}\hat{\mathbf{f}}(\mathbf{z})D_{j^{\prime}}\hat{\mathbf{f}}( \mathbf{z})$ $\displaystyle=\sum_{k_{1}\in[K]}\sum_{(i_{1},i_{2})\in B^{2}_{k_{1}}}D_{i_{1}} \mathbf{f}(\mathbf{h}(\mathbf{z}))D_{i_{2}}\mathbf{f}(\mathbf{h}(\mathbf{z}))D _{j}\mathbf{h}_{i_{1}}(\mathbf{z})D_{j^{\prime}}\mathbf{h}_{i_{2}}(\mathbf{z})$ $\displaystyle=\mathbf{W}^{\mathbf{f}}(\mathbf{h}(\mathbf{z})){\bm{m}}^{\mathbf {h}}(\mathbf{z},(j,j^{\prime}))\,.$ $$

∎

###### Theorem A.20 .

Let $\mathbf{f}:\mathcal{Z}\rightarrow\mathcal{X}$ be a $C^{1}$ diffeomorphism satisfying interaction asymmetry (Asm. 3.5) for all equivalent generators (Defn. 4.1) for $n=0$. Let $\mathcal{Z}_{\textnormal{supp}}\subseteq\mathcal{Z}$ be regular closed (Defn. A.3), path-connected (Defn. A.14) and aligned-connected (Defn. A.16). A model ${\hat{\mathbf{f}}}:\mathcal{Z}\rightarrow\mathbb{R}^{d_{x}}$ disentangles $\mathbf{z}$ on $\mathcal{Z}_{\textnormal{supp}}$ w.r.t. ${\mathbf{f}}$ (Defn. 2.1) if it is (*i*) a $C^{1}$ diffeomorphism between $\hat{\mathcal{Z}}_{\textnormal{supp}}$ and $\mathcal{X}_{\textnormal{supp}}$ with (*ii*) at most 0^th order interactions across slots (Defn. 3.4) on $\hat{\mathcal{Z}}_{\textnormal{supp}}$.

###### Proof.

As mentioned in Section A.3, the proofs will proceed in two steps: First, we show local disentanglement (Definition A.13) and then we show (global) disentanglement via Lemma A.18. We first show local disentanglement.

Remark: We will use the following notation below:

$$ $D^{1}_{i,j}\mathbf{f}(\mathbf{z}):=D_{j}\mathbf{f}(\mathbf{z})\odot D_{i} \mathbf{f}(\mathbf{z})\in\mathbb{R}^{m}$ (A.16) $$

We first define the function $\mathbf{h}:\hat{\mathcal{Z}}_{\textnormal{supp}}\rightarrow\mathcal{Z}_{
\textnormal{supp}}$ relating the latent spaces of these functions on $\hat{\mathcal{Z}}_{\textnormal{supp}}$:

$$ $\mathbf{h}:={\mathbf{f}}^{-1}\circ{\hat{\mathbf{f}}}$ (A.17) $$

The function $\hat{\mathbf{f}}$ can then be written in terms of $\mathbf{f}$ and $\mathbf{h}$ on $\hat{\mathcal{Z}}_{\textnormal{supp}}$:

$$ $\hat{\mathbf{f}}=\mathbf{f}\circ\mathbf{h}$ (A.18) $$

Because $\mathbf{f},\hat{\mathbf{f}}$ are both $C^{1}$ diffeomorphism between $\mathcal{Z}_{\textnormal{supp}},\mathcal{X}_{\textnormal{supp}}$ and $\hat{\mathcal{Z}}_{\textnormal{supp}},\mathcal{X}_{\textnormal{supp}}$, respectively, we have that $\mathbf{h}$ is a $C^{1}$ diffeomorphism.

By Lemma A.19, for all $\mathbf{z}\in\hat{\mathcal{Z}}_{\textnormal{supp}},\ j,j^{\prime}\in[d_{z}]$, we have:

$$ $D_{j}\hat{\mathbf{f}}(\mathbf{z})\odot D_{j^{\prime}}\hat{\mathbf{f}}(\mathbf{ z})=\mathbf{W}^{\mathbf{f}}(\mathbf{h}(\mathbf{z})){\bm{m}}^{\mathbf{h}}( \mathbf{z},(j,j^{\prime}))\,$ (A.19) $$

where ${\bm{w}}^{\mathbf{f}}$ and ${\bm{m}}^{\mathbf{h}}$ are defined in Lemma A.19.

Define the sets

$$ ${\mathcal{D}}:=\bigcup_{k\in[K]}B_{k}^{2},\qquad{\mathcal{D}}^{c}:=\{1,\dots,d _{z}\}^{2}\setminus{\mathcal{D}}$ (A.20) $$

Because $\boldsymbol{\hat{f}}$ has no interaction (Definition 3.2), we have that, for all $(j,j^{\prime})\in{\mathcal{D}}^{c}$

$$ $\displaystyle 0$ $\displaystyle={\bm{W}}^{\bm{f}}({\bm{h}}({\bm{z}})){\bm{m}}^{\bm{h}}({\bm{z}}, (j,j^{\prime}))$ $\displaystyle=\sum_{k\in[K]}{\bm{W}}_{k}^{\bm{f}}({\bm{h}}({\bm{z}})){\bm{m}}_ {k}^{\bm{h}}({\bm{z}},(j,j^{\prime}))\,.$ $$

Because $\boldsymbol{f}$ has no interaction, each row ${\bm{W}}^{\bm{f}}_{k}({\bm{h}}(\boldsymbol{z}))_{n,\cdot}$ is non-zero for at most one $k\in[K]$ (although this $k$ can change for different values of $n$ and ${\bm{z}}$). This implies that for all $\boldsymbol{z}\in\hat{\mathcal{Z}}_{\textnormal{supp}},(j,j^{\prime})\in{
\mathcal{D}}^{c}$, $k\in[K]$:

$$ $0={\bm{W}}^{\bm{f}}_{k}({\bm{h}}(\boldsymbol{z}))\boldsymbol{m}^{\bm{h}}_{k}( \boldsymbol{z},(j,j^{\prime}))$ (A.21) $$

Case 1: $|B_{k}|=1$ (One-Dimensional Slots)

When $|B_{k}|=1$, for all $k\in[d_{z}]$, the matrix $\mathbf{W}^{\mathbf{f}}_{k}(\mathbf{h}(\mathbf{z}))$ can be written as:

$$ ${\bm{W}}^{\mathbf{f}}_{k}(\mathbf{h}(\mathbf{z}))=[D_{k}\mathbf{f}(\mathbf{z}) \odot D_{k}\mathbf{f}(\mathbf{z})]$ (A.22) $$

This matrix has a single column, which must be non-zero since $\mathbf{f}$ is a $C^{1}$ diffeomorphism. Thus, ${\bm{W}}^{\mathbf{f}}_{k}(\mathbf{h}(\mathbf{z}))$ has full column rank and thus has a null space equal to 0 0. Using Eq. A.21, we conclude that for all $(j,j^{\prime})\in{\mathcal{D}}^{c}$, $k\in[d_{z}]$:

$$ $0=\boldsymbol{m}^{\bm{h}}_{k}(\boldsymbol{z},(j,j^{\prime}))$ (A.23) $$

Applying the definition of $\boldsymbol{m}^{\bm{h}}_{k}(\boldsymbol{z},(j,j^{\prime}))$, this implies that for all $(j,j^{\prime})\in{\mathcal{D}}^{c}$, $k\in[d_{z}]$:

$$ $0=D_{j^{\prime}}\boldsymbol{h}_{k}(\boldsymbol{z})D_{j}\boldsymbol{h}_{k}( \boldsymbol{z})$ (A.24) $$

This means each row of the Jacobian matrix $D\boldsymbol{h}(\boldsymbol{z})$ cannot have more than one nonzero value. Since the Jacobian is invertible, these nonzero values must all be different for different rows, otherwise a whole column would be zero. Hence $D\boldsymbol{h}(\boldsymbol{z})$ is a permutation-scaling matrix, i.e. we have local disentanglement.

Case 2: $|B_{k}|>1$ (Multi-Dimensional Slots)

Assume for a contradiction that $\boldsymbol{\hat{f}}$ is not locally disentangled on $\mathcal{Z}_{\textnormal{supp}}$ w.r.t $\boldsymbol{f}$. This implies that there exist a $\boldsymbol{z}^{*}\in\hat{\mathcal{Z}}_{\textnormal{supp}}$, $k,k^{\prime},k^{\prime\prime}\in[K]$ for $k^{\prime}\not=k^{\prime\prime}$, such that:

$$ $D_{B_{k^{\prime}}}\boldsymbol{h}_{B_{k}}(\boldsymbol{z}^{*})\neq\bf{0},\quad D _{B_{k^{\prime\prime}}}\boldsymbol{h}_{B_{k}}(\boldsymbol{z}^{*})\neq\bf{0}$ (A.25) $$

Because $\boldsymbol{f},\boldsymbol{\hat{f}}$ are $C^{1}$ diffeomorphisms, we know that $\boldsymbol{h}$ is also a $C^{1}$ diffeomorphism. Coupling this with Eq. A.25, Lemma A.7 tells us that there exist an $S\subset[d_{z}]$ with cardinality $|B_{k}|$ such that:

$$ $\forall B\in\mathcal{B},\ S\not\subseteq B,\ \ \text{and}\quad\forall i\in S,D _{i}\boldsymbol{h}_{B_{k}}(\boldsymbol{z}^{*})\ \ \text{are linearly independent.}$ (A.26) $$

Now choose any $\bar{B}\in\mathcal{B}$ such that $S_{1}:=S\cap\bar{B}\neq\emptyset$. Furthermore, define the set $S_{2}:=S\setminus{S_{1}}$.
Because $S\not\subseteq\bar{B}$, we know that $S_{2}$ is non-empty. Further, by construction $S=S_{1}\cup S_{2}$. In other words, $S_{1}$ and $S_{2}$ are non-empty, form a partition of $S$, and do not contain any indices from the same slot.

Now construct the matrices, denoted $\boldsymbol{A}_{S_{1}}$ and $\boldsymbol{A}_{S_{2}}$ as follows:

$$ $\boldsymbol{A}_{S_{1}}:=D_{S_{1}}\boldsymbol{h}_{B_{k}}(\boldsymbol{z}^{*}), \quad\boldsymbol{A}_{S_{2}}:=D_{S_{2}}\boldsymbol{h}_{B_{k}}(\boldsymbol{z}^{*})$ (A.27) $$

And the matrix denoted $\boldsymbol{A}_{k}$ as:

$$ $\boldsymbol{A}_{k}:=\left[\boldsymbol{A}_{S_{1}},\boldsymbol{A}_{S_{2}}\right]$ (A.28) $$

Note that because, $\forall i\in S$, $D_{i}\boldsymbol{h}_{B_{k}}(\boldsymbol{\hat{z}}^{*})$ are linearly independent (Eq. (A.26)), we know that $\boldsymbol{A}_{k}$ is invertible.
Now, define the following block diagonal matrix $\boldsymbol{A}\in\mathbb{R}^{d_{z}\times d_{z}}$ as follows:

$$ $\boldsymbol{A}:=\begin{bmatrix}\boldsymbol{A}_{1}&0&\dots&0\\ 0&\boldsymbol{A}_{2}&\dots&0\\ \vdots&\vdots&\ddots&\vdots\\ 0&0&\dots&\boldsymbol{A}_{K}\end{bmatrix}$ (A.29) $$

where $\forall i\in[K]\setminus\{k\},\boldsymbol{A}_{i}$ is the identity matrix, and thus invertible, while $\boldsymbol{A}_{k}$ is defined according to Eq. A.28.

Define $\bar{\mathcal{Z}}:={\bm{A}}^{-1}{\mathcal{Z}}$, the function $\bar{\bm{h}}:\bar{\mathcal{Z}}\rightarrow{\mathcal{Z}}$ as $\boldsymbol{\bar{h}}(\boldsymbol{z}):={\boldsymbol{A}}\boldsymbol{z}$ and the function $\bar{\bm{f}}:\bar{\mathcal{Z}}\rightarrow{\mathcal{X}}$ as ${\boldsymbol{\bar{f}}}:=\boldsymbol{f}\circ{\boldsymbol{\bar{h}}}$. By construction we have

$$ $\forall\boldsymbol{z}\in\mathcal{Z},\qquad{\boldsymbol{\bar{f}}}\left( \boldsymbol{A}^{-1}_{1}\boldsymbol{z}_{B_{1}},\dots,\boldsymbol{A}^{-1}_{K} \boldsymbol{z}_{B_{K}}\right)=\boldsymbol{f}(\boldsymbol{z}_{B_{1}},\dots, \boldsymbol{z}_{B_{K}})\,.$ (A.30) $$

Because all $\boldsymbol{A}^{-1}_{i}$ are invertible, then ${\boldsymbol{\bar{f}}}$ is *equivalent* to ${\boldsymbol{{f}}}$ in the sense of Def. (4.1).

We can now apply Lemma A.19 to $\bar{\bm{f}}={\bm{f}}\circ\bar{\bm{h}}$ to obtain, for all $j,j^{\prime}\in[d_{z}]$:

$$ $\displaystyle D_{j}\boldsymbol{\bar{f}}({\bm{z}})\odot D_{j^{\prime}} \boldsymbol{\bar{f}}({\bm{z}})={\bm{W}}^{\bm{f}}(\bar{\bm{h}}({\bm{z}})){\bm{m }}^{\bar{\bm{h}}}({\bm{z}},(j,j^{\prime}))\,.$ (A.31) $$

Choose $\bar{\bm{z}}\in\bar{\mathcal{Z}}$ such that $\bar{\bm{h}}(\bar{\bm{z}})={\bm{h}}({\bm{z}}^{*})$, which is possible because ${\bm{h}}({\bm{z}}^{*})\in{\mathcal{Z}}$ and $\bar{\bm{h}}$ is a bijection from $\bar{\mathcal{Z}}$ to ${\mathcal{Z}}$). We can then write

$$ $\displaystyle D_{j}\boldsymbol{\bar{f}}(\bar{\bm{z}})\odot D_{j^{\prime}} \boldsymbol{\bar{f}}(\bar{\bm{z}})={\bm{W}}^{\bm{f}}({\bm{h}}({\bm{z}}^{*})){ \bm{m}}^{\bar{\bm{h}}}(\bar{\bm{z}},(j,j^{\prime}))\,.$ (A.32) $$

Let $J,J^{\prime}\subseteq B_{k}$ be a partition of $B_{k}$ such that $J$ is the set of columns of ${\bm{A}}$ corresponding to ${\bm{A}}_{S_{1}}$ and $J^{\prime}$ be the set of columns of ${\bm{A}}$ corresponding to ${\bm{A}}_{S_{2}}$. More formally, we have

$$ $\displaystyle{\bm{A}}_{B_{k},J}={\bm{A}}_{S_{1}}\quad\quad\text{and}\quad\quad {\bm{A}}_{B_{k},J^{\prime}}={\bm{A}}_{S_{2}}$ $$

Since ${\bm{A}}_{S_{1}}=D_{S_{1}}{\bm{h}}_{B_{k}}({\bm{z}}^{*})$ and ${\bm{A}}_{S_{2}}=D_{S_{2}}{\bm{h}}_{B_{k}}({\bm{z}}^{*})$, we have that

$$ $\displaystyle{\bm{A}}_{B_{k},J}=D_{S_{1}}{\bm{h}}_{B_{k}}({\bm{z}}^{*})\quad \text{and}\quad{\bm{A}}_{B_{k},J^{\prime}}=D_{S_{2}}{\bm{h}}_{B_{k}}({\bm{z}}^ {*})$ $$

Since $D\bar{\bm{h}}(\bar{\bm{z}})={\bm{A}}$, we have

$$ $\displaystyle D_{J}\bar{\bm{h}}_{B_{k}}(\bar{\bm{z}})=D_{S_{1}}{\bm{h}}_{B_{k} }({\bm{z}}^{*})\quad\text{and}\quad D_{J^{\prime}}\bar{\bm{h}}_{B_{k}}(\bar{ \bm{z}})=D_{S_{2}}{\bm{h}}_{B_{k}}({\bm{z}}^{*})\,.$ $$

Choose some $(j,j^{\prime})\in J\times J^{\prime}$. We know there must exist $(s,s^{\prime})\in S_{1}\times S_{2}$ such that

$$ $\displaystyle D_{j}\bar{\bm{h}}_{B_{k}}(\bar{\bm{z}})=D_{s}{\bm{h}}_{B_{k}}({ \bm{z}}^{*})\quad\text{and}\quad D_{j^{\prime}}\bar{\bm{h}}_{B_{k}}(\bar{\bm{z }})=D_{s^{\prime}}{\bm{h}}_{B_{k}}({\bm{z}}^{*})\,.$ $$

which implies

$$ $\displaystyle{\bm{m}}_{k}^{\bar{\bm{h}}}(\bar{\bm{z}},(j,j^{\prime}))={\bm{m}} _{k}^{{\bm{h}}}({\bm{z}}^{*},(s,s^{\prime}))\,.$ (A.33) $$

Moreover, since the Jacobian of $\bar{\bm{h}}$ is block diagonal, we have that ${\bm{m}}^{\bar{\bm{h}}}_{k^{\prime}}({\bm{z}},(j,j^{\prime}))=0$ for all $k^{\prime}\not=k$ (recall that $j,j^{\prime}\in B_{k}$). This means we can rewrite (A.32) as

$$ $\displaystyle D_{j}\boldsymbol{\bar{f}}(\bar{\bm{z}})\odot D_{j^{\prime}} \boldsymbol{\bar{f}}(\bar{\bm{z}})={\bm{W}}_{k}^{\bm{f}}({\bm{h}}({\bm{z}}^{*} )){\bm{m}}_{k}^{\bar{\bm{h}}}(\bar{\bm{z}},(j,j^{\prime}))\,.$ (A.34) $$

Plugging (A.33) into the above equation yields

$$ $\displaystyle D_{j}\boldsymbol{\bar{f}}(\bar{\bm{z}})\odot D_{j^{\prime}} \boldsymbol{\bar{f}}(\bar{\bm{z}})={\bm{W}}_{k}^{\bm{f}}({\bm{h}}({\bm{z}}^{*} )){\bm{m}}_{k}^{{\bm{h}}}({\bm{z}}^{*},(s,s^{\prime}))\,.$ (A.35) $$

Since $(s,s^{\prime})\in S_{1}\times S_{2}\subseteq{\mathcal{D}}^{c}$, we can apply (A.21) to get

$$ $\displaystyle D_{j}\boldsymbol{\bar{f}}(\bar{\bm{z}})\odot D_{j^{\prime}} \boldsymbol{\bar{f}}(\bar{\bm{z}})={\bm{W}}_{k}^{\bm{f}}({\bm{h}}({\bm{z}}^{*} )){\bm{m}}_{k}^{{\bm{h}}}({\bm{z}}^{*},(s,s^{\prime}))=0\,.$ (A.36) $$

In other words, we found a partition $J,J^{\prime}$ of the block $B_{k}$ such that $D_{j}\boldsymbol{\bar{f}}(\bar{\bm{z}})\odot D_{j^{\prime}}\boldsymbol{\bar{f}
}(\bar{\bm{z}})=0$ for all $(j,j^{\prime})\in J\times J^{\prime}$. This means that the blocks $J$ and $J^{\prime}$ have no interaction in $\bar{\bm{f}}$ at $\bar{\bm{z}}$. This is a contradiction with Assm. 3.5. Hence, we have local disentanglement.

Local to global disentanglement. We showed that $D{\bm{h}}({\bm{z}})$ is a block-permutation matrix for all ${\bm{z}}\in\hat{\mathcal{Z}}_{\text{supp}}$, i.e. local disentanglement. Consider the inverse ${\bm{h}}$, ${\bm{v}}:={\bm{h}}^{-1}$. The Jacobian of ${\bm{v}}$ is given by $D{\bm{v}}({\bm{z}})=D{\bm{h}}^{-1}({\bm{z}})=D{\bm{h}}({\bm{v}}({\bm{z}}))^{-1}$, by the inverse function theorem. By Proposition A.12, this means $D{\bm{v}}({\bm{z}})$ is also a block permutation matrix for all ${\bm{z}}\in{\mathcal{Z}}_{\text{supp}}$. Since ${\mathcal{Z}}_{\textnormal{supp}}$ is aligned-connected (Definition A.16), Lemma A.18 guarantees that we can write ${\bm{v}}({\bm{z}})=({\bm{v}}_{1}({\bm{z}}_{B_{\pi(1)}}),\dots,{\bm{v}}_{K}({
\bm{z}}_{B_{\pi(K)}}))$ for all ${\bm{z}}\in{\mathcal{Z}}_{\text{supp}}$ where the ${\bm{v}}_{k}$ are diffeomorphisms. This implies that ${\bm{h}}({\bm{z}})=({\bm{v}}_{1}^{-1}({\bm{z}}_{B_{\pi^{-1}(1)}}),\dots,{\bm{v
}}_{K}^{-1}({\bm{z}}_{B_{\pi^{-1}(K)}}))$ for all ${\bm{z}}\in\hat{\mathcal{Z}}_{\textnormal{supp}}$, which concludes the proof.
∎

###### Lemma A.19 .

###### Proof.

###### Theorem A.20 .

###### Proof.

#### A.5 Disentanglement (At Most 1 1 1 1 st Order Interaction)

###### Lemma A.21 .

Let $\mathcal{Z}_{\textnormal{supp}}\subseteq\mathcal{Z}$ be a regular closed set (Defn. A.3). Let $\mathbf{f}:\mathcal{Z}\rightarrow\mathcal{X}$ be $C^{1}$ and $\mathbf{h}:\hat{\mathcal{Z}}_{\textnormal{supp}}\rightarrow\mathcal{Z}_{
\textnormal{supp}}$ be a diffeomorphism. Let $\hat{\mathbf{f}}:=\mathbf{f}\circ\mathbf{h}$. If $\mathbf{f}$ has at most $1$^st order interaction (Definition 3.4 with $n=1$), then, for all $j,j^{\prime}\in[d_{z}]$ and $\mathbf{z}\in\hat{\mathcal{Z}}_{\textnormal{supp}}$, we have

$$ $\displaystyle D^{2}_{j,j^{\prime}}\boldsymbol{\hat{f}}({\bm{z}})={\bm{W}}^{\bm {f}}({\bm{h}}({\bm{z}})){\bm{m}}^{\bm{h}}({\bm{z}},(j,j^{\prime}))\,,$ (A.37) $$

where

$$ $\displaystyle{\bm{W}}^{\bm{f}}(\boldsymbol{z})$ $\displaystyle:=[{\bm{W}}^{\bm{f}}_{k}(\boldsymbol{z}))]_{k\in[K]}$ $\displaystyle{\bm{W}}^{\bm{f}}_{k}(\boldsymbol{z})$ $\displaystyle:=\Bigl{[}[D_{i_{1}}\boldsymbol{f}(\boldsymbol{z})]_{i_{1}\in B_{ k}},[D^{2}_{i_{1},i_{2}}\boldsymbol{f}(\boldsymbol{z})]_{(i_{1},i_{2})\in B^{2 }_{k}}\Bigr{]}$ $\displaystyle\boldsymbol{m}^{\bm{h}}(\boldsymbol{z},(j,j^{\prime}))$ $\displaystyle:=[\boldsymbol{m}^{\bm{h}}_{k}(\boldsymbol{z},(j,j^{\prime}))]_{k \in[K]}$ $\displaystyle\boldsymbol{m}^{\bm{h}}_{k}(\boldsymbol{z},(j,j^{\prime}))$ $\displaystyle:=\Bigl{[}[D^{2}_{j,j^{\prime}}\boldsymbol{h}_{i_{1}}(\boldsymbol {z})]_{i_{1}\in B_{k}},[D_{j^{\prime}}\boldsymbol{h}_{i_{2}}(\boldsymbol{z})D_ {j}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})]_{(i_{1},i_{2})\in B^{2}_{k}}\Bigr{] }\,.$ $$

###### Proof.

The exact same argument as the one presented in Lemma A.19 (based on Lachapelle et al. ()) guarantees that, $\hat{\bm{f}}$ and ${\bm{f}}\circ{\bm{h}}$ have equal derivatives on $\hat{\mathcal{Z}}_{\textnormal{supp}}$. We leverage this fact next.

By taking the derivative w.r.t. ${\bm{z}}_{j}$ on both sides of $\hat{\bm{f}}({\bm{z}})={\bm{f}}\circ{\bm{h}}({\bm{z}})$, we get

$$ $D_{j}\boldsymbol{\hat{f}}(\boldsymbol{z})=\sum_{k\in[K]}\sum_{i\in B_{k}}D_{i} \boldsymbol{f}({\bm{h}}(\boldsymbol{z}))D_{j}\boldsymbol{h}_{i}(\boldsymbol{z})$ (A.38) $$

Now take another derivative w.r.t. ${\bm{z}}_{j^{\prime}}$ for some $j^{\prime}\in[d_{z}]$ to get

$$ $D^{2}_{j,j^{\prime}}\boldsymbol{\hat{f}}(\boldsymbol{z})=\sum_{k_{1}\in[K]} \sum_{i_{1}\in B_{k_{1}}}\left[D_{i_{1}}\boldsymbol{f}({\boldsymbol{h}}( \boldsymbol{z}))D^{2}_{j,j^{\prime}}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})+ \sum_{k_{2}\in[K]}\sum_{i_{2}\in B_{k_{2}}}D^{2}_{i_{1},i_{2}}\boldsymbol{f}({ \boldsymbol{h}}(\boldsymbol{z}))D_{j^{\prime}}\boldsymbol{h}_{i_{2}}( \boldsymbol{z})D_{j}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})\right]$ $$

Because we have *at most first order interactions* (Def. 3.4 with $n=1$), the second sum over $[K]$ drops, and we are left with:

$$ $\displaystyle D^{2}_{j,j^{\prime}}\boldsymbol{\hat{f}}(\boldsymbol{z})$ $\displaystyle=\sum_{k_{1}\in[K]}\sum_{i_{1}\in B_{k_{1}}}\left[D_{i_{1}} \boldsymbol{f}({\boldsymbol{h}}(\boldsymbol{z}))D^{2}_{j,j^{\prime}} \boldsymbol{h}_{i_{1}}(\boldsymbol{z})+\sum_{i_{2}\in B_{k_{1}}}D^{2}_{i_{1},i _{2}}\boldsymbol{f}({\boldsymbol{h}}(\boldsymbol{z}))D_{j^{\prime}}\boldsymbol {h}_{i_{2}}(\boldsymbol{z})D_{j}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})\right]$ $\displaystyle=\sum_{k_{1}\in[K]}\left[\sum_{i_{1}\in B_{k_{1}}}D_{i_{1}} \boldsymbol{f}({\boldsymbol{h}}(\boldsymbol{z}))D^{2}_{j,j^{\prime}} \boldsymbol{h}_{i_{1}}(\boldsymbol{z})+\sum_{(i_{1},i_{2})\in B^{2}_{k_{1}}}D^ {2}_{i_{1},i_{2}}\boldsymbol{f}({\boldsymbol{h}}(\boldsymbol{z}))D_{j^{\prime} }\boldsymbol{h}_{i_{2}}(\boldsymbol{z})D_{j}\boldsymbol{h}_{i_{1}}(\boldsymbol {z})\right]$ $\displaystyle={\bm{W}}^{\bm{f}}({\bm{h}}({\bm{z}})){\bm{m}}^{\bm{h}}({\bm{z}}, (j,j^{\prime}))\,,$ $$

which concludes the proof.
∎

###### Theorem A.22 .

Let $\mathbf{f}:\mathcal{Z}\rightarrow\mathcal{X}$ be a $C^{2}$ diffeomorphism satisfying interaction asymmetry (Asm. 3.5) for all equivalent generators (Defn. 4.1) for $n=1$ and sufficient independence (Defn. A.9). Let $\mathcal{Z}_{\textnormal{supp}}\subseteq\mathcal{Z}$ be regular closed (Defn. A.3), path-connected (Defn. A.14) and aligned-connected (Defn. A.16). A model ${\hat{\mathbf{f}}}:\mathcal{Z}\rightarrow\mathbb{R}^{d_{x}}$ disentangles $\mathbf{z}$ on $\mathcal{Z}_{\textnormal{supp}}$ w.r.t. ${\mathbf{f}}$ (Defn. 2.1) if it is (*i*) a $C^{2}$ diffeomorphism between $\hat{\mathcal{Z}}_{\textnormal{supp}}$ and $\mathcal{X}_{\textnormal{supp}}$ with (*ii*) at most 1^st order interactions across slots (Defn. 3.4) on $\hat{\mathcal{Z}}_{\textnormal{supp}}$.

###### Proof.

As mentioned in Section A.3, the proofs will proceed in two steps: First, we show local disentanglement (Definition A.13) and then we show (global) disentanglement via Lemma A.18. We first show local disentanglement.

We first define the function $\mathbf{h}:\hat{\mathcal{Z}}_{\textnormal{supp}}\rightarrow\mathcal{Z}_{
\textnormal{supp}}$ relating the latent spaces of these functions on $\hat{\mathcal{Z}}_{\textnormal{supp}}$:

$$ $\mathbf{h}:={\mathbf{f}}^{-1}\circ{\hat{\mathbf{f}}}$ (A.39) $$

The function $\hat{\mathbf{f}}$ can then be written in terms of $\mathbf{f}$ and $\mathbf{h}$ on $\hat{\mathcal{Z}}_{\textnormal{supp}}$:

$$ $\hat{\mathbf{f}}=\mathbf{f}\circ\mathbf{h}$ (A.40) $$

Because $\mathbf{f},\hat{\mathbf{f}}$ are both $C^{2}$ diffeomorphism between $\mathcal{Z}_{\textnormal{supp}},\mathcal{X}_{\textnormal{supp}}$ and $\hat{\mathcal{Z}}_{\textnormal{supp}},\mathcal{X}_{\textnormal{supp}}$, respectively, we have that $\mathbf{h}$ is a $C^{2}$ diffeomorphism.

Since ${\bm{f}}$ has at most 1st order interactions, we can apply Lemma A.21 to obtain, for all $\mathbf{z}\in\hat{\mathcal{Z}}_{\textnormal{supp}},\ j,j^{\prime}\in[d_{z}]$,

$$ $\displaystyle D^{2}_{j,j^{\prime}}\boldsymbol{\hat{f}}({\bm{z}})={\bm{W}}^{\bm {f}}({\bm{h}}({\bm{z}})){\bm{m}}^{\bm{h}}({\bm{z}},(j,j^{\prime}))\,.$ $$

Since $\hat{\bm{f}}$ has at most 1st order interaction, we have that, for all $(j,j^{\prime})\in{\mathcal{D}}^{c}$

$$ $\displaystyle 0={\bm{W}}^{\bm{f}}({\bm{h}}({\bm{z}})){\bm{m}}^{\bm{h}}({\bm{z} },(j,j^{\prime}))\,.$ (A.41) $$

By defining

$$ $\displaystyle{\bm{W}}^{{\bm{f}},\text{rest}}_{k}({\bm{z}})$ $\displaystyle:=[D_{i_{1}}\boldsymbol{f}(\boldsymbol{z})]_{i_{1}\in B_{k}}$ $\displaystyle{\bm{W}}^{{\bm{f}},\text{high}}_{k}({\bm{z}})$ $\displaystyle:=[D^{2}_{i_{1},i_{2}}\boldsymbol{f}(\boldsymbol{z})]_{(i_{1},i_{ 2})\in B^{2}_{k}}$ $\displaystyle{\bm{m}}^{{\bm{h}},\text{rest}}_{k}({\bm{z}},(j,j^{\prime}))$ $\displaystyle:=[D^{2}_{j,j^{\prime}}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})]_{i _{1}\in B_{k}}$ $\displaystyle{\bm{m}}^{{\bm{h}},\text{high}}_{k}({\bm{z}},(j,j^{\prime}))$ $\displaystyle:=[D_{j^{\prime}}\boldsymbol{h}_{i_{2}}(\boldsymbol{z})D_{j} \boldsymbol{h}_{i_{1}}(\boldsymbol{z})]_{(i_{1},i_{2})\in B^{2}_{k}}$ $$

we can restate the sufficiently independent derivative assumption (Def. A.9) as, for all $\boldsymbol{z}\in\mathcal{Z}$

$$ $\displaystyle\text{rank}\left({\bm{W}}^{\bm{f}}({\bm{z}})\right)=\sum_{k\in[K] }\left[\text{rank}\left({\bm{W}}^{{\bm{f}},\text{rest}}_{k}({\bm{z}})\right)+ \text{rank}\left({\bm{W}}^{{\bm{f}},\text{high}}_{k}({\bm{z}})\right)\right]$ $$

This condition allows us to apply Lemma A.6 to go from (A.41) to, for all $(j,j^{\prime})\in{\mathcal{D}}^{c}$, $k\in[K]$:

$$ $0={\bm{W}}^{{\bm{f}},\text{high}}_{k}({\bm{h}}({\bm{z}})){\bm{m}}_{k}^{{\bm{h} },\text{high}}({\bm{z}},(j,j^{\prime}))$ (A.42) $$

Case 1: $|B_{k}|=1$ (One-Dimensional Slots)
By Assumption 3.5.ii, (with $A=B=\{i\}$) $D_{i,i}^{2}{\bm{f}}({\bm{z}})\not=0$. Note that ${\bm{W}}^{{\bm{f}},\text{high}}_{k}({\bm{h}}({\bm{z}}))=D_{k,k}^{2}{\bm{f}}({
\bm{z}})$. Hence, (A.42) implies that ${\bm{m}}_{k}^{{\bm{h}},\text{high}}({\bm{z}},(j,j^{\prime}))=0$ (which is a scalar). This means ${\bm{m}}_{k}^{{\bm{h}},\text{high}}({\bm{z}},(j,j^{\prime}))=D_{j^{\prime}}
\boldsymbol{h}_{k}(\boldsymbol{z})D_{j}\boldsymbol{h}_{k}(\boldsymbol{z})=0$. Since this is true for all $k$ and all distinct $j,j^{\prime}$, this means each row has at most one nonzero entry. Since $D{\bm{h}}({\bm{z}})$ is invertible, these nonzero entries must appear on different columns, otherwise a column will be filled with zeros. This means $D{\bm{h}}({\bm{z}})$ is a permutation-scaling matrix, i.e. we have local disentanglement (Definition A.13).

Case 2: $|B_{k}|>1$ (Multi-Dimensional Slots)

Assume for a contradiction that $\boldsymbol{\hat{f}}$ is not locally disentangled on $\mathcal{Z}_{\textnormal{supp}}$ w.r.t. $\boldsymbol{f}$. This implies that there exist a $\boldsymbol{z}^{*}\in\hat{\mathcal{Z}}_{\textnormal{supp}}$, $k,k^{\prime},k^{\prime\prime}\in[K]$ with $k^{\prime}\not=k^{\prime\prime}$ such that:

$$ $D_{B_{k^{\prime}}}\boldsymbol{h}_{B_{k}}(\boldsymbol{z}^{*})\neq\bf{0},\quad D _{B_{k^{\prime\prime}}}\boldsymbol{h}_{B_{k}}(\boldsymbol{z}^{*})\neq\bf{0}$ (A.43) $$

Because $\boldsymbol{f},\boldsymbol{\hat{f}}$ are $C^{1}$ diffeomorphisms, we know that $\boldsymbol{h}$ is also a $C^{1}$ diffeomorphism. Coupling this with Eq. A.43, Lemma A.7 tells us that there exist an $S\subset[d_{z}]$ with cardinality $|B_{k}|$ such that:

$$ $\forall B\in\mathcal{B},\ S\not\subseteq B,\ \ \text{and}\quad\forall i\in S,D _{i}\boldsymbol{h}_{B_{k}}(\boldsymbol{z}^{*})\ \ \text{are linearly independent.}$ (A.44) $$

Now choose any $\bar{B}\in\mathcal{B}$ such that $S_{1}:=\{S\cap\bar{B}\}\neq\emptyset$.
Furthermore, define the set $S_{2}:=S\setminus{S_{1}}$.
Because $S\not\subseteq\bar{B}$, we know that $S_{2}$ is non-empty. Further, by construction $S=S_{1}\cup S_{2}$. In other words, $S_{1}$ and $S_{2}$ are non-empty, form a partition of $S$, and do not contain any indices from the same slot.

Now construct the matrices, denoted $\boldsymbol{A}_{S_{1}}$ and $\boldsymbol{A}_{S_{2}}$ as follows:

$$ $\boldsymbol{A}_{S_{1}}:=D_{S_{1}}\boldsymbol{h}_{B_{k}}(\boldsymbol{z}^{*}), \quad\boldsymbol{A}_{S_{2}}:=D_{S_{2}}\boldsymbol{h}_{B_{k}}(\boldsymbol{z}^{*})$ (A.45) $$

And the matrix denoted $\boldsymbol{A}_{k}$ as:

$$ $\boldsymbol{A}_{k}:=\left[\boldsymbol{A}_{S_{1}},\boldsymbol{A}_{S_{2}}\right]$ (A.46) $$

Note that because, $\forall i\in S$, $D_{i}\boldsymbol{h}_{B_{k}}(\boldsymbol{\hat{z}}^{*})$ are linearly independent (Eq. A.44), we know that $\boldsymbol{A}_{k}$ is invertible.
Now, define the following block diagonal matrix $\boldsymbol{A}\in\mathbb{R}^{d_{z}\times d_{z}}$ as follows:

$$ $\boldsymbol{A}:=\begin{bmatrix}\boldsymbol{A}_{1}&0&\dots&0\\ 0&\boldsymbol{A}_{2}&\dots&0\\ \vdots&\vdots&\ddots&\vdots\\ 0&0&\dots&\boldsymbol{A}_{K}\end{bmatrix}$ (A.47) $$

where $\forall i\in[K]\setminus\{k\},\boldsymbol{A}_{i}$ is the identity matrix, and thus invertible, while $\boldsymbol{A}_{k}$ is defined according to Eq. A.46.

Define $\bar{\mathcal{Z}}:={\bm{A}}^{-1}{\mathcal{Z}}$, the function $\bar{\bm{h}}:\bar{\mathcal{Z}}\rightarrow{\mathcal{Z}}$ as $\boldsymbol{\bar{h}}(\boldsymbol{z}):={\boldsymbol{A}}\boldsymbol{z}$ and the function $\bar{\bm{f}}:\bar{\mathcal{Z}}\rightarrow{\mathcal{X}}$ as ${\boldsymbol{\bar{f}}}:=\boldsymbol{f}\circ{\boldsymbol{\bar{h}}}$. By construction we have

$$ $\forall\boldsymbol{z}\in\mathcal{Z},\qquad{\boldsymbol{\bar{f}}}\left( \boldsymbol{A}^{-1}_{1}\boldsymbol{z}_{B_{1}},\dots,\boldsymbol{A}^{-1}_{K} \boldsymbol{z}_{B_{K}}\right)=\boldsymbol{f}(\boldsymbol{z}_{B_{1}},\dots, \boldsymbol{z}_{B_{K}})\,.$ (A.48) $$

Because all $\boldsymbol{A}^{-1}_{i}$ are invertible, then ${\boldsymbol{\bar{f}}}$ is *equivalent* to ${\boldsymbol{{f}}}$ in the sense of Def. (4.1).

We can now apply Lemma A.21 to $\bar{\bm{f}}={\bm{f}}\circ\bar{\bm{h}}$ to obtain, for all $j,j^{\prime}\in[d_{z}]$:

$$ $\displaystyle D^{2}_{j,j^{\prime}}\boldsymbol{\bar{f}}({\bm{z}})={\bm{W}}^{\bm {f}}(\bar{\bm{h}}({\bm{z}})){\bm{m}}^{\bar{\bm{h}}}({\bm{z}},(j,j^{\prime}))\,.$ (A.49) $$

Choose $\bar{\bm{z}}\in\bar{\mathcal{Z}}$ such that $\bar{\bm{h}}(\bar{\bm{z}})={\bm{h}}({\bm{z}}^{*})$, which is possible because ${\bm{h}}({\bm{z}}^{*})\in{\mathcal{Z}}$ and $\bar{\bm{h}}$ is a bijection from $\bar{\mathcal{Z}}$ to ${\mathcal{Z}}$. We can then write

$$ $\displaystyle D^{2}_{j,j^{\prime}}\boldsymbol{\bar{f}}(\bar{\bm{z}})={\bm{W}}^ {\bm{f}}({\bm{h}}({\bm{z}}^{*})){\bm{m}}^{\bar{\bm{h}}}(\bar{\bm{z}},(j,j^{ \prime}))\,.$ (A.50) $$

Let $J,J^{\prime}\subseteq B_{k}$ be a partition of $B_{k}$ such that $J$ is the set of columns of ${\bm{A}}$ corresponding to ${\bm{A}}_{S_{1}}$ and $J^{\prime}$ be the set of columns of ${\bm{A}}$ corresponding to ${\bm{A}}_{S_{2}}$. More formally, we have

$$ $\displaystyle{\bm{A}}_{B_{k},J}={\bm{A}}_{S_{1}}\quad\quad\text{and}\quad\quad {\bm{A}}_{B_{k},J^{\prime}}={\bm{A}}_{S_{2}}\,.$ $$

Since ${\bm{A}}_{S_{1}}=D_{S_{1}}{\bm{h}}_{B_{k}}({\bm{z}}^{*})$ and ${\bm{A}}_{S_{2}}=D_{S_{2}}{\bm{h}}_{B_{k}}({\bm{z}}^{*})$, we have that

$$ $\displaystyle{\bm{A}}_{B_{k},J}=D_{S_{1}}{\bm{h}}_{B_{k}}({\bm{z}}^{*})\quad \text{and}\quad{\bm{A}}_{B_{k},J^{\prime}}=D_{S_{2}}{\bm{h}}_{B_{k}}({\bm{z}}^ {*})$ $$

Since $D\bar{\bm{h}}(\bar{\bm{z}})={\bm{A}}$, we have

$$ $\displaystyle D_{J}\bar{\bm{h}}_{B_{k}}(\bar{\bm{z}})=D_{S_{1}}{\bm{h}}_{B_{k} }({\bm{z}}^{*})\quad\text{and}\quad D_{J^{\prime}}\bar{\bm{h}}_{B_{k}}(\bar{ \bm{z}})=D_{S_{2}}{\bm{h}}_{B_{k}}({\bm{z}}^{*})\,.$ $$

For all $(j,j^{\prime})\in J\times J^{\prime}$, there must exist $(s,s^{\prime})\in S_{1}\times S_{2}$ such that

$$ $\displaystyle D_{j}\bar{\bm{h}}_{B_{k}}(\bar{\bm{z}})=D_{s}{\bm{h}}_{B_{k}}({ \bm{z}}^{*})\quad\text{and}\quad D_{j^{\prime}}\bar{\bm{h}}_{B_{k}}(\bar{\bm{z }})=D_{s^{\prime}}{\bm{h}}_{B_{k}}({\bm{z}}^{*})\,.$ $$

This implies that, for all $(j,j^{\prime})\in J\times J^{\prime}$, there exists $(s,s^{\prime})\in S_{1}\times S_{2}$ such that

$$ $\displaystyle{\bm{m}}_{k}^{\bar{\bm{h}},\text{high}}(\bar{\bm{z}},(j,j^{\prime }))={\bm{m}}_{k}^{{\bm{h}},\text{high}}({\bm{z}}^{*},(s,s^{\prime}))\,.$ (A.51) $$

Moreover, since $\bar{\bm{h}}$ is a block-wise function we have that, for all $(j,j^{\prime})\in J\times J^{\prime}\subseteq B_{k}$ and $k^{\prime}\in[K]\setminus\{k\}$, ${\bm{m}}^{\bar{\bm{h}}}_{k^{\prime}}(\bar{\bm{z}},(j,j^{\prime}))=0$. We can thus write:

$$ $\displaystyle D^{2}_{j,j^{\prime}}\boldsymbol{\bar{f}}(\bar{\bm{z}})={\bm{W}}_ {k}^{\bm{f}}({\bm{h}}({\bm{z}}^{*})){\bm{m}}_{k}^{\bar{\bm{h}}}(\bar{\bm{z}},( j,j^{\prime}))\,.$ (A.52) $$

Since $\bar{\bm{h}}$ is linear, we have that ${\bm{m}}_{k}^{\bar{\bm{h}},\text{rest}}(\bar{\bm{z}},(j,j^{\prime}))=0$, and thus

$$ $\displaystyle D^{2}_{j,j^{\prime}}\boldsymbol{\bar{f}}(\bar{\bm{z}})={\bm{W}}_ {k}^{{\bm{f}},\text{high}}({\bm{h}}({\bm{z}}^{*})){\bm{m}}_{k}^{\bar{\bm{h}}, \text{high}}(\bar{\bm{z}},(j,j^{\prime}))\,.$ (A.53) $$

Plug the (A.51) into the above to obtain that, for all $(j,j^{\prime})\in J\times J^{\prime}$,

$$ $\displaystyle D^{2}_{j,j^{\prime}}\boldsymbol{\bar{f}}(\bar{\bm{z}})={\bm{W}}_ {k}^{{\bm{f}},\text{high}}({\bm{h}}({\bm{z}}^{*})){\bm{m}}_{k}^{{\bm{h}},\text {high}}({\bm{z}}^{*},(s,s^{\prime}))=0\,,$ (A.54) $$

where the very last “$=0$” is due to (A.42) (recall $(s,s^{\prime})\in S_{1}\times S_{2}\subseteq{\mathcal{D}}^{c}$).

In other words, we found a partition $J,J^{\prime}$ of the block $B_{k}$ and a value $\bar{\bm{z}}$ such that $D^{2}_{j,j^{\prime}}\boldsymbol{\bar{f}}(\bar{\bm{z}})=0$ for all $(j,j^{\prime})\in J\times J^{\prime}$. This means that the blocks $J$ and $J^{\prime}$ have no second order interaction in $\bar{\bm{f}}$ at $\bar{\bm{z}}$. This is a contradiction with Assm. 3.5. Hence, we have local disentanglement.

From local to global disentanglement. The same argument as in the proof of Theorem A.20 applies.

∎

###### Lemma A.21 .

###### Proof.

###### Theorem A.22 .

###### Proof.

#### A.6 Disentanglement (At Most 2 2 2 2 nd Order interaction)

###### Lemma A.23 .

Let $\mathcal{Z}_{\textnormal{supp}}\subseteq\mathcal{Z}$ be a regular closed set (Defn. A.3). Let $\mathbf{f}:\mathcal{Z}\rightarrow\mathcal{X}$ be $C^{1}$ and $\mathbf{h}:\hat{\mathcal{Z}}_{\textnormal{supp}}\rightarrow\mathcal{Z}_{
\textnormal{supp}}$ be a diffeomorphism. Let $\hat{\mathbf{f}}:=\mathbf{f}\circ\mathbf{h}$. If $\mathbf{f}$ has at most $2$^nd order interaction (Definition 3.4 with $n=2$), then, for all $j,j^{\prime}\in[d_{z}]$ and $\mathbf{z}\in\hat{\mathcal{Z}}_{\textnormal{supp}}$, we have

$$ $\displaystyle D^{3}_{j,j^{\prime},j^{\prime\prime}}\boldsymbol{\hat{f}}({\bm{z }})={\bm{W}}^{\bm{f}}({\bm{h}}({\bm{z}})){\bm{m}}^{\bm{h}}({\bm{z}},(j,j^{ \prime},j^{\prime\prime}))\,,$ (A.55) $$

where

$$ $\displaystyle{\bm{W}}^{\bm{f}}(\boldsymbol{z})$ $\displaystyle:=[{\bm{W}}^{\bm{f}}_{k}(\boldsymbol{z}))]_{k\in[K]}$ $\displaystyle{\bm{W}}^{\bm{f}}_{k}(\boldsymbol{z})$ $\displaystyle:=\Bigl{[}[D_{i_{1}}\boldsymbol{f}(\boldsymbol{z})]_{i_{1}\in B_{ k}},$ $\displaystyle\qquad[D^{2}_{i_{1},i_{2}}\boldsymbol{f}(\boldsymbol{z})]_{i_{1} \in B_{k},i_{2}\in[d_{z}]},$ $\displaystyle\qquad[D^{3}_{i_{1},i_{2},i_{3}}\boldsymbol{f}(\boldsymbol{z})]_{ (i_{1},i_{2},i_{3})\in B^{3}_{k}}\Bigr{]}$ $\displaystyle\boldsymbol{m}^{\bm{h}}(\boldsymbol{z},(j,j^{\prime},j^{\prime \prime}))$ $\displaystyle:=[\boldsymbol{m}^{\bm{h}}_{k}(\boldsymbol{z},(j,j^{\prime},j^{ \prime\prime}))]_{k\in[K]}$ $\displaystyle\boldsymbol{m}^{\bm{h}}_{k}(\boldsymbol{z},(j,j^{\prime},j^{ \prime\prime}))$ $\displaystyle:=\Bigl{[}[D^{3}_{j,j^{\prime},j^{\prime\prime}}\boldsymbol{h}_{i _{1}}(\boldsymbol{z})]_{i_{1}\in B_{k}},$ $\displaystyle\qquad[D_{j}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})D^{2}_{j^{ \prime},j^{\prime\prime}}\boldsymbol{h}_{i_{2}}(\boldsymbol{z})+D_{j^{\prime}} \boldsymbol{h}_{i_{2}}(\boldsymbol{z})D^{2}_{j,j^{\prime\prime}}\boldsymbol{h} _{i_{1}}(\boldsymbol{z})+D_{j^{\prime\prime}}\boldsymbol{h}_{i_{2}}( \boldsymbol{z})D^{2}_{j,j^{\prime}}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})]_{i_ {1}\in B_{k},i_{2}\in[d_{z}]}$ $\displaystyle\qquad[D_{j^{\prime\prime}}\boldsymbol{h}_{i_{3}}(\boldsymbol{z}) D_{j^{\prime}}\boldsymbol{h}_{i_{2}}(\boldsymbol{z})D_{j}\boldsymbol{h}_{i_{1} }(\boldsymbol{z})]_{(i_{1},i_{2},i_{3})\in B^{3}_{k}}\Bigr{]}\,.$ $$

###### Proof.

As argued in Lemma A.21, differentiating $\hat{\bm{f}}({\bm{z}})={\bm{f}}\circ{\bm{h}}({\bm{z}})$ w.r.t. ${\bm{z}}_{j}$ and ${\bm{z}}_{j^{\prime}}$ on both sides yields

$$ $D^{2}_{j,j^{\prime}}\boldsymbol{\hat{f}}(\boldsymbol{z})=\sum_{k_{1}\in[K]} \sum_{i_{1}\in B_{k_{1}}}\left[D_{i_{1}}\boldsymbol{f}({\boldsymbol{h}}( \boldsymbol{z}))D^{2}_{j,j^{\prime}}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})+ \sum_{k_{2}\in[K]}\sum_{i_{2}\in B_{k_{2}}}D^{2}_{i_{1},i_{2}}\boldsymbol{f}({ \boldsymbol{h}}(\boldsymbol{z}))D_{j^{\prime}}\boldsymbol{h}_{i_{2}}( \boldsymbol{z})D_{j}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})\right]$ $$

Now take another derivative with respect to ${z_{j^{\prime\prime}}}$ to compute $D^{3}_{j,j^{\prime},j^{\prime\prime}}\boldsymbol{\hat{f}}(\boldsymbol{z})$. For the first term in the sum, we have:

$$ $\sum_{k_{1}\in[K]}\sum_{i_{1}\in B_{k_{1}}}\left[\sum_{k_{2}\in[K]}\sum_{i_{2} \in B_{k_{2}}}D^{2}_{i_{1},i_{2}}\boldsymbol{f}_{n}({\boldsymbol{h}}( \boldsymbol{z}))D_{j^{\prime\prime}}\boldsymbol{h}_{i_{2}}(\boldsymbol{z})D^{2 }_{j,j^{\prime}}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})+D_{i_{1}}\boldsymbol{f} _{n}({\boldsymbol{h}}(\boldsymbol{z}))D^{3}_{j,j^{\prime},j^{\prime\prime}} \boldsymbol{h}_{i_{1}}(\boldsymbol{z})\right]$ $$

And for the second term in the sum (the nested sum), we have:

$$ $\displaystyle\sum_{k_{1}\in[K]}\sum_{i_{1}\in B_{k_{1}}}\sum_{k_{2}\in[K]}\sum _{i_{2}\in B_{k_{2}}}\Biggl{[}\sum_{k_{3}\in[K]}\sum_{i_{3}\in B_{k_{3}}}D^{3} _{i_{1},i_{2},i_{3}}\boldsymbol{f}_{n}({\boldsymbol{h}}(\boldsymbol{z}))D_{j^{ \prime\prime}}\boldsymbol{h}_{i_{3}}(\boldsymbol{z})D_{j^{\prime}}\boldsymbol{ h}_{i_{2}}(\boldsymbol{z})D_{j}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})+$ $\displaystyle D^{2}_{i_{1},i_{2}}\boldsymbol{f}_{n}({\boldsymbol{h}}( \boldsymbol{z}))\Bigl{[}D^{2}_{j^{\prime},j^{\prime\prime}}\boldsymbol{h}_{i_{ 2}}(\boldsymbol{z})D_{j}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})+D_{j^{\prime}} \boldsymbol{h}_{i_{2}}(\boldsymbol{z})D^{2}_{j,j^{\prime\prime}}\boldsymbol{h} _{i_{1}}(\boldsymbol{z})\Bigr{]}\Biggr{]}$ $$

Because we have at most second order interactions (Def. 3.4 with $n=2$), this term can be rewritten as:

$$ $\displaystyle\sum_{k_{1}\in[K]}\sum_{i_{1}\in B_{k_{1}}}\Biggl{[}\sum_{i_{2} \in B_{k_{1}}}\sum_{i_{3}\in B_{k_{1}}}D^{3}_{i_{1},i_{2},i_{3}}\boldsymbol{f} _{n}({\boldsymbol{h}}(\boldsymbol{z}))D_{j^{\prime\prime}}\boldsymbol{h}_{i_{3 }}(\boldsymbol{z})D_{j^{\prime}}\boldsymbol{h}_{i_{2}}(\boldsymbol{z})D_{j} \boldsymbol{h}_{i_{1}}(\boldsymbol{z})+$ $\displaystyle\sum_{k_{2}\in[K]}\sum_{i_{2}\in B_{k_{2}}}D^{2}_{i_{1},i_{2}} \boldsymbol{f}_{n}({\boldsymbol{h}}(\boldsymbol{z}))\Bigl{[}D^{2}_{j^{\prime}, j^{\prime\prime}}\boldsymbol{h}_{i_{2}}(\boldsymbol{z})D_{j}\boldsymbol{h}_{i_ {1}}(\boldsymbol{z})+D_{j^{\prime}}\boldsymbol{h}_{i_{2}}(\boldsymbol{z})D^{2} _{j,j^{\prime\prime}}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})\Bigr{]}\Biggr{]}$ $$

Combining the first and second terms, we get:

$$ $\displaystyle D^{3}_{j,j^{\prime},j^{\prime\prime}}\boldsymbol{\hat{f}}( \boldsymbol{z})$ $\displaystyle=\sum_{k_{1}\in[K]}\sum_{i_{1}\in B_{k_{1}}}\Biggl{[}D_{i_{1}} \boldsymbol{f}({\boldsymbol{h}}(\boldsymbol{z}))D^{3}_{j,j^{\prime},j^{\prime \prime}}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})\ +$ $\displaystyle\sum_{k_{2}\in[K]}\sum_{i_{2}\in B_{k_{2}}}D^{2}_{i_{1},i_{2}} \boldsymbol{f}({\boldsymbol{h}}(\boldsymbol{z}))\Bigl{(}D_{j}\boldsymbol{h}_{i _{1}}(\boldsymbol{z})D^{2}_{j^{\prime},j^{\prime\prime}}\boldsymbol{h}_{i_{2}} (\boldsymbol{z})+D_{j^{\prime}}\boldsymbol{h}_{i_{2}}(\boldsymbol{z})D^{2}_{j, j^{\prime\prime}}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})+D_{j^{\prime\prime}} \boldsymbol{h}_{i_{2}}(\boldsymbol{z})D^{2}_{j,j^{\prime}}\boldsymbol{h}_{i_{1 }}(\boldsymbol{z})\Bigr{)}\ +$ $\displaystyle\sum_{i_{2}\in B_{k_{1}}}\sum_{i_{3}\in B_{k_{1}}}D^{3}_{i_{1},i_ {2},i_{3}}\boldsymbol{f}({\boldsymbol{h}}(\boldsymbol{z}))D_{j^{\prime\prime}} \boldsymbol{h}_{i_{3}}(\boldsymbol{z})D_{j^{\prime}}\boldsymbol{h}_{i_{2}}( \boldsymbol{z})D_{j}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})\Biggr{]}$ $\displaystyle=\sum_{k_{1}\in[K]}\Biggl{[}\sum_{i_{1}\in B_{k_{1}}}D_{i_{1}} \boldsymbol{f}({\boldsymbol{h}}(\boldsymbol{z}))D^{3}_{j,j^{\prime},j^{\prime \prime}}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})\ +$ $\displaystyle\sum_{i_{1}\in B_{k_{1}}}\sum_{i_{2}\in[d_{z}]}D^{2}_{i_{1},i_{2} }\boldsymbol{f}({\boldsymbol{h}}(\boldsymbol{z}))\Bigl{(}D_{j}\boldsymbol{h}_{ i_{1}}(\boldsymbol{z})D^{2}_{j^{\prime},j^{\prime\prime}}\boldsymbol{h}_{i_{2} }(\boldsymbol{z})+D_{j^{\prime}}\boldsymbol{h}_{i_{2}}(\boldsymbol{z})D^{2}_{j ,j^{\prime\prime}}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})+D_{j^{\prime\prime}} \boldsymbol{h}_{i_{2}}(\boldsymbol{z})D^{2}_{j,j^{\prime}}\boldsymbol{h}_{i_{1 }}(\boldsymbol{z})\Bigr{)}\ +$ $\displaystyle\sum_{(i_{1},i_{2},i_{3})\in B^{3}_{k_{1}}}D^{3}_{i_{1},i_{2},i_{ 3}}\boldsymbol{f}({\boldsymbol{h}}(\boldsymbol{z}))D_{j^{\prime\prime}} \boldsymbol{h}_{i_{3}}(\boldsymbol{z})D_{j^{\prime}}\boldsymbol{h}_{i_{2}}( \boldsymbol{z})D_{j}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})\Biggr{]}$ $\displaystyle={\bm{W}}^{\bm{f}}({\bm{h}}({\bm{z}})){\bm{m}}^{\bm{h}}({\bm{z}}, (j,j^{\prime},j^{\prime\prime}))\,.$ $$

∎

###### Theorem A.24 .

Let $\mathbf{f}:\mathcal{Z}\rightarrow\mathcal{X}$ be a $C^{3}$ diffeomorphism satisfying interaction asymmetry (Asm. 3.5) for all equivalent generators (Defn. 4.1) for $n=2$ and sufficient independence (Defn. 4.2). Let $\mathcal{Z}_{\textnormal{supp}}\subseteq\mathcal{Z}$ be regular closed (Defn. A.3), path-connected (Defn. A.14) and aligned-connected (Defn. A.16). A model ${\hat{\mathbf{f}}}:\mathcal{Z}\rightarrow\mathbb{R}^{d_{x}}$ disentangles $\mathbf{z}$ on $\mathcal{Z}_{\textnormal{supp}}$ w.r.t. ${\mathbf{f}}$ (Defn. 2.1) if it is (*i*) a $C^{3}$ diffeomorphism between $\hat{\mathcal{Z}}_{\textnormal{supp}}$ and $\mathcal{X}_{\textnormal{supp}}$ with (*ii*) at most 2^nd order interactions across slots (Defn. 3.4) on $\hat{\mathcal{Z}}_{\textnormal{supp}}$.

###### Proof.

As mentioned in Section A.3, the proofs will proceed in two steps: First, we show local disentanglement (Definition A.13) and then we show (global) disentanglement via Lemma A.18. We first show local disentanglement.

We first define the function $\mathbf{h}:\hat{\mathcal{Z}}_{\textnormal{supp}}\rightarrow\mathcal{Z}_{
\textnormal{supp}}$ relating the latent spaces of these functions on $\hat{\mathcal{Z}}_{\textnormal{supp}}$:

$$ $\mathbf{h}:={\mathbf{f}}^{-1}\circ{\hat{\mathbf{f}}}$ (A.56) $$

The function $\hat{\mathbf{f}}$ can then be written in terms of $\mathbf{f}$ and $\mathbf{h}$ on $\hat{\mathcal{Z}}_{\textnormal{supp}}$:

$$ $\hat{\mathbf{f}}=\mathbf{f}\circ\mathbf{h}$ (A.57) $$

Because $\mathbf{f},\hat{\mathbf{f}}$ are both $C^{2}$ diffeomorphism between $\mathcal{Z}_{\textnormal{supp}},\mathcal{X}_{\textnormal{supp}}$ and $\hat{\mathcal{Z}}_{\textnormal{supp}},\mathcal{X}_{\textnormal{supp}}$, respectively, we have that $\mathbf{h}$ is a $C^{2}$ diffeomorphism.

Since $\hat{\bm{f}}$ has at most 2^nd order interaction, we have that, for all $\mathbf{z}\in\hat{\mathcal{Z}}_{\textnormal{supp}},\ (j,j^{\prime},j^{\prime
\prime})\in{\mathcal{D}}^{c}\times[d_{z}]$,

$$ $\displaystyle 0={\bm{W}}^{\bm{f}}({\bm{h}}({\bm{z}})){\bm{m}}^{\bm{h}}({\bm{z} },(j,j^{\prime},j^{\prime\prime}))\,.$ (A.58) $$

By defining

$$ $\displaystyle{\bm{W}}^{{\bm{f}},\text{rest}}_{k}({\bm{z}})$ $\displaystyle:=\biggl{[}[D_{i_{1}}\boldsymbol{f}(\boldsymbol{z})]_{i_{1}\in B_ {k}},$ $\displaystyle\qquad[D^{2}_{i_{1},i_{2}}\boldsymbol{f}(\boldsymbol{z})]_{i_{1} \in B_{k},i_{2}\in[d_{z}]}\biggr{]}$ $\displaystyle{\bm{W}}^{{\bm{f}},\text{high}}_{k}({\bm{z}})$ $\displaystyle:=[D^{3}_{i_{1},i_{2},i_{3}}\boldsymbol{f}(\boldsymbol{z})]_{(i_{ 1},i_{2},i_{3})\in B^{3}_{k}}$ $\displaystyle{\bm{m}}^{{\bm{h}},\text{rest}}_{k}({\bm{z}},(j,j^{\prime},j^{ \prime\prime}))$ $\displaystyle:=\biggl{[}[D^{3}_{j,j^{\prime},j^{\prime\prime}}\boldsymbol{h}_{ i_{1}}(\boldsymbol{z})]_{i_{1}\in B_{k}},$ $\displaystyle\qquad[D_{j}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})D^{2}_{j^{ \prime},j^{\prime\prime}}\boldsymbol{h}_{i_{2}}(\boldsymbol{z})+D_{j^{\prime}} \boldsymbol{h}_{i_{2}}(\boldsymbol{z})D^{2}_{j,j^{\prime\prime}}\boldsymbol{h} _{i_{1}}(\boldsymbol{z})+D_{j^{\prime\prime}}\boldsymbol{h}_{i_{2}}( \boldsymbol{z})D^{2}_{j,j^{\prime}}\boldsymbol{h}_{i_{1}}(\boldsymbol{z})]_{i_ {1}\in B_{k},i_{2}\in[d_{z}]}\biggr{]}$ $\displaystyle{\bm{m}}^{{\bm{h}},\text{high}}_{k}({\bm{z}},(j,j^{\prime},j^{ \prime\prime}))$ $\displaystyle:=[D_{j^{\prime\prime}}\boldsymbol{h}_{i_{3}}(\boldsymbol{z})D_{j ^{\prime}}\boldsymbol{h}_{i_{2}}(\boldsymbol{z})D_{j}\boldsymbol{h}_{i_{1}}( \boldsymbol{z})]_{(i_{1},i_{2},i_{3})\in B^{3}_{k}}\,,$ $$

we can restate the sufficiently independent derivative assumption (Def. 4.2) as, for all $\boldsymbol{z}\in\mathcal{Z}$

$$ $\displaystyle\text{rank}\left({\bm{W}}^{\bm{f}}({\bm{z}})\right)=\sum_{k\in[K] }\left[\text{rank}\left({\bm{W}}^{{\bm{f}},\text{rest}}_{k}({\bm{z}})\right)+ \text{rank}\left({\bm{W}}^{{\bm{f}},\text{high}}_{k}({\bm{z}})\right)\right]$ $$

This condition allows us to apply Lemma A.6 to go from (A.58) to, for all $(j,j^{\prime},j^{\prime\prime})\in{\mathcal{D}}^{c}\times[d_{z}]$, $k\in[K]$:

$$ $0={\bm{W}}^{{\bm{f}},\text{high}}_{k}({\bm{h}}({\bm{z}})){\bm{m}}_{k}^{{\bm{h} },\text{high}}({\bm{z}},(j,j^{\prime},j^{\prime\prime}))$ (A.59) $$

Case 1: $|B_{k}|=1$ (One-Dimensional Slots)
By Assumption 3.5.ii (with $A=B=\{i\}$), we have that $D_{i,i,i}^{3}{\bm{f}}({\bm{z}})\not=0$. Note that ${\bm{W}}^{{\bm{f}},\text{high}}_{k}({\bm{h}}({\bm{z}}))=D_{k,k,k}^{3}{\bm{f}}(
{\bm{z}})$. Hence, (A.42) implies that ${\bm{m}}_{k}^{{\bm{h}},\text{high}}({\bm{z}},(j,j^{\prime},j^{\prime\prime}))=0$ (which is a scalar). This means ${\bm{m}}_{k}^{{\bm{h}},\text{high}}({\bm{z}},(j,j^{\prime},j^{\prime\prime}))=
D_{j^{\prime\prime}}\boldsymbol{h}_{k}(\boldsymbol{z})D_{j^{\prime}}
\boldsymbol{h}_{k}(\boldsymbol{z})D_{j}\boldsymbol{h}_{k}(\boldsymbol{z})=0$ for all $(j,j^{\prime},j^{\prime\prime})\in\mathcal{D}^{c}\times[d_{z}]$. In particular, we have

$$ $D_{j^{\prime}}\boldsymbol{h}_{k}(\boldsymbol{z})^{2}D_{j}\boldsymbol{h}_{k}( \boldsymbol{z})=0\,,$ $$

for all $(j,j^{\prime})\in\mathcal{D}^{c}$. Since this is true for all $k$ and all distinct $j,j^{\prime}$, this means each row of $D{\bm{h}}({\bm{z}})$ has at most one nonzero entry. Since $D{\bm{h}}({\bm{z}})$ is invertible, these nonzero entries must appear on different columns, otherwise a column would be filled with zeros. This means $D{\bm{h}}({\bm{z}})$ is a permutation-scaling matrix, i.e. we have local disentanglement (Definition A.13).

Case 2: $|B_{k}|>1$ (Multi-Dimensional Slots)

Assume for a contradiction that $\boldsymbol{\hat{f}}$ does not disentangled $\boldsymbol{z}$ on $\mathcal{Z}_{\textnormal{supp}}$ w.r.t. $\boldsymbol{f}$. This implies that there exist a $\boldsymbol{z}^{*}\in\hat{\mathcal{Z}}_{\textnormal{supp}}$, $k,k^{\prime},k^{\prime\prime}\in[K]$ with $k^{\prime}\not=k^{\prime\prime}$ such that:

$$ $D_{B_{k^{\prime}}}\boldsymbol{h}_{B_{k}}(\boldsymbol{z}^{*})\neq\bf{0},\quad D _{B_{k^{\prime\prime}}}\boldsymbol{h}_{B_{k}}(\boldsymbol{z}^{*})\neq\bf{0}$ (A.60) $$

Because $\boldsymbol{f},\boldsymbol{\hat{f}}$ are $C^{3}$ diffeomorphisms, we know that $\boldsymbol{h}$ is also a $C^{3}$ diffeomorphism. Coupling this with Eq. A.60, Lemma A.7 tells us that there exist an $S\subset[d_{z}]$ with cardinality $|B_{k}|$ such that:

$$ $\forall B\in\mathcal{B},\ S\not\subseteq B,\ \ \text{and}\quad\forall i\in S,D _{i}\boldsymbol{h}_{B_{k}}(\boldsymbol{z}^{*})\ \ \text{are linearly independent.}$ (A.61) $$

Now choose any $\bar{B}\in\mathcal{B}$ such that $S_{1}:=\{S\cap\bar{B}\}\neq\emptyset$. Furthermore, define the set $S_{2}:=S\setminus{S_{1}}$.
Because $S\not\subseteq\bar{B}$, we know that $S_{2}$ is non-empty. Further, by construction $S=S_{1}\cup S_{2}$. In other words, $S_{1}$ and $S_{2}$ are non-empty, form a partition of $S$, and do not contain any indices from the same slot.

Now construct the matrices, denoted $\boldsymbol{A}_{S_{1}}$ and $\boldsymbol{A}_{S_{2}}$ as follows:

$$ $\boldsymbol{A}_{S_{1}}:=D_{S_{1}}\boldsymbol{h}_{B_{k}}(\boldsymbol{z}^{*}), \quad\boldsymbol{A}_{S_{2}}:=D_{S_{2}}\boldsymbol{h}_{B_{k}}(\boldsymbol{z}^{*})$ (A.62) $$

And the matrix denoted $\boldsymbol{A}_{k}$ as:

$$ $\boldsymbol{A}_{k}:=\left[\boldsymbol{A}_{S_{1}},\boldsymbol{A}_{S_{2}}\right]$ (A.63) $$

Note that because, $\forall i\in S$, $D_{i}\boldsymbol{h}_{B_{k}}(\boldsymbol{\hat{z}}^{*})$ are linearly independent (Eq. (A.61)), we know that $\boldsymbol{A}_{k}$ is invertible.
Now, define the following block diagonal matrix $\boldsymbol{A}\in\mathbb{R}^{d_{z}\times d_{z}}$ as follows:

$$ $\boldsymbol{A}:=\begin{bmatrix}\boldsymbol{A}_{1}&0&\dots&0\\ 0&\boldsymbol{A}_{2}&\dots&0\\ \vdots&\vdots&\ddots&\vdots\\ 0&0&\dots&\boldsymbol{A}_{K}\end{bmatrix}$ (A.64) $$

where $\forall i\in[K]\setminus\{k\},\boldsymbol{A}_{i}$ is the identity matrix, and thus invertible, while $\boldsymbol{A}_{k}$ is defined according to Eq. A.63.

Define $\bar{\mathcal{Z}}:={\bm{A}}^{-1}{\mathcal{Z}}$, the function $\bar{\bm{h}}:\bar{\mathcal{Z}}\rightarrow{\mathcal{Z}}$ as $\boldsymbol{\bar{h}}(\boldsymbol{z}):={\boldsymbol{A}}\boldsymbol{z}$ and the function $\bar{\bm{f}}:\bar{\mathcal{Z}}\rightarrow{\mathcal{X}}$ as ${\boldsymbol{\bar{f}}}:=\boldsymbol{f}\circ{\boldsymbol{\bar{h}}}$. By construction we have

$$ $\forall\boldsymbol{z}\in\mathcal{Z},\qquad{\boldsymbol{\bar{f}}}\left( \boldsymbol{A}^{-1}_{1}\boldsymbol{z}_{B_{1}},\dots,\boldsymbol{A}^{-1}_{K} \boldsymbol{z}_{B_{K}}\right)=\boldsymbol{f}(\boldsymbol{z}_{B_{1}},\dots, \boldsymbol{z}_{B_{K}})\,.$ (A.65) $$

Because all $\boldsymbol{A}^{-1}_{i}$ are invertible, then ${\boldsymbol{\bar{f}}}$ is *equivalent* to ${\boldsymbol{{f}}}$ in the sense of Def. (4.1).

We can now apply Lemma A.23 to $\bar{\bm{f}}={\bm{f}}\circ\bar{\bm{h}}$ to obtain, for all $j,j^{\prime},j^{\prime\prime}\in[d_{z}]$:

$$ $\displaystyle D^{3}_{j,j^{\prime},j^{\prime\prime}}\boldsymbol{\bar{f}}({\bm{z }})={\bm{W}}^{\bm{f}}(\bar{\bm{h}}({\bm{z}})){\bm{m}}^{\bar{\bm{h}}}({\bm{z}}, (j,j^{\prime},j^{\prime\prime}))\,.$ (A.66) $$

Choose $\bar{\bm{z}}\in\bar{\mathcal{Z}}$ such that $\bar{\bm{h}}(\bar{\bm{z}})={\bm{h}}({\bm{z}}^{*})$, which is possible because ${\bm{h}}({\bm{z}}^{*})\in{\mathcal{Z}}$ and $\bar{\bm{h}}$ is a bijection from $\bar{\mathcal{Z}}$ to ${\mathcal{Z}}$. We can then write

$$ $\displaystyle D^{3}_{j,j^{\prime},j^{\prime\prime}}\boldsymbol{\bar{f}}(\bar{ \bm{z}})={\bm{W}}^{\bm{f}}({\bm{h}}({\bm{z}}^{*})){\bm{m}}^{\bar{\bm{h}}}(\bar {\bm{z}},(j,j^{\prime},j^{\prime\prime}))\,.$ (A.67) $$

Let $J,J^{\prime}\subseteq B_{k}$ be a partition of $B_{k}$ such that $J$ is the set of columns of ${\bm{A}}$ corresponding to ${\bm{A}}_{S_{1}}$ and $J^{\prime}$ be the set of columns of ${\bm{A}}$ corresponding to ${\bm{A}}_{S_{2}}$. More formally, we have

$$ $\displaystyle{\bm{A}}_{B_{k},J}={\bm{A}}_{S_{1}}\quad\quad\text{and}\quad\quad {\bm{A}}_{B_{k},J^{\prime}}={\bm{A}}_{S_{2}}$ $$

Since ${\bm{A}}_{S_{1}}=D_{S_{1}}{\bm{h}}_{B_{k}}({\bm{z}}^{*})$ and ${\bm{A}}_{S_{2}}=D_{S_{2}}{\bm{h}}_{B_{k}}({\bm{z}}^{*})$, we have that

$$ $\displaystyle{\bm{A}}_{B_{k},J}=D_{S_{1}}{\bm{h}}_{B_{k}}({\bm{z}}^{*})\quad \text{and}\quad{\bm{A}}_{B_{k},J^{\prime}}=D_{S_{2}}{\bm{h}}_{B_{k}}({\bm{z}}^ {*})$ $$

Since $D\bar{\bm{h}}(\bar{\bm{z}})={\bm{A}}$, we have

$$ $\displaystyle D_{J}\bar{\bm{h}}_{B_{k}}(\bar{\bm{z}})=D_{S_{1}}{\bm{h}}_{B_{k} }({\bm{z}}^{*})\quad\text{and}\quad D_{J^{\prime}}\bar{\bm{h}}_{B_{k}}(\bar{ \bm{z}})=D_{S_{2}}{\bm{h}}_{B_{k}}({\bm{z}}^{*})\,.$ $$

For all $(j,j^{\prime},j^{\prime\prime})\in J\times J^{\prime}\times B_{k}$ there must exist $(s,s^{\prime},s^{\prime\prime})\in S_{1}\times S_{2}\times S$ such that

$$ $\displaystyle D_{j}\bar{\bm{h}}_{B_{k}}(\bar{\bm{z}})=D_{s}{\bm{h}}_{B_{k}}({ \bm{z}}^{*}),\quad D_{j^{\prime}}\bar{\bm{h}}_{B_{k}}(\bar{\bm{z}})=D_{s^{ \prime}}{\bm{h}}_{B_{k}}({\bm{z}}^{*}),\ \text{and}\ D_{j^{\prime\prime}}\bar{ \bm{h}}_{B_{k}}(\bar{\bm{z}})=D_{s^{\prime\prime}}{\bm{h}}_{B_{k}}({\bm{z}}^{* })\,.$ $$

This implies that for all $(j,j^{\prime},j^{\prime\prime})\in J\times J^{\prime}\times B_{k}$ there must exist $(s,s^{\prime},s^{\prime\prime})\in S_{1}\times S_{2}\times S$ such that

$$ $\displaystyle{\bm{m}}_{k}^{\bar{\bm{h}},\text{high}}(\bar{\bm{z}},(j,j^{\prime },j^{\prime\prime}))={\bm{m}}_{k}^{{\bm{h}},\text{high}}({\bm{z}}^{*},(s,s^{ \prime},s^{\prime\prime}))\,.$ (A.68) $$

Moreover, since $\bar{\bm{h}}$ is a block-wise function, we have that, for all $(j,j^{\prime},j^{\prime\prime})\in J\times J^{\prime}\times B_{k}\subseteq B_{
k}^{3}$ and all $k^{\prime}\in[K]\setminus\{k\}$, we have ${\bm{m}}^{\bar{\bm{h}}}_{k^{\prime}}(\bar{\bm{z}},(j,j^{\prime},j^{\prime
\prime}))=0$, which allows us to rewrite (A.67) as

$$ $\displaystyle D^{3}_{j,j^{\prime},j^{\prime\prime}}\boldsymbol{\bar{f}}(\bar{ \bm{z}})={\bm{W}}_{k}^{\bm{f}}({\bm{h}}({\bm{z}}^{*})){\bm{m}}_{k}^{\bar{\bm{h }}}(\bar{\bm{z}},(j,j^{\prime},j^{\prime\prime}))\,.$ (A.69) $$

Since $\bar{\bm{h}}$ is linear, we have that ${\bm{m}}_{k}^{\bar{\bm{h}},\text{rest}}(\bar{\bm{z}},(j,j^{\prime},j^{\prime
\prime}))=0$, and thus

$$ $\displaystyle D^{3}_{j,j^{\prime},j^{\prime\prime}}\boldsymbol{\bar{f}}(\bar{ \bm{z}})={\bm{W}}_{k}^{{\bm{f}},\text{high}}({\bm{h}}({\bm{z}}^{*})){\bm{m}}_{ k}^{\bar{\bm{h}},\text{high}}(\bar{\bm{z}},(j,j^{\prime},j^{\prime\prime}))\,.$ (A.70) $$

Plug (A.68) into the above to obtain that for all $(j,j^{\prime},j^{\prime\prime})\in J\times J^{\prime}\times B_{k}$, there exists $(s,s^{\prime},s^{\prime\prime})\in S_{1}\times S_{2}\times S$ such that

$$ $\displaystyle D^{3}_{j,j^{\prime},j^{\prime\prime}}\boldsymbol{\bar{f}}(\bar{ \bm{z}})={\bm{W}}^{{\bm{f}},\text{high}}({\bm{h}}({\bm{z}}^{*})){\bm{m}}_{k}^{ {\bm{h}},\text{high}}({\bm{z}}^{*},(s,s^{\prime},s^{\prime\prime}))=0\,,$ (A.71) $$

where the very last “$=0$” is due to (A.59) (recall $(s,s^{\prime},s^{\prime\prime})\in S_{1}\times S_{2}\times S\subseteq{\mathcal
{D}}^{c}\times[d_{z}]$).

In other words, we found a partition $J,J^{\prime}$ of the block $B_{k}$ and a value $\bar{\bm{z}}$ such that $D^{3}_{j,j^{\prime},j^{\prime\prime}}\boldsymbol{\bar{f}}(\bar{\bm{z}})=0$ for all $(j,j^{\prime},j^{\prime\prime})\in J\times J^{\prime}\times B_{k}$. One can show that $\bar{\bm{f}}$ as no 3rd order interaction across blocks because it is equivalent to ${\bm{f}}$, which also has no 3rd order interactions across blocks. We thus have that $D^{3}_{j,j^{\prime},j^{\prime\prime}}\boldsymbol{\bar{f}}(\bar{\bm{z}})=0$ for all $(j,j^{\prime},j^{\prime\prime})\in J\times J^{\prime}\times[d_{z}]$. This means that the blocks $J$ and $J^{\prime}$ have no third order interaction in $\bar{\bm{f}}$ at $\bar{\bm{z}}$. This is a contradiction with Assm. 3.5.

From local to global disentanglement. The same argument as in the proof of Theorem A.20 applies.

∎

###### Lemma A.23 .

###### Proof.

###### Theorem A.24 .

###### Proof.

### Appendix B Multi-Index Notation

Multi-index notation is a convenient shorthand to denote higher order derivatives. A multi-index
of dimension $d$
is an ordered tuple $\bm{\alpha}=(\alpha_{1},\ldots,\alpha_{d})\in\mathbb{N}^{d}$. We introduce the shorthands

$$ $\displaystyle|\bm{\alpha}|=\sum_{i=1}^{d}\alpha_{i},\quad\bm{\alpha}!=\prod_{i =1}^{d}\alpha_{i}!$ (B.1) $$

and we write $\bm{\alpha}\geq\bm{\beta}$ if $\alpha_{i}\geq\beta_{i}$ for all $i$ and $\bm{\alpha}\pm\bm{\beta}$ denotes the element wise sum (difference) of the entries.
We write

$$ $\displaystyle D^{\bm{\alpha}}=\frac{\partial^{\alpha_{1}}}{\partial z_{1}^{ \alpha_{1}}}\ldots\frac{\partial^{\alpha_{d}}}{\partial z_{d}^{\alpha_{d}}}$ (B.2) $$

and

$$ $\displaystyle\mathbf{z}^{\bm{\alpha}}=\prod_{i=1}^{d}z_{i}^{\alpha_{i}}.$ (B.3) $$

We will need the important property that

$$ $\displaystyle D^{\bm{\alpha}}\mathbf{z}^{\bm{\beta}}=\begin{cases}\frac{\bm{ \beta}!}{(\bm{\beta}-\bm{\alpha})!}\mathbf{z}^{\bm{\beta}-\bm{\alpha}}\quad& \text{if $\bm{\beta}\geq\bm{\alpha}$}\\ 0\quad&\text{otherwise.}\end{cases}$ (B.4) $$

Consider now a partition of $d_{z}$ into slots $B_{1},\ldots,B_{k}$. We define the set of interaction multi-indices of order $n$ for $n\geq 2$ by

$$ $\displaystyle I_{n}=\{\bm{\alpha}\in\mathbb{N}^{d_{z}}:\text{$|\bm{\alpha}|=n$ , $\exists i_{1},i_{2}$ s.\ t.\ $i_{1}\in B_{k_{1}}$, $i_{2}\in B_{k_{2}}$ with $k_{1}\neq k_{2}$ and $\alpha_{i_{1}},\alpha_{i_{2}}>0$}\},$ (B.5) $$

i.e., the set of all multi-indices such that the non-zero components are contained in at least two blocks.
Clearly $I_{n}$ depends on the block partition which we do not reflect in the notation.
We also consider

$$ $\displaystyle I_{\leq n}=\bigcup_{2\leq m\leq n}I_{m}.$ (B.6) $$

Clearly, if $\bm{\alpha}\in I_{|\bm{\alpha}|}$ and $\bm{\beta}$ is any multi-index, then $\bm{\alpha}+\bm{\beta}\in I_{|\bm{\alpha}|+|\bm{\beta}|}$.

### Appendix C Characterization of Functions With At Most n 𝑛 n italic_n th Order Interactions

In this section we characterize functions with interaction of at most $n$^th order by proving Theorem C.2.
Our characterization relies on the
notion of aligned-connectedness introduced in Definition A.16 and the following topological notion.

###### Definition C.1 .

A topological space $X$ is contractible if there is a continuous function $F:X\times[0,1]\to X$
such that $F(x,0)=x$ and $F(x,1)=x_{0}$ for a point $x_{0}\in X$.
We call a subset of $\mathbb{R}^{d}$ contractible if it is contractible as a topological space with respect to the induced subspace topology.

Roughly, contractibility means that we can transform a topological space continuously into a point, which is possible if the space has no holes.
Note that, e.g., all one dimensional connected sets and all convex sets are contractible. Sets that are not contractible are, e.g., spheres and disconnected sets.
Note that the characterization in the following theorem generalizes Proposition 7 in Lachapelle et al. () by allowing higher order interactions and showing the result for more general domains.
We denote, similar to (2.3),
for $\Omega\subset\mathbb{R}^{d_{x}}$ by
$\Omega_{i}=\{\mathbf{z}_{B_{i}}:\mathbf{z}\in\Omega\}$ the projections of $\Omega$ on the blocks.

###### Theorem C.2 (Characterization of functions with at most $n$ th order interactions across slots.) .

Let $\Omega$ be an open connected and aligned-connected set such that
${\Omega}_{k}$ is contractible.
Let $\mathbf{f}(\mathbf{z})=\mathbf{f}(\mathbf{z}_{B_{1}},\mathbf{z}_{B_{2}},...,
\mathbf{z}_{B_{K}})$ be
a $C^{n+1}$ function on $\Omega$
for an integer $n\in\mathbb{Z}_{\geq 1}$.
Then any distinct slots $\mathbf{z}_{B_{i}}$ and $\mathbf{z}_{B_{j}}$ have at most $n$^th order interaction within $\mathbf{f}$ (Defn. 3.4) if and only if, for some constants $\left\{\mathbf{c}_{\bm{\alpha}}\in\mathbb{R}^{d_{x}}\right\}_{\bm{\alpha}\in I
_{\leq n}}$
and some $C^{n+1}$ functions $\mathbf{f}^{k}:\Omega_{k}\to\mathbb{R}^{d_{x}}$ such that for all $\mathbf{z}\in\mathcal{Z}$

$$ $\mathbf{f}(\mathbf{z})=\sum_{k=1}^{K}\mathbf{f}^{k}\left(\mathbf{z}_{B_{k}} \right)+\sum_{\bm{\alpha}\in I_{\leq n}}\mathbf{c}_{\bm{\alpha}}\mathbf{z}^{ \bm{\alpha}}\,.$ (C.1) $$

###### Remark C.3 .

To avoid unnecessary complications we focus on the case where the ground truth $\mathbf{f}$ is defined on $\mathcal{Z}=\mathbb{R}^{d_{z}}$. Then $\Omega=\mathcal{Z}$ clearly satisfies the assumptions and actually the proof is slightly simpler. The more general result here would allows us to handle also $\mathcal{Z}\subsetneq\mathbb{R}^{d_{z}}$ in Appendix D with minor changes.

The proof can be essentially decomposed in two steps: We show how to reduce from interaction of at most order $n$ to interaction of at most order
$n-1$ and then we establish the induction base for $n=2$.

###### Lemma C.4 .

Suppose $\mathbf{f}:\Omega\to\mathbb{R}^{d_{x}}$ is a $C^{n+1}$ function and $\Omega$ open and connected.
Assume that $\mathbf{f}$
has interaction of at most order $n$
between any two different slots for some $n\geq 2$. Let $\mathbf{z}_{0}\in\Omega$ be any point.
Then the function

$$ $\displaystyle\mathbf{f}(\mathbf{z})-\sum_{\bm{\alpha}\in I_{n}}\frac{D^{\bm{ \alpha}}\mathbf{f}(\mathbf{z}_{0})}{\bm{\alpha}!}\mathbf{z}^{\bm{\alpha}}$ (C.2) $$

has interaction of order at most $n-1$.

###### Proof.

First we observe that $\mathbf{f}$ having interaction at most $n$ implies that
$D^{\bm{\alpha}}\mathbf{f}$ is constant in $\Omega$
for $\bm{\alpha}\in I_{n}$.
Indeed, since $\bm{\alpha}\in I_{n}$
we conclude $\bm{\alpha}+e_{i}\in I_{n+1}$
where $e_{i}$ denotes the tuple with $i$-th entry $1$ and all other entries 0.
Then, by definition of having interaction at most in $n$ in Definition 3.4,
we conclude that

$$ $\displaystyle\partial_{i}D^{\bm{\alpha}}\mathbf{f}(\mathbf{z})=D^{\bm{\alpha}+ e_{i}}\mathbf{f}(\mathbf{z})=0.$ (C.3) $$

This implies that the total derivative of $D^{\bm{\alpha}}\mathbf{f}$ vanishes on $\Omega$, which implies that $D^{\bm{\alpha}}\mathbf{f}$ is constant
because $\Omega$ is connected.
Consider now any $\bm{\beta}\in I_{n}$. Then we find
using (B.4)

$$ $\displaystyle D^{\bm{\beta}}\left(\mathbf{f}(\mathbf{z})-\sum_{\bm{\alpha}\in I _{n}}\frac{D^{\bm{\alpha}}\mathbf{f}(\mathbf{z}_{0})}{\bm{\alpha}!}\mathbf{z}^ {\bm{\alpha}}\right)=D^{\bm{\beta}}\mathbf{f}(\mathbf{z})-\frac{D^{\bm{\beta}} \mathbf{f}(\mathbf{z}_{0})}{\bm{\beta}!}\bm{\beta}!=0$ (C.4) $$

where we used that $D^{\bm{\beta}}\mathbf{f}$ is constant
and $D^{\bm{\beta}}\mathbf{z}^{\bm{\alpha}}=0$ for $\bm{\alpha}\neq\bm{\beta}$ if $|\bm{\alpha}|=|\bm{\beta}|$.
This ends the proof.
∎

We now establish the functional form for interaction of at most order 1.
This is essentially a similar statement as in Proposition 7 in Lachapelle et al. () except that we consider more general domains so that their proof does not apply.

###### Lemma C.5 .

Assume $\Omega$ is an open connected and aligned-connected set such that
$\Omega_{k}$ is contractible. If $\mathbf{f}$ is a function such that different slots have interaction at most of order 1 then
there are functions $\mathbf{f}^{k}$ such that

$$ $\displaystyle\mathbf{f}(\mathbf{z})=\sum_{k=1}^{K}\mathbf{f}^{k}(\mathbf{z}_{B _{k}}).$ (C.5) $$

###### Proof.

Fix a $1\leq k\leq K$.
With slight abuse of notation we write
$\mathbf{z}=(\mathbf{z}_{B_{k}},\mathbf{z}_{B_{k}^{c}})$.
Fix now some value $\mathbf{z}_{B_{k}}$.
We claim that for all $\mathbf{z}_{B_{k}^{c}},\mathbf{z}_{B_{k}^{c}}^{\prime}$ such that
$(\mathbf{z}_{B_{k}},\mathbf{z}_{B_{k}^{c}}),(\mathbf{z}_{B_{k}},\mathbf{z}^{
\prime}_{B_{k}^{c}})\in\Omega$

$$ $\displaystyle D_{\mathbf{z}_{B_{k}}}\mathbf{f}((\mathbf{z}_{B_{k}},\mathbf{z}_ {B_{k}^{c}}))=D_{\mathbf{z}_{B_{k}}}\mathbf{f}((\mathbf{z}_{B_{k}},\mathbf{z}^ {\prime}_{B_{k}^{c}})).$ (C.6) $$

By assumption we indeed know that

$$ $\displaystyle D_{\mathbf{z}_{B_{k}^{c}}}D_{\mathbf{z}_{B_{k}}}\mathbf{f}(( \mathbf{z}_{B_{k}},\mathbf{z}_{B_{k}^{c}}))=0.$ (C.7) $$

Moreover, by aligned-connectedness we know that the set $\Omega_{z_{B_{k}}}=\{z_{B_{k}^{c}}:(\mathbf{z}_{B_{k}},\mathbf{z}_{B_{k}^{c}})
\in\Omega\}$ is connected so we conclude that the function

$$ $\displaystyle\Omega_{z_{B_{k}^{c}}}\to\mathbb{R}^{|B_{k}|\times d_{x}},\quad \mathbf{z}_{B_{k}^{c}}\to D_{\mathbf{z}_{B_{k}}}\mathbf{f}((\mathbf{z}_{B_{k}} ,\mathbf{z}_{B_{k}^{c}}))$ (C.8) $$

is indeed constant.
This implies that there is a function $\mathbf{g}^{k}$
depending on $\mathbf{z}_{B_{k}}$
such that

$$ $\displaystyle\mathbf{g}^{k}(\mathbf{z}_{B_{k}})=D_{\mathbf{z}_{B_{k}}}\mathbf{ f}((\mathbf{z}_{B_{k}},\mathbf{z}_{B_{k}^{c}}))$ (C.9) $$

for all $\mathbf{z}=(\mathbf{z}_{B_{k}},\mathbf{z}_{B_{k}^{c}})\in\Omega$.
Locally $\mathbf{g}^{k}$ is the gradient of a function, but by assumption $\Omega_{k}$
is contractible and therefore, by the Poincaré-Lemma, there is a function $\mathbf{f}^{k}$ such that $D\mathbf{f}^{k}=\mathbf{g}^{k}$. Then we find

$$ $\displaystyle D_{\mathbf{z}_{B_{k}}}\mathbf{f}((\mathbf{z}_{B_{k}},\mathbf{z}_ {B_{k}^{c}}))=\mathbf{g}(\mathbf{z}_{B_{k}})=D_{\mathbf{z}_{B_{k}}}\mathbf{f}^ {k}(\mathbf{z}_{B_{k}})=D_{\mathbf{z}_{B_{k}}}\left(\sum_{k^{\prime}=1}^{K} \mathbf{f}^{k^{\prime}}(\mathbf{z}_{B_{k^{\prime}}})\right).$ (C.10) $$

Thus the difference $\mathbf{f}-\sum_{k=1}^{K}\mathbf{f}^{k}$
has vanishing derivative on $\Omega$ and since $\Omega$ is connected we conclude that it is constant. This implies (C.5) after shifting one $\mathbf{f}^{k}$ by this constant.
∎

Based on these two lemmas the proof of Theorem C.2
is straightforward.

###### Proof of Theorem C.2 .

In the first step we show that if the at most $n$-th order interaction condition holds then $\mathbf{f}$
can be written as in (C.1), i.e., ’$\Rightarrow$’.
Applying inductively Lemma C.4
we conclude that there are constants $\mathbf{c}_{\bm{\alpha}}\in\mathbb{R}^{d_{x}}$ such that

$$ $\displaystyle\mathbf{f}(\mathbf{z})-\sum_{m=2}^{n}\sum_{\bm{\alpha}\in I_{m}} \mathbf{c}_{\bm{\alpha}}\mathbf{z}^{\bm{\alpha}}$ (C.11) $$

has interaction of order at most $1$.
Thus, we can apply Lemma C.5 which implies
that a representation as in
(C.1) exists on $\Omega$.
For the reverse direction ’$\Leftarrow$’ we observe that clearly the functional form implies for $\bm{\beta}\in I_{n+1}$ the relation

$$ $\displaystyle D^{\bm{\beta}}\mathbf{f}=0.$ (C.12) $$

∎

Let us show through examples that the topological conditions on the set $\Omega$ are neccessary. The following examples shows that the condition that $\Omega_{k}$
is contractible cannot be dropped.

###### Example C.6 .

For every $\mathbf{z}\in\mathbb{R}^{2}\setminus\{0\}$
we denote by $\theta(\mathbf{z})\in[0,2\pi)$ the argument (i.e., the angle to the positive $x$-axis in radian)
and by $r(\mathbf{z})=|\mathbf{z}|$ the radius of $\mathbf{z}$.
We consider $\Omega\subset\mathbb{R}^{4}$ and $B_{1}=\{1,2\}$,
$B_{2}=\{3,4\}$
given by

$$ $\displaystyle\Omega=\{\mathbf{z}:\,r(\mathbf{z}_{B_{1}}),r(\mathbf{z}_{B_{2}}) \in(1,2),\,\left(\theta(\mathbf{z}_{B_{1}})-\theta(\mathbf{z}_{B_{2}})\mod{2 \pi}\right)\in(0,\pi)\}$ (C.13) $$

and the function

$$ $\displaystyle\mathbf{f}:\Omega\to\mathbb{R},\quad\mathbf{f}(\mathbf{z})=\theta (\mathbf{z}_{B_{1}})-\theta(\mathbf{z}_{B_{2}})\mod{2\pi}.$ (C.14) $$

Then $\Omega$ is aligned-connected because the sets in questions are annular sectors and in particular path connected. Moreover, $\mathbf{f}$ is smooth because
$\theta(\mathbf{z}_{B_{1}})-\theta(\mathbf{z}_{B_{2}})\mod{2\pi}\in(0,\pi)$ so it does not jump
and $D_{z_{B_{1}}}D_{z_{B_{2}}}\mathbf{f}=0$ because it is locally additive. However it is not globally additive as in (C.1).

The necessity of the aligned conncetedness condition can be shown by an example that is similar to Example 7 in Lachapelle et al. ().

###### Example C.7 .

Consider $\Omega=([-1,0]\times[-2,2])\cup([0,1]\times[1,2])\cup([0,1]\times[-2,-1])$
and $\mathbf{f}:\Omega\to\mathbb{R}$ given by

$$ $\displaystyle\mathbf{f}(\mathbf{z})=\begin{cases}z_{1}^{3}\quad&\text{if $z_{1 },z_{2}>0$}\\ 0\quad&\text{otherwise}.\end{cases}$ (C.15) $$

Then $\mathbf{f}$ is $C^{2}$, $\mathbf{f}$ has interaction of order at most 1 but $\mathbf{f}$ cannot be written as in (C.1).
Note that $\Omega$ is not aligned-connected because
$\{z_{2}:(1/2,z_{2})\in\Omega\}=[-2,-1]\cup[1,2]$
is not connected.

###### Definition C.1 .

###### Theorem C.2 (Characterization of functions with at most n 𝑛 n italic_n th order interactions across slots.) .

###### Remark C.3 .

###### Lemma C.4 .

###### Proof.

###### Lemma C.5 .

###### Proof.

###### Proof of Theorem C.2 .

###### Example C.6 .

###### Example C.7 .

### Appendix D Compositional Generalization Proofs

In this appendix we prove extrapolation result Theorem 4.4.
Based on the functional form derived in
Theorem C.2
we relate two different disentangled representations.

###### Lemma D.1 .

Let $\boldsymbol{f}:\mathcal{Z}\to\mathbb{R}^{d_{x}}$ be a $C^{3}$ diffeomorphism of the form:

$$ $\mathbf{f}(\mathbf{z})=\sum_{k=1}^{K}\mathbf{f}^{k}\left(\mathbf{z}_{B_{k}} \right)+\sum_{\bm{\alpha}\in I_{2}}\mathbf{c}_{\bm{\alpha}}\mathbf{z}^{\bm{ \alpha}}$ (D.1) $$

for some $\mathbf{f}^{i}$ in $C^{3}$.
Let $\boldsymbol{\hat{f}}:{\mathcal{Z}}\to\mathbb{R}^{d_{x}}$ be a diffeomorphism of the same functional form. Let $\boldsymbol{h}:\mathcal{Z}_{\textnormal{supp}}\to{\mathcal{Z}}$
be such that $\mathbf{f}=\hat{\mathbf{f}}\circ\boldsymbol{h}$ on $\mathcal{Z}_{\textnormal{supp}}$. If $\boldsymbol{h}$ is a slot-wise function, i.e. for all $k\in[K],\boldsymbol{h}_{k}(\boldsymbol{z})=\boldsymbol{h}_{k}(\boldsymbol{z}_{
B_{k}})$ and $\mathcal{Z}_{\textnormal{supp}}$ is regularly closed
then for all $\boldsymbol{z}\in\mathcal{Z}_{\textnormal{supp}}$

$$ $\sum_{k=1}^{K}\boldsymbol{f}^{k}(\boldsymbol{z}_{B_{k}})=\sum_{k=1}^{K} \boldsymbol{\hat{f}}^{\pi(k)}(\boldsymbol{h}_{k}(\boldsymbol{z}_{B_{k}}))+L( \mathbf{z})$ (D.2) $$

for some affine function $L:\mathbb{R}^{d_{z}}\to\mathbb{R}^{d_{x}}$.

###### Remark D.2 .

We note that it is not possible to remove the affine function $L$ from the statement.
Indeed if all slots have dimension $1$ and $h_{1}(z_{1})=z_{1}+1$,
$h_{2}(z_{2})=z_{2}+1$ then $h_{1}(z_{1})h_{2}(z_{2})-z_{1}z_{2}=z_{1}+z_{2}+1$
is an additive function.
Moreover, we cannot in general prove that $\mathbf{h}$ itself is slotwise affine because
the coefficients $\mathbf{c}$ can be zero.
In this case $\mathbf{h}$ can be any slot-wise diffeomorphism.

###### Proof.

First we remark that the polynomial part of the functional form in (D.1) contains all terms $z_{i}z_{j}$ where $i,j$ are in different slots, thus it can be equivalently written as

$$ $\displaystyle\sum_{\bm{\alpha}\in I_{2}}\mathbf{c}_{\bm{\alpha}}\mathbf{z}^{ \bm{\alpha}}=\sum_{k=1}^{K}\sum_{k^{\prime}=k+1}^{K}\left(\mathbf{z}_{B_{k}} \otimes\mathbf{z}_{B_{k^{\prime}}}\right)\mathbf{A}_{kk^{\prime}}$ (D.3) $$

for some constant matrices $\{\mathbf{A}_{kk^{\prime}}\in\mathbb{R}^{(|B_{k}|\cdot|B_{k^{\prime}}|)\times N
}\}_{k<k^{\prime}\in[K]}$, where $\otimes$ denotes the Kronecker product (e.g., $[z_{1},z_{2}]\otimes[z_{3},z_{4}]=[z_{1}z_{3},z_{1}z_{4},z_{2}z_{3},z_{2}z_{4}]$).

We assume that the permutation $\pi$ is the identity.
We know that $\boldsymbol{f},\boldsymbol{\hat{f}}$ are diffeomorphisms between the same spaces and can thus be related by the function $\boldsymbol{h}$ via:

$$ ${\boldsymbol{f}}=\boldsymbol{\hat{f}}\circ{\boldsymbol{h}}$ (D.4) $$

Inserting the functional forms for $\boldsymbol{f},\boldsymbol{\hat{f}}$ and leveraging that $\boldsymbol{h}$ is a slot-wise function and $\pi$ is the identity, we have for all $\boldsymbol{z}\in\mathcal{Z}$

$$ $\displaystyle\begin{split}\sum_{k=1}^{K}\mathbf{f}^{k}\left(\mathbf{z}_{B_{k}} \right)+\sum_{k=1}^{K}\sum_{k^{\prime}=k+1}^{K}&\left(\mathbf{z}_{B_{k}} \otimes\mathbf{z}_{B_{k^{\prime}}}\right)\mathbf{A}_{kk^{\prime}}\\ &=\sum_{k=1}^{K}\hat{\mathbf{f}}^{k}\left(\mathbf{h}_{B_{k}}(\mathbf{z}_{B_{k} })\right)+\sum_{k=1}^{K}\sum_{k^{\prime}=k+1}^{K}\left(\mathbf{h}^{k}(\mathbf{ z}_{B_{k}})\otimes\mathbf{h}^{k^{\prime}}(\mathbf{z}_{B_{k^{\prime}}})\right) \hat{\mathbf{A}}_{kk^{\prime}}.\end{split}$ (D.5) $$

To prove the claim we now consider the expression

$$ $\displaystyle\begin{split}L(\mathbf{z})&=\sum_{k=1}^{K}\mathbf{f}^{k}\left( \mathbf{z}_{B_{k}}\right)-\sum_{k=1}^{K}\hat{\mathbf{f}}^{k}\left(h_{B_{k}}( \mathbf{z}_{B_{k}})\right)\\ &=\sum_{i=k}^{K}\sum_{k^{\prime}=k+1}^{K}\left(\mathbf{h}^{k}(\mathbf{z}_{B_{k }})\otimes\mathbf{h}^{k^{\prime}}(\mathbf{z}_{B_{k^{\prime}}})\right)\hat{ \mathbf{A}}_{kk^{\prime}}-\sum_{k=1}^{K}\sum_{k^{\prime}=k+1}^{K}\left(\mathbf {z}_{B_{k}}\otimes\mathbf{z}_{B_{k^{\prime}}}\right)\mathbf{A}_{kk^{\prime}} \end{split}$ (D.6) $$

and prove that $L(\mathbf{z})$ is an affine function. To show this it is sufficient to prove
that the second derivative $D^{2}L$ vanishes because $\mathcal{Z}_{\textnormal{supp}}$ is path-connected.
Thus we consider all partial derivatives. Consider first the case where $i\in B_{k}$ and $i^{\prime}\in B_{k^{\prime}}$ for $k<k^{\prime}$.
Then we find that

$$ $\displaystyle D_{i}D_{i^{\prime}}L(\mathbf{z})=D_{i}D_{i^{\prime}}\left(\sum_{ k=1}^{K}\mathbf{f}^{k}\left(\mathbf{z}_{B_{k}}\right)-\sum_{k=1}^{K}\hat{ \mathbf{f}}^{k}\left(\mathbf{h}_{B_{k}}(\mathbf{z}_{B_{k}})\right)\right)=0.$ (D.7) $$

It remains to consider derivatives of the form $D_{i}D_{i^{\prime}}$ where $i,i^{\prime}\in B_{k}$ for some slot $i$.
Then we clearly have

$$ $\displaystyle D_{i}D_{i^{\prime}}\sum_{k=1}^{K}\sum_{k^{\prime}=k+1}^{K}\left( \mathbf{z}_{B_{k}}\otimes\mathbf{z}_{B_{k^{\prime}}}\right)\mathbf{A}_{kk^{ \prime}}=0$ (D.8) $$

because this is a linear expression in $z_{B_{k}}$.
Next, we want to show that

$$ $\displaystyle D_{i}D_{i^{\prime}}\left(\mathbf{h}^{k}(\mathbf{z}_{B_{k}}) \otimes\mathbf{h}^{{k^{\prime}}}(\mathbf{z}_{B_{k^{\prime}}})\right)\hat{ \mathbf{A}}_{kk^{\prime}}=0$ (D.9) $$

for all $k<k$.
To prove this we show the more general statement
(that will be used in the proof of Theorem 4.4 below)
that for any $k\neq k^{\prime}$ and any vector $v\in\mathbb{R}^{B_{k^{\prime}}}$ the functions

$$ $\displaystyle\mathbf{z}_{B_{k}}\to(\mathbf{h}^{k}(\mathbf{z}_{B_{k}})\otimes v )\hat{\mathbf{A}}_{kk^{\prime}}$ (D.10) $$

are affine on $\mathcal{Z}_{k}$ or equivalently that

$$ $\displaystyle D_{i}D_{i^{\prime}}\left(\mathbf{h}^{k}(\mathbf{z}_{B_{k}}) \otimes v)\right)\hat{\mathbf{A}}_{kk^{\prime}}=0$ (D.11) $$

for every $v\in\mathbb{R}^{B_{k^{\prime}}}$.
To prove this we consider any $j\in B_{k^{\prime}}$ and apply the derivative $D_{i}D_{i^{\prime}}D_{j}$ to
(D.5) to get

$$ $\displaystyle 0=\left(D_{i}D_{i^{\prime}}\mathbf{h}^{k}(\mathbf{z}_{B_{k}}) \otimes D_{j}\mathbf{h}^{k^{\prime}}(\mathbf{z}_{B_{k^{\prime}}})\right)\hat{ \mathbf{A}}_{kk^{\prime}}$ (D.12) $$

for every $\mathbf{z}\in\mathring{\mathcal{Z}}_{\mathrm{supp}}$.
Now we use that by assumption $\mathbf{h}$ is a diffeomorphism. Using the
block structure of $\mathbf{h}$ we find that also $\mathbf{h}^{k}$ are diffeomorphisms.
In particular, this implies that for any $\mathbf{z}\in\mathring{\mathcal{Z}}_{\mathrm{supp}}$
the vectors $(D_{j}\mathbf{h}^{k^{\prime}}(\mathbf{z}_{B_{k^{\prime}}}))_{j\in B_{k^{\prime
}}}$ are linearly independent vectors in $\mathbb{R}^{|B_{k^{\prime}}|}$ and they thus
generate $\mathbb{R}^{|B_{k^{\prime}}|}$.
Therefore we can find coefficients $\alpha_{j}$ (depending on $\mathbf{z}_{B_{k^{\prime}}}$) such that

$$ $\displaystyle\sum_{j\in B_{k^{\prime}}}\alpha_{j}D_{j}\mathbf{h}^{k^{\prime}}( \mathbf{z}_{B_{k^{\prime}}})=v$ (D.13) $$

Then we get using (D.12)

$$ $\displaystyle\begin{split}D_{i}D_{i^{\prime}}\left(\mathbf{h}^{k}(\mathbf{z}_{ B_{k}})\otimes v)\right)\hat{\mathbf{A}}_{kk^{\prime}}&=D_{i}D_{i^{\prime}} \left(\mathbf{h}^{k}(\mathbf{z}_{B_{k}})\otimes\left(\sum_{j\in B_{k^{\prime}} }\alpha_{j}D_{j}\mathbf{h}^{k^{\prime}}(\mathbf{z}_{B_{k^{\prime}}})\right) \right)\hat{\mathbf{A}}_{kk^{\prime}}\\ &=\sum_{j\in B_{k^{\prime}}}\alpha_{j}\left(D_{i}D_{i^{\prime}}\mathbf{h}^{k}( \mathbf{z}_{B_{k}})\otimes D_{j}\mathbf{h}^{k^{\prime}}(\mathbf{z}_{B_{k^{ \prime}}})\right)\hat{\mathbf{A}}_{kk^{\prime}}=0.\end{split}$ (D.14) $$

So (D.10) holds and thus also (D.9) (we actually only get this for points $z_{k}\in\mathcal{Z}_{k}$ such that there is $\mathbf{z}\in\mathring{\mathcal{Z}}_{\mathrm{supp}}$ with $z_{k}=\mathbf{z}_{B_{k}}$ but by continuity and since $\mathcal{Z}_{\textnormal{supp}}$ is regularly closed this actually holds on $\mathcal{Z}_{k}$). The same reasoning shows that this is also true if
$i,i^{\prime}\in B_{k^{\prime}}$ (instead of $i,i^{\prime}\in B_{k}$). We then find that for $i,i^{\prime}\in B_{k}$

$$ $\displaystyle\begin{split}D_{i}D_{i^{\prime}}\sum_{k=1}^{K}\sum_{k^{\prime}=k+ 1}^{K}&\left(\mathbf{h}^{k}(\mathbf{z}_{B_{k}})\otimes\mathbf{h}^{k^{\prime}}( \mathbf{z}_{B_{k^{\prime}}})\right)\hat{\mathbf{A}}_{kk^{\prime}}=\\ &=\sum_{k=1}^{K}\sum_{k^{\prime}=k+1}^{K}D_{i}D_{i^{\prime}}\left(\mathbf{h}^{ k}(\mathbf{z}_{B_{k}})\otimes\mathbf{h}^{k^{\prime}}(\mathbf{z}_{B_{k^{\prime} }})\right)\hat{\mathbf{A}}_{kk^{\prime}}=0.\end{split}$ (D.15) $$

The last display together with (D.8) and (D.7)
imply that $D^{2}L=0$ and thus $L$ is affine. When $\pi$ is not the identity the proof is similar.
∎

We also need the following simple lemma which states that we have unique Cartesian-product extension of functions with interaction of order at most $n$ between different slots.

###### Lemma D.3 .

Let $\boldsymbol{f}:\mathcal{Z}\to\mathbb{R}^{d_{x}}$ be a $C^{3}$ diffeomorphism with interaction at most $n$
between different slots such that $\mathcal{Z}_{\textnormal{supp}}$ is regularly closed and for $\mathbf{z}\in\mathcal{Z}_{\textnormal{supp}}$

$$ $\mathbf{f}(\mathbf{z})=\sum_{k=1}^{K}\mathbf{f}^{k}\left(\mathbf{z}_{B_{k}} \right)+\sum_{2\leq m\leq n}\sum_{\bm{\alpha}\in I_{m}}\mathbf{c}_{\bm{\alpha} }\mathbf{z}^{\bm{\alpha}}$ (D.16) $$

for some $\mathbf{f}^{i}$ in $C^{3}$.
Then this relation holds on $\mathcal{Z}_{\mathrm{CPE}}$.

###### Proof.

We know by Theorem C.2
that a representation as in (D.16) holds on $\mathcal{Z}=\mathbb{R}^{d_{z}}$ and thus can be restricted to
$\mathcal{Z}_{\mathrm{CPE}}$, however it might not be the same representation but involve functions $\tilde{\mathbf{f}}^{k}$ and constants $\tilde{\mathbf{c}}_{\bm{\alpha}}$.
Taking the difference and setting $\bar{\mathbf{f}}^{k}=\mathbf{f}^{k}-\tilde{\mathbf{f}}^{k}$ and $\bar{\mathbf{c}}_{\bm{\alpha}}=\mathbf{c}_{\bm{\alpha}}-\tilde{\mathbf{c}}_{
\bm{\alpha}}$
we find that on
$\mathcal{Z}_{\textnormal{supp}}$

$$ $\displaystyle 0=\sum_{k=1}^{K}\bar{\mathbf{f}}^{k}\left(\mathbf{z}_{B_{k}} \right)+\sum_{2\leq m\leq n}\sum_{\bm{\alpha}\in I_{m}}\bar{\mathbf{c}}_{\bm{ \alpha}}\mathbf{z}^{\bm{\alpha}}.$ (D.17) $$

But by applying $D^{\bm{\alpha}}$ for $\bm{\alpha}\in I_{m}$
for $m=n$ down to $m=2$
we find $\bar{\mathbf{c}}_{\bm{\alpha}}=0$ for all $\bm{\alpha}\in I_{\leq n}$ and thus the polynomial term vanishes. Next, we
apply $D$ and find that $\bar{\mathbf{f}}^{k}$ is constant on $\mathcal{Z}_{k}$ (because $\mathcal{Z}_{\textnormal{supp}}$ is regularly closed).
This implies that (D.17) holds in
$\mathcal{Z}_{\mathrm{CPE}}$ and thus (D.16)
holds on $\mathcal{Z}_{\mathrm{CPE}}$.
∎

Using the previous lemmas we can prove Theorem 4.4.
See 4.4

###### Proof of Theorem 4.4 .

Note that Corollary 3 in Lachapelle et al. () already handles the case $n=0,1$ but the proof below is more general, and also covers the case of $n=0,1$, since functions with at most 0^th and 1^st order interactions are special cases of functions with at most 2^nd order interactions assuming $\mathbf{f}$ is a $C^{3}$ diffeomorphism.

We can apply Theorem C.2 to $\mathbf{f}$ which implies that
$\mathbf{f}$ can be written on $\mathcal{Z}=\mathbb{R}^{d_{z}}$ as in (C.1) and as explained in Lemma D.1
an equivalent representation is

$$ $\displaystyle\mathbf{f}(\mathbf{z})=\sum_{k=1}^{K}\mathbf{f}^{k}\left(\mathbf{ z}_{B_{k}}\right)+\sum_{k=1}^{K}\sum_{k^{\prime}=k+1}^{K}\left(\mathbf{z}_{B_{ k}}\otimes\mathbf{z}_{B_{k^{\prime}}}\right)\mathbf{A}_{kk^{\prime}}.$ (D.18) $$

and we have similarly

$$ $\displaystyle\hat{\mathbf{f}}(\mathbf{z})=\sum_{k=1}^{K}\hat{\mathbf{f}}^{k} \left(\mathbf{z}_{B_{k}}\right)+\sum_{k=1}^{K}\sum_{k^{\prime}=k+1}^{K}\left( \mathbf{z}_{B_{k}}\otimes\mathbf{z}_{B_{k^{\prime}}}\right)\hat{\mathbf{A}}_{ kk^{\prime}}.$ (D.19) $$

By assumption we have
$\mathbf{f}=\hat{\mathbf{f}}\circ\mathbf{h}$ on $\mathcal{Z}_{\textnormal{supp}}$ where ${\bm{h}}({\bm{z}}):=\left(\mathbf{h}_{1}\left(\mathbf{z}_{B_{\pi(1)}}\right),
\dots,\mathbf{h}_{K}\left(\mathbf{z}_{B_{\pi(K)}}\right)\right)$ and the functions ${\bm{h}}_{k}:{\mathbb{R}}^{|B_{\pi(k)}|}\rightarrow{\mathbb{R}}^{|B_{k}|}$ are diffeomorphisms.
Our goal is to show that this relation actually holds on the Cartesian-product extensions $\mathcal{Z}_{\mathrm{CPE}}$.
Let $\mathcal{U}$ be the set of points such that
$\mathbf{f}(z)=\hat{\mathbf{f}}\circ\mathbf{h}(z)$ for $z\in\mathcal{U}$.
We claim that if $\mathbf{z}=(\mathbf{z}_{B_{1}},\ldots,\mathbf{z}_{B_{K}})\in\mathring{\mathcal
{U}}$ then
$\mathbf{z}^{\prime}=(\mathbf{z}_{B_{1}},\ldots,\mathbf{z}_{B_{l}}^{\prime},
\ldots,\mathbf{z}_{B_{K}})\in\mathcal{U}$ for any $\mathbf{z}_{B_{l}}^{\prime}\in\mathcal{Z}_{l}$.
Let us define the map $e^{\mathbf{z}}:\mathcal{Z}_{l}\to\mathcal{Z}$
given by $e^{\mathbf{z}}(\mathbf{z}^{\prime}_{B_{l}})=\mathbf{z}^{\prime}$.
We know by Lemma D.1 that
the function

$$ $\displaystyle\mathbf{z}\to\sum_{k=1}^{K}\boldsymbol{f}^{k}(\mathbf{z}_{B_{k}}) -\sum_{k=1}^{K}\boldsymbol{\hat{f}}^{\pi(k)}(\boldsymbol{h}_{k}(\mathbf{z})_{B _{k}}))=L(\mathbf{z})$ (D.20) $$

is affine on $\mathcal{Z}_{\textnormal{supp}}$. Applying Lemma D.3 the same holds on $\mathcal{Z}_{\mathrm{CPE}}$. Thus we conclude that

$$ $\displaystyle\mathbf{z}_{B_{l}}^{\prime}\to\sum_{k=1}^{K}\boldsymbol{f}^{k}(e^ {\mathbf{z}}(\mathbf{z}^{\prime}_{B_{l}})_{B_{k}})-\sum_{k=1}^{K}\boldsymbol{ \hat{f}}^{\pi(k)}(\boldsymbol{h}_{k}(e^{\mathbf{z}}(\mathbf{z}^{\prime}_{B_{l} })_{B_{k}}))=L(e^{\mathbf{z}}(\mathbf{z}^{\prime}_{B_{i}}))$ (D.21) $$

is affine on $\mathcal{Z}_{l}$. Moreover,

$$ $\displaystyle\mathbf{z}_{B_{l}}^{\prime}\to\sum_{k=1}^{K}\sum_{k^{\prime}=k+1} ^{K}$ $\displaystyle\left(e^{\mathbf{z}}(\mathbf{z}^{\prime}_{B_{l}})_{B_{k}}\otimes e ^{\mathbf{z}}(\mathbf{z}^{\prime}_{B_{l}})_{B_{k^{\prime}}}\right)\mathbf{A}_{ kk^{\prime}}$ (D.22) $$

is clearly affine on $\mathcal{Z}_{l}$ and by (D.10)
the same holds for

$$ $\displaystyle\mathbf{z}_{B_{l}}^{\prime}\to\sum_{k=1}^{K}\sum_{k^{\prime}=k+1} ^{K}\left(\mathbf{h}^{k}(e^{\mathbf{z}}(\mathbf{z}^{\prime}_{B_{l}})_{B_{k}}) \otimes\mathbf{h}^{k^{\prime}}(e^{\mathbf{z}}(\mathbf{z}^{\prime}_{B_{l}})_{B_ {k^{\prime}}})\right)\mathbf{A}_{kk^{\prime}}.$ (D.23) $$

The last three displays together imply that

$$ $\displaystyle\mathbf{z}_{B_{l}}^{\prime}\to\mathbf{f}(e^{\mathbf{z}}(\mathbf{z }^{\prime}_{B_{l}}))-\hat{\mathbf{f}}\circ\mathbf{h}(e^{\mathbf{z}}(\mathbf{z} ^{\prime}_{B_{l}}))$ (D.24) $$

is affine on $\mathcal{Z}_{l}$ and since it is zero in a neighbourhood of $\mathbf{z}_{B_{l}}^{\prime}=\mathbf{z}_{B_{l}}$ (because $\mathbf{z}\in\mathring{\mathcal{U}}$) it is equal to zero on $\mathcal{Z}_{l}$.
Since this is true for any slot $B_{l}$ we can now conclude that $\mathcal{U}=\mathcal{Z}$. Indeed,
pick any open rectangle $\mathcal{Z}_{1}^{\prime}\times\mathcal{Z}_{2}^{\prime}\times\ldots\times
\mathcal{Z}^{\prime}_{K}\subset\mathcal{Z}_{\textnormal{supp}}\subset\mathcal{U}$.
We then infer that $\mathring{\mathcal{Z}_{1}}\times\mathcal{Z}_{2}^{\prime}\times\ldots\times
\mathcal{Z}_{K}^{\prime}\subset\mathcal{U}$
and by inducting over the slots and applying continuity at the boundary we obtain the claim.
∎

###### Lemma D.1 .

###### Remark D.2 .

###### Proof.

###### Lemma D.3 .

###### Proof.

###### Proof of Theorem 4.4 .

### Appendix E Unifying Assumptions from Prior Work

#### E.1 At Most 0 0 th Order Interaction Across Slots

To prove that the assumptions in Brady et al. () are a special case of our assumptions for $n=0$, we first restate their assumptions formally. To this end, we first define the following set:

$$ $\forall S\subseteq[d_{z}]\quad I_{S}(\mathbf{z}):=\left\{\,l\in[d_{x}]:D_{S} \boldsymbol{f}_{l}(\boldsymbol{z})\neq 0\,\right\}.$ (E.1) $$

The assumption of *compositionality* in Brady et al. () can now be stated:

###### Definition E.1 (Compositionality) .

A differentiable function $\mathbf{f}:\mathcal{Z}\rightarrow\mathcal{X}$, is said to be *compositional* if:

$$ $\forall\mathbf{z}\in\mathcal{Z},k,j\neq k\in[K]:I_{k}(\mathbf{z})\cap I_{j}( \mathbf{z})=\emptyset.$ (E.2) $$

We now state the second assumption in Brady et al. (), deemed *irreducibility*.

###### Definition E.2 (Irreducibility) .

A differentiable function $\mathbf{f}:\mathcal{Z}\rightarrow\mathcal{X}$, is said to be *irreducible* if for all $\mathbf{z}\in\mathcal{Z}$ and $k\in[K]$ and any partition $I_{k}(\mathbf{z})=S_{1}\cup S_{2}$ (i.e., $S_{1}\cap S_{2}=\emptyset$ and $S_{1},S_{2}\neq\emptyset$), we have:

$$ $\text{rank}\big{(}D\mathbf{f}_{S_{1}}(\mathbf{z})\big{)}+\text{rank}\big{(}D \mathbf{f}_{S_{2}}(\mathbf{z})\big{)}>\text{rank}\big{(}D\mathbf{f}_{I_{k}}( \mathbf{z})\big{)}.$ (E.3) $$

We now prove that compositionality and irreducibility are equivalent to $\mathbf{f}$ having satisfying interaction asymmetry (3.5) for all equivalent generators (4.1) for $n=0$.

###### Theorem E.3 .

A $C^{1}$ diffeomorphism $\mathbf{f}:\mathcal{Z}\rightarrow\mathcal{X}$ satisfies compositionality (Def. E.1) and irreducibility (Def. E.2) if and only if $\mathbf{f}$ has at most 0^th order interaction across slots (Defn. 3.2) and satisfies interaction asymmetry (Assm. 3.5) for all equivalent generators (4.1).

###### Proof.

We start by proving the forward direction, i.e., that compositionality and irreducibility imply that $\mathbf{f}$ has at most 0^th order interaction across slots and satisfies interaction asymmetry for all equivalent generators.
The definitions of compositionality and at most 0^th order interaction across slots are precisely equivalent, thus we only need to show that compositionality and irreducibility imply that $\mathbf{f}$ satisfies interaction asymmetry for all equivalent generators. To show this we will prove the following contraposition: that if $\mathbf{f}$ has at most 0^th order interaction across slots and *does not* satisfy interaction asymmetry for all equivalent generators, then $\mathbf{f}$ is not irreducible.

Since $\mathbf{f}$ has at most 0^th order interaction across slots and *does not* satisfy interaction asymmetry for all equivalent generators, this implies that there exists a matrix $\mathbf{A}\in\mathbb{R}^{|B_{k}\times B_{k}|}$ and a partition of ${B_{k}}$, into $A,B$ ($A\cup B=B_{k},A\cap B=\emptyset$) such that within the function ${\bar{f}}$ defined as:

$$ $\forall\boldsymbol{z}\in\mathcal{Z},\qquad{\boldsymbol{\bar{f}}}\left( \boldsymbol{A}_{1}\boldsymbol{z}_{B_{1}},\dots,\boldsymbol{A}_{K}\boldsymbol{z }_{B_{K}}\right)=\boldsymbol{f}(\boldsymbol{z}_{B_{1}},\dots,\boldsymbol{z}_{B _{K}})\,.$ (E.4) $$

where $\boldsymbol{A}_{i}$ such that $i\neq k$ is the identity matrix, the latents ${\bar{\mathbf{z}}}_{A},{\bar{\mathbf{z}}}_{B}$ have no interaction. This implies that under ${\bar{\mathbf{f}}}$, $I_{A}({\bar{\mathbf{z}}})$ does not intersect with $I_{B}({\bar{\mathbf{z}}})$. Further, because ${\bar{\mathbf{f}}}$ is invertible, we know that $D{\bar{\mathbf{f}}}_{B_{k}}({\bar{\mathbf{z}}})$ is full column rank. Coupling these two properties, we conclude that $\text{rank}(D{\bar{\mathbf{f}}}_{B_{k}}({\bar{\mathbf{z}}}))=\text{rank}(D{
\bar{\mathbf{f}}}_{A}({\bar{\mathbf{z}}}))+\text{rank}(D{\bar{\mathbf{f}}}_{B}
({\bar{\mathbf{z}}}))$. Furthermore, the Jacobians $D{\bar{\mathbf{f}}}({\bar{\mathbf{z}}})$ and $D{\mathbf{f}}({\mathbf{z}})$ will be related by an invertible linear map by construction. Thus, $D{\bar{\mathbf{f}}}_{S}({\bar{\mathbf{z}}})$ and $D{\mathbf{f}}_{S}({\mathbf{z}})$ have equal rank for any subset $S\subseteq[d_{z}]$. Therefore, we conclude that $\text{rank}(D{\mathbf{f}}_{B_{k}}({\mathbf{z}}))=\text{rank}(D{\mathbf{f}}_{A}
({\mathbf{z}}))+\text{rank}(D{\mathbf{f}}_{B}({\mathbf{z}}))$. Because $A$ and $B$ form a partition of $B_{k}$ we conclude that $\mathbf{f}$ is not irreducible.
We now prove the reverse direction if $\mathbf{f}$ has at most 0^th order interaction across slots and satisfies interaction asymmetry for all equivalent generators then $\mathbf{f}$ satisfies compositionality and irreducibility. As noted before, the definitions of compositionality and at most 0^th order interaction across slots are precisely equivalent. Thus, we only need to show that if $\mathbf{f}$ has at most 0^th order interaction across slots and satisfies interaction asymmetry then this implies $\mathbf{f}$ satisfies irreducibility. To show this, will prove the following contraposition: that if $\mathbf{f}$ does not satisfy irreducibility, then it *does not* satisfy interaction asymmetry for all equivalent generators with $n=0$.

Since $\mathbf{f}$ is not irreducible, we know that there exist a $\mathbf{z}$, a slot $k\in[K]$, and a partition of $B_{k}$ into $A,B$ such that rank$(D{\mathbf{f}}_{B_{k}}({\mathbf{z}}))$ = rank$(D{\mathbf{f}}_{A}({\mathbf{z}}))$ + rank$(D{\mathbf{f}}_{B}({\mathbf{z}}))$. Because $D{\mathbf{f}}_{B_{k}}({\mathbf{z}})$ is full column rank this implies that rank$(D{\mathbf{f}}_{A}({\mathbf{z}}))=|A|$ and rank$(D{\mathbf{f}}_{B}({\mathbf{z}}))=|B|$. Now take two matrices $\mathbf{M}_{S_{1}}\in\mathbb{R}^{d_{x}\times|A|}$ and $\mathbf{M}_{S_{2}}\in\mathbb{R}^{d_{x}\times|B|}$ such that the column space of $\mathbf{M}_{S_{1}}$ is the same as $D{\mathbf{f}}_{A}({\mathbf{z}})$ and the columns space of $\mathbf{M}_{S_{2}}$ is the same as $D{\mathbf{f}}_{B}({\mathbf{z}})$. Now construct the following matrix $\mathbf{M}\in\mathbb{R}^{d_{x}\times|B_{k}|}$ as follows:

$$ $\mathbf{M}:=[\mathbf{M}_{S_{1}},\mathbf{M}_{S_{2}}]$ (E.5) $$

Note that by construction this matrix has a block structure such that rows for $\mathbf{M}_{S_{1}}$ are never non-zero for the same rows as $\mathbf{M}_{S_{2}}$. Because $\mathbf{M}$ and $D{\mathbf{f}}_{B_{k}}({\mathbf{z}})$ are both full column rank, then there exist a matrix $\mathbf{A}_{k}\in\mathbb{R}^{|B_{k}|\times|B_{k}|}$ such that:

$$ $\mathbf{M}:=D{\mathbf{f}}_{B_{k}}({\mathbf{z}})\mathbf{A}_{k}$ (E.6) $$

Now define the function ${\bar{\mathbf{f}}}$ as follows:

$$ $\forall\boldsymbol{z}\in\mathcal{Z},\qquad{\boldsymbol{\bar{f}}}\left( \boldsymbol{A}^{-1}_{1}\boldsymbol{z}_{B_{1}},\dots,\boldsymbol{A}^{-1}_{K} \boldsymbol{z}_{B_{K}}\right)=\boldsymbol{f}(\boldsymbol{z}_{B_{1}},\dots, \boldsymbol{z}_{B_{K}})\,.$ (E.7) $$

such that $\mathbf{A}_{i}^{-1}$ is defined as above when $i=k$, and otherwise it is the identity matrix.

Writing the derivative of $D{\bar{\mathbf{f}}}_{B_{k}}({\bar{\mathbf{z}}})$ in terms of $\mathbf{f}$ we get $D{\mathbf{f}}_{B_{k}}({\mathbf{z}})\mathbf{A}_{k}=\mathbf{M}$. Because $\mathbf{M}$ has a block structure we conclude that there exist a partition of $B_{k}$ such that these latents have no interaction within ${\bar{\mathbf{f}}}$ at ${\bar{\mathbf{z}}}$. Because ${\bar{\mathbf{f}}}$ is equivalent to $\mathbf{f}$ we conclude that the function does not satisfy interaction asymmetry for $n=0$.
∎

###### Definition E.1 (Compositionality) .

###### Definition E.2 (Irreducibility) .

###### Theorem E.3 .

###### Proof.

#### E.2 At Most 1 1 1 1 st Order Interaction Across Slots

We now prove that the assumptions in Lachapelle et al. () are a special case of our assumptions for $n=1$. To this end, we first restate their assumptions. The first assumption in Lachapelle et al. () is that the generator $\mathbf{f}$ is *additive*:

###### Definition E.4 (Additive decoder) .

A $C^{2}$ diffeomorphism $\mathbf{f}:\mathcal{Z}\rightarrow\mathcal{X}$ is said to be additive if:

$$ $\mathbf{f}(\mathbf{z})=\sum_{k\in[K]}\mathbf{f}^{k}(\mathbf{z}),\quad\text{ where}\;\mathbf{f}^{k}:\mathbb{R}^{|B_{k}|}\to\mathbb{R}^{d_{x}}\text{ for any }k\in[K]\;\text{and}\;\mathbf{z}\in\mathcal{Z}.$ (E.8) $$

###### Definition E.5 (Sufficient Nonlinearity) .

Let $\boldsymbol{f}:\mathcal{Z}\rightarrow\mathcal{X}$ be a $C^{2}$ diffeomorphism. For all $k\in[K]$, let $B^{2}_{k\leq}:=B^{2}_{k}\cap\{(i_{1},i_{2})|i_{2}\leq i_{1}\}$. $\boldsymbol{f}$ is said to satisfy *sufficiently nonlinearity* if $\forall\boldsymbol{z}\in\mathcal{Z}$ the following matrix has full column-rank:

$$ $\displaystyle\mathbf{W}(\mathbf{z}):=\left[\left[D_{i}\boldsymbol{f}( \boldsymbol{z})\right]_{i\in B_{k}}\left[D^{2}_{i,i^{\prime}}\boldsymbol{f}( \boldsymbol{z})\right]_{(i,i^{\prime})\in B^{2}_{k\leq}}\right]_{k\in[K]}$ (E.9) $$

We now state our result.

###### Theorem E.6 .

Let $\mathbf{f}:\mathcal{Z}\rightarrow\mathcal{X}$ be a $C^{2}$ diffeomorphism. If $\mathbf{f}$ satisfies additivity (Def. E.4) and sufficient nonlinearity (Def. E.5) then $\mathbf{f}$ has at most 1^st order interactions across slots (Defn. 3.3), satisfies sufficient independence (Defn. A.9), and satisfies interaction asymmetry (Asm. 3.5) for all equivalent generators (Defn. 4.1) for $n=1$.

###### Proof.

We note that $\mathbf{f}$ having at most first order interactions across slots is equivalent to having a block-diagonal Hessian for every observed component. Such functions were proven to be equivalent to additive functions in Lachapelle et al. (). Furthermore, sufficient independence is clearly implied by sufficient nonlinearity as if all columns of the matrix $\mathbf{W}(\mathbf{z})$ are linearly independent, then blocks
$\left[D_{i}\boldsymbol{f}(\boldsymbol{z})\right]_{i\in B_{k}}\left[D^{2}_{i,i^
{\prime}}\boldsymbol{f}(\boldsymbol{z})\right]_{(i,i^{\prime})\in B^{2}_{k\leq}}$ will have non-intersecting columns spaces for all $k\in[K]$ and will thus satisfy sufficient independence (Def. A.9. Consequently, the only thing we need to show is that sufficient nonlinearity (Def. E.5) implies interaction asymmetry (Assm. 3.5) for all equivalent generators (4.1).
Assume for a contradiction that sufficient nonlinearity (Def. E.5) did not imply interaction asymmetry (Assm. 3.5) for all equivalent generators (4.1) with $n=1$. This would imply that there exists an equivalent generator to $\mathbf{f}$ denoted ${\bar{\mathbf{f}}}$ defined in terms of a slot-wise linear function ${\boldsymbol{h}}$:

$$ ${\bar{\mathbf{f}}}=\mathbf{f}\circ\mathbf{h}$ (E.10) $$

such that ${\bar{\mathbf{f}}}$ has at most first order interaction within some slot $B_{k}$. In other words, leveraging Lemma A.21, there exist a $(j,j^{\prime})\in B^{2}_{k}$ and a ${\bm{z}}\in\mathcal{Z}$ s.t.

$$ $\displaystyle 0=D^{2}_{j,j^{\prime}}{\bar{\mathbf{f}}}({\bm{z}})={\bm{W}}^{\bm {f}}({\bm{h}}({\bm{z}})){\bm{m}}^{\bm{h}}({\bm{z}},(j,j^{\prime}))\,,$ (E.11) $$

Because ${\bm{W}}^{\bm{f}}({\bm{h}}({\bm{z}}))$ is assumed to be full rank by sufficient nonlinearity (Def. E.5), then in order for this equation to hold ${\bm{m}}^{\bm{h}}({\bm{z}},(j,j^{\prime}))$ must be zero. Note, however, that by construction $\mathbf{h}$ is defined slot-wise such that $z_{j},z_{j}^{\prime}$ map to the same slot $\mathbf{h}_{B_{k}}$. By construction, if two $z_{j},z_{j}^{\prime}$ affect the same slot $\mathbf{h}_{B_{k}}$ then ${\bm{m}}^{\bm{h}}({\bm{z}},(j,j^{\prime}))$, cannot be zero. Thus, we obtain a contradiction.
∎

###### Definition E.4 (Additive decoder) .

###### Definition E.5 (Sufficient Nonlinearity) .

###### Theorem E.6 .

###### Proof.

### Appendix F Transformers for Interaction Regularization

Each layer of a Transformer (Vaswani et al., ) consist of two main components: an MLP sub-layer and an attention mechanism. Notably, in the MLP sub-layer, MLPs are applied separately to each slot or pixel query and their outputs are then concatenated. Further, additional layer normalization operations (Ba, ) are typically used in Transformers but are also separately applied to each slot or pixel query. Thus, the only opportunity for interaction between slots in a Transformer occurs through the attention mechanism. Our focus in this work is on the cross-attention mechanism, opposed to the alternative self-attention. As noted in § 5, cross-attention takes the form:

$$ $\displaystyle\mathbf{K}$ $\displaystyle=\mathbf{W}^{K}[\hat{\mathbf{z}}_{B_{k}}]_{k\in[K]},$ $\displaystyle\mathbf{V}$ $\displaystyle=\mathbf{W}^{V}[\hat{\mathbf{z}}_{B_{k}}]_{k\in[K]},$ $\displaystyle\mathbf{Q}$ $\displaystyle=\mathbf{W}^{Q}[\boldsymbol{o}_{d}]_{d\in[d_{x}]},$ (F.1) $\displaystyle\mathbf{A}_{d,k}$ $\displaystyle=\frac{\exp\left(\mathbf{Q}_{:,d}^{\top}\mathbf{K}_{:,k}\right)}{ \sum_{l\in[K]}\exp\left(\mathbf{Q}_{:,d}^{\top}\mathbf{K}_{:,l}\right)},$ $\displaystyle\bar{\mathbf{x}}_{d}$ $\displaystyle=\mathbf{A}_{d,:}\mathbf{V}^{\top},$ $\displaystyle{\hat{x}_{d}}$ $\displaystyle=\psi(\bar{\mathbf{x}}_{d})\,.$ (F.2) $$

where $\mathbf{K}_{:,k},\mathbf{V}_{:,k}\in\mathbb{R}^{d_{q}}$, $\mathbf{W}^{K},\mathbf{W}^{V}\in\mathbb{R}^{d_{q}\times|B_{k}|}$ for query dimension $d_{q}$. Further, $\boldsymbol{o}_{d}\in\mathbb{R}^{d_{o}}$, $\mathbf{Q}_{:,l}\in\mathbb{R}^{d_{q}}$, $\mathbf{W}^{Q}\in\mathbb{R}^{d_{q}\times d_{o}}$, where $d_{o}$ is the dimension of a pixel coordinate vector, and $\psi:\mathbb{R}^{d_{q}}\to\mathbb{R}$.

Additional Details. In Eq. F.2, we do not include the scaling factor $d_{q}^{-\frac{1}{2}}$ for $\mathbf{A}_{d,k}$, that is typically used as it does not affect our arguments below. We do, however, include it in our experiments. Further, when $\mathbf{x}$ is an RGB image, ${\hat{x}_{d}}$ will not be a scalar but will instead be a vector in $\mathbb{R}^{3}$ since each pixel has $3$ color channels. Additionally, in our experiments, multi-head attention is used. In this case, slot keys and values and pixel queries are partitioned into $h$ sub-vectors. Eqs. F.1 and F.2 are then applied separately to each resulting sub-latent, and the resulting outputs are concatenated. When using multiple layers of cross-attention, as we do in our experiments, $\psi$ is only applied at the last layer and vectors $\boldsymbol{o}_{d}$ for a subsequent layer are defined as the vectors $\bar{\mathbf{x}}_{d}$ from the prior layer. Eqs. F.1 and F.2 are then repeated. We discuss how these additional caveats are dealt with empirically when implementing $\mathcal{L}_{\text{interact}}$ below in § F.2, however, they do not affect our formal argument regarding regularizing interactions in § F.1. We discuss how the vectors $\boldsymbol{o}_{d}$ in Eq. F.1 and function $\psi$ in Eq. F.2 are implemented in our experiments in Appx. I.

#### F.1 Jacobian of Cross-Attention Mechanism

Our goal is to show that if $\mathbf{A}_{d,k}$ in equation is 0 0, then partial derivative of Eqs. F.2 and F.1 w.r.t slot $\hat{\mathbf{z}}_{B_{k}}$, i.e, $\frac{\partial\hat{x}_{d}}{\partial\hat{z}_{B_{k}}}$ will also be zero. This would then imply that if $\mathbf{A}_{d,:}$ is non-zero for at most one slot $k$ for every $d\in[d_{x}]$, and every $\hat{\mathbf{z}}\in\hat{\mathcal{Z}}_{\textnormal{supp}}$, then slots do not interact in the sense of Defn. 3.2, since all such derivative products $\frac{\partial\hat{x}_{d}}{\partial\hat{\mathbf{z}}_{B_{k}}}\frac{\partial\hat
{x}_{d}}{\partial\hat{\mathbf{z}}_{B_{l}}}$ for $l\neq k$ are zero. To this end, we are interested in computing the derivative:

$$ $\displaystyle\frac{\partial\hat{x}_{d}}{\partial(\hat{\mathbf{z}}_{B_{m}})_{r} }=\partial_{i}\psi(\bar{\mathbf{x}})\frac{\partial(\bar{\mathbf{x}}_{d})_{i}}{ \partial(\hat{\mathbf{z}}_{B_{m}})_{r}}$ (F.3) $$

where we here and from now on use the convention that we sum over every index that appears only on one side. To evaluate this we decompose the terms

$$ $\displaystyle(\bar{\mathbf{x}}_{d})_{i}=\mathbf{A}_{d,k}\mathbf{V}_{i,k}= \mathbf{A}_{d,k}\mathbf{W}_{i,j}^{V}(\hat{\mathbf{z}}_{B_{k}})_{j}.$ (F.4) $$

We set $\mathbf{M}_{d,:}=\mathbf{o}_{d}^{\top}(\mathbf{W}^{Q})^{\top}\mathbf{W}^{K}$
so that

$$ $\displaystyle\mathbf{Q}_{:,d}^{\top}\mathbf{K}_{:,k}=\mathbf{M}_{d,i}(\hat{ \mathbf{z}}_{B_{k}})_{i}.$ (F.5) $$

This implies that

$$ $\displaystyle\frac{\partial}{\partial(\hat{\mathbf{z}}_{B_{m}})_{i}}\exp( \mathbf{Q}_{:,d}^{\top}\mathbf{K}_{:,k})=\mathbf{M}_{d,i}\delta_{km}\exp( \mathbf{Q}_{:,d}^{\top}\mathbf{K}_{:,k})$ (F.6) $$

where $\delta$ is the Kronecker-Delta (and here no summation over $k$ or $d$ is done). This implies using the product rule and the chain rule that

$$ $\displaystyle\frac{\partial\mathbf{A}_{d,k}}{\partial(\hat{\mathbf{z}}_{B_{m}} )_{i}}=\mathbf{M}_{d,i}\delta_{k,m}\mathbf{A}_{d,k}-\mathbf{M}_{d,i}\mathbf{A} _{d,k}\mathbf{A}_{d,m}.$ (F.7) $$

Plugging this together we get

$$ $\displaystyle\begin{split}\frac{\partial\hat{x}_{d}}{\partial(\hat{\mathbf{z}} _{B_{m}})_{r}}&=\partial_{i}\psi(\bar{\mathbf{x}})\frac{\partial(\bar{\mathbf{ x}}_{d})_{i}}{\partial(\hat{\mathbf{z}}_{B_{m}})_{r}}\\ &=\mathbf{A}_{d,m}\mathbf{W}_{i,r}^{V}\partial_{i}\psi(\bar{\mathbf{x}})+ \partial_{i}\psi(\bar{\mathbf{x}})\mathbf{W}_{i,j}^{V}(\hat{\mathbf{z}}_{B_{k} })_{j}\frac{\partial\mathbf{A}_{d,k}}{\partial(\hat{\mathbf{z}}_{B_{m}})_{r}} \\ &=\mathbf{A}_{d,m}\mathbf{W}_{i,r}^{V}\partial_{i}\psi(\bar{\mathbf{x}})+ \partial_{i}\psi(\bar{\mathbf{x}})\mathbf{W}_{i,j}^{V}(\hat{\mathbf{z}}_{B_{k} })_{j}(\mathbf{M}_{d,r}\delta_{k,m}\mathbf{A}_{d,k}-\mathbf{M}_{d,r}\mathbf{A} _{d,k}\mathbf{A}_{d,m})\\ &=\mathbf{A}_{d,m}\partial_{i}\psi(\bar{\mathbf{x}})(\mathbf{W}_{i,r}^{V}+ \mathbf{W}_{i,j}^{V}(\hat{\mathbf{z}}_{B_{m}})_{j}\mathbf{M}_{d,r})-\partial_{ i}\psi(\bar{\mathbf{x}})\mathbf{W}_{i,j}^{V}(\hat{\mathbf{z}}_{B_{k}})_{j} \mathbf{M}_{d,r}\mathbf{A}_{d,k}\mathbf{A}_{d,m}\end{split}$ (F.8) $$

From this, we can see that if $\mathbf{A}_{d,m}=0$, then the partial derivative $\frac{\partial\hat{x}_{d}}{\partial\hat{\mathbf{z}}_{B_{m}}}$, will indeed be zero as $\mathbf{A}_{d,m}$ scales both terms in the last line of Eq. F.8.

#### F.2 Interaction Regularizer

Based on § F.1, we propose to regularize the interaction in a Transformer by minimizing the sum of all pairwise products $\mathbf{A}_{l,j}\mathbf{A}_{l,k}$, where $j\neq k$. More specifically, we minimize the following loss:

$$ $\mathcal{L}_{\text{interact}}:=\mathbb{E}\sum_{l\in[d_{x}]}\sum_{j\in[K]}\sum_ {k=j+1}^{K}\mathbf{A}_{l,j}(\hat{\mathbf{z}})\mathbf{A}_{l,k}(\hat{\mathbf{z}})$ (F.9) $$

where $\mathbf{A}_{l,k}(\hat{\mathbf{z}})$ is used to indicate the input dependence of attention weights on latents $\hat{\mathbf{z}}$. $\mathcal{L}_{\text{interact}}$ is a non-negative quantity which will be zero if and only if a matrix has at most one non-zero for each row (Brady et al., ).

Figure: Figure 4: PyTorch code to compute $\mathcal{L}_{\text{interact}}$.
Refer to caption: extracted/5994558/figs/l_interact_code.png

Code to compute $\mathcal{L}_{\text{interact}}$ for a batch of attention matrices can be seen in Fig. 4. We note that when using multiple attention heads, we first sum the attention matrices over all heads to ensure consistent pixel assignments across different heads. When using multiple layers, we also sum the attention matrices over each layer, for the same reason. $\mathcal{L}_{\text{interact}}$ is then computed on the resulting attention matrix.

Regularizing Higher Order Interactions.
We note that while we show formally that $\mathcal{L}_{\text{interact}}$ directly regularizes for 1^st order interactions, we do not explicitly address regularizing for higher order interactions, i.e., for $n\geq 2$. We conjecture there is a relationship between regularizing $\mathcal{L}_{\text{interact}}$ and higher order interactions but that it is less direct than the 1^st order case. We leave it to future work to explore these connections further, as well as alternative, computationally efficient regularizers which can more directly penalize higher order interactions.

Computational Efficiency.
We note that regularizing with $\mathcal{L}_{\text{interact}}$ adds minimal additional computational overhead since attention weights are already computed at each forward pass through the model, and, moreover can be easily optimized using gradient descent. This is in contrast to Brady et al. () which required computing the Jacobian of the decoder $\hat{\mathbf{f}}$ at each forward pass and then optimizing it using gradient descent. This results in second-order optimization which is computationally intractable for high-dimensional data such as images (Brady et al., ).

### Appendix G Extended Related Work

#### G.1 Theory

Relationship Between Principle 3.1 and Other Principles. The interaction asymmetry Principle 3.1, “parts of the same concept have more complex interactions, than parts of different concepts”, is intuitively similar to several prior principles explored for learning concepts. For example, the prior works of Schmidhuber (), Reynolds et al. (), Zacks et al. (), Baldwin et al. () on disentangling events/sub-task (e.g., “making coffee”, “driving to work”), of Greff et al. (), Hyvarinen and Perkio () on disentangling objects in an image, and of Schmidhuber () are all essentially based on the principle that parts of same concept are *more mutually predictable* than parts of different concepts. Similarly, Hochreiter and Schmidhuber (), Jiang et al. () implicitly use the idea that parts of same concept are *more compressible* than different concepts. Research on complex networks commonly uses the idea that nodes from the same “community” interact more strongly than nodes from different communities (Fortunato and Hric, ), which also resembles ideas from clustering that points from the same cluster have higher mutual information than points from different clusters (Kraskov et al., ). This network-based framework was applied by Schapiro et al. () as a model for grouping temporal events. Furthermore, in Gestalt Psychology, the law of common fate (Koffka, , Tangemann et al., ) states that parts of the same object interact in the sense that they move together. Lastly, Greff et al. () propose that objects do not interact much with their surroundings but have a strong internal structure. While these different ideas are intuitively similar to that of interaction asymmetry, they take on different formalizations. Moreover, these principles are generally used as high-level heuristics for designing a learning algorithm, and their theoretical implications for disentanglement and compositional generalization have, to the best of our knowledge, not been explored.

Polynomial Decoders.
As noted in § 4.2, Asm. 3.5 implies that the cross-partial derivatives of the generator $\mathbf{f}$ w.r.t. components from different slots will be finite-degree polynomials. This partially resembles the polynomial constraints imposed on $\mathbf{f}$ by Ahuja et al. () for disentanglement. Importantly, however, Ahuja et al. () assume that *all* cross-partial derivatives of $\mathbf{f}$ are polynomials such that the entire function $\mathbf{f}$ is a finite-degree polynomial. In contrast, Asm. 3.5 constrains the form of cross-partial derivatives *across* slots to be polynomial, but does *not* constrain the form of cross-partial derivatives *within* the same slot. In other words, Asm. 3.5 only constrains the interactions across slots, while Ahuja et al. () constrains all possible interactions. This is an important distinction since the former gives rise to much more flexible generators than the latter (see Eq. 4.2).

#### G.2 Method and Experiments

VAE Losses in Object-Centric Models.
Prior work of Wang et al. () also applies a VAE loss to an unsupervised object-centric learning setting. However, while we minimize $\mathcal{L}_{\text{KL}}$ directly on the inferred slots in $\hat{\mathbf{z}}$ given by our Transformer encoder, Wang et al. () minimize $\mathcal{L}_{\text{KL}}$ on an intermediate representation which is then further processed to yield $\hat{\mathbf{z}}$. Furthermore, the focus of Wang et al. () is on scene generation and not penalizing the capacity of $\hat{\mathbf{z}}$. Additionally, Kori et al. () explore a loss for object-centric learning resembling a VAE loss, though they aim to enforce a certain probabilistic structure on $\hat{\mathbf{z}}$ implied by their theoretical disentanglement result, as opposed to penalizing latent capacity.

Inductive Bias Through Explicit Supervision.
Recently, many works have shown remarkable empirical success in disentangling (Kirillov et al., , Ravi et al., ) and composing (Ramesh et al., ; , Saharia et al., , Ruiz et al., , Brooks et al., ) visual concepts in images on web-scale data. These works achieve this through explicit supervision via segmentation masks or natural language descriptions of each concept, as opposed to constraints on the generative process in Eq. 2.1. Notably, however, many species in human’s evolutionary lineage disentangle and compose concepts in sensory data *without* using explicit supervision like natural language (Tolman, , Behrens et al., , LeCun, , Summerfield, ). This suggest the existence of a self-supervised coding mechanism for disentanglement and compositional generalization that is still lacking in current machine learning models. The present work aims to make theoretical and empirical progress towards such a mechanism.

Relation Between a Transformer Regularized with $\mathcal{L}_{\text{interact}}$ and Prior Works. Goyal et al. () proposed recurrent independent mechanisms, a Transformer-style architecture aimed at enforcing a “modular” structure. Contrary to our work, Goyal et al. () do not regularize for modularity. Instead, they posit that it may emerge from “competition” induced by an attention mechanism, which resembles the motivation for the masking schemes used in earlier object-centric decoders (Greff et al., , von Kügelgen et al., , Engelcke et al., , Burgess et al., , Greff et al., ). Similarly, Lamb et al. () propose an alternative Transformer architecture aimed at enforcing modularity, which also tries to enforce competition using a mechanism similar to Goyal et al. (). More recently, Vani et al. () proposed a Transformer component aimed at yielding disentanglement by processing a Transformer embedding into different slots using separate attention heads for each slot. While these works are similar to ours in that they aim to learn disentangled representations of concepts using a Transformer-style architecture, they are based on architectural changes to a Transformer, whereas we use a standard cross-attention Transformer decoder and regularize it explicitly towards having a modular structure using $\mathcal{L}_{\text{interact}}$.

Alternative Object Disentanglement Metrics. Metrics for object disentanglement, which rely on the latent representation, as opposed to the decoder, have also been proposed in prior works (Locatello et al., , Dittadi et al., , Brady et al., , Lachapelle et al., ). For example, Brady et al. () propose the slot identifiability score (SIS) in which the R2 score is computed from the predictions of a model fit between each inferred slot and the best matching ground-truth slot. A second predictor is then fit between the second-best matching slot to determine if inferred slots contain information about more than one ground-truth slot. We found this metric to yield inconsistent results on CLEVR6, which we hypothesize was due to instability in resolving the permutations when matching inferred and ground-truth slots. This motivated us to focus on alternative disentanglement metrics which are computed using only the decoder, rather than the latent representation. Such metrics also align with our formal disentanglement definition (Defn. 2.1) which is formulated in terms of the decoder, in contrast to the definition of Brady et al. (), which is formulated purely in terms of the slot representations.

### Appendix H Extended Discussion

#### H.1 Theory

Defining Interactions via the Latent Distribution.
In § 3, we focused on formalizing interactions between latents via assumptions on the generator $\mathbf{f}$.
However, one could also consider formalizing such interactions via assumptions on the latent distribution or, more specifically, on $\log{p_{\mathbf{z}}}$.
For example, analogous to Defn. 3.3, we could say that slots have at most $1$^st order interaction within $\log{p_{\mathbf{z}}}$ if $D^{2}_{i,j}\log{p_{\mathbf{z}}}(\mathbf{z})=0$ for any components $i,j$ from different slots. This would imply that $\log{p_{\mathbf{z}}}$ is an additive function w.r.t. different slots, which is equivalent to stating that slots are statistically independent. Thus, interaction asymmetry for $n=1$, formalized in terms of $\log{p_{\mathbf{z}}}$, would mean that different slots are statistically independent, while components within the same slot are *uniformly* statistically dependent, i.e., for all $\mathbf{z}\in\mathcal{Z}$, $D^{2}_{i,j}\log{p_{\mathbf{z}}}(\mathbf{z})\neq 0$ if $i$ and $j$ are components from the same slot. In the case of one-dimensional slots, such assumptions resemble independent component analysis (ICA; Hyvärinen et al., )
, while for multi-dimensional slots, they resemble independent subspace analysis (ISA; Cardoso, , Hyvärinen and Hoyer, , Theis, ), in which statistical independence is assumed across but not within slots. Higher order interactions (i.e., $n>1$) can be analogously defined on $\log{p_{\mathbf{z}}}$ which would capture increasingly more complex statistical dependencies between latents. However, formalizing interaction asymmetry at the level of $\log{p_{\mathbf{z}}}$ alone will, in general, not be sufficient for disentanglement or compositional generalization, since, as explained in § 2, this also requires assumptions on the generator $\mathbf{f}$. However, if
$\mathbf{f}$ is also restricted, such assumptions could potentially be useful. We leave it for future work to investigate this further.

Requirements on the Observed Dimension.
We note that satisfying our assumptions on the generator $\mathbf{f}$ in § 3 and § 4 requires that the observed dimension $d_{x}$ is greater than the latent dimension $d_{z}$. Moreover, the required $d_{x}$ will scale as a function of the number of latent slots $K$, the slot dimensions $|B_{k}|$, and the order of interaction across slots $(n+1)$. For example, for functions with at most 0^th order interaction across slots, satisfying irreducibility (Defn. E.2), and thus interaction asymmetry (Asm. 3.5), requires that $d_{x}\geq\sum_{k\in[K]}|B_{k}|+1$. For functions with at most 1^st order interactions across slots, ensuring that the rank condition in sufficient independence (Defn. A.9) is met requires that $d_{x}\geq\sum_{k\in[K]}\frac{|B_{k}|(|B_{k}|+1)}{2}+d_{z}$. For functions with at most 2^nd order interactions, satisfying this condition (Defn. 4.2) requires $d_{x}\geq\sum_{k\in[K]}\frac{|B_{k}|(|B_{k}|+1)(|B_{k}|+2)}{6}+\frac{d_{z}(d_{
z}+1)}{2}+d_{z}$. We note that we are interested in modelling high-dimensional sensory data, such as images, in which the observed dimension $d_{x}$ will be much greater than the latent dimension $d_{z}$. Thus, for practical cases of interest, we expect these requirements on $d_{x}$ to be met.

Concepts Potentially not Captured by Interaction Asymmetry.
For certain concepts, it is not obvious if interaction asymmetry will always hold. For example, consider object attributes such as the $x$-$y$-position of an object, which can be modelled by one-dimensional slots. For such concepts, the interaction within a slot, i.e., the interaction of each latent component w.r.t. itself, should, intuitively, be a simple function. It is thus not obvious if the interaction within each slot will necessarily be more complex than interactions across slots, such that $\mathbf{f}$ may not satisfy interaction asymmetry (Asm. 3.5). Additionally, it is not immediately clear how interaction asymmetry can be applied to more abstract concepts which are not directly grounded in sensory data such as the concept of “democracy” or the concept of a “function” in mathematics.

#### H.2 Method and Experiments

Applying our Method to Other Types of Concepts.
One important direction for future work is to apply our method to data consisting of different types of concepts, such as object-attributes or temporal events. For object attributes, our same empirical framework can be applied, but with the additional caveat that Transformers are permutation invariant, while object attributes do not possess the same permutation invariance as objects. To this end, methods such as adding a positional encoding to each slot could be used to address this (Singh et al., ). Additionally, the problem of disentangling temporal events in image sequences can also be modelled naturally using a slot-based framework (Kipf et al., , Gopalakrishnan et al., ). In this case, the “tokens” that a slot encoder (e.g., a Transformer or Slot Attention) operates on are not pixels processed by a CNN, as in our current model. Instead, they would correspond to individual images in a sequence which are each mapped into representation tokens. These tokens can then be mapped into slots using a slot encoder, and then decoded back to output space using the same Transformer decoder in our current model. In this case, however, the queries for the decoder would not correspond to individual pixels but instead to images in the temporal sequence.

Limitations of $\mathcal{L}_{\text{disent}}$.
One potential issue with $\mathcal{L}_{\text{rec}}$ is that for real-world data, reconstructing every pixel in an image exactly, may not be necessary and could lead to overly prioritizing tasks irrelevant information in $\hat{\mathbf{z}}$ such as the background (Seitzer et al., ). It would thus be interesting to see if our theory and method could be extended to a self-supervised setting, as explored by Seitzer et al. (), in which exact invertibility is not strictly necessary. Regarding $\mathcal{L}_{\text{KL}}$, in addition to a model having inferred latent dimensionality $d_{\hat{z}}$ equal to the ground-truth dimension $d_{z}$, our theory also requires that the inferred slot dimensions equal the ground-truth slot dimensions. While $\mathcal{L}_{\text{KL}}$ explicitly regularizes for the former, it does not directly regularize for the latter. More specifically, $\mathcal{L}_{\text{KL}}$ could, in principle, penalize latent capacity by putting information from all, e.g., objects, in one slot (assuming the slot size is large enough), as opposed to distributing this information over components from different slots. Despite this, we found that this failure mode did not occur in our experiments. Another potential issue with $\mathcal{L}_{\text{KL}}$ is that it aims to enforce statistically independent latents which could lead to suboptimal solutions if the ground-truth latents exhibit strong statistical dependencies. Lastly, regarding $\mathcal{L}_{\text{interact}}$, a shortcoming of this regularizer is that, while it directly regularizes 1^st order interactions (§ F.1), its connection to regularizing higher-order interactions is not as direct. Future work should thus aim to investigate this point further, both theoretically and empirically.

#### H.3 Enforcing Theoretical Criteria Out-of-Domain

As noted in § 5, enforcing (i) invertibility and (ii) at most $n$^th order interactions across slots on $\hat{\mathbf{f}}$, out-of-domain, i.e., globally on all of $\mathcal{Z}$, poses distinct practical challenges. We now discuss this in detail. To this end, we first discuss enforcing (ii) globally on $\mathcal{Z}$.

Restricting Interactions Globally. The easiest way to enforce that $\hat{\mathbf{f}}$ has at most $n$^th order interactions across slots on $\mathcal{Z}$ is to directly parameterize $\hat{\mathbf{f}}$ to match the form of such functions for some $n$ (Eq. 4.2). This is, for example, how at most 1^st order interactions were enforced by Lachapelle et al. (), i.e., by defining $\hat{\mathbf{f}}$ to be an additive function (Defn. E.4) on all of $\mathcal{Z}$. We found for higher order interactions, parameterizing $\hat{\mathbf{f}}$ directly to match the form of Eq. 4.2 leads to training difficulties on toy data. Moreover, even if we could easily train such a model, this explicit form would pose an overly restrictive inductive bias when scaling to more realistic data. This motivated us to consider how to regularize for (ii) rather than enforce it explicitly. The issue with this approach is that we only regularize the derivatives of $\hat{\mathbf{f}}$ in-domain on $\hat{\mathcal{Z}}_{\textnormal{supp}}$. Yet, enforcing structure on the derivatives of $\hat{\mathbf{f}}$ on $\hat{\mathcal{Z}}_{\textnormal{supp}}$ does not imply that same structure will be enforced on all of $\mathcal{Z}$. As noted in § 4.2, however, by knowing the behavior of the derivatives of $\hat{\mathbf{f}}$ on $\hat{\mathcal{Z}}_{\textnormal{supp}}$, we can infer their behavior everywhere on $\mathcal{Z}$. Thus, in principle, it should be possible to propagate the correct derivative structure learned by $\hat{\mathbf{f}}$ locally on $\hat{\mathcal{Z}}_{\textnormal{supp}}$, to all of $\mathcal{Z}$. Practically, however, it is not obvious how this can be done in an effective manner. Thus, properly addressing this challenge would require further methodological and empirical contributions, which are not within the scope of the present work.

Enforcing Invertibility Globally.
Additionally, even if $\hat{\mathbf{f}}$ satisfies (ii) globally, we still must enforce (i) invertibility, globally. As noted in § 5, it is not feasible to define $\hat{\mathbf{f}}$ such that it is an invertible function from $\mathcal{Z}$ to $\mathcal{X}$ by construction. This necessitated parameterizing the inverse of $\hat{\mathbf{f}}$ with *an encoder* $\hat{\mathbf{g}}$ which was trained to invert the *decoder* $\hat{\mathbf{f}}$ via a reconstruction loss. Assuming that a decoder $\hat{\mathbf{f}}$ satisfies (ii) globally, and is invertible on $\hat{\mathcal{Z}}_{\textnormal{supp}}$, it is possible to show that $\hat{\mathbf{f}}$ will be invertible on all of $\mathcal{Z}$ and thus generalize compositionally. The issue, however, is that our encoder $\hat{\mathbf{g}}$ is only trained to invert $\hat{\mathbf{f}}$ on $\hat{\mathcal{Z}}_{\textnormal{supp}}$ but not on unseen data from the rest of $\mathcal{Z}$. Consequently, even if $\hat{\mathbf{f}}$ generalizes compositionally, an encoder $\hat{\mathbf{g}}$ will not necessarily invert $\hat{\mathbf{f}}$ out-of-domain, and can thus yield arbitrary representations $\hat{\mathbf{z}}$ on such data. This “encoder-decoder inconsistency” was pointed out by Wiedemer et al. (), who studied compositional generalization for decoders with at most 0 0^th and $1$^st order interactions. They proposed a loss which addresses this problem by first generating out-of-domain samples using $\hat{\mathbf{f}}$, and then training the encoder $\hat{\mathbf{g}}$ to invert $\hat{\mathbf{f}}$ on this “imagined” data. This loss was shown to be ineffective for images consisting of more than 2 objects, however (Wiedemer et al., ). Consequently, scaling this loss, or exploring alternative losses for encoder-decoder consistency, remain open research questions that require a deeper investigation to be properly addressed.

For these reasons, the empirical aspects of this work focus on enforcing (i) and (ii) in-domain to achieve disentanglement on
$\mathcal{Z}_{\textnormal{supp}}$ (Thm. 4.3). As highlighted above, however, our theory elucidates the core problems that need to be solved empirically to also achieve compositional generalization, thus giving a clear direction for future work.

### Appendix I Experimental Details

#### I.1 Data, Model, and Training Details

Data.
The Sprites dataset used in § 6 was generated using the Spriteworld renderer (Watters et al., ) and consists of 100,000 images of size $64\times 64\times 3$ each with between 2 and 4 objects. The CLEVR6 dataset (Johnson et al., , Locatello et al., ) consists of 53,483 images of size $128\times 128\times 3$ each with between 2 and 6 objects. For Sprites, we use 5,000 images for validation, 5,000 for testing, and the rest for training, while for CLEVR6, we use 2,000 images for validation and 2,000 for testing.

Encoders.
All models use encoders which first process images using the same CNN of Locatello et al. (). When using a Transformer encoder, these CNN features are fed to a 5-layer Transformer which uses both self- and cross-attention with 4 attention heads. When using a Slot Attention encoder, we use $3$ Slot Attention iterations, and use the improved implicit differentiation proposed by Chang et al. (). Both the Transformer and Slot Attention encoders use learned query vectors, as opposed to randomly sampling queries. On Sprites, all models use $5$ slots, each with $32$ dimensions, while on CLEVR6, all models use $7$ slots, each with $64$ dimensions. When using a VAE loss, this slot dimension doubles since we must model the mean and variance of each latent dimension.

Decoders.
When using a Spatial Broadcast decoder (Watters et al., ), we use the same architecture as Locatello et al. () across all experiments, using a channel dimension of $32$ for both datasets. When using a Transformer decoder, we first upscale slots to 516 dimensions by processing them separately using a 2-layer MLP, with a hidden dimension of 2064. We then apply a 2-layer cross-attention Transformer to these features which uses 12 attention heads. To obtain the vectors $\boldsymbol{o}_{l}$ in Eq. 5.1, we apply a 2D positional encoding to each pixel coordinate. This vector is then mapped by a 2-layer MLP with a hidden dimension of 360 to yield $\boldsymbol{o}_{l}$, which has dimension 180. The function $\psi$ in Eq. 5.2 is implemented by a 3-layer MLP with a hidden dimension of 180, which outputs a 3-dimensional pixel ${\hat{\mathbf{x}}}_{l}$ for each pixel $l$. This architecture does not rely on auto-regressive masking as in the work of Singh et al. ().

Training Details.
We train all models on Spriteworld across 3 random seeds using batches of 64 for 500,000 iterations. For CLEVR6, we use batches of 32 and train for 400,000 iterations. In all cases, we use the Adam optimizer (Kingma and Ba, ) with a learning rate of $5\times 10^{-4}$ which we warm up for the first 30,000 training iterations and then decay by a factor of 10 throughout training. When training with $\beta\mathcal{L}_{\text{KL}}$ and $\alpha\mathcal{L}_{\text{interact}}$, we use hyperparameter weights of 0.05, which we found to work well across both datasets. We found much larger values could lead to training instability and, in some cases, insufficient optimization of $\mathcal{L}_{\text{rec}}$, while smaller values often led to insufficient optimization of the regularizers. We warm-up the value of $\alpha$ for the first 30,000 training iterations. Additionally, when training with $\alpha$ or $\beta$, we drop the value of the learning rate after 30,000 training iterations to $1\times 10^{-4}$, which improved training stability. Lastly, on Sprites, we weight $\mathcal{L}_{\text{rec}}$ by a factor of 5, when training with $\alpha$ or $\beta$.

#### I.2 Metrics and Evaluation

Computing ARI with Attention Scores.
To compute the Adjusted Rand Index (ARI), each pixel must first be assigned to a unique model slot. To this end, prior works typically choose the slot with the largest attention score from either Slot Attention or the alpha mask of a Spatial Broadcast decoder (Locatello et al., , Seitzer et al., ). This approach can be problematic since the attention scores used are model-dependent, making a direct comparison of ARI across models challenging. Further, the relationship between attention scores and the pixels encoded in a model slot is somewhat indirect. As noted in § 6, we consider an alternative and compute the ARI using the Jacobian of a decoder (J-ARI). Specifically, we assign a pixel $l$ to the slot with the largest $L_{1}$ norm for the slot-wise Jacobian $D_{B_{k}}\hat{f}_{l}(\hat{\mathbf{z}})$. This can be done for any autoencoder and provides a more principled metric for object disentanglement since a decoder’s Jacobian directly describes the pixels each slot encodes (assuming $\hat{\mathbf{f}}$ and $\hat{\mathbf{g}}$ invert each other).

Evaluation.
We select models for testing which had the highest average values for J-ARI and JIS (each of which take values from 0 to 1) on the validation set. These models were then evaluated on the test set, yielding the scores reported in Tab. 1.

#### I.3 Additional Figures

In this subsection, we include 3 additional experimental figures. In Fig. 5, we compare the value of $\mathcal{L}_{\text{interact}}$ throughout training for a model with a Transformer encoder and decoder, trained using a VAE loss and a standard autoencoder loss on both Sprites and CLEVR6. We plot values over 3 random seeds; the shaded regions in the plots indicate one standard deviation from the mean. We find on Sprites (A) and CLEVR6 (B) that the VAE loss achieves much lower $\mathcal{L}_{\text{interact}}$ than the unregularized model. This provides a possible explanation for the solid object disentanglement often achieved by the VAE loss in Tab. 1.

In Fig. 6, we compare slot-wise Jacobians for our model versus baseline models across both Sprites (A) and CLEVR6 (B). To create these plots, we normalize the partial derivatives across slots such that they only take values between 0 0 and $1$. The colors associated with partial derivative values can be interpreted using the color bar at the bottom of (A). We only compute partial derivatives on the foreground pixels and set the derivatives of background pixels w.r.t each slot to 0 0. We see that when regularizing interactions via our model, slots rarely affect the same pixels (i.e., interact) unnecessarily, while for unregularized models, multiple slots often affect the same pixels even when no interactions should occur, e.g., for images in Sprites (A).

In Fig. 7, we compare decoder attention maps w.r.t. each slot for our model versus baseline models from § 6, which also use a Transformer decoder. These maps, which indicate the slots each pixel attends to, are plotted for both Sprites (A) and CLEVR6 (B). We compute these values by taking the mean attention weight over decoder layers. Similar to Fig. 6, we see that, in our model, pixels rarely unnecessarily attend to multiple slots. On the other hand, for unregularized models, pixels often attend to multiple slots in cases where no interactions between slots should occur.

Figure: Figure 5: Analysis of $\mathcal{L}_{\text{interact}}$ when using a VAE loss. We plot $\mathcal{L}_{\text{interact}}$ for the first 400,000 training iterations for a Transformer autoencoder trained without regularization ($\alpha\!=\!0,\beta\!=\!0$) and with a VAE loss which does not explicitly optimize $\mathcal{L}_{\text{interact}}$ ($\alpha\!=\!0,\beta\!=\!0.05$).
Refer to caption: x4.png

Figure: Figure 6: Normalized Slot-wise Jacobians. We plot the Jacobians w.r.t. each slot (columns) for 5 random test images (rows) from (A) Sprites and (B) CLEVR6 for our regularized Transformer model and the baseline models used in our experiments in § 6.
Refer to caption: x5.png

Figure: Figure 7: Slot-wise Transformer Decoder Attention Maps. We plot decoder attention maps w.r.t. each slot (columns) for 5 random test images (rows) from (A) Sprites and (B) CLEVR6 for our regularized Transformer decoder and the baseline models in § 6 which also use a Transformer decoder.

## Peer Reviews

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: Please see above comments.
soundness: 3
strengths: - the principle of interaction asymmetry, offers a novel and insightful perspective on disentanglement and compositionality. While previous works have explored related ideas, the formalization through higher-order derivatives and the connection to the complexity of interaction is original and provides a unifying framework for prior results in object-centric learning. The proposed regularizer on the Transformer's attention weights is a creative application to a scalable architecture.
- The theoretical results are rigorously presented and appear sound. The connection to existing works is carefully established, demonstrating the generality of the proposed framework. The experiments, while conducted on synthetic datasets, offer convincing evidence for the effectiveness of the proposed method and regularizer.
- The paper is generally well-written and easy to follow. The authors clearly motivate their work, provide intuitive explanations of the core ideas, and present the theoretical results in a structured and accessible manner. The figures effectively illustrate the key concepts and experimental results.
summary: This paper investigates the challenge of learning disentangled and composable representations, crucial for robust generalization in machine learning. It introduces the principle of "interaction asymmetry," positing that parts of the same concept interact more complexly than parts of different concepts. This principle is formalized through block-diagonality conditions on higher-order derivatives of the generator function mapping concepts to observed data, with the order of the derivative reflecting the "complexity" of interaction. The authors theoretically demonstrate that interaction asymmetry enables both disentanglement and compositional generalization, unifying and extending prior work focused specifically on visual objects. They show that existing results for object-centric learning emerge as special cases of their framework, corresponding to lower-order interactions (0th and 1st order). The theory suggests practical criteria for disentanglement: enforcing invertibility with minimal latent dimensions and penalizing interactions across concept slots during decoding. The authors propose an attention-regularized Transformer-based VAE, leveraging the VAE framework for capacity control and incorporating a novel regularizer on the decoder's attention weights to minimize cross-slot interactions. Experiments on synthetic image datasets with objects demonstrate the effectiveness of this approach, showing that the proposed model learns disentangled object representations, achieving performance comparable to existing methods that rely on more explicit object-centric priors.
weaknesses: - the aligned-connectedness condition on $Z_{supp}$ seems to be restrictive and its practical implications are not fully explored.
- The proposed regularizer, while efficient, only approximately enforces minimal interactions. Analyzing the gap between this approximation and the theoretical ideal, and exploring alternative regularization strategies that more directly address higher-order interactions, could further enhance the method's effectiveness.
- The experiments primarily focus on synthetic datasets and object-centric learning. While this provides a controlled setting for evaluating disentanglement, exploring the effectiveness of the proposed method on more complex, real-world datasets and diverse concept types (e.g., attributes, events) is crucial for demonstrating its broader applicability.

---

confidence: 5
contribution: 3
initial_rating: 6
presentation: 3
questions: 1. Are there plans to extend the empirical evaluation to include more challenging, real-world datasets? This would help establish the practical utility of the model in diverse settings.

2. Given the theoretical assumptions made in the paper, could you discuss how they might be relaxed to make the model more applicable to real-world scenarios? Are there any potential modifications to the theory that could broaden its applicability?

3. How does the interaction asymmetry principle relate to the Information Bottleneck theory? A discussion on this connection could provide additional insights into the theoretical foundations of the proposed approach and highlight its relevance to existing literature on disentanglement.
soundness: 4
strengths: **Originality**:  
The paper introduces the principle of **interaction asymmetry** to advance disentanglement and compositional generalization, providing a unified theoretical foundation that applies to broader conditions. The use of block diagonality in higher-order derivatives is creative and extends representation learning. The combination of theoretical insights with a practical Transformer-based VAE implementation is also notable.

**Quality**:  
The theoretical contributions are well-developed, extending previous findings to more complex settings. The regularized Transformer-based VAE is supported by empirical evidence, showing comparable performance to state-of-the-art methods. The use of multiple datasets (Sprites and CLEVR6) allows for a thorough assessment of the model's capacity for disentanglement.

**Clarity**:  
The paper is well-written and accessible. The authors clearly define theoretical constructs like **interaction asymmetry** and **nth order interaction**, using visual aids to illustrate complex concepts effectively. The logical structure and provided diagrams help convey the ideas intuitively.

**Significance**:  
The principle of interaction asymmetry offers a general framework for **disentanglement** and **compositional generalization**, extending the applicability of models to more complex generative processes. The flexible and scalable Transformer-based model positions this work as a significant step toward learning useful representations for real-world tasks.
summary: The paper titled "Interaction Asymmetry: A General Principle for Learning Composable Abstractions" presents the principle of "interaction asymmetry" to explain why some latent structures enable better generalization and disentanglement in representation learning. The core idea is that parts of the same concept interact more complexly compared to parts of different concepts, and the authors formalize this using block diagonality in higher-order derivatives of a generator function.

The main contributions of the paper include:

Theory: A formal proof that the principle of interaction asymmetry enables both disentanglement and compositional generalization. The authors extend previous results to more general generator functions, generalizing beyond earlier specific cases.
Method: An autoencoder-based approach that uses a Transformer architecture with an attention-based regularizer to limit interactions across slots, following the interaction asymmetry principle.
Empirical Evaluation: Demonstration on synthetic datasets that the proposed model can achieve disentanglement comparable to other models while allowing for more flexible interactions among the latent representations.
The paper unifies prior work by presenting a more general theoretical framework and proposes a practical implementation that achieves strong results in object disentanglement tasks.
weaknesses: 1. **Limited Empirical Evaluation**: The empirical evaluation, while thorough for the presented datasets, is somewhat limited in scope. The paper only evaluates on synthetic datasets (Sprites and CLEVR6), which may not fully demonstrate the model's potential for real-world applications. Including experiments on more challenging, real-world datasets would strengthen the evidence for the model's practical utility and scalability.

2. **Theoretical Assumptions**: The theoretical results rely on several assumptions (e.g., sufficient independence, specific conditions on the latent distribution). These assumptions may be restrictive in practical scenarios, and their implications are not fully explored in the context of real-world data. It would be beneficial to discuss how these assumptions could impact the applicability of the model and whether there are potential relaxations that could make the theory more practical.

3. **Connection with Information Bottleneck**: The paper does not explicitly connect its disentanglement framework with the **Information Bottleneck** principle, which has been discussed in several works as an effective approach to disentanglement. Incorporating a discussion on how interaction asymmetry relates to information bottleneck theory could strengthen the theoretical underpinnings and offer insights into how limiting mutual information might aid in disentangling the latent representations. Including references to relevant literature, such as Tishby et al. (2000), Alemi et al. (2017)  and Meo et al. (2024), could provide additional context and depth to the discussion.

https://arxiv.org/abs/physics/0004057
https://arxiv.org/abs/1612.00410
https://openreview.net/pdf?id=ptXo0epLQo

---

confidence: 3
contribution: 3
initial_rating: 5
presentation: 4
questions: - In L519–521, can the trade-off between interaction and model expressivity be effectively controlled through the parameter $\alpha$? For example, when increasing $\alpha$, does it lead to increased J-ARI but prevent reflections in mirrored objects in output images?
- As the Sprite dataset inherently exhibits 0th order interaction between objects, wouldn’t a spatial broadcast decoder (though the final alpha-blending layer does permit some interaction) serve as an architectural bias enforcing 0th order interaction? If so, should this setup represent the upper bound performance? Why does the proposed method outperform this approach?
- Although not a critical question, why did the authors choose to use learned queries instead of randomly sampled queries, which are typically used in Slot Attention?
soundness: 3
strengths: - The paper is clearly written and easy to follow, with a well-motivated presentation that effectively derives theorems and implementations.
- The theoretical foundation of the paper is solid and sound, offering meaningful insights that contribute to our understanding of compositional representation learning.
- It is interesting and valuable that the proposed approach unifies existing work while also extending to more complex scenarios, e.g., including high-order interactions between concepts, highlighting its versatility and potential impact.
summary: This paper introduces a novel principle for learning composable representations, termed “interaction asymmetry.”, stating that interactions between distinct concepts are less complex than those within sub-parts of each concept. By formalizing these interactions as high-order derivatives of each concept to output images, the authors theoretically demonstrate that interaction asymmetry facilitates disentanglement and compositional generalization (though the latter is not empirically validated). Notably, their theoretical findings encompass previous approaches for achieving compositional generalization as specific cases (e.g., assumptions of at most 0th or 1st order interactions) and extend to accommodate more complex scenarios with higher-order interactions.To implement these theoretical insights, the authors propose regularizing cross-attention layers in standard transformer architectures. Empirical evaluations on two synthetic datasets show that the proposed method effectively captures distinct objects. The main contributions of the paper are as follows:
- The introduction of interaction asymmetry as a general principle for compositional representation learning, supported by a theoretical framework that links interaction asymmetry to disentanglement and compositional generalization.
- A practical method to enforce interaction asymmetry within transformers by regularizing cross-attention layers, with empirical results on synthetic datasets that demonstrate the method’s ability to capture distinct objects.
weaknesses: - Although the theoretical foundation is solid, the experimental support is relatively limited. The empirical results are based solely on the simple Sprite and CLEVR6 datasets, raising questions about the generalizability of the findings to more complex scenarios.
- Theorem 4.3 states that achieving disentanglement requires ensuring at most $n$-th order interaction between slots. 
While theoretically sound, implementing this in practice as minimizing interaction without knowing the ground truth value of $n$, could be a limitation. For instance, each dataset (such as Sprite or CLEVR6) may have interactions of different orders, implying that the regularizer's weight to control interaction strength should be carefully adjusted for each case. If the Sprite dataset exhibits 0th order interaction, a stronger regularizer may be necessary compared to that in CLEVR6. Additional interpretation or obervations from the authors on this aspect would make the empirical support for their theory more comprehensive. 
- To implement Theorem 4.3 in a feasible way, the authors propose to minimize interactions between distinct slots through an attention regularizer in the transformer. However, it is unclear if this regularizer provides any advantage over the existing spatial exclusiveness inductive bias in slot attention encoders, which already minimizes interaction through slot-wise competition. Clarifying the unique benefits of the proposed regularizer compared to slot attention’s inherent mechanism would enhance the paper's contributions.
- Additionally, the authors claim that their generalized transformer structure with regularization is more flexible than slot attention-based methods (e.g., slot attention encoder + transformer decoder in L460–463). However, this claim is less convincing due to the following reasons: (1) To enforce invertibility, an additional KL term is required in the objective function, as shown in Table 1 (the value suggests that this term is crucial). 
Therefore, the proposed approach requires two additional terms (KL term and the regularizer term) and it may introduces additional burden on finding proper hyper-parameters. It is hard to tell if these inductive biases are favorable than architectural bias in slot attention methods.
(2) If my understanding is correct, the transformer decoder lacks a self-attention layer, using only cross-attention to avoid slot interactions. This specific design differs from the conventional transformer architecture, potentially limiting scalability. In contrast, slot attention-based methods, they can resume off-the-shelf models such as off-the-shelf encoder + slot attention encoder + off-the-shelf decoder (as in DINOSAUR [1], SLATE [2], LSD [3]), which might be more flexible in real-world applications.
- Finally, the proposed J-ARI metric may be misleading. The Jacobian of the decoder identifies regions most affected by each slot, but due to slot interactions, it may fail to segment objects accurately. For example, in Figure 3(B), the metallic sphere reflects the blue cuboid, causing the normalized slot-wise Jacobian to activate for the blue cuboid in the reflection area. However, this does not imply that the slot for the blue cuboid genuinely contains information about the metallic sphere. To assess whether composable abstractions are effectively captured, a downstream task like property prediction, as in LSD, may be necessary.

[1] Seitzer et al., bridging the gap to real-world object- centric learning, in ICLR 23. 

[2] Singh et al., Illiterate dall-e learns to compose, in ICLR 22. 

[3] Jiang et al., Object-centric slot diffusion, in NeurIPS 23.

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: What does your work imply about the debate in the literature as to whether disentanglement and compositional generalisation are related?

How does  ‘sufficiently predictable’ imply compositional generalisation?

What are the exact values of $\alpha$ and $\beta$ in Table 1?

Also, a general point: This formulation of the interaction principle is binary, either the required derivatives are zero everywhere or they are not. Disentanglement, on the other hand, is normally quantified to a matter of degree, giving a particular model on a particular dataset a score in [0,1]. How easy would it be to extend your formulation to provide a score in [0,1], rather than {0,1}?
soundness: 4
strengths: The problem of measuring disentanglement and compositional generalisation is interesting.

The intro and high-level background is generally well-motivated.

The general principle of interaction asymmetry is, to my knowledge, creative in that it is unlike previous approaches to this problem. It is convincing and put to good use.

Eq 4.2 is a nice expression of how a function can, in some sense be decomposed into a disentangled and entangled portion.
summary: This paper introduces the interaction asymmetry principle as a way to measure disentanglement and compositional generalisation, based on decomposing the latent space into blocks, and requiring non-zero partial derivatives between elements of the same block, but not between those of different blocks. The authors prove, in the appendix, that functions meeting this condition are disentangled, and discuss how this framework generalises some existing characterisations of disentanglement. Then they describe how this idea can be implemented as an additional loss term in a vision transformer VAE, and present results quantifying the degree of disentanglement using two metrics they devise, and compared to a slot attention decoder and a spatial broadcast decoder.
weaknesses: The discussion on the relationship between disentanglement and compositional generalisation could be improved by engaging with further existing work. While Montero et al (2020, 2022) claim to find no relationship between disentanglement and compositional generalisation, Higgins et al. (2016) and Esmaili et al. (2019) claim that their disentangled methods also enabled compositional generalisation, and Mahon (2024) claims to find an empirical correlation between disentanglement and compositional generalisation across multiple models and datasets. In fact, the position of Montero seems somewhat incongruent with your argument that they both share an underlying mechanism of interaction asymmetry.

I am slightly confused by some terminology: does ‘latent’ mean latent dimension or latent vector? e.g. on 197 "group of latents from the same or different slots" sounds like the former, but on line 409, it's in bold, suggesting a vector; does 'block' mean the same thing as 'slot'?

In Section 4.2, I don’t follow why $f$ and $\hat{f} \circ h$ being ‘sufficiently predictable’, in having all partial derivatives be fixed-degree polynomials, means that they are both equal on $Z_{cpe}$? It seems like there are three notions here, the interaction asymmetry condition, 'sufficiently predictable' and compositional generalisation.

The description of ARI on lines 478-9 is not the standard one as used e.g. in clustering (Vinh et al; 2009). Please state what the measure is exactly.

Comparing the different ablation settings in Table 1, it looks like having $\beta > 0$ makes a bigger difference than $\alpha > 0$, did you try a range of values for $\beta$? it could be that if you have the correct value of $\beta$, then $alpha>0$ makes no difference. It’s a bit odd to just report the value of these scaling parameters as > 0, it would be more insightful to report the exact values used.

Some information from Appendix I should be in the main paper, at least the number of dimensions in each slot.

**Refs**

Montero et al. (2020) "On the Role of Disentanglement in Generalisation".

Montero et al. (2022) "Lost in Latent Space: Examining failures of disentangled models at combinatorial generalisation"

Higgins et al. (2016) "beta-vae: Learning basic visual concepts with a constrained variational framework."

Esmaeli et al. (2019) "Structured Disentangled Representations"

Mahon et al. (2024) "Correcting Flaws in Common Disentanglement Metrics"

Vinh et al (2009). "Information Theoretic Measures for Clustering Comparison: Is a Correction for Chance Necessary?"

Meta-review: # Summary
This paper investigates the conditions for disentangling concept attributes. It
proposes a theory of interaction asymmetry principle for learning disentangled representation, and introduces metrics to evaluate disentanglement. Implementation of theory and experiments are conducted to support the claims.

# strengths
+ The principle of interaction asymmetry, offers a novel and insightful perspective on disentanglement and compositionally.
+ It presents a solid theoretical foundation.
+ It unifies existing work while also extending to more complex scenarios.
+ The paper is well-written and easy to follow.

# weaknesses
- experimental support is limited: need to conduct experiments on more complex data.
- need additional discussion on theoretical assumptions.
- need to discuss the relationship between disentanglement and compositional generalization further.
- need to discuss scalability of method and relationship to Slot Attention.

# reasons for decision
The paper provides insights for better understanding compositional representation learning, and it makes a significant step toward learning useful representations for real-world tasks.
The combination of theoretical insights with a practical Transformer-based VAE implementation is also notable. I recommend accept.

Decision: Accept (Poster)