Skip to content

HLM-Spatial

HLM-Spatial applies polynomial Hopfield networks to 3D perception tasks. The same Energy Language operations that edit language models work on spatial models — every basin is a geometric pattern the model has learned.

Status

HLM-Spatial is currently training at large scale. Join the waiting list for early access.

Domains

DomainInputUse cases
LIDARPoint cloudsAutonomous driving, robotics, terrain mapping
Medical3DVolumetric scansOrgan segmentation, anomaly detection, tumor localization
Industrial3D3D meshes / point cloudsDefect detection, safety inspection, predictive maintenance

Available Models

ModelTaskMetric
LIDAR: SegmentationPoint cloud semantic segmentation96.3% accuracy
Medical: Organ SegVolumetric organ segmentation97.7% accuracy
Medical: AnomalyVolumetric anomaly detection98.7% accuracy
Industrial: DefectSurface defect classification99.5% accuracy
Industrial: SafetySafety-critical inspection100% accuracy
Predictive: Classify3D object classification99.5% accuracy

How Spatial Basins Work

In a language model, basins represent semantic patterns — "polite", "technical", "cat". In a spatial model, basins represent geometric patterns: edges, surfaces, shapes, spatial relationships, and object classes.

Each layer captures different geometric abstractions:

Layer depthWhat basins represent
Early layers (0–2)Low-level geometry: edges, normals, local curvature
Middle layers (3–5)Surface primitives: planes, cylinders, corners, junctions
Deep layers (6+)Object-level patterns: "wheel", "organ boundary", "crack"

Surveying a spatial model reveals this hierarchy:

python
from qriton_hlm import BasinSurgeon

surgeon = BasinSurgeon.from_checkpoint("hlm-spatial-lidar.pt", device="cuda")

# Early layer: many fine-grained geometric basins
survey_0 = surgeon.survey(layer=0)
print(f"Layer 0: {survey_0['num_basins']} basins (local geometry)")

# Deep layer: fewer, more semantic basins
survey_6 = surgeon.survey(layer=6)
print(f"Layer 6: {survey_6['num_basins']} basins (object-level)")

Surgery on Spatial Models

LIDAR — Point Cloud Editing

Modify how the model segments point clouds from LIDAR sensors:

python
surgeon = BasinSurgeon.from_checkpoint("hlm-spatial-lidar.pt", device="cuda")

# Survey the segmentation layer
survey = surgeon.survey(layer=5)
print(f"{survey['num_basins']} segmentation basins found")

# Discover causal links: which geometric patterns depend on each other?
graph = surgeon.causal_scan(layer=5, threshold=0.15)
for edge in graph['edges']:
    print(f"  B{edge['source']} -> B{edge['target']}  drift={edge['drift']:.3f}")

# Remove a misclassification pattern (e.g., ground points classified as obstacles)
surgeon.remove(layer=5, seed=17, strength=0.1)

# Inject a new geometric pattern for an object class
surgeon.inject(layer=5, seed=42, strength=0.1)

# Verify the edit
v = surgeon.verify(layer=5, seed=42)
print(f"Basin created: {v['is_basin']}  cos={v['cos']:.4f}")

# Apply and benchmark
surgeon.apply(layer=5)
result = surgeon.benchmark()
print(f"Accuracy after surgery: {result['perplexity']:.2f}")

# Undo if needed
surgeon.restore(layer=5)

Medical3D — Volumetric Editing

Edit organ segmentation and anomaly detection in medical volumes:

python
surgeon = BasinSurgeon.from_checkpoint("hlm-spatial-medical.pt", device="cuda")

# Survey what anatomical patterns the model has learned
survey = surgeon.survey(layer=4)

# Strengthen an organ boundary pattern to improve segmentation
surgeon.strengthen(layer=4, seed=8, factor=1.5)

# Weaken a false-positive anomaly pattern
surgeon.weaken(layer=4, seed=23, factor=0.5)

# Guard against removing too many patterns (safety-critical)
surgeon.guard(layer=4, max_remove_pct=5.0)

# Apply and verify
surgeon.apply(layer=4)
diff = surgeon.diff(layer=4)
print(f"W change: {diff['relative_pct']:.2f}%")

Industrial3D — Defect Detection

Fine-tune defect classification without retraining:

python
surgeon = BasinSurgeon.from_checkpoint("hlm-spatial-industrial.pt", device="cuda")

# Survey defect pattern basins
survey = surgeon.survey(layer=3)

# Inject a new defect type the model hasn't seen
surgeon.inject(layer=3, seed=55, strength=0.1)

# Use causal analysis to understand which defect patterns are linked
graph = surgeon.causal_scan(layer=3, threshold=0.15)
hub_basins = [
    node for node, targets in graph['adjacency'].items()
    if len(targets) >= 2
]
print(f"Hub patterns (influence many others): {hub_basins}")

# Counterfactual: what if we removed this pattern?
for hub in hub_basins:
    cf = surgeon.causal_counterfactual(layer=3, basin_idx=hub, modification='invert')
    print(f"  B{hub}: inverting would affect {cf['num_affected']} basins")

surgeon.apply(layer=3)

Cross-Modal Surgery

Because all HLM models share the same polynomial Hopfield architecture, you can transfer geometric insights across domains:

python
lidar = BasinSurgeon.from_checkpoint("hlm-spatial-lidar.pt")
medical = BasinSurgeon.from_checkpoint("hlm-spatial-medical.pt")

# Compare basin landscapes between two spatial models
diff = lidar.compare(medical, layer=3)
print(f"Shared geometric patterns: {diff['shared']}")
print(f"LIDAR-only: {diff['only_self']}")
print(f"Medical-only: {diff['only_other']}")

HLM Script — Spatial Audit

bash
# spatial_audit.hlm
load hlm-spatial-industrial.pt
info
survey-all
guard max-basins 300
guard min-basins 5

# Inspect defect detection layers
survey 3
landscape 3
causal scan 3 0.15

# Test an edit
inject 3 55 0.1
verify 3 55
diff 3
benchmark
restore 3

history

Run with: qriton-hlm --script spatial_audit.hlm

Custom Training & Pilots

For industrial, medical, or autonomous vehicle applications requiring custom spatial model training, contact us.

We support:

  • Custom training on proprietary 3D datasets (point clouds, volumetric scans, meshes)
  • Domain adaptation — fine-tune existing spatial models for your specific geometry
  • Pilot projects with hands-on engineering support