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-1.0.0.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-1.0.0-cp313-cp313-win_amd64.whl (162.0 kB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.13macOS 11.0+ x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

hypercube_hopfield-1.0.0-cp312-cp312-win_amd64.whl (162.0 kB view details)

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.12macOS 11.0+ x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

hypercube_hopfield-1.0.0-cp311-cp311-win_amd64.whl (159.7 kB view details)

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.11macOS 11.0+ x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

hypercube_hopfield-1.0.0-cp310-cp310-win_amd64.whl (157.9 kB view details)

Uploaded CPython 3.10Windows x86-64

hypercube_hopfield-1.0.0-cp310-cp310-manylinux_2_28_x86_64.whl (293.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.10macOS 11.0+ x86-64

hypercube_hopfield-1.0.0-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-1.0.0.tar.gz.

File metadata

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

File hashes

Hashes for hypercube_hopfield-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7d566f9c606df5f71d6b223a817c29f71312a52605239ba3669e455ebed7ac59
MD5 907e1da8cca9d80936eaded9fc451897
BLAKE2b-256 08d3cf28f33fd16485e877e6c324db518bf8b6dfefc23d79719a94a13a899639

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 26d35096241520dba7f85ee6252d66317e9728a7e27b7c08b5fe67541ca31763
MD5 3270ed8c216c8f4b1ce8511b5d542d1b
BLAKE2b-256 7e9c28c3fde88a3cbc47f8f473eb22f05e6453ebb8cd22f67e2c5574f74ad422

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 97f262c0b430ff549f7938c0038c3f60f82ba3d6a135aad97213457d7b94273a
MD5 924c17bd1279342ab861c0b2f22f289d
BLAKE2b-256 d0a5d43469334fa0708298adb7a904df61d78b2af83b802adaf54bc7b13ef9c1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.0-cp313-cp313-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 03140ae2d844cb63bf8c7949bad2a9c6c7b50af36095e72767abcedac72eb78d
MD5 b24ef3423437705c0db97cfd9f6c364e
BLAKE2b-256 6dce96c6372a43092b5089c4b3c51f28beca9787604f3ae873a89ea431e5ba80

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 39bda291b34743920fab9f42d094a815455a42b04d86ecd91f1c2ecfbd6b1299
MD5 12afcf254686366682fd480164245ef6
BLAKE2b-256 41506aae5dc29722a97a7ef966550d3ad5be9a2fe1dab0f80e7e4ccf2cf700c8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4e71a38d1a21ec846c4fb17b6ff26239fda905a71e23ad6c3faac34d7bdbbbf5
MD5 ef15fabd52de07f181ce9febe18251d7
BLAKE2b-256 4936de80ff1a94962ea8ba8c05bffa28a8207478674a1b1e0c17e5aa1eb3dfa1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9b9db74eb8b9d36241a87b3819f2336227aa18527b3a550f7c07296c352ac6a3
MD5 607b8fb1d93474bd1b3d64d7046884d7
BLAKE2b-256 5a391b6204cc2d8c2ff40b50688617fca5652a001504c4bea6cef44be88eb270

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.0-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 2c15ecd6b4ce78835c4308490c600c0325408e9dd17705d65b77a6675fe33f13
MD5 79fd3fd70629cbcb665ad7419de0b2b0
BLAKE2b-256 62ff5b69ac9fe405ea5864b000888c74b3f5be81d35aaecb8e350f5437eafc46

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 52cf0cd1b76f81fd31a0185eaa1df5f82203376bdf4243c03b88b3ae5b0cd2fb
MD5 b26ff888498981a90651f099dd703150
BLAKE2b-256 bc020ea2ea457475043a8ce829f8da5e078aade7f683e483f42f84f9e75a4bde

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 680efe2d6409fe963c2068dd5eeffaa3af27c1342bb22b5513f0502e25fdb4ac
MD5 9b858cb5373589a0d382deb8c9c4b555
BLAKE2b-256 5a715020fa75abf2c1b0ea30b0257ef782527f7cc1b4c6286bc6de22a9439ec0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e5064b27c8f8adc83a9e1385ea179d0f13ca46de33551d913621c9c201e7bc91
MD5 92ebe3a83931f7791a0e286a2111fadf
BLAKE2b-256 1d016447319a6f31a9f3895df97001f1bd616e85d2e37c40680da18d6271a1e6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 2b4d74f2f6057d49fad54dabdf0a70760c48d4f9b419ecb53518b1e194327854
MD5 ec956db04847784fad69550732023152
BLAKE2b-256 9be8929dc8388dad8b69c1b8aeb1702523083968fec4917b0c2d9a772072fccb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cb630a2a9713d0f41194dcf112a8f2421f84366202943f3defd5d600ee96587f
MD5 56e7aa9b164d115a26afc0a5846558d1
BLAKE2b-256 af161c66645462e631f2d798b857ff86d33bffaef410591ab9b9035d687920ee

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9f70eb8f6a452e11772fa06401143c37fab46c9cd5f450fb1f16c969f7beb6fa
MD5 9ace37174a7ac3874a661d9aaf7f0f9d
BLAKE2b-256 a447b918ddd7ab36330e22a2bf5430a83b307449aacc2c969355ca57fd4053ae

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4818c4867ca36a63b601447f9b7cb89fc405607b17bf3f90c9f5acf4c3637564
MD5 9abd7bfd04671f26e7f55333398c3235
BLAKE2b-256 22cc7442d75242d3b1c1378f5a4ba9e52e581ada43ba661f3d032df22964ad0d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.0-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 e1dd2d25f5e3571d1b868a608ff68a7f077eb8c7d9c25b768168224c190ba8f2
MD5 c35721a87b4a5f327e0dc1cf7bcc3ebd
BLAKE2b-256 a74e8a85114a91d35cb42ea0d0e92d2b50b2e92f238bea854b0a1d64f0c4b66b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for hypercube_hopfield-1.0.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4a9dabf552f29f17246c36156b78d394445535165e781d7d53c646daa65566a8
MD5 ed947cca527674187382146615f4d45c
BLAKE2b-256 938fcdc2aedb69b1bba0ffc16947e2c041fed52339026d2282571d3c4b446fb6

See more details on using hashes here.

Provenance

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