An attempt at achieving data compression using inspiration from the Ising Model
This compression scheme introduces a novel approach to data representation by leveraging the Ising model, a mathematical model from statistical mechanics, to encode and reconstruct 2D binary data arrays.
We define a 2D lattice of size
Each spin interacts with its nearest neighbours (up, down, left, right), and the energy of a given configuration of spins is defined by the Ising Hamiltonian:
Where:
- The sum is taken over all nearest neighbour pairs
$( \langle i,j \rangle )$ -
$( J )$ is the interaction constant (assumed$( J > 0 )$ for ferromagnetic coupling) $( s_{ij}, s_{i'j'} \in {-1, +1} )$
In our compression scheme, we define the energy of a configuration using the above Hamiltonian and try to find the ground state of the system.
Input:
A 2D binary array of size
-
Map to Ising Spins:
Convert the binary array to Ising spins:- Bit
1$( \rightarrow )$ Spin$( +1 )$ - Bit
0$( \rightarrow )$ Spin$( -1 )$
- Bit
-
Select Minimal Seed Set:
Identify a minimal subset of spin values and their positions such that:- If only these spins are known and fixed in value, with all others being random,
- Then, under energy minimization to the ground state, the system will evolve into the original spin matrix.
-
Store the Seed Set:
Save:- A list of coordinates of the necessary spins to fix:
$( (i, j) )$ - Corresponding spin values for these fixed spins:
$( s_{ij} \in {-1, +1} )$
- A list of coordinates of the necessary spins to fix:
Output:
A compressed representation consisting of a small list of
Input:
- The list of seed coordinates and spin values
- The lattice size
$( N \times N )$ - Knowledge of the energy minimization rules (i.e., Ising Hamiltonian)
-
Initialize Lattice:
- Create an
$( N \times N )$ spin lattice - Set the spins at the given coordinates to their seed values
- Initialize all other spins randomly (e.g., sampled from
$( {-1, +1} ))$
- Create an
-
Find the Ground State:
- Apply an energy minimization algorithm to evolve the lattice to the ground state whilst keeping the original set of spins fixed throughout.
-
Map Spins Back to Bits:
- Convert each spin back to a bit:
- Spin
$( +1 \rightarrow 1 )$ - Spin
$( -1 \rightarrow 0 )$
- Spin
- Convert each spin back to a bit:
Output:
The reconstructed binary array — the original uncompressed data.
Any knowledge on whether this problem is solvable as well as the theoretical limits of this scheme are welcomed. Please get in touch: toby.hallett9@gmail.com.
