跳到正文

OpSafari

hypoarena

Scientific hypothesis-discovery workbench: grounded hypothesis-evidence graphs, synthetic literature with planted causal chains, generate-debate-evolve loops over pluggable offline adapters, Elo tournaments recovering planted skill order, paraphrase dedup, Bayesian evidence accumulation, reproducible reports. NumPy core, CPU-only torch extra.

README 已保存到本站,可直接阅读

Documentation snapshot

README 快照

这篇是英文原文

下面正文是项目自己的英文 README。想读全文就用浏览器自带的整页翻译: Chrome / Edge 点地址栏右侧的翻译图标,或用右键菜单里的「翻译成中文」; 手机浏览器一般在菜单里。

本页保存的是公开项目资料快照,阅读过程不需要连接 GitHub。

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

CommandPurpose
make buildBuild a wheel with the local venv (--no-isolation)
make testFast test suite (excludes the slow mark)
make test-allFull suite (includes slow / model tests)
make format / make format-checkruff formatting and its check mode
make lintruff check + format —check
make typecheckmypy static analysis
make demoEnd-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

  • corpus — generate a deterministic synthetic literature with planted causal chains, competing hypotheses, paraphrase clusters, and controllable noise (distractors, contradictory findings); every corpus carries a provenance hash.
  • generate / debate / evolve — run the generate–debate–evolve loop over the pluggable agent protocol (propose / critique / revise) with scripted, replay, or loopback-mock agents; evolution operators (scope narrowing, variable substitution, mechanism crossover, claim decomposition) preserve graph validity by construction.
  • verify — span-level grounding checks: citation existence, entity overlap, polarity consistency, and numeric agreement, with graded flags for ungrounded or weakly grounded claims. Adversarial fixtures (fabricated citations, drifted numbers, negation flips) must be caught.
  • dedup — normalized-text hashing, char/word n-gram Jaccard, TF-IDF cosine, and MinHash LSH with documented false-positive/false-negative behavior; planted paraphrase clusters are detected at measured recall/precision.
  • rank — round-robin pairwise judging over rubric scores (novelty, testability, grounding, consistency) with Bradley–Terry/Elo updates, draw handling, and K-factor decay. Property tests assert that ratings recover a planted skill order within tolerance on seeded runs.
  • accumulate — Bayesian belief updating from graded evidence with prior sensitivity analysis, contradiction policies, and golden numeric tests.
  • report — Markdown and self-contained HTML reports (rankings, grounding flags, dedup clusters, belief updates) with hostile-text escaping, embedded run metadata, and an honest limitations section; no network access required.

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.

Official distribution

获取与安装

暂未发现可确认的官方软件包地址

当前 README 快照没有出现 npm、PyPI、Crates.io、pub.dev 等官方包页链接。本站不会根据仓库名称猜测下载地址。

本站不托管项目文件;需要安装时,请以项目维护者发布的官方文档为准。

使用前核验

本站保存公开资料用于阅读,不代表安全审计或功能背书。安装前请核对许可证、依赖来源和发布签名,不要直接运行来源不明的二进制文件或高权限脚本。