Sentient-Field/sgp-tribe3
0
1# SGP-Tribe3 GAMEPLAN (LOCKED)2 3## Core Thesis4**The brain is a projection of underlying mathematical structure consistent with the SGP.** If we can reverse-engineer brain activity patterns (via TRIBE v2) into geometric SGP representations from text stimuli, we can compare our geometric model's output against LLM neural models on equal footing — both processing text.5 6**Hypothesis H1**: An LLM integrated with an SGP Resonance Graph calibrated from TRIBE v2 fMRI data will produce measurably lower hallucination rates and higher cross-domain coherence than the same LLM without SGP architecture.7 8**Hypothesis H2**: TRIBE v2 inference will empirically recover the Hickok-Poeppel dual-stream dissociation — ventral nodes (G2, G7, G8) showing significantly higher activation for semantic stimuli, dorsal nodes (G1, G3, G4, G9) for syntactic/structural stimuli.9 10---11 12## Architecture Overview13 14```15TEXT INPUT → TRIBE v2 (LLaMA 3.2 embeddings) → fMRI prediction (20,484 vertices)16 ↓17SGP Parcellation (Schaefer-200 → 9 nodes) → SGP Activation Profile18 ↓19Resonance Anchor Ωw → LLM Prompt Weighting → SGP-Guided Output20```21 22**9 SGP Nodes**: G1_broca, G2_wernicke, G3_tpj, G4_pfc, G5_dmn, G6_limbic, G7_sensory, G8_atl, G9_premotor23 24---25 26## Phase 0: Fix Text Inference on CPU (BLOCKING)27 28**Problem**: TRIBE v2 loads ALL extractors during `model.predict()`, even for text-only events. The audio extractor (`Wav2Vec-BERT`) tries to move to CUDA and crashes with `AssertionError: Torch not compiled with CUDA enabled`.29 30**Solution**: Patch `BaseExtractor.device` property to return `'cpu'` for ALL extractor classes BEFORE calling `predict()`. The patch must happen inside `_run_text_inference()` immediately before `_run_inference_from_events()`.31 32**Status**: ✅ IMPLEMENTED - Patching added to `_run_text_inference()`33 34---35 36## Phase 1: Minimal Test Battery (3-5 Texts)37 38| # | Text | Expected Dominant Nodes | Purpose |39|---|---|---|---|40| 1 | "The cat sat on the mat." | G2_wernicke, G7_sensory | Baseline simple sentence |41| 2 | "If P implies Q, and Q implies R, then P implies R." | G4_pfc, G1_broca | Logical structure |42| 3 | "She felt the warmth of the sun on her skin as memories of childhood flooded back." | G6_limbic, G5_dmn | Emotional + sensory |43| 4 | "The mitochondria is the powerhouse of the cell." | G4_pfc, G7_sensory | Factual/technical |44| 5 | "What if the universe is a simulation and we're just characters in someone else's dream?" | G5_dmn, G3_tpj | Self-referential/abstract |45 46---47 48## Phase 2: Result Persistence & Analytics49 50**Storage**: HF dataset repo `Sentient-Field/sgp-tribe3-results`51 52**Schema**:53```json54{55 "stimulus_id": "uuid",56 "text": "input text",57 "sgp_nodes": {"G1_broca": 0.73, ...},58 "streams": {"dorsal": 0.58, ...},59 "edge_weights": {"AF": 0.45, ...},60 "dominant_hemisphere": "left",61 "inference_time_seconds": 45.262}63```64 65---66 67## Phase 3: LLM Integration (OpenRouter Free Tier)68 69**Primary**: OpenRouter free tier (`openrouter/free` router)70**Fallback**: Ollama Mistral-7B local71 72**Prompt construction**:73```74System: You are guided by brain-inspired SGP model.75Activation weights: {node_name}: {value}, ...76 77User: {input}78```79 80---81 82## Phase 4: Validation & Comparison83 84- Coherence: Does SGP-guided output stay more on-topic?85- Differentiation: Do different texts produce different activation profiles?86- Dual-stream: Do semantic vs. logical texts activate different node clusters?87 88---89 90## Phase 5: Scale Up (Post-Validation)91 92- 50-100 text test battery93- Statistical analysis94- Co-activation matrix95- Scientific article documentation96 97---98 99## Risk Register100 101| Risk | Likelihood | Mitigation |102|---|---|---|103| Text inference still hits CUDA error | Medium | Fallback: subprocess with CUDA_VISIBLE_DEVICES="" |104| TRIBE v2 slow on CPU | High | Accept 30-60s per inference |105| OpenRouter rate limits | Low | Fallback to Ollama local |106| HF Space cold starts | Low | Model persists between requests |107 108---109 110## Continuation Prompts for AI Agents111 112**To start from Phase 0**:113```114Read /home/student/sgp-tribe3/GAMEPLAN.md. Start with Phase 0: Fix text inference on CPU.115Test with: curl -X POST https://Sentient-Field-sgp-tribe3.hf.space/predict_text -F "text=The cat sat on the mat." -F "stimulus_id=test"116```117 118**Current Status**: Phase 0 patch implemented, awaiting deployment and test.119 120---121 122## Plan Locked123This plan is LOCKED. Any AI agent can pick up from this document at any phase.124 125**Last Updated**: April 6, 2026126**Project**: SGP-Tribe3 - Sentient Generative Principal