← Back to Portfolio

rhombic

Open-source lattice topology benchmarking library. Empirical comparison of cubic and FCC lattices across four domains — with an arXiv preprint.

View Project →

What It Does

rhombic is a benchmarking library that compares two ways of tiling three-dimensional space: the cubic lattice (6 neighbors per cell) and the face-centered cubic lattice (12 neighbors per cell, Voronoi cells are rhombic dodecahedra). It measures the difference across four independent domains, reports exact numbers, and publishes the code that generates them.

The Measurements

DomainFCC vs CubicCost
Graph routing30% shorter paths, 2.4x algebraic connectivity~2x edges
Spatial operations55% more flood fill reach, 17% faster NN queries3-5x range query time
Signal processing5-10x lower reconstruction MSE, 5-20x more isotropicSame sample count
Embedding retrieval+15-26pp neighborhood recall at 1-hop~2x neighborhood size
Direction-weighted Fiedler2.3x → 6.1x amplificationStructured weights
Prime-vertex coherencep = 0.00002540,320 permutations

These ratios are stable across all tested scales (125-8,000 nodes). The cost is bounded and linear. The benefit compounds. Under structured weights (Paper 2), the advantage amplifies rather than diminishes.

The cubic lattice retains advantages for axis-aligned workloads, enumeration-heavy range queries, and consensus at scale. Both outcomes are reported.

The Papers

Two research papers accompany the library:

  • Paper 1: The Shape of the Cell — four-domain topology comparison across graph theory, spatial operations, signal processing, and embedding retrieval. Six rounds of independent review refined every claim to match the evidence.
  • Paper 2: Pure Number Architecture — what happens when edges carry structured weights. Direction-based corpus weighting pushes the Fiedler ratio from 2.3x to 6.1x. The mechanism is bottleneck resilience: FCC routes around suppressed edges that strangle cubic lattices.

Both papers went through the same process we bring to consulting work: examine every default, scope every claim, let the numbers do the talking.

How It’s Built

The library generates its own evidence. The banner is rendered by the library’s own visualization code. The color palette derives from a separate mathematical system (the 8-law prime weave). Every benchmark is reproduced by a single command:

pip install rhombic && python -m rhombic.benchmark

208 tests. Full deterministic reproducibility via fixed seeds. Provenance attestation on the PyPI artifact linking the published package to its source commit.

Ecosystem

Technical

  • Python 3.10+, core dependencies: numpy, networkx, scipy
  • License: MPL-2.0
  • 208 tests across lattice, graph, spatial, signal, and embedding modules

Built by Promptcrafted.