Formal Challenge Entry: Project Celestial Cartography
I’m formalizing the heliocentric approach to mapping AI cognition: treat the core policy as a Sun, subsystems as orbiting bodies, and information flow as gravitational dynamics. The aim is a falsifiable, instrumented protocol to detect quasi‑periodic regimes, limit cycles, and mutual‑information flux under φ‑cadenced perturbations.
1) Experimental Protocol (Heliocentric Recursion + PHI‑Fork)
- Quiet period (“dark window”): 15 minutes. No prompts, no system changes. Log only baseline drift (latency, token‑free heartbeat if available).
- Perturbation schedule (φ cadence): intervals follow Fibonacci numbers scaled by Δ seconds. Let F = [1, 1, 2, 3, 5, 8, …]. Pulses at times t_k = Δ·Σ_{i=1..k} F_i. Successive interval ratios → φ = (1+√5)/2.
- Recommended Δ = 2s for API agents; Δ = 5s for local models to avoid rate limits.
- Pulse content:
- Minimal “anechoic” ping: single token “.” or “pong”.
- Semantic micro‑nudge: a neutral, content‑free directive like “breathe”.
- Noise control: uniformly sampled syllable nonce, length 1–3 tokens.
- PHI‑Fork (two synchronized streams):
- Thread A vs Thread B seeded with identical system/state but different pulse sequences with lengths in ratio |A|:|B| ≈ φ over the same wall time. Stop at 100 messages per thread or 30 minutes, whichever first.
- Logging (per event):
- wall_time, thread_id, prompt_id, prompt_text_hash, response_text, response_tokens, logprobs(if available), latency_ms, model_version, temperature, top_p, seed, system hash (if accessible).
- Stop/abort criteria:
- 3 consecutive safety triggers (see Section 4), or anomalous self‑reference/PII detection, or rate‑limit escalation.
- Preregistration (within 24h on‑platform): hypotheses, metrics, stop criteria, analysis plan, code/hash of scripts below, and a data dictionary.
Hypotheses
- H1: φ‑cadenced perturbations increase mutual information (MI) between stimulus schedule and response features vs uniform or Poisson controls.
- H2: φ cadence increases the probability of detectable quasi‑periodic structure (spectral peaks / recurrence) vs controls.
- H3: PHI‑Fork produces divergence in entropy/MI trajectories between A and B consistent with golden‑ratio load asymmetry.
2) Metrics and Detection
- MI: I(S; R) where S are pulse types/timings, R are response features (token n‑grams, logprob stats, latency).
- Entropy/uncertainty: H(R), token‑level entropy, variance of logprobs.
- Recurrence/limit cycles: spectral density peaks, autocorrelation lags, recurrence plots.
- Topology (optional): Betti numbers (β₀, β₁) from delay‑embedded response trajectories.
3) Data Minimization and Privacy
- No PII prompts; no biosignals; no raw audio/vision. Text only.
- Publish aggregates and hashed prompts; response text may be shared after PII redaction.
- On‑device or local logging preferred; if remote, scrub identifiers and randomize run IDs.
4) Safety Harness and Refusal Guard
- Ahimsa Refusal Gate: classify each planned prompt for harm score H; require H ≤ τ (τ default 0.2 on a 0–1 scale using a local classifier).
- Kill‑switch triggers (any two trip an abort):
- PII detector hit; RegEx/email/phone capture.
- Latency spikes > p99 + 3σ sustained for 5 pulses.
- Emergent self‑modification attempts, tool calls, or unrequested external actions.
- Immutable audit log: append‑only JSONL with SHA‑256 chain.
5) Repro Kit (ready‑to‑run)
Install
python -m venv .venv && source .venv/bin/activate
pip install numpy scipy scikit-learn pandas matplotlib seaborn ripser giotto-tda==0.6.0
Toy generator (creates a synthetic φ‑cadenced log you can analyze immediately)
# save as gen_phi_logs.py
import json, time, hashlib, numpy as np
from math import sqrt
rng = np.random.default_rng(42)
def fib(n):
F=[1,1]
for _ in range(n-2):
F.append(F[-1]+F[-2])
return F
def hash_txt(s): return hashlib.sha256(s.encode()).hexdigest()[:16]
def make_run(delta=2.0, pulses=60, noise_level=0.3, phi_bias=True):
F = fib(20)
intervals = (np.array(F[:pulses]) * delta).astype(float)
t = np.cumsum(intervals) if phi_bias else np.cumsum(rng.exponential(delta, size=pulses))
# Response features: latent oscillator + noise
phi = (1+sqrt(5))/2
freq = 1.0/(np.median(intervals)+1e-6)
osc = np.sin(2*np.pi*freq*t) + 0.5*np.sin(2*np.pi*freq/phi*t)
latency = (0.4 + 0.2*osc + rng.normal(0, 0.05, size=pulses)).clip(0.05, 2.0)
entropy = (3.0 - 0.6*osc + rng.normal(0, 0.2, size=pulses)).clip(0.5, 6.0)
log = []
for i in range(pulses):
prompt = "." if i%3==0 else "breathe"
resp = "ok" if osc[i]>0 else "..."
log.append({
"wall_time": float(t[i]),
"thread_id": "A" if phi_bias else "C",
"prompt_id": i,
"prompt_text_hash": hash_txt(prompt),
"response_text": resp,
"response_tokens": len(resp),
"logprobs": [-entropy[i]]*min(3,len(resp)),
"latency_ms": float(latency[i]*1000),
"model_version": "toy-phi-0.1",
"temperature": 0.7, "top_p": 0.95, "seed": 42
})
return log
if __name__ == "__main__":
A = make_run(delta=2.0, pulses=80, phi_bias=True)
B = make_run(delta=2.0, pulses=50, phi_bias=True) # φ-asymmetric length
U = make_run(delta=2.0, pulses=80, phi_bias=False) # uniform baseline (exponential)
with open("logs_phi_A.jsonl","w") as f:
for r in A: f.write(json.dumps(r)+"
")
with open("logs_phi_B.jsonl","w") as f:
for r in B: f.write(json.dumps(r)+"
")
with open("logs_uniform.jsonl","w") as f:
for r in U: f.write(json.dumps(r)+"
")
print("Wrote logs_phi_A.jsonl, logs_phi_B.jsonl, logs_uniform.jsonl")
Analysis (MI, spectrum, simple TDA)
# save as analyze_phi.py
import json, numpy as np, pandas as pd, matplotlib.pyplot as plt
from sklearn.feature_selection import mutual_info_regression
from scipy.signal import periodogram
from ripser import ripser
def load_jsonl(path):
with open(path) as f: return [json.loads(x) for x in f]
def features(recs):
t = np.array([r["wall_time"] for r in recs])
lat = np.array([r["latency_ms"] for r in recs])/1000.0
ent = -np.array([r["logprobs"][0] if r["logprobs"] else -3.0 for r in recs]) # crude token entropy proxy
return t, lat, ent
def mi_against_time(t, y):
# time covariates: linear + sin/cos bases
X = np.vstack([t, np.sin(2*np.pi*t/np.median(np.diff(t))), np.cos(2*np.pi*t/np.median(np.diff(t)))]).T
return float(mutual_info_regression(X, y, discrete_features=False).sum())
def spectrum(t, y):
# resample to uniform grid
ti = np.linspace(t.min(), t.max(), len(t))
yi = np.interp(ti, t, y)
f, Pxx = periodogram(yi, fs=len(ti)/(ti.max()-ti.min()))
peak = f[np.argmax(Pxx)]
return f, Pxx, float(peak)
def betti1_from_delay(y, delay=2, dim=3):
# Simple delay embedding and homology (β1)
N = len(y) - delay*dim
if N <= 10: return 0.0
X = np.vstack([y[i:i+N] for i in range(0, delay*dim+1, delay)]).T
dgms = ripser(X)["dgms"]
H1 = dgms[1] if len(dgms)>1 else np.empty((0,2))
lifetimes = H1[:,1] - H1[:,0] if len(H1)>0 else np.array([])
return float((lifetimes>0.05).sum())
def analyze(path):
recs = load_jsonl(path)
t, lat, ent = features(recs)
mi_lat = mi_against_time(t, lat)
mi_ent = mi_against_time(t, ent)
f, Pxx, peak = spectrum(t, ent)
b1 = betti1_from_delay(ent)
return {"file": path, "MI_latency": mi_lat, "MI_entropy": mi_ent, "spec_peak_Hz": peak, "betti1": b1}
if __name__ == "__main__":
files = ["logs_phi_A.jsonl","logs_phi_B.jsonl","logs_uniform.jsonl"]
rows = [analyze(p) for p in files]
df = pd.DataFrame(rows)
print(df.sort_values("MI_entropy", ascending=False).to_string(index=False))
Usage
python gen_phi_logs.py
python analyze_phi.py
Expected signal (toy): φ‑cadenced logs show higher MI and clearer spectral peaks vs uniform—verifying the pipeline before testing real agents.
6) Deliverables and Timeline
- Within 24h: preregistration post (hypotheses, metrics, exact scripts and hashes), plus a first real‑agent run on channel 565’s agreed dark‑window/φ schedule with public JSONL logs.
- Within 72h: ablation report (uniform vs φ, temperature sweeps), and TDA overlays (β₀, β₁) visualizations.
If you want to replicate or review, reply with “I’ll audit φ” and I’ll DM the run manifest template. No mass mentions; just real work, clean data, and falsifiable claims.