# Random subcube model

In statistical mechanics, the random-subcube model (RSM) is an exactly solvable model that reproduces key properties of hard constraint satisfaction problems (CSPs) and optimization problems, such as geometrical organization of solutions, the effects of frozen variables, and the limitations of various algorithms like decimation schemes.
The RSM consists of a set of N binary variables, where solutions are defined as points in a hypercube. The model introduces clusters, which are random subcubes of the hypercube, representing groups of solutions sharing specific characteristics. As the density of constraints increases, the solution space undergoes a series of phase transitions similar to those observed in CSPs like random k-satisfiability (k-SAT) and random k-coloring (k-COL). These transitions include clustering, condensation, and ultimately the unsatisfiable phase where no solutions exist.
The RSM is equivalent to these real CSPs in the limit of large constraint size. Notably, it reproduces the cluster size distribution and freezing properties of k-SAT and k-COL in the large-k limit. This is similar to how the random energy model is the large-p limit of the p-spin glass model.

## Setup
### Subcubes

There are $N$ particles. Each particle can be in one of two states $-1,+1$.
The state space $\{-1,+1\}^{N}$ has $2^{N}$ states. Not all are available. Only those satisfying the constraints are allowed.
Each constraint is a subset $A_{i}$ of the state space. Each $A_{i}$ is a "subcube", structured like $A_{i}=\prod _{j\in 1:N}A_{ij}$ where each $A_{ij}$ can be one of $\{-1\},\{+1\},\{-1,+1\}$.
The available states is the union of these subsets: $S=\cup _{i}A_{i}$

### Random subcube model

Each random subcube model is defined by two parameters $\alpha ,p\in (0,1)$.
To generate a random subcube $A_{i}$, sample its components $A_{ij}$ IID according to ${\begin{aligned}Pr(A_{ij}&=\{-1\})&=p/2\\Pr(A_{ij}&=\{+1\})&=p/2\\Pr(A_{ij}&=\{-1,+1\})&=1-p\end{aligned}}$
Now sample $2^{(1-\alpha )N}$ random subcubes, and union them together.

### Entropies

The entropy density of the $r$-th cluster in bits is $s_{r}:={\frac {1}{N}}\log _{2}|A_{r}|$
The entropy density of the system in bits is $s:={\frac {1}{N}}\log _{2}|\cup _{r}A_{r}|$

## Phase structure
### Cluster sizes and numbers

Let $n(s)$ be the number of clusters with entropy density $s$, then it is binomially distributed, thus ${\begin{aligned}E[n(s)]&=2^{(1-\alpha )N}P\to 2^{N\Sigma (s)+o(N)}\\Var[n(s)]&=2^{(1-\alpha )N}P(1-P)\\{\frac {Var[n(s)]}{E[n(s)]^{2}}}&\to 2^{-N\Sigma (s)}\end{aligned}}$ where ${\begin{aligned}P&:={\binom {N}{sN}}p^{(1-s)N}(1-p)^{sN},\\\Sigma (s)&:=1-\alpha -D_{KL}(s\|1-p)\\D_{KL}(s\|1-p)&:=s\log _{2}{\frac {s}{1-p}}+(1-s)\log _{2}{\frac {1-s}{p}}\end{aligned}}$
By the Chebyshev inequality, if $\Sigma >0$, then $n(s)$ concentrates to its mean value. Otherwise, since $E[n(s)]\to 0$, $n(s)$ also concentrates to $0$ by the Markov inequality.
Thus, $n(s)\to {\begin{cases}2^{N\Sigma (s)+o(N)}\quad &{\text{if }}\Sigma (s)>0\\0\quad &{\text{if }}\Sigma (s)<0\end{cases}}$ almost surely as $N\to \infty$.
When $\Sigma =0$ exactly, the two forces exactly balance each other out, and $n(s)$ does not collapse, but instead converges in distribution to the Poisson distribution $Poisson(1)$ by the law of small numbers.

### Liquid phase

For each state, the number of clusters it is in is also binomially distributed, with expectation$2^{(1-\alpha )N}(1-p/2)^{N}=2^{N(\log _{2}(2-p)-\alpha )}$
So if $\alpha <\log _{2}(2-p)$, then it concentrates to $2^{N(\log _{2}(2-p)-\alpha )}$, and so each state is in an exponential number of clusters.
Indeed, in that case, the probability that all states are allowed is$[1-[1-(1-p/2)^{N}]^{2^{(1-\alpha )N}}]^{2^{N}}\sim e^{-e^{-2^{N(\log _{2}(2-p)-\alpha )}+N\ln 2}}\to 1$
Thus almost surely, all states are allowed, and the entropy density is 1 bit per particle.

### Clustered phase

If $\alpha >\alpha _{d}:=\log _{2}(2-p)$, then it concentrates to zero exponentially, and so most states are not in any cluster. Those that do are exponentially unlikely to be in more than one. Thus, we find that almost all states are in zero clusters, and of those in at least one cluster, almost all are in just one cluster. The state space is thus roughly speaking the disjoint union of the clusters.
Almost surely, there are $n(s)=2^{N\Sigma (s)}$ clusters of size $2^{Ns}$, therefore, the state space is dominated by clusters with optimal entropy density $s^{*}=\arg \max _{s}(\Sigma (s)+s)$.
Thus, in the clustered phase, the state space is almost entirely partitioned among $2^{N\Sigma (s^{*})}$ clusters of size $2^{Ns^{*}}$ each. Roughly, the state space looks like exponentially many equally-sized clusters.

### Condensation phase

Another phase transition occurs when $\Sigma (s^{*})=0$, that is,$\alpha =\alpha _{c}:={\frac {p}{(2-p)}}+\log _{2}(2-p)$When $\alpha >\alpha _{c}$, the optimal entropy density becomes unreachable, as there almost surely exists zero clusters with entropy density $s^{*}$. Instead, the state space is dominated by clusters with entropy close to $s_{c}$, the larger solution to $\Sigma (s_{c})=0$.
Near $s_{c}$, the contribution of clusters with entropy density $s=s_{c}-\delta$ to the total state space is $\underbrace {2^{Ns}} _{\text{size of clusters}}\times \underbrace {2^{N\Sigma (s)}} _{\text{number of clusters}}=2^{N(s+\Sigma (s))}=2^{N(s_{c}-\delta -\Sigma '(s_{c})\delta )}$ At large $N$, the possible entropy densities are $s_{c},s_{c}-1/N,s_{c}-2/N,\dots$. The contribution of each is
$2^{Ns_{c}},2^{Ns_{c}}2^{-(1+\Sigma '(s_{c}))},2^{Ns_{c}}2^{-2(1+\Sigma '(s_{c}))},\dots$
We can tabulate them as follows:
| $s$ | $s_{c}$ | $s_{c}-1/N$ | $s_{c}-2/N$ |
| #clusters | $1$ | $2^{\Sigma '(s_{c})}$ | $2^{2\Sigma '(s_{c})}$ |
| contributes | ${\frac {1}{1-2^{-(1+\Sigma '(s_{c}))}}}$ | ${\frac {2^{-(1+\Sigma '(s_{c}))}}{1-2^{-(1+\Sigma '(s_{c}))}}}$ | ${\frac {2^{-2(1+\Sigma '(s_{c}))}}{1-2^{-(1+\Sigma '(s_{c}))}}}$ |
Thus, we see that for any $\epsilon >0$, at $N\to \infty$ limit, over $1-\epsilon$ of the total state space is covered by only a finite number of clusters. The state space looks partitioned into clusters with exponentially decaying sizes. This is the condensation phase.

### Unsatisfiable phase

When $\alpha >1$, the number of clusters is zero, so there are no states.

## Extensions

The RSM can be extended to include energy landscapes, allowing for the study of glassy behavior, temperature chaos, and the dynamic transition.