Skip to content
mutib202-uxPublic

About

A reference architecture for falsifiable, budget-controlled, multi-fidelity agentic discovery loops. Photonics is the worked example.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

falsify

A reference architecture for falsifiable, budget-controlled, multi-fidelity agentic discovery loops.

status python license

falsify is not a photonic CAD tool. It is an architecture for autonomous research loops that produce typed, falsifiable hypotheses with content-hashed evidence and refuse to declare success without independent verification. Photonics is the worked example.

What this is

A small Python framework (≈ 1.5k LOC) that wires together six things most agentic-discovery systems leave implicit:

  1. Typed Hypothesis records with a predict() method, automatically paired with a null hypothesis. Tolerance is set by the goal, not by the agent.
  2. Immutable, content-addressed evidence (Designs, Simulations, AnalysisReports, FOMs, ConvergenceReports) in a NetworkX-backed knowledge graph with 8 node and 8 edge types.
  3. Intent stamps on every producer edge. explain_provenance(node_id) returns the causal chain back to the originating goal, with the hypothesis being tested at each step.
  4. Three-condition stop gates: DRC ∧ high-fidelity-converged ∧ cross-fidelity agreement. The Coordinator refuses target_reached otherwise.
  5. Budget controls: max iterations, simulations, wall time, and high-fidelity runs, each with a typed stop_reason.
  6. Domain plugins under falsify.domains.*. v0.1 ships photonic (MZI worked example) and synthetic (benchmark problems with ground truth).

What this is not (and will not pretend to be in v0.x)

  • A replacement for gdsfactory, Lumerical, Tidy3d, Synopsys OptoCompiler, or Cadence Virtuoso Photonic. The shipped SAX engine is uncalibrated; do not trust its FOMs as device-quality predictions.
  • An LLM-driven agent. The v0.1 hypothesis layer is rule-based pattern detection. An LLM-backed pattern is on the roadmap (v0.6).
  • A finished scientific-discovery system. See LIMITATIONS.md.

Quickstart

git clone https://github.com/mutib202-ux/falsify
cd falsify
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest                              # ~10–20 s
python examples/quickstart.py
from falsify.contracts import Budget, Goal
from falsify.domains.photonic.loop import build_default_loop

loop = build_default_loop(
    goal=Goal(component_family="mzi", target_metric="FSR_nm",
              target_value=0.4007, target_tolerance=0.05),   # ≈ 50 GHz
    budget=Budget(max_iterations=8, max_simulations=30,
                  max_wall_time_s=60.0, max_fdtd_runs=4),
)
report = loop.run()
print(report.to_markdown())

The headline run converges in 2 iterations, 7 simulations, and 1 FDTD verification (the default verifier is a deterministic mock — see docs/ for plugging in real Meep).

Architecture

                          CoordinatorAgent.run()
                                  │
              seed → ingest → hypothesize → review → check_stop
                                                ↓             ↓
                                              STOP        CONTINUE
                                                ↓             ↓
                                             report       plan → dispatch → ingest …

                          ┌───────────────┐
                          │ KnowledgeGraph │   nx.MultiDiGraph
                          │  8 node types  │   immutable evidence
                          │  8 edge types  │   intent_id on every
                          └───────────────┘   producer edge
                                  ⇈
                  AnalysisAgent ← SimulationEngine ← DesignFactory
                                  ⇈
                          HypothesisAgent  (pattern detectors + null pairing)
                                  ⇈
                          MeepVerifier  (FDTD gate before target_reached)

Status & readiness

Layer Status
KG + intent provenance ✅ stable, tested
Hypothesis + null pairing + extrapolation guard ✅ stable, tested
Coordinator + three-condition gates ✅ stable, tested
Photonic SAX engine 🟡 toy, qualitatively realistic, not calibrated
Photonic Meep verifier 🟡 deterministic mock by default; real Meep is a swap-in
LLM-backed hypothesis patterns 🔴 v0.6
Foundry PDK integration 🔴 v1.0
Multi-objective / Pareto 🔴 v0.8

See ROADMAP.md for the timing.

Honest framing

The provenance graph, the falsifiable-hypothesis ledger, and the three-condition gates are the framework's actual contribution. The photonics layer demonstrates them on a problem with a closed-form answer (FSR = λ²/(n_g · ΔL)); the loop converges fast because the relation is algebraic.

If you want to use this as a scientific discovery system, you need to plug in an experimental oracle (a real measurement, a real independent solver, a real foundry run). The architecture is ready for that; v0.1 doesn't ship it.

Citation

If you use falsify in research:

@software{falsify_2026,
  author = {falsify contributors},
  title  = {falsify: a reference architecture for falsifiable agentic
            discovery loops},
  year   = 2026,
  url    = {https://github.com/mutib202-ux/falsify},
}

License

Apache License 2.0. The patent grant matters in photonic CAD; permissiveness matters for research adoption. Optional GPL-licensed dependencies (KLayout, pymeep) are documented in NOTICE.

About

A reference architecture for falsifiable, budget-controlled, multi-fidelity agentic discovery loops. Photonics is the worked example.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages