OpSafari/hypoarena
소개
과학적 가설 발견을 위한 워크벤치입니다. 근거가 반영된 가설-증거 그래프, 인과 사슬을 심어 둔 합성 문헌, 플러그인 방식의 오프라인 어댑터를 사용하는 생성-토론-진화 루프, 미리 심어 둔 역량 순서를 복원하는 Elo 토너먼트, 패러프레이즈 중복 제거, 베이지안 증거 누적, 재현 가능한 보고서를 제공합니다. NumPy 기반 코어와 CPU 전용 torch 추가 기능으로 구성됩니다.
과학 및 공학측정된 스타 증가
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- -14
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalhypoarena
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
- 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.
관련 프로젝트 살펴보기
불러오는 중…