Skip to main content

Python bindings for HypercubeHopfield: modern Hopfield associative memory on hypercube graphs

Project description

HypercubeHopfield: Modern Hopfield Associative Memory

Pattern storage and recall on Boolean hypercube graphs, with exponential capacity and softmax attention over sparse Hamming-ball neighborhoods.

Installation

pip install hypercube-hopfield

Quick Start

import numpy as np
import hypercube_hopfield as hh

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

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

# Recall from a noisy cue
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}")

Features

  • Explicit pattern storage with exponential capacity
  • Softmax attention over sparse Hamming-ball neighborhoods
  • Two update modes: Sync (deterministic, GPU-portable) and Async (guaranteed energy descent)
  • Pickle support for saving/loading networks
  • NumPy integration with automatic float32 conversion

Documentation

See Python SDK Reference for the full API.

Project details


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-0.1.1.tar.gz (10.6 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-0.1.1-cp313-cp313-win_amd64.whl (144.6 kB view details)

Uploaded CPython 3.13Windows x86-64

hypercube_hopfield-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl (295.2 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

hypercube_hopfield-0.1.1-cp313-cp313-macosx_11_0_x86_64.whl (168.4 kB view details)

Uploaded CPython 3.13macOS 11.0+ x86-64

hypercube_hopfield-0.1.1-cp313-cp313-macosx_11_0_arm64.whl (154.6 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

hypercube_hopfield-0.1.1-cp312-cp312-win_amd64.whl (144.6 kB view details)

Uploaded CPython 3.12Windows x86-64

hypercube_hopfield-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl (295.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

hypercube_hopfield-0.1.1-cp312-cp312-macosx_11_0_x86_64.whl (168.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

hypercube_hopfield-0.1.1-cp312-cp312-macosx_11_0_arm64.whl (154.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

hypercube_hopfield-0.1.1-cp311-cp311-win_amd64.whl (142.9 kB view details)

Uploaded CPython 3.11Windows x86-64

hypercube_hopfield-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl (294.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

hypercube_hopfield-0.1.1-cp311-cp311-macosx_11_0_x86_64.whl (166.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

hypercube_hopfield-0.1.1-cp311-cp311-macosx_11_0_arm64.whl (153.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

hypercube_hopfield-0.1.1-cp310-cp310-win_amd64.whl (142.1 kB view details)

Uploaded CPython 3.10Windows x86-64

hypercube_hopfield-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl (293.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

hypercube_hopfield-0.1.1-cp310-cp310-macosx_11_0_x86_64.whl (165.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

hypercube_hopfield-0.1.1-cp310-cp310-macosx_11_0_arm64.whl (152.1 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: hypercube_hopfield-0.1.1.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hypercube_hopfield-0.1.1.tar.gz
Algorithm Hash digest
SHA256 92e57b368b3b55544ddf15780606a02a3cd72e75b69292de43b5f84aa52dd1b3
MD5 c069ead236633cddac70dee2c07f1f3f
BLAKE2b-256 3dbb8499be6e517dc50e19237be5933079307de3cb9481dc95a89952570b17ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.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-0.1.1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6b8aef737ce149d3b689ccbb399f1793dba521cd50e4bc6105a45435c225df58
MD5 8d933af800de765482ef5be2c8d63d78
BLAKE2b-256 bcbbe8bdf352ba82cd99965e22d347637303971373dc14cea9b083215c716b7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.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-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 28eada9433cd7a3d93e9bdd4fada84b4b1e4bec397c01f2cb8459e7a3d9e90df
MD5 d4f278b553e0fac8834d64d2a61a4e36
BLAKE2b-256 c3d1a72f9cfc9016d191a3077325713c2ea4614dba6aa6f5c3819c257facd2be

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.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-0.1.1-cp313-cp313-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.1-cp313-cp313-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 bc6cbc6021e26db1efd08aceed82dbe011c1a9de82837281046e8621686852c7
MD5 c81c1b0bfa55c638d53249bf136a3c97
BLAKE2b-256 71cf7b1c394b371f3c4c8711a7aa0d38d858ee6564507c118636dbc7463ab261

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.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-0.1.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5492a22923bb298e10c2ea9b3752b3b99d559569b61a28741277964ad8ceb318
MD5 c942ed6df326558afdf5061acfc5d9d1
BLAKE2b-256 550fc61a1791f70921c12bf7f6bb672c230d3a3539d1cf239202dfb3fa0058be

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.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-0.1.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 50277821d6fc9367a7b7cb1e259206e99d3d002de7310e6af1213aadd2ad5bbd
MD5 7488238d7695486604c7ea16d142696e
BLAKE2b-256 b028a3bf12bedb4d8329d3799e6ba8e52334a5aebda3b4b27b93721d378a54d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.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-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a452509c575e907ee224bb7e2417c6b14cf1348e1c75af7d01f6794860cfdf56
MD5 519494ffebe9444ce3f33edeac6c082c
BLAKE2b-256 2ce675e789b92884f308e3c3da9fe85b406e53d91f61dfd615512fccd4357c09

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.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-0.1.1-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.1-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 d819eebeefa11f232831fb30f8e6223277be607d82bcac5fb6644283769e332f
MD5 7efb5cfb5e54560396eea1c32a464649
BLAKE2b-256 86c72d1fcc45dcbfcff42e0b09e91f83bd4695d9ff8bafdce596c326f53f8744

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.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-0.1.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 12cb36c1c7648482f8ff84c0ba59e0542f0d2a94ff46f6487961df567e469dc8
MD5 2c2b2f3f7235e8ed4a2e612d3c83c089
BLAKE2b-256 349f5e79343356da222bac07d198099f21a0463cacdcb223a8334340e258f688

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.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-0.1.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b73dbede39c0f4fa3d87d47907579b656ff3368efb3e64cd21806e4c41c76fa2
MD5 79e372f8ab2551b5f895872f36b95176
BLAKE2b-256 13f9d993dff7d2dea292c554fb60e6e27c641144bdc9cbf6842949d00fa90cf6

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.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-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 206518baf81fc8f9422115b3fee5019d01891130c96ffea7f1f8694d55a780d4
MD5 081c9461728015aabd6bbc99a74a51c8
BLAKE2b-256 7d509092f82833b0ae2a5c381e7732ce5c45dac33677f2436531d754f53346ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.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-0.1.1-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.1-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 dd33aa78bcb41a7d09f6e54286b761ff05a3dfb5e5e3a60525393ddb7c70961b
MD5 bd954f1723742a87adf8738c7b16e707
BLAKE2b-256 f639f003004e8daaeb5da16bf0a36f004fcd15f27ba24b58aa13b8b38a0665cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.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-0.1.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b7a814cc500929a43fa1e17912bf6f9693e0992aae619f3cfac81b4b8f0aa8a4
MD5 652103196c4a611abbd092cc40944b0c
BLAKE2b-256 ea04a59744525d45bed3781a6c311dc4497192b3e53e00ed14501ac390f0af7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.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-0.1.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7c1808dc129a3945adacecf6e386a4db9899c2c4e4485a72910aad3b5ac329e6
MD5 0536154784e9eb6a4335bba78d38d64f
BLAKE2b-256 c259c6596164fd59ce905c2413778533c5501a25cd72e488e3564f0be1050431

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.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-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4e4a290b92a555034c534995965ac4e1b89414710fb7290c6b7317d99c087f9e
MD5 a2f45a99e9772a4cd677d1da360f93ab
BLAKE2b-256 b920a6f97eff5c711d1eb0440913f35624ad5ce07fe2b2bf7ae966d1ce977724

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.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-0.1.1-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.1-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 66ab09922068f3ecd103e7c95f8f4f4230de684cf93b9e6776f5548c6de09930
MD5 f5727370df02914b229585e6695d3c96
BLAKE2b-256 3d14d3c090988050921b27747193326e6dcb705f00e1b0f0d0588b92a6a658bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.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-0.1.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for hypercube_hopfield-0.1.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5add3e8c44167cb81b3e6f5ae709d267681960feaf1e2de1300e699976e8a58a
MD5 afbce6beebd084f6e17d3721fc7560f4
BLAKE2b-256 aa42a1ceda8ec4031728ca13de20e5dbe892e44cff77541e6b4d5cb61a439342

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypercube_hopfield-0.1.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.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page