Rename neural experiments to descriptive paths (drop N* codes)

configs/neural/{N0,N1,N2,N5}.yaml -> {bridge,collapse,grounding,architectures}.yaml,
results dirs likewise. Updated experiment/output.dir fields, comments/docstrings, and
docs; regenerated the four result manifests (now carrying the real git commit). No
functional path resolution referenced the codes (the Makefile globs configs/neural/*.yaml
and tests use inline configs), so nothing breaks. 92 tests green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Giorgio Gilestro 2026-07-04 21:21:56 +01:00
parent 840b6b00b3
commit aca7b394a3
21 changed files with 82 additions and 78 deletions

View file

@ -6,7 +6,7 @@ provenance helpers, and its output contract (``save_artifacts``). Only the per-r
the config key set differ: a neural run trains generative models rather than resampling a
frequency vector, and its config groups are ``synthetic``/``model``/``dynamics``/... .
CLI: python -m neural.experiment configs/neural/N0.yaml
CLI: python -m neural.experiment configs/neural/bridge.yaml
"""
from __future__ import annotations
@ -98,7 +98,7 @@ def run_and_save(config_path: str | Path) -> Path:
out_dir = Path(cfg.get("output", {}).get("dir", f"results/{cfg['experiment']}"))
kind = cfg.get("kind", "gen_lineage")
if kind == "recombination":
from .recombine import run_recombination # Stage C (N4); imported lazily
from .recombine import run_recombination # the `recombination` experiment; lazy import
df = run_recombination(cfg)
grid = None
elif kind == "gen_lineage":
@ -114,7 +114,7 @@ def run_and_save(config_path: str | Path) -> Path:
def main(argv: list[str] | None = None) -> None:
parser = argparse.ArgumentParser(description="Run a Layer-1.5 neural experiment from a YAML config.")
parser.add_argument("config", help="Path to configs/neural/NX.yaml")
parser.add_argument("config", help="Path to configs/neural/<name>.yaml")
args = parser.parse_args(argv)
out_dir = run_and_save(args.config)
print(f"wrote artifacts to {out_dir}/")

View file

@ -72,7 +72,7 @@ def run_generative_lineage(cfg: Mapping[str, Any] | NeuralLineageCfg,
grounding = cfg.dynamics.grounding
exercised = np.asarray(grounding.exercised) if grounding.exercised is not None else None
m_vector = allocate_m(grounding.m, R, grounding.policy, exercised)
p_star_eff = p_star_orig.copy() # grounding reference; may be re-minted (N6)
p_star_eff = p_star_orig.copy() # grounding reference; may be re-minted (`remint`)
remint = cfg.dynamics.remint
n = cfg.dynamics.n
@ -105,7 +105,7 @@ def run_generative_lineage(cfg: Mapping[str, Any] | NeuralLineageCfg,
if remint.enabled and remint.period and t % remint.period == 0:
# Founder event: current distribution becomes the new grounding reference and
# the original truth is discarded for grounding. Gated on diversity (N6).
# the original truth is discarded for grounding. Gated on diversity (`remint`).
if remint.H_gate is None or heterozygosity(p) >= remint.H_gate:
p_star_eff = p.copy()
record(t, p)

View file

@ -3,7 +3,7 @@
Every model implements the same three-method protocol: ``fit`` on a batch of token
sequences, ``sample`` fresh token sequences, and report its ``mode_distribution`` (the
model's ``p_t``). Keeping the interface identical is what makes "collapse is
architecture-general" (experiment N5) a single sweep over ``model.kind``.
architecture-general" (the `architectures` experiment) a single sweep over ``model.kind``.
``HistogramModel`` is the bridge: its ``fit`` is a maximum-likelihood mode histogram and
its ``sample`` is a multinomial draw, so a lineage of histogram models is *exactly*

View file

@ -1,4 +1,4 @@
"""Autoregressive MLP generative model (Stage C, for the N5 architecture-generality axis).
"""Autoregressive MLP generative model (Stage C, for the `architectures` generality axis).
A causal feed-forward next-token model: token ``i`` is predicted from the concatenated
(causally-masked) embeddings of all earlier tokens. Deliberately a *different* inductive

View file

@ -2,7 +2,7 @@
Each model implements the same ``GenerativeModel`` protocol as the histogram bridge
(``initialise`` / ``fit`` / ``sample`` / ``mode_distribution``), so a lineage is
architecture-agnostic and N5 is a single sweep over ``model.kind``. Unlike the histogram
architecture-agnostic and the `architectures` experiment is a single sweep over ``model.kind``. Unlike the histogram
model, a neural model's ``mode_distribution`` is *estimated* by generate-and-classify
(``n_eval`` samples), which is the honest, slightly-noisy neural readout of ``p_t``.

View file

@ -1,4 +1,4 @@
"""Sequence VAE generative model (Stage C, for the N5 architecture-generality axis).
"""Sequence VAE generative model (Stage C, for the `architectures` generality axis).
A GRU encoder maps a token sequence to a Gaussian latent ``z``; a GRU decoder (its initial
hidden state projected from ``z``) reconstructs the sequence. Trained by the ELBO