hypoarena README

The project's README from github.com/OpSafari/hypoarena. As one markdown file: README.md.

hypoarena

hypoarena is a fully offline scientific hypothesis-discovery workbench. It decomposes the mechanism layer of generate–debate–evolve "AI co-scientist" pipelines into individually testable components: a citation-bearing hypothesis/evidence graph, a synthetic literature factory, span-level grounding verification, pluggable agent adapters, Bradley–Terry / Elo tournaments, paraphrase deduplication (TF-IDF, MinHash LSH), hypothesis evolution operators, and Bayesian evidence accumulation.

At runtime the package depends only on NumPy. PyTorch (CPU-only) is an optional extra used solely to demonstrate a small trainable ranker. Every default test and example runs without network access, without calling real models, and without downloading weights.

Installation

python -m venv .venv
.venv/bin/pip install -e ".[dev]"          # development env (hatchling, pytest, ruff, mypy)
.venv/bin/pip install -e ".[dev,torch]" \
    --extra-index-url https://download.pytorch.org/whl/cpu   # when the optional ranker is needed

Quick start

.venv/bin/hypoarena demo --chains 2 --chain-length 2 --out /tmp/hya

This runs the complete pipeline offline over a synthetic corpus, prints whether each planted causal chain was recovered, and writes report.md / report.html. It is a mechanism demonstration and makes no claim about real scientific discovery capability. A typical run reports every planted link (e.g. planted links: 6 recovered: 6 rate: 1.0 on the demo corpus) and ends with an explicit note that it is a synthetic demonstration only.

Common commands

Command Purpose
make build Build a wheel with the local venv (--no-isolation)
make test Fast test suite (excludes the slow mark)
make test-all Full suite (includes slow / model tests)
make format / make format-check ruff formatting and its check mode
make lint ruff check + format --check
make typecheck mypy static analysis
make demo End-to-end offline demonstration

CLI

The hypoarena command-line tool exposes one subcommand per pipeline stage, in pipeline order: corpus, generate, verify, dedup, debate, rank, evolve, accumulate, report, and demo. All of them run offline over synthetic corpora. One-shot demonstration:

$ hypoarena demo --chains 2 --chain-length 2 --out /tmp/hya

Subcommand options, shared arguments, and exit codes are documented in docs/cli.md.

What each stage does

Artifact stability

All JSONL/JSON artifacts are written through a single canonical serializer (sorted keys, fixed separators, floats quantized at their production points), so run outputs — and the golden digests pinned over them — are byte-identical across platforms and interpreter versions. Checkpointed runs replay completed stages from the ledger and produce artifacts byte-identical to straight runs.

Examples and documentation

examples/ contains three fully offline, runnable examples — planted-corpus generation with grounding verification, a full generate→debate→rank tournament showing Elo recovery of a planted skill order, and an evolution + dedup cycle with measured novelty statistics. Each ships with its own README and real captured output; see docs/examples.md for the overview.

Architecture, schemas, per-module notes, and the honesty conventions live under docs/; start the module index at docs/api.md.

License

MIT — see LICENSE. Release history is in CHANGELOG.md.

hypoarena (OpSafari/hypoarena)

Searching Database…

这是什么?hypoarena 是一个完全离线的工作台,把「生成-辩论-进化」的 AI 协同科学家流水线拆解成可以逐一测试的机制:带引用的假设-证据图、合成文献工厂、依据校验、可插拔的智能体适配器、Elo 锦标赛、改写去重,以及贝叶斯证据累积。
这是 Python 库还是命令行工具?两者都是——它是一个基于 NumPy、可导入的 Python 包,同时自带 `hypoarena` CLI,流水线每个阶段对应一个子命令(corpus、generate、verify、dedup、debate、rank、evolve、accumulate、report、demo)。
怎么试用?运行 `make demo` 可以一次性端到端离线演示,或者自己运行各个 CLI 阶段(corpus -> generate/debate/evolve -> verify -> dedup -> rank -> accumulate -> report);这会生成 report.md 和 report.html。
运行它需要安装什么?运行时只需要 NumPy。PyTorch(仅 CPU 版)是可选附加项,只用于演示一个小型可训练排序器——不需要 GPU,也不需要联网。
hypoarena 真的能发现真实的科学假设吗?不能——每个默认测试和示例都在合成语料上运行,不调用真实模型也不联网;项目明确声明它只是机制演示,并非对真实科学发现能力的主张。
Elo/锦标赛排名实际是怎么运作的?假设按循环赛制依据评分细则(新颖性、可检验性、依据充分性、一致性)对决,采用 Bradley-Terry/Elo 更新,处理平局并有 K 因子衰减;性质测试确认评分能在容差内还原预置的能力顺序。
改写去重是怎么检测近似重复假设的?它结合了规范化文本哈希、字符/词 n-gram Jaccard 相似度、TF-IDF 余弦相似度和 MinHash LSH,并在预置的改写簇上记录了假阳性/假阴性表现。
结果在不同机器之间可复现吗?可以——所有 JSON/JSONL 产物都经过同一个规范化序列化器(键排序、固定分隔符、浮点数量化),因此输出及其黄金摘要在不同平台和 Python 解释器版本之间字节级一致。
我能把哪类智能体接入辩论循环?生成-辩论-进化循环采用可插拔的提议/批评/修订智能体协议,支持脚本式、回放或环回模拟(loopback-mock)智能体,实现完全离线运行。
Creator
OpSafari
Size
1.5 MB
Stars
555
Age
19d
Commits · 90 Days