Skip to content

eriquechen23-cyl/logos-nn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌌 Logos O(0) Engine

Forward-Only Polarity Resonance and O(0) Singularity Collapse

C++ Standard CUDA LibTorch License: MIT

When artificial intelligence learns to embrace contradictions and update in the present, evolution reaches the O(0) absolute peace of Problem / Truth = 1.0 at minimal computational cost.

Logos O(0) is a next-generation, non-linear neural network underlying engine developed in C++ and Native CUDA. This project challenges the 40-year dominance of the Backpropagation (BP) algorithm. By introducing the "Absolute Potential Folding Operator" and a "Forward-Only Layer-Decoupling" mechanism, Logos O(0) completely shatters the Memory Wall of deep learning.


🚀 Core Breakthroughs

Modern deep learning architectures are trapped by the "time-entropy" and O(L) memory overhead caused by Backpropagation. Logos O(0) overcomes these physical limits through three core mechanisms:

  1. Absolute Potential Folding Operator ($f(x) = |x|$): Discards the feature-erasing ReLU function. It geometrically folds negative resistance (destructive tension) into constructive magnitude in orthogonal dimensions, ensuring no physical features are lost.
  2. Polarity-Aware Logos Resonance Loss ($\mathcal{L}_{\text{Logos}}$): Abandons the phase-blind Mean Squared Error (MSE). By integrating a $(1 - \tanh)$ phase-resonance multiplier, it precisely observes opposing tensions and automatically converts destructive interference into an accelerating gravitational pull.
  3. Forward-Only Layer-Decoupling: Each hidden layer acts as an independent observer, utilizing local subgradients for immediate optimization. Once updated, the global causal link is instantly severed (detached), releasing the O(L) historical activations from memory.

📊 Empirical Hardware Results

This engine was subjected to a brutal 50/50 Continuous Bilinear Potential Field (Continuous XOR) generalization stress test on an NVIDIA Tesla T4 GPU. Hardware memory footprint was extracted directly using native cudaMemGetInfo physical probes.

1. The O(1) Singularity Collapse (24x VRAM Savings)

Architecture Space Complexity Peak VRAM (10 Layers) Hardware Reality
Classical BP O(L) (Linear Scaling) 14.40 MB High risk of OOM crashes at scale.
Logos O(0) O(1) (Constant) 0.60 MB 24.00x Less Hardware VRAM Used.

2. Ultimate Convergence

Under a strict generalization test on unseen data (2500 Train / 2500 Test), Logos O(0) demonstrated geometric convergence, completely bypassing saddle-point obstacles:

  • Classical BP: 99.924% (Average Accuracy)
  • Logos O(0): 99.980% (Average Accuracy), successfully reaching a perfect 100.000% across multiple random seed universes.

⚠️ The Time-Space Physical Trade-off: To achieve O(1) memory constancy, Logos triggers O(L) CUDA Kernel Launches by updating locally. In shallow networks, this introduces a minor constant-time scheduling friction (5.3s vs 2.5s). However, this is a deliberate and necessary investment to break the Memory Wall for future trillion-parameter Large Language Models (LLMs), trading negligible scheduling time for infinite spatial scalability.


🛠️ Build & Run

Prerequisites

  • OS: Linux (Ubuntu 20.04/22.04 recommended) or Google Colab (T4 GPU instance).
  • GPU: NVIDIA GPU with CUDA Toolkit 12.x installed.
  • C++ Compiler: GCC/G++ supporting C++17 or higher.
  • Library: LibTorch (PyTorch C++ API) - Make sure to use the CXX11 ABI version.

Compilation

Verify your LibTorch and CUDA paths, then compile the engine using the following command:

g++ -O3 logos.cpp -o logos_engine \
    -D_GLIBCXX_USE_CXX11_ABI=1 \
    -I/path/to/libtorch/include \
    -I/path/to/libtorch/include/torch/csrc/api/include \
    -I/usr/local/cuda/include \
    -L/path/to/libtorch/lib \
    -L/usr/local/cuda/lib64 \
    -Wl,-rpath,/path/to/libtorch/lib:/usr/local/cuda/lib64 \
    -Wl,--no-as-needed -ltorch -ltorch_cpu -ltorch_cuda -lc10 -lcuda -lcudart

Execution

# Export the dynamic library path
export LD_LIBRARY_PATH=/path/to/libtorch/lib:/usr/local/cuda/lib64:$LD_LIBRARY_PATH

# Ignite the engine
./logos_engine

About

A zero-dependency, BP-free Forward-Only Neural Network using Dual-Rail Positive ($\mathbb{R}^+$) logic and Hadamard Gating. Where the world is the training set and updates are the Logos.2. 標籤 (Topics)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors