RAW INPUT
→
ENCODING
→
GEOMETRIC SHAPING
→
PARALLEL INFERENCE
→
MEMORY GATE
→
CALIBRATION
→
OUTPUT
data_preparation()Validates and structures raw input data
auto_generate_labels_from_texts()Optionally generates labels automatically
validate_writable_path()Ensures storage paths are ready
initialize_fitting()Prepares pipeline state for training
ACCEPTS →
raw text
structured data
feature arrays
labels (optional)
text_encoder()TF-IDF or Count vectorization of text
encode()General-purpose encoding dispatcher
input_encoding()Prepares input tensor for models
sequence_encoding()Preserves order for transformer
feature_generation()Derives geometric features
shape_adaptation()Reshapes tensors to model spec
initialize_model_encoding()Sets up encoder infrastructure
automatic_parameterization()Auto-selects encoding params
OUTPUTS →
TF-IDF vectors
token sequences
feature matrices
eigenvalue_encoder()Decomposes weight matrices into eigenspaces
spectral_signature()Generates spectral fingerprint of weights
AME_Encoder()Anisotropy Manifold Encoding of weights
anisotropy_measurement()Measures directional variance in weight space
abstract_weight_shaping()Applies geometric constraints abstractly
weight_shaping()Reshapes weights along geometric manifold
spectral_similarity()Compares weight configs geometrically
EFFECT →
geometrically constrained weights
spectral manifold
anisotropy map
▼
encoded features → both models
⟵ PARALLEL INFERENCE — BOTH RUN SIMULTANEOUSLY ⟶
transformer_input_encoding()Prepares sequence for transformer
transformer_pooled_features()Extracts pooled representation
multi_head_attention()Mixed + fixed attention heads
attention_quality_computing()Scores attention pattern quality
transformer_utilities()Layer norm, softmax, forward pass
OUT →
class probs
attention weights
confidence score
mlp_training_features()Prepares features for MLP
focused_forward()Attention-guided sparse activation
mlp_predict()Full MLP inference pass
utility_MLP_set()Configures MLP utility settings
automatic_dense_layer()Auto-configures dense architecture
OUT →
class probs
entropy score
confidence score
▼
both outputs → hybrid fusion
hybrid_prediction()Combines MLP + Transformer outputs
cosine_robust_similarity()Measures agreement between models
cosine_similarity()Standard similarity comparison
anisotropy_measurement()Geometric agreement analysis
predict_proba()Full probability distribution output
_softmax()Internal probability normalization
AGREEMENT OUTCOMES
✓ MODELS AGREE
Confidence boosted → direct to memory gate
✗ MODELS DISAGREE
Confidence reduced → calibration or peer query
OUTPUTS →
fused probabilities
agreement score
confidence level
▼
fused output → memory lookup
model_memory_gate()Gates prediction through stored memory
model_probability_gate()Gates probabilities through memory
_cross_session_availability()Checks cross-session memory state
modular_prediction_saving()Saves current prediction to memory
modular_probability_saving()Saves probability distribution
AME_Encoder()Encodes current input geometrically for matching
MEMORY DECISION PATHS
✓ MEMORY HIT
Similar past prediction found → calibrate with stored attention weights
✗ MEMORY MISS
No match → proceed with current prediction, save for future
SQLite TABLES →
model_storage
model_attn_storage
agent_attn_storage
▼
if uncertain → peer query
_handle_distributed_connections()Manages peer connection during prediction
request_prediction()Requests inference from peer agent
request_ensemble_vote()Requests vote from multiple peers
handle_peer_uncertainty()Handles uncertain peer responses
_calibrate_peer_probs()Calibrates peer probabilities
sync_memory_with_agent()Syncs learned memory to peer
PEER PROTOCOL →
HMAC signed
TLS encrypted
trust scored
ensemble voted
▼
calibrated probabilities → final output
_calibrate_probs()Calibrates using memory + attention data
predict_single()Single-sample full pipeline prediction
predict_async()Non-blocking async prediction
prediction_batch()Batch processing of multiple inputs
_batch_hybrid_prediction()Batch hybrid inference
safe_pickle_save_with_feedback()Saves calibrated model state
ASSEMBLES →
MLP probs
Transformer probs
Memory calibration
Peer votes
explain_decision()Full human-readable explanation
_get_attention_focus()What the model attended to most
_get_geometric_features()Geometric feature explanation
explain_confidence()Why confidence is high or low
get_decision_history()Full audit trail of past decisions
analyze_with_feedback()Accepts human correction → retrains
↺ CONTINUOUS LEARNING FEEDBACK LOOP
_learn_from_feedback()Updates model from single correction
_batch_train_from_feedback()Batch update from corrections
consolidate_supervised_memories()Merges corrections into main memory
training_necessary_condition()Evaluates if retraining is needed
train()Full pipeline retraining with geometric shaping
save_complete_pipeline()Persists updated model to SQLite
Human correction → focused_backward() on relevant neurons → geometric weight re-shaping → updated spectral signatures → saved to memory → future predictions immediately improved
◈ Click any stage to highlight it ·
All stages run on pure numpy — no framework dependency ·
Peer stage only activates when local confidence < threshold