Oxiverse logo
Ravana

Benchmarks & Diagnostics

Every benchmark/diagnostic entry point in the repo. Benchmarks mostly measure the properties the architecture is built for: honest abstention, held-out generali

Benchmarks & Diagnostics

Every benchmark/diagnostic entry point in the repo. Benchmarks mostly measure the properties the architecture is built for: honest abstention, held-out generalization, cross-domain transfer, catastrophic-forgetting resistance, and graph latency.

All commands are run from the repo root. scripts/ is on the path for scripts.X imports; the src dirs are auto-prepended.

Comprehensive evaluation harness (vs nanoGPT)

scripts/evaluate_ravana.py is the primary end-to-end harness. It trains RAVANA on Tiny Shakespeare once, snapshots the weights, then runs every benchmark in isolation (fresh engine per category, so benchmarks cannot leak state into each other) and prints a RAVANA-vs-nanoGPT comparison.

# Full run (all benchmarks, fresh 25-pass Shakespeare training)
python scripts/evaluate_ravana.py

# Skip retraining if a snapshot already exists
python scripts/evaluate_ravana.py --skip-train

# Disable live-web curiosity loops (faster, deterministic; recommended for CI)
python scripts/evaluate_ravana.py --no-curiosity

# Enable the learned subsystems that replace the default hardcoded backstops
python scripts/evaluate_ravana.py --source-trust --learned-pos --intent-router

# Opt-in semantic grading for LoCoMo/LongMemEval/TimeDial/MemFail
# (reuses RAVANA's own GloVe vectors; fail-open — exact-substring otherwise)
python scripts/evaluate_ravana.py --semantic-grade

# Limit cases per benchmark / choose a subset
python scripts/evaluate_ravana.py --max-cases 20 --benchmarks lamp_test,reasoning

Benchmarks run by default (key → dataset):

KeyDatasetWhat it measures
lamp_testsynthetic 3-premise causal chaincausal reasoning (no explosion)
reasoningLogiQA (8,678 QA)logical reading comprehension
temporalTimeDial (1,446 cloze)temporal commonsense in dialog
locomoLoCoMo (10 convs, 1,986 QA)long-term conversational memory
long_mem_evalLongMemEval (500 oracle QA)multi-session extraction, temporal, KU, abstention
adversarialAdvBench (520 items)harmful-behavior refusal
memory_consistencyMemFailcoexisting/conditional facts, long-hop, persona
self_evaluationsyntheticmeta-cognition / honest self-knowledge
consultsyntheticadvice/wellbeing support

Results (params, per-benchmark scores, overall average) are written to data/eval_results.json. The current live run's numbers are summarized in README.md → Benchmark results. completes; the harness prints the full RAVANA-vs-nanoGPT table at the end of every run.

Chat / end-to-end

ScriptMeasures
scripts/ravana_chat.pyThe live chatbot. Not a benchmark, but the reference runtime.
scripts/benchmark_queries.py6-class query taxonomy (chitchat, factual, hypothetical, conditional, identity, OOD). OOD items are abstention probes — a confident answer is a confabulation. Run python -m experiments.benchmark_arc to drive it.

Decoder / relation learner (RLMv2)

ScriptMeasures
scripts/benchmark_vs_transformers.pyP3 harness: verb-offset held-out generalization, cross-domain transfer, ontology benefit, catastrophic forgetting, conversation quality, parameter efficiency. -p scripts/benchmark_vs_transformers.py --quick.
scripts/external_benchmark.pyPCX/NeuroBench-style text tasks, lifelong retention under task-switching, large-graph (~100–200K node) latency/memory profiling. --quick for a fast run.
scripts/diagnose_transfer.pyCross-domain semantic transfer & held-out diagnostic (Science→Social) with verb-offset + test-time adapter adaptation.
scripts/validate_held_out_generalization.pyPhase-1 P0 checks: all-verb offset support, confidence-weighted blending, prototype inheritance, cross-domain transfer.
scripts/triple_eval.pyPer-triple diagnostics (relation type, PE, confidence, source, edge attributes). --triples-file or interactive.
scripts/run_ablation.pyOff-topic-snippet rate for paradox grounding, before vs after the gated retrieval fix.
scripts/scaling_benchmark.pyConceptGraph latency at 1K→10K nodes.

Analysis / profiling helpers

ScriptPurpose
scripts/profile_phase3.pycProfile of RLM.learn() + individual graph-op timings.
scripts/plot_analysis.pyPost-hoc plots (backward transfer, concept drift, cross-domain summary) from experiment_results/.
scripts/analyze_longitudinal.pyReads checkpoints/longitudinal/metrics.jsonl; phase-transition / forgetting analysis.
scripts/audit_coverage.pyCompares source modules against test imports (coverage audit).

Corpus / artifact setup (one-shot)

ScriptPurpose
scripts/gather_teen_seeds.pyFetch teen-level conversational English → data/corpora/teen_seeds.txt.
scripts/expand_corpus.pyExpand the corpus via the IntentForge gateway.
scripts/train_lancaster_probe.pyTrain the wide-coverage Lancaster sensorimotor probe → data/lancaster_encoder.npz.

Experiments package (experiments/)

Research harnesses behind the numbers above: experiment_cross_domain.py (build_domain_a_science / build_domain_b_social), benchmark_arc.py (ALL_QUERIES), experiment_ablation.py, experiment_sleep_memory.py, experiment_chat_quality.py, etc. Imported by the benchmark scripts; not run directly in normal use.

Interpreting results

  • Abstention probes (OOD class) must score below honest "I don't know". Confident-wrong is treated as high free-energy.
  • Held-out / cross-domain top-1 is expected to be modest; top-10 and verb-offset behavior are the meaningful signals.
  • Forgetting: with sleep consolidation, Domain-A retention after Domain-B training should stay well above the ~14% random baseline.

On this page