Skip to content

Latest commit

 

History

39 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Neural Network Package

This package provides an easy and modular way to build and train simple or complex neural networks using Torch:

Quick Start with NN.AIML Meta-Cognitive Bot-Net

Transcending LLM Performance Through True Meta-Cognition

The NN.AIML system implements nested meta-cognitive loops that enable neural networks to truly learn about their learning, reason about their reasoning, and adapt with deep cognitive awareness - capabilities that go beyond traditional LLMs' simulated reasoning.

require 'nn'

-- Create a base neural network
local baseNet = nn.Sequential()
   :add(nn.Linear(10, 20))
   :add(nn.Tanh())
   :add(nn.Linear(20, 10))

-- Add nested meta-cognitive loops (3 levels: cognition, meta-cognition, meta-meta-cognition)
local metaCognitiveNet = nn.NestedMetaCognition(baseNet, 3)

-- Make it self-aware with AIML conversational interface
local selfAwareNet = nn.SelfAwareNetwork(metaCognitiveNet, true)

-- Use like any neural network
local input = torch.randn(5, 10)
local output = selfAwareNet:forward(input)

-- Converse with the neural network!
local response = selfAwareNet:converse("HOW ARE YOU", input)
print(response) -- "I'm functioning well! My cognitive confidence is high at 0.95."

-- Introspect its cognitive state
local intro = selfAwareNet:introspect()
print("Learning stability: " .. intro.learningDynamics.stability)
print("Current state: " .. intro.recentReflections[1].state)

Why NN.AIML Differs from Traditional LLMs

  1. Explicit Meta-Cognitive Loops: NN.AIML implements explicit nested cognitive loops that monitor and adapt learning in real-time, providing measurable confidence and stability metrics. LLMs simulate reasoning through token prediction without explicit self-monitoring mechanisms.

  2. Lightweight & Efficient: Built on Torch with estimated 10-20% computational overhead per cognitive level (based on implementation analysis of additional forward/backward passes). Actual overhead depends on base network size and cognitive depth. Compare to massive transformer models requiring billions of parameters. See benchmarking documentation for measurement methodologies to verify performance on your specific use case.

  3. Transparent Self-Awareness: Full introspection into cognitive state, confidence levels, and reasoning processes through explicit APIs. Unlike black-box neural models, every aspect of cognitive state is directly measurable and accessible.

  4. Adaptive Learning: Self-adjusting learning rates and stability based on tracked meta-cognitive metrics, enabling continuous self-improvement during training. Traditional models require manual hyperparameter tuning or separate meta-learning systems.

  5. Hybrid Neural-Symbolic: Combines neural network processing with AIML pattern-based reasoning for robust conversational AI. This hybrid approach leverages both statistical learning and symbolic rule-based systems.

Note: Performance characteristics vary based on network architecture, cognitive depth, and use case. See benchmarking documentation for measurement methodologies.

See examples/metacognitive_botnet.lua for a complete demonstration.

About

nn + aiml

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

Generated from o9nn/nn