Small examples
Q2. Can one network preserve all selected spin patterns?
Every coordinate is −1 or +1; every selected vertex must have positive margins under one common network.
Click vertices · Blue = prescribed memory
How often is a uniform set storable?
Every set of this size is equally likely; each may use a different network.
All sets
✓ Storable · × Impossible
Why? The two-neuron criterion and proof
$$J=\begin{pmatrix}0&w\\w&0\end{pmatrix},\qquad h\in\mathbb R^2,\qquad H_i(s)=ws_{3-i}+h_i.$$
· Which prescribed sets can two neurons store?
For \(D\subseteq\{-1,1\}^2\), $$D\text{ storable}\iff d_H(s,t)\ne1\quad\forall s,t\in D,$$ where \(d_H(s,t)=|\{i:s_i\ne t_i\}|\).
Why is this criterion exact?
Step 1. Identical inputs cannot require opposite signs
If \(s,t\) differ only at neuron \(i\), then $$H_i(s)=H_i(t),\qquad t_i=-s_i.$$ Both signed margins cannot be positive.
Proof
For \(s=(-1,-1)\) and \(t=(-1,+1)\), neuron 2 would require $$-w+h_2<0\quad\text{and}\quad-w+h_2>0.$$ The zero diagonal makes its input identical in both patterns.
Step 2. Classify the remaining sets
A set without adjacent vertices is empty, a singleton, or one of the opposite pairs $$\{(-1,-1),(+1,+1)\},\qquad\{(-1,+1),(+1,-1)\}.$$
Proof
Each square vertex has exactly one distinct nonadjacent vertex, its negative. Thus a nonempty such set has at most two members.
Step 3. Store the empty set and each singleton
For \(D=\{s\}\), choose $$J=0,\qquad h=s,\qquad s_iH_i(s)=1.$$ The empty set imposes no constraints.
Proof
These parameters satisfy symmetry and zero diagonal; each field has the prescribed sign.
Step 4. Store both opposite pairs
For \(D=\{s,-s\}\), choose $$w=s_1s_2,\qquad h=0,\qquad t_iH_i(t)=1\quad\forall t\in D,\ i\in\{1,2\}.$$
Proof
Since \(t=\pm s\), $$t_i(s_1s_2)t_{3-i}=1.$$ Step 1 gives necessity; Steps 2–4 give sufficiency.
Why? Three neurons and the parity obstruction
For \(D\subseteq\{-1,1\}^3\), $$D\text{ storable}\iff |D|\le3\quad\text{and}\quad d_H(s,t)\ne1\quad\forall s,t\in D.$$
The only four-vertex sets without adjacent vertices are the two parity classes; neuron 1 cannot separate their required labels.
For the class \(\{(-1,-1,-1),(-1,+1,+1),(+1,-1,+1),(+1,+1,-1)\}\), $$\begin{aligned}H_1(-1,-1,-1)+H_1(-1,+1,+1)&=2h_1<0,\\H_1(+1,-1,+1)+H_1(+1,+1,-1)&=2h_1>0.\end{aligned}$$
Every independent triple is a coordinate permutation and coordinate sign change of this strictly stored example:
$$D_0=\{(-1,-1,-1),(-1,+1,+1),(+1,-1,+1)\},$$
$$J_0=\frac12\begin{pmatrix}0&-1&1\\-1&0&1\\1&1&0\end{pmatrix},\qquad h_0=(-1/2,-1/2,+1/2)^\top,$$
$$\min_{s\in D_0,\ i\in[3]}s_i((J_0s)_i+h_{0i})=\frac12.$$
Distance-two pairs extend to such a triple; opposite pairs use the one-memory outer product; singletons and the empty set are immediate.
For a diagonal sign matrix \(T\), $$ (s,J,h)\mapsto(Ts,TJT,Th) $$ preserves every signed margin; coordinate permutations do likewise.
4, 5 and 6 neurons: a hypercube of spin patterns
Literature: what does each drawing preserve?
Copy and connect. Duplicate the previous cube and join corresponding vertices; this preserves the exact adjacency list. Knott, Polytopes, “How to generate hypercubes”.
Projection and rotation. Egan’s interactive 4- and 5-cubes project into three dimensions; overlapping vertices and distorted lengths require coordinate labels. Egan (2005), Hypercube, opening description.
Distance layouts. Abramson and Zanette optimize planar distances against Hamming distances; weighting nearby vertices changes the layout substantially. Abramson–Zanette (2003), Eqs. (1), (3), Fig. 1.
For this storage question, the drawing below uses coordinate faces and exact one-spin links; screen distances carry no mathematical meaning.
| Neurons n | Patterns | One-spin edges | 3-cube faces shown |
|---|---|---|---|
| 4 | 16 | 32 | 2 |
| 5 | 32 | 80 | 4 |
| 6 | 64 | 192 | 8 |
Solid edges flip one of s₁,s₂,s₃ inside a face; dashed edges join matching v across faces whose suffixes differ in one sign.
Blue = selected memory; orange ring = inspected pattern; bold edges = its n one-spin neighbors.
On a narrow screen, scroll the drawing sideways to see both columns of faces.
What do the presets establish about storage?
Opposite pair. For any ξ ∈ Vₙ, one common symmetric network stores ξ and −ξ:
$$J_{ij}=\begin{cases}\xi_i\xi_j,&i\ne j,\\0,&i=j,\end{cases}\qquad h=0,\qquad g_i(\pm\xi)=n-1>0.$$Adjacent pair. At the changed coordinate, identical other inputs demand opposite outputs; no zero-diagonal network can store both.
Parity in a 3-face. Fixing the other coordinates only adds a constant to each varying neuron’s field, so the three-neuron parity contradiction still applies.
For a manually selected set, the display checks the explicit all-ones outer-product network; failure of that network alone does not decide whether another network can store it.
The capacity question fixes the load and lets the number of neurons grow.