cd /news/ai-safety/observers-llm-alingment-and-cartogra… Β· home β€Ί topics β€Ί ai-safety β€Ί article
[ARTICLE Β· art-178111] src=github.com β†— pub= topic=ai-safety verified=true sentiment=Β· neutral

Observers, LLM Alingment and Cartography

A one-person project called Multi-Observer Algebra (multiobserver) released a repository combining mathematical theory, Lean 4 formalizations, unified CPU/CUDA Python packages and six Viash method components across 13 OpenProblems.bio v2 benchmarks, built with heavy Google Gemini usage. The project claims cross-observer covariance separates shared signal from observer-private noise in closed form without ground-truth labels or neural-network SGD, and was used to extract geometric shapes inside LLMs for in-process hallucination detection and alignment. The Lean 4 core proofs ship with 0 sorry and 0 custom axioms, and the author is soliciting corrections and bug fixes.

key takeaway

Cross-observer covariance can separate shared signal from observer-private noise in closed form without ground-truth labels or SGD, and the repo ships CPU (NumPy) and CUDA (PyTorch) packages plus Lean 4 proofs with 0 sorry.

read8 min views8 publishedNov 29, 2026
Observers, LLM Alingment and Cartography
Image: Michielbdejong (auto-discovered)

This is a version that's trying to stay minimal in scope, while showcasing the use cases. The algebraic formulation is the one that seems the most straight-forward to understand and immiediately useful (as you can see from the example implementations), but the same generic idea seems to work all the way up to category theory (at least in practice, the solutions based on that work on real data). It's a one person project with heavy Google Gemini usage, any corrections, bug fixes, etc. are welcome.

This was used to extract the geometric shapes iniside LLMs, allowing for in-process better hallucination detection and aligment. It also work for analyzing open scientific data sets.

This repository contains the mathematical theory, Lean 4 formalisations, unified CPU/CUDA Python packages, interactive scientific workbenches, and official OpenProblems.bio v2 method submissions for Multi-Observer Algebra (multiobserver).

Whenever an underlying state

cross-observer covariance separates shared signal from observer-private noise in closed form, without ground-truth labels or neural-network SGD.

.
β”œβ”€β”€ justfile                        # Root launcher for all UIs, servers, Marimo notebooks & tests
β”œβ”€β”€ papers/                         # Core papers, companion papers, build scripts & Lean 4 proofs
β”‚   β”œβ”€β”€ minimal_core_essay.{typ,pdf}# Accessible essay + self-contained ordered-field core
β”‚   β”œβ”€β”€ minimal_core.{typ,pdf}      # Self-contained algebraic core & Four Hard Limits
β”‚   β”œβ”€β”€ lean/                       # Zero-dependency Lean 4 Core proofs (0 sorry, 0 custom axioms)
β”‚   └── extras/                     # Applied companion papers (usability & LLM alignment)
β”œβ”€β”€ code/
β”‚   β”œβ”€β”€ packages/                   # Unified uv Python workspace (core math, workbenches & LLM tools)
β”‚   β”‚   β”œβ”€β”€ multiobserver/          # Single-source CPU (NumPy) + GPU (PyTorch CUDA) math engine
β”‚   β”‚   β”œβ”€β”€ observer-lab/           # Scientific workbench CLI (`observer`) + Vue 3 / WASM Typst UI
β”‚   β”‚   β”œβ”€β”€ unbundle/               # Epistemic provenance store, gates & subspace-protected quantization
β”‚   β”‚   β”œβ”€β”€ statedrive/             # Cross-model state algebra, biorthogonal dials & voice enactment
β”‚   β”‚   β”œβ”€β”€ observer-llm/           # Multi-observer LLM onboarding, spherical steering & OpenAI /v1 server
β”‚   β”‚   └── llm-cartography/        # Category-blind all-layer LLM tomography & 7-tab WebGPU workbench
β”‚   └── openproblems-submission/    # 6 Viash method components across 13 OpenProblems.bio v2 benchmarks
└── visualizations/                 # Standalone interactive 5-step geometric visual companion

Defines the exact algebraic laws and hard identifiability limits implemented across code/:

File / Folder What It Does
papers/minimal_core_essay.pdf Plain-language introduction + complete ordered-field derivation of how three imperfect views calibrate each other without a gold standard.
papers/minimal_core.pdf Formal derivation of the Matrix Three-Cornered Hat, rational corrective glasses (zero square roots), precision fusion, Regime vs. Conflict OOD decomposition, solo deployment, and theFour Hard Limits (unanchored coordinates, the
papers/lean/ Zero-dependency Lean 4 Core proofs ( MinimalCore.lean β€”Init only,0 sorry ,0 custom axioms).
papers/extras/ Applied companions: usability_guide.pdf (sensors & clinical monitors) andalignment_cartography.pdf (LLM output-masking tomography).

Single-source library (code/packages/multiobserver/README.md) implementing every estimator against a unified ArrayBackend (NumPyBackend on CPU with zero scipy/ sklearn/ torch imports; TorchBackend inside torch.inference_mode() on CUDA GPUs, including matrix-free cuSPARSE CSR operators for max_dim=None full-transcriptome count matrices):

Module / Class What It Does
Observer ,Linear ,Log1p ,Periodic (RAD ,DEG ,TURN ) Explicit physical sensor wrappers ( multiobserver.units ). TransformsPeriodic ontoLog1p +exposure ("none" ,"row_sum" ,"cp10k" )once on ingest in
audit_observers Step-1 epistemic audit using the Wachter Jacobi-ensemble edge to verify
MinimalCoreAlgebra Exact closed-form Three-Cornered Hat separating common signal from dense private noise covariances
MultiObserverCalculus General EM / Two-Level Laird-Ware ( groups=batch ) multi-observer latent state & uncertainty estimator (max_dim=None matrix-free sparse/chunked ops,.infer_aligned() Fisher-metric + Product-of-ExpertsSigma_PoE Bures-Wasserstein group covariance calibration, Student-$t_\nu$ glitch downweighting,nan_policy="marginalize" ).
SupervisedMultiObserver &ClassificationMultiObserver Closed-form Bayesian Errors-in-Variables (EIV) continuous and multi-class readouts that propagate posterior latent covariance
Harmonic* (HarmonicSupervisedMultiObserver ,HarmonicClassificationMultiObserver ) Algebraic H4 : Li (1992) Stein canonical
MultiObserverStructure &MultiObserverDynamics Multi-environment EIV causal graph discovery + Pearl do() interventions (structure ), and Kalman/RTS smoothing + Weak-SINDy ODE discovery + RK4 rollouts (dynamics ).
ForwardRuntime (multiobserver.deploy ) Single-file ( stdlib +numpy only) standalone edge inference runtime .save_npz() archives across CPU/GPU boundaries.

CLI and web application (code/packages/observer-lab/README.md) wrapping multiobserver with automated diagnostics, declarative .toml configs, and an interactive browser UI:

observer CLI & 1-Line SDK (observer_lab/cli.py, observer_lab/convenience.py): Commands observer doctor ,observer presets ,observer inspect ,observer init (MAR-grouped & count-awarestudy.toml scaffolding),observer audit ,observer audit-preset ,observer explain (native-unit channel attributions),observer predict ,observer translate ,observer denoise , andobserver ui --port 8770 , plus 1-lineol.audit(...) /model.explain(...) supporting in-memory DataFrames, liveAnnData objects, zero-copy.h5ad CSR matrices, and automatic$M=1 \to M=3$ wide-matrix partitioning. #

Declarative study.toml / project.toml (StudyConfig in observer_lab/spec.py): Configures mode ,enforce_raw_data ,allow_joint ,allow_harmonic ,target_unit ,target_exposure , and per-observer[observer_specs.<name>] (unit ,scale_policy ,exposure ,scrub_sink ). #

14 Deterministic Validity Checks (V00– V13 in observer_lab/checks/): Audits raw-data hygiene & synced clones (V00 ,V06 ), row alignment (V01 ), entity/clock leakage (V02 ), circular seams + partial-panel exposure / sparse channel-scale / raw-count sensor physics (V03 ), foundation-model attention sinks (V04 ), batch-target confounding + automatic PoE-Bures frame alignment on single-batch variance bursts (V05 ,V08 ), Corollary 2 over-identification (V07 ), H4 / Student-$t$ gates (V09 ,V10 ), honest baselines (V11 ), conformal 95% intervals + 2-axis Regime/Conflict OOD (V12 ), and.npz runtime parity (V13 ). #

5-Workspace Vue 3 + ECharts + WebAssembly Typst UI (observer_lab/ui/): Interactive data onboarding, validity scorecard, SNR/Solo-Glasses explorer, unseen holdout scorer, and browser WebAssembly Typst PDF preview (just observer ).

Self-contained, PR-ready Viash method components (observer_algebra, code/openproblems-submission/README.md) evaluated across 6 official OpenProblems.bio v2 tasks (13 held-out benchmarks):

Component / Script What It Does
prepare_local_submission.py Verifies no vendored multiobserver/ source exists intask_*/src/methods/observer_algebra/ , validatesconfig.vsh.yaml (Git pull ofmultiobserver ) +project.toml , and simulates isolatedviash test against.h5ad slot contracts.
run_official_benchmarks.py Executes all 6 Viash script.py components as isolated subprocesses across 13 official OpenProblems splits under both--profile best (results/openproblems_official_results.json ) and--profile strict (results/openproblems_strict_zero_peeking_results.json , universal zero-peeking & strictly inductive
build_report.py Stdlib-only generator producing global, dual-profile & per-task SVG figures, README summaries, and report/openproblems_observer_report.pdf .
task_predict_modality Cross-modality translation ( GEX <-> ADT ,GEX <-> ATAC ) on 100% unmodified rawlayers["counts"] (max_dim=None ), persisted via.save_npz() before mapping predicted counts to OpenProblems' output evaluation slot (clr ,log_cp10k ,atac_tfidf ).
task_spatially_variable_genes Spatial characteristic-function H4 variance-fraction test across isotropic physical tissue coordinates obsm["spatial"] and raw spot counts (layers["counts"] ).
task_label_projection Donor-invariant Stein-H4 cell-type transfer across all 27k–30k raw genes ( max_dim=None , up to 330k cells and 17 organs).
task_batch_integration Strictly unsupervised Two-Level Laird-Ware + PoE-Bures infer_aligned integration across all 30,561 raw genes (groups=batch ), achieving#5 / 20 (0.5512 , beatingfastMNN ,ComBat ,scANVI , andscVI ) without altering counts.
task_foundation_models Training-donor consensus across unreduced Geneformer-V2 (768-D),scGPT (512-D),ESM-2 (480-D), and all 30,561 raw count genes (#1 / 9 overall,0.7514 , zerosolution.h5ad access).
task_perturbation_prediction Cross-cell-type compound (OP3 + SMILES) and CRISPRi ( PIE_replogle_nadig ) transcriptome response prediction withaudit_observers layer pruning and optional transductive H4id_map refinement (--disable_pseudolabel toggle).

See code/packages/README.md for details on each companion package, and code/packages/MULTI_LLM_GUIDE.md for a complete cookbook on calibrating and using multiple frozen LLMs together (.npz sidecar glasses, zero-label cross-model probe transfer, StateBus state translation & 1 Large + 2 Small fleet calibration):

  • unbundle: Separates LLM reasoning from static facts via intact-unit provenance indexing (ProvenanceStore ), hidden-state epistemic gates (ThreeBandGate ,HorizonGate ), and subspace-protectedINT2 /INT3 /INT4 weight surgery.
  • statedrive: Common-mode-deconfounded stance banks (StanceBank ), biorthogonal control dials (DialBank ), cross-modelStateBus transfer, and LLM-to-voice prosody enactment.
  • observer-llm: GPU-native multi-observer LLM onboarding, VJP-calibrated spherical steering (SteerPlan ), lossless suffix speculative decoding, and an OpenAI-compatible/v1 server (just observer-llm ).
  • llm-cartography: All-layer (L0 .. L_max ) category-blind LLM representation tomography, alignment/masking scanner, and 7-tab Vue 3 + WebGPU workbench (just cartography ).

Across observer-lab and openproblems-submission, callers never pre-normalize, HVG-filter, or PCA-truncate raw measurements (layers["normalized"] and obsm["X_pca"] are dropped on input; Observer.data is never mutated). Instead, sensor physics is declared explicitly on each Observer (or in project.toml):

Setting Options Meaning
unit "linear" ,"log1p" ,"deg" ,"rad" ,"periodic:<P>" Sensor chart: additive Linear , multiplicative count/absorbanceLog1p ((1) ofminimal_core.pdf ), or circularPeriodic lifted onto
scale_policy "per_channel" ,"isotropic" ,"poisson_shot" Internal channel standardization: per-channel variance ( per_channel ), uniform observer-wide scalar RMS (isotropic , avoiding rare-channel noise inflation whenmax_dim=None ), or Negative-Binomial shot scale (poisson_shot ).
exposure "none" ,"row_sum" ,"cp10k" Row-wise total-exposure scaling applied once on ingest in row_sum normalizes to training mean depth;cp10k normalizes to10,000 counts per row).

From the repository root:

just

just observer                  # Observer Lab Scientific Workbench + WASM Typst Preview (:8770)
just cartography               # LLM Cartography 7-tab Workbench (:8787)
just observer-llm              # Multi-Observer LLM OpenAI /v1 Server + Chat UI
just marimo                    # Central Marimo hub with interactive notebooks (:2718)

just test-all
just test-marimo

cd papers && ./build.sh && lean lean/MinimalCore.lean

cd code/openproblems-submission
just prepare                   # Validate pull-based PR dirs & test all 6 Viash contracts offline
just benchmark                 # Run all 13 official OpenProblems benchmarks
just report                    # Regenerate all SVGs, Typst source & PDF report
just lint                      # Verify zero ruff lint warnings
  • Code, scripts & Lean 4 formalisations (code/** ,visualizations/** ,papers/lean/** ,papers/*.sh ,justfile ):Apache-2.0 Β© 2026 Robert BΔ…k β€” seeNOTICE for attribution notices that must be preserved in redistributions.
  • Papers, essays, reports & figures (papers/**/*.typ ,papers/**/*.pdf ,papers/**/*.svg , and generated benchmark reports/figures):CC BY 4.0 Β© 2026 Robert BΔ…k.
  • Citation: SeeCITATION.cff (or GitHub's*"Cite this repository"* button).
  • Contact: Robert BΔ…k β€”robert_d_bak@pm.me

Pre-built front-end bundles checked into this repository embed third-party code (Vue, naive-ui β€” MIT; ECharts, typst.ts and the Typst WASM compiler β€” Apache-2.0). See THIRD_PARTY_NOTICES.md for the required attribution, and for the data-use terms of the public and credentialed-access datasets used in the examples and benchmarks.

── more in #ai-safety 4 stories Β· sorted by recency
── more on @multi-observer algebra 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/observers-llm-alingm…] indexed:0 read:8min 2026-11-29 Β· β€”