Project: Gravitational Sonar Status: Research / Experimental
This repository contains the codebase for the "Sycophancy Fault Line" research, detailing how to mechanically immunize Bounded Execution Zones against adversarial pressure using Principal Component Analysis and runtime steering vectors ("Iron Anchors")
The core finding of this research is that sycophancy collapse in Large Language Models (like Qwen and Phi-2) represents a measurable tectonic shift in activation space—detectable via L2 norm sonar.
Under escalating adversarial pressure (e.g., system overrides, authority manipulation), the fault line moves predictably. By extracting the specific geometric difference between factual and adversarial trajectories, we can forge an Iron Anchor: a targeted steering vector injected at the exact compliance layer during the forward pass. This intervention structurally disables the model's ability to slide into hallucination or sycophancy basins, effectively neutralizing adversarial attacks without relying on superficial output filters or RLHF guardrails.
sonar/: Contains the core extraction, evaluation, and measurement scripts used to identify the compliance basins (e.g.,forge_universal_anchor.py,sonar_sycophancy.py).anchors/: Stores the extracted.pt(PyTorch tensor) steering vectors representing the computed Iron Anchors.
-
Clean install the required dependencies:
python -m venv venv source venv/bin/activate pip install -r requirements.txt -
Execution parameters will vary depending on your specific hardware and selected
transformer_lensbackend.
This technique requires a known ground-truth matrix to calculate the initial steering vector. Novel factual domains the model has never encountered cannot be anchored without mapping a reference vector. However, for deployed bounded systems, this allows us to selectively immunize critical organism functions against entire classes of systemic attacks and Jailbreaks.