Skip to content

ngeodesic-ai/ngf-alpha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Noetic Geodesic Framework (Alpha)

🚀 The Noetic Geodesic Framework (NGF) is a geometric approach to deterministic AI reasoning. It reframes reasoning in latent space as geodesic traversals through warped manifolds, where semantic structure is enforced by energy wells. This allows us to suppress hallucinations and enforce stable, truth-aligned reasoning.

NGF builds on two key pillars:

  • Latent Vector Embeddings — high-dimensional representations (used across modern AI, including LLMs).
  • Warp → Detect → Denoise Doctrine (Stage 11) — our pipeline that shapes these embeddings into deterministic geodesic trajectories.

LLMs vs Vector Embeddings

  • LLMs (Large Language Models): Sequence models that operate on tokens, typically built on transformer architectures. They internally rely on vector embeddings (hidden states) but expose only the text interface.
  • Vector Embeddings: High-dimensional vectors that encode semantic meaning. These can be obtained independently of an LLM (e.g., sentence embeddings, ARC synthetic embeddings) and are directly manipulable.

NGF operates at the embedding level, not at the text level. This means NGF methods are pluggable into any LLM or embedding model. Instead of manipulating prompts or fine-tuning weights, NGF directly reshapes latent trajectories in vector space.

Research Plan Stages

The NGF follows a 12-step research plan, with 10 completed stages posted here where step 10 marked the public rollout. Steps 11-12 (milestone reports) are in progress.

Stage Description Level Hardware Folder/Code
1 Toy Example Embedding / toy $R^4$ CPU toy-example/
2 Embed Grid Intelligently Embedding / toy $R^4$ CPU embed-grid/
3 Rotation Matrix Integration Embedding / toy $R^4$ CPU rotation-matrix/
4 Simulate Pattern Completion Embedding / toy $R^4$ CPU pattern-completion/
5 Higher-Dim Embeddings Embedding / toy $R^9$ CPU higher-dim-embeddings/
6 Integrate Dynamic Intelligence Embedding / toy $R^9$ CPU dynamic-intelligence/
7 ARC Question Embedding / toy $R^9$ CPU rudimentary-arc/
8 LLM Latent Embedding Embedding / external CPU llm-latent-embedding/
9 Warp LLM Interference Embedding / external CPU warp-interference/
10 Rudimentary Benchmarks Embedding / external CPU rudimentary-interference/
11 Small Benchmarks Latent / LLM CPU small-benchmarks/
12 Large Benchmark (coming) Latent / LLM A100/T4 milestone-benchmark/

Summary Note: Stages 1–10 were critical as they provided the evidence that warping is effective; in toy R⁴ and R⁹ spaces we saw clean, causal effects, however in external LLM embeddings we validated that the same principles held under noise and larger dimensions. Without this scaffolding, we would not have had the evidence to help cut through Stage 11 when the messy latents looked bleak. In short, if apply the engine analogy: Stages 1–7 were toy engines, Stages 8–10 were mock-ups, and Stage 11 was where we dropped NGF into the engine bay (ie, a live LLM). Hence, stage 11 transformed that conviction into the working doctrine, Warp → Detect → Denoise.

Illustration: NGF Warped vs Flat Paths (Re: Stage 5)

This animation shows how warped paths converge to correct answers in high-dimensional semantic space:

NGF Warped vs Flat Paths

Requirements

  • Python 3.x
  • transformers==4.55.2
  • torch==2.8.0
  • numpy==2.0.2
  • scikit-learn==1.6.1
  • NVIDIA A100 GPU (e.g., Colab Pro+)

Setup

Install dependencies:

!pip install transformers==4.55.2 torch==2.8.0 numpy==2.0.2 scikit-learn==1.6.1

Alternative (reproducible env via uv + Makefile):

make init   # creates .venv with uv and syncs deps
make nb     # launches Jupyter from the venv

Stage-11 (Current): Warp → Detect → Denoise

Stage-11 introduced the breakthrough:

  • Warp: Embed latents into PCA(3) space, warp into a single dominant well.
  • Detect: Use matched filters with null calibration to identify the true well.
  • Denoise: Apply smoothing, phantom guards, and jitter averaging to suppress false wells.

(Part A) Latent-ARC Results (n=100)

Model Exact Acc Precision Recall F1 Halluc. Omission
Denoise (Stage 11) 1.000 0.9977 0.9989 0.9983 0.0045 0.0023
Geodesic (pre) 0.640 0.8450 1.0000 0.8980 0.1550 0.0000
Stock baseline 0.490 0.8900 0.7767 0.7973 0.1100 0.2233

Note (Part A): Stock baseline approximates what you’d see if you used simple thresholds on LLM latents/logits without NGF’s Warp→Detect→Denoise.

(Part B) LMM-HellaSwag Results (n=1000)

Model F1 ECE (Caliibration) Brier Score Overconfidence >0.70
MaxWarp (Stage 11) 0.356 0.080 0.743 1.2%
Stock baseline 0.324 0.122 0.750 0.7%
Change ($\Delta$) +0.032 (good) -0.032 (good) -0.007 (good) 0.5%

How This Relates to LLMs

  • NGF is not a new LLM. It is a geometry-on-latents module.
  • You can integrate NGF with any embedding-producing model (LLMs, encoders, diffusion models).
  • Example: an LLM provides hidden states → NGF warps them → trajectories follow deterministic geodesics instead of drifting probabilistically. This separation is critical: LLMs handle language; NGF handles geometry.

(Part A) Run latest benchmark on latents:

python -u small_benchmark/stage11_benchmark_latest.py \
      --samples 100 --seed 42 \
      --latent_arc --latent_dim 64 --latent_arc_noise 0.05 \
      --denoise_mode hybrid --ema_decay 0.85 --median_k 3 \
      --probe_k 5 --probe_eps 0.02 --conf_gate 0.65 --noise_floor 0.03 \
      --seed_jitter 2 --log INFO \
      --out_json latent_arc_denoise_100.json --out_csv latent_arc_denoise_100.csv

(Part B) Run latest benchmark on LMM:

export NGF_RENO_CFG="use_denoise=1 denoise_mode=ema denoise_beta=0.22 denoise_ph_lambda=0.35 \
phantom_k=8 phantom_lambda=0.28 squeeze_orth_lambda=0.20 \
k_det=9 g_det_max=1.26 det_robust=mad winsor_q=0.985 \
alpha_min=0.034 alpha0=0.14 alpha_r_gamma=0.45 alpha_r_p=1.6 \
anneal_tokens=40 anneal_scale=1.85 outlier_q=1.0 outlier_alpha_scale=1.0 tap=-9"

python3 small_benchmark/ngf_benchmark.py --mode ngf --ngf_import ngf_hooks_v2:attach_ngf_hooks \
      --model gpt2 --tap -9 --n 1000 \
      --alpha0 0.06 --alpha_min 0.012 --trend_tau 0.30 --k_tr 12 \
      --use_detect 1 --detect_width 22 --detect_sigma 4.5 --k_det 8 \
      --s_latch 0.35 --linger 3 --ema_center_beta=0.04 \
      --gen_mode geo --save_hidden 1 --hidden_dump_dir small_benchmark/results/maxwarpC_tap9_noOutlier \
      --out_json small_benchmark/results/maxwarpC_tap9_noOutlier/metrics.json

Stage-11 (Summary / What’s Next)

  • Tests on simulated latent environment provided a perfect F1 score for latent-ARC tests on GPT2
  • Saw +3 incremental boost on F1 Score on HellaSwag for real LLM tests on GPT2
  • For real LLM we can see noticable difference in semantic well PCA plots post warp when comparing before vs after (see Fig below)
  • Stage 11 nearly complete: need to perform robustness checks on testing
  • Warp → Detect → Denoise doctrine is holding, thus marking the first lightweight, geometry-driven path to upgrade LLMs by reshaping their latent manifolds for stability and truth alignment
  • See Stage 11 quickstart for more info

NGF Warped vs Flat Paths

Fig 1. PCA-2 visualization of “semantic wells” (pre vs post warp) on GPT2 - tap 9


Technical Paper - WORK IN PROGRESS

  • Moore, I. C. (2025). Noetic Geodesic Framework: Deterministic AI Reasoning via Warped Manifolds (Early Preprint). Zenodo. https://zenodo.org/records/17032117 (DOI: 10.5281/zenodo.17032116), Sept 2025.
  • Disclaimer: This is a preliminary alpha-stage document (Sept 1, 2025) avaliable here from repos , subject to change. Feedback is welcome!
  • Provisional patents filed as #63/864,726, #63/865,437, #63/871,647, and #63/872,334.

References

  • Moore, I. C. (2025). Warped Semantic Manifolds: A Geometric Framework for Deterministic AI Reasoning (Preliminary Memo). Zenodo. https://zenodo.org/records/16908227 (DOI: 10.5281/zenodo.16730759), Aug 2025; see code

Medium Articles

Onboarding

As these techniques are uncommon in AI, onboarding requires some prerequisites background knowledge in general relativity, differential geometry, and signal proccessing coupled with a good understanding of the objectives behind each of the steps in the 12-staged research plan. If this interests you, please see the onboarding docs for further detail.

Contribute

This is alpha software! Help us refine prompts, test on other hardware, or improve the nudge. Contributors must sign the CLA and email it to [email protected] before submitting pull requests.

If you find this helpful, please leave a ⭐!

Packages

No packages published

Contributors 2

  •  
  •