Skip to main content

HypercubeHopfield

HypercubeHopfield — modern Hopfield associative memory on a Boolean hypercube. Neurons sit on the vertices of a dim-dimensional cube (N = 2^dim). Patterns are stored explicitly and retrieved by softmax attention over a sparse neighborhood — not collapsed into a Hebbian weight matrix, and not full all-to-all modern-Hopfield attention either.

A topology you don't store. Connectivity is the mask table of the Hamming ball — one XOR per neighbor, no adjacency list, at any size. Each vertex attends only inside that ball; cost scales with connections, not with the full cube.


HypercubeAI ecosystem
One geometry. Three libraries. Topology-native intelligence.

HypercubeESN  ·  HypercubeCNN  ·  HypercubeHopfield

HypercubeHopfield is a pillar of HypercubeAI — a family of tools that treat the Boolean hypercube as a first-class computational medium: dynamical reservoirs (ESN), convolutional learning on the same graph (CNN), and associative memory (Hopfield). Shared vertices, shared XOR neighborhoods, no bolted-on grid.


Installation

pip install hypercube-hopfield

Pre-built wheels for Python 3.10–3.13 on Windows, Linux, and macOS. NumPy is the only runtime dependency.

Build from source (C++23 + CMake): see the Python SDK guide.

Quick Start

import numpy as np
import hypercube_hopfield as hh

# 256 neurons (dim=8, N=2^8)
net = hh.HopfieldNetwork(dim=8, seed=42)

patterns = np.random.randn(10, net.num_vertices).astype(np.float32)
net.store_patterns(patterns)

cue = patterns[0] + np.random.randn(net.num_vertices).astype(np.float32) * 0.3
result = net.recall(cue)
print(f"Converged: {result.converged}, steps: {result.steps}")
# result.state is the cleaned recall; input cue is not modified

Features

  • Explicit pattern storage — modern Hopfield retrieval without a Hebbian weight matrix
  • Sparse Hamming-ball attentionreach and neighbor_fraction control connectivity and cost
  • Two update modes — Sync (default, deterministic) and Async (guaranteed energy descent)
  • Pickle / save / load — persist config and all stored patterns
  • NumPy integration — automatic float32 conversion; recall does not mutate the cue

Documentation

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hypercube_hopfield-1.0.1.tar.gz (12.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

hypercube_hopfield-1.0.1-cp313-cp313-win_amd64.whl (162.8 kB view details)

Uploaded CPython 3.13Windows x86-64

hypercube_hopfield-1.0.1-cp313-cp313-manylinux_2_28_x86_64.whl (296.0 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

hypercube_hopfield-1.0.1-cp313-cp313-macosx_11_0_x86_64.whl (169.2 kB view details)

Uploaded CPython 3.13macOS 11.0+ x86-64

hypercube_hopfield-1.0.1-cp313-cp313-macosx_11_0_arm64.whl (155.4 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

hypercube_hopfield-1.0.1-cp312-cp312-win_amd64.whl (162.8 kB view details)

Uploaded CPython 3.12Windows x86-64

hypercube_hopfield-1.0.1-cp312-cp312-manylinux_2_28_x86_64.whl (295.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

hypercube_hopfield-1.0.1-cp312-cp312-macosx_11_0_x86_64.whl (169.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

hypercube_hopfield-1.0.1-cp312-cp312-macosx_11_0_arm64.whl (155.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

hypercube_hopfield-1.0.1-cp311-cp311-win_amd64.whl (160.4 kB view details)

Uploaded CPython 3.11Windows x86-64

hypercube_hopfield-1.0.1-cp311-cp311-manylinux_2_28_x86_64.whl (295.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

hypercube_hopfield-1.0.1-cp311-cp311-macosx_11_0_x86_64.whl (167.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

hypercube_hopfield-1.0.1-cp311-cp311-macosx_11_0_arm64.whl (154.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

hypercube_hopfield-1.0.1-cp310-cp310-win_amd64.whl (158.7 kB view details)

Uploaded CPython 3.10Windows x86-64

hypercube_hopfield-1.0.1-cp310-cp310-manylinux_2_28_x86_64.whl (294.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

hypercube_hopfield-1.0.1-cp310-cp310-macosx_11_0_x86_64.whl (165.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

hypercube_hopfield-1.0.1-cp310-cp310-macosx_11_0_arm64.whl (152.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file hypercube_hopfield-1.0.1.tar.gz.

File metadata

  • Download URL: hypercube_hopfield-1.0.1.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for hypercube_hopfield-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b71a33934107cb96177acc90ac6f0f5684db0343e605d7ba87c4fa549e7998a7
MD5 bc51623582472d93ac1045f11fbfba17
BLAKE2b-256 97148cf94aba62f34a7bd075b75cfced4650c12aff08d0b7a08a68efda59dcec

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-1.0.1.tar.gz:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hypercube_hopfield-1.0.1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 4eb7d6353ad88fbc2c205416307327100cbb157e83b38f358a6c742d1aadf5d3
MD5 6b8f680e6681ef514b0996d66cedeeb8
BLAKE2b-256 a820ea8370de4dd4b2b601f0f8ce3d0f3e36247a6419c4a7eabbda4522a14b9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-1.0.1-cp313-cp313-win_amd64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hypercube_hopfield-1.0.1-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 972a3175ecb4480a4e0d07fddb05f2e6ac3927c0c4f5429ae168d39147e87597
MD5 05cc143d618285e2edf65222706f4166
BLAKE2b-256 00c2913cd123fd731b726cf451ca3f26bfa3bdf660c077b0481c03a9f9f84f6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-1.0.1-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hypercube_hopfield-1.0.1-cp313-cp313-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.1-cp313-cp313-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 7ff7f411379c80417a0d2120e4bf6e462c7f134cb2a0c805e53d0106e54e25f0
MD5 bbb9534b3ff740eec1e6cf27ddf70ed2
BLAKE2b-256 c53d7b61a0186b5e2f538da9b0c319a2e78bc0fbea0c2dbbe0a0aec61cb3255a

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-1.0.1-cp313-cp313-macosx_11_0_x86_64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hypercube_hopfield-1.0.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b8c04797fcb62997e3583ad090173dc0ec543efa3234984e510f2969c24afcc2
MD5 f73525027df6d0dd365c76b007cf09b2
BLAKE2b-256 9cdd4adef4d7597aa061b236f564223cede9e1478c5143ff4b1b58750659bb80

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-1.0.1-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hypercube_hopfield-1.0.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 61ec91b9154a87b9d1f4fbed74970722a2f360bec86c75d33cc608d705859490
MD5 dc5c89731e3215f088e505c69a2644d8
BLAKE2b-256 970a261d05ac955207fccc73f3ea9f3d99335667419df1a5ee82005c43b60d69

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-1.0.1-cp312-cp312-win_amd64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hypercube_hopfield-1.0.1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 497138bcf36a6909784b508960feb0006ba13ed4e99f0239d39104166f4d35dc
MD5 ace15673e69108f3732fa842ab6d7a77
BLAKE2b-256 8abe1138c6f7e1984895f3aa210f4f9341da03c7b3227962a3a6d8c3b114895f

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-1.0.1-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hypercube_hopfield-1.0.1-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.1-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 828d3a8cf0fbd61ece760542b17734bb6de0ad26160eb078bd439dc8dbcede3a
MD5 e83057271d291a67f28ae1a570d77e0c
BLAKE2b-256 e4a15c498249735acfa275ab4d482bd0de727b9e8186a4f0703980dd89fd04d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-1.0.1-cp312-cp312-macosx_11_0_x86_64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hypercube_hopfield-1.0.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 81a677ea926c48864c9eaa545a3161b402d08982cbbca3051c9dbfd27d95b302
MD5 54fb374c8cfeb81533def2916bfd5ea1
BLAKE2b-256 e1fd453fe4591b37d54920a7e5d01e6e4b315a543e9e48ac712dac87f0405f59

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-1.0.1-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hypercube_hopfield-1.0.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ef0220571a3652b17fba8e74b62ad10c2e3bf70c24f68e785526637e2943d900
MD5 ffb8c76f222ffc3da4e54eddced74125
BLAKE2b-256 d5416df8ebd6c9a66a96905a21a063662a9956fdf4b63d850ba878b5decda61b

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-1.0.1-cp311-cp311-win_amd64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hypercube_hopfield-1.0.1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ba37eda009fbf07b5a8284d4af813c78a5c2783efdfd4ca6e3eaafbcb3ec6ca0
MD5 4f4293bd14c7610d054ee2e25bcdecd3
BLAKE2b-256 8b3a238829e435c7ac538e36850f871b344fc0261f83a29b10a1b120ae0c2c85

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-1.0.1-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hypercube_hopfield-1.0.1-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.1-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 712ab2c3fa1afb829697760154704e278d59f877e8502a0dddc3b3e409841caa
MD5 e2cdc55cf7a313fa9658944b6fce0596
BLAKE2b-256 7e12bdd352ea51bfe97661880d4b5177e78c0692f6e492daaf91bbdc8e54c6c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-1.0.1-cp311-cp311-macosx_11_0_x86_64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hypercube_hopfield-1.0.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 86d1134330749088e49432db5a565f1fdbb8149eb63475a463b5ca76554fbc6e
MD5 f62479f19e0ab665e963ca05a8f31c7c
BLAKE2b-256 e4766653d8249fbede65d343bf0b6b4935603f696f833a0881f54e7cfdaaef9c

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-1.0.1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hypercube_hopfield-1.0.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8835970ec0cc64a3db2ab049efe6f0fbeb9e861816e8bddebd2954e965be8723
MD5 10ae4be29a91a7b8e4bcdba252c5dcf1
BLAKE2b-256 368fb393925cab62a211f808c0584391feee6f9fcb3c5047c6e4950d81378c2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-1.0.1-cp310-cp310-win_amd64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hypercube_hopfield-1.0.1-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bdf4ee2386c32351b441fc19a96cbc4723d0a3a3947c3ab00db1e667c67671bb
MD5 4442fb09740970f84c3461d8dca15491
BLAKE2b-256 1148b0f89553839ca039053b6a86260036a090ac23b425a4a5964b9d546b8029

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-1.0.1-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hypercube_hopfield-1.0.1-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.1-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 c696af38cc3e6f4fff7c5df9c11eb665ddda545b6f2e100c8add920af95e7119
MD5 4ba3132bbe85875b3d74b003f2cc81ee
BLAKE2b-256 3597b70ebf091199c2979fc67acd1b53c30f776c90555d7066eb4a0ad29fdc15

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-1.0.1-cp310-cp310-macosx_11_0_x86_64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hypercube_hopfield-1.0.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ad7c58bb480c8f890f0931a4f610931d9114fcaf5f7485f2cfecf2a16bc1bd7e
MD5 679a2f04a252c8497d0f91532febaeb7
BLAKE2b-256 972c7fe8a65d24edf372339df0bcba2bb6488cf0a3f1b45f58c0af649d95c9f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-1.0.1-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: wheels.yml on dliptak001/HypercubeHopfield

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.0.3

17 files

1.0.2

17 files

This release

1.0.1 This release

17 files

1.0.0

17 files

0.1.1

17 files

0.1.0

17 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page