Skip to content

Softplus shape nonlinearity, rho=-10 null marks, and cleanup#2

Draft
Copilot wants to merge 9 commits intomainfrom
copilot/retrain-full-pipelines-easier-setting
Draft

Softplus shape nonlinearity, rho=-10 null marks, and cleanup#2
Copilot wants to merge 9 commits intomainfrom
copilot/retrain-full-pipelines-easier-setting

Conversation

Copy link
Contributor

Copilot AI commented Mar 19, 2026

Phase II bootstrap was unstable due to the hard zero at rho=0. This PR introduces softplus(rho) * exp(...) as the shape function and moves null marks from rho=0 to rho=-10, giving smooth gradients near zero and faint background noise instead of exact silence.

Shape function change

# before
shapes = rho * jnp.exp(-xs**2 / (2.0 * var))

# after
shapes = jax.nn.softplus(rho) * jnp.exp(-xs**2 / (2.0 * var))

Applied in shape_fn, compute_X, compute_X_batched in model.py and the inline copies in run_modal_experiment.py.

Null marks: rho=0 → rho=-10

  • Sampling functions emit rho=-10 instead of rho=0 for null marks (softplus(-10) ≈ 4.5e-5)
  • NaN/Inf replacement uses jnp.array([-10.0, 0.0]) instead of 0.0
  • Diagnostics use frac(softplus(rho) < 0.1) instead of frac(|rho| < 0.1)

Results

Phase II bootstrap is now stable: frac holds at ~0.95 through 150k iterations (previously degraded 0.858 → 0.358).

Cleanup

  • Deleted 4 obsolete runner scripts (run_modal.py, run_modal_diag.py, run_modal_easy.py, run_modal_oracle.py) — all superseded by run_modal_experiment.py
  • Deleted DETAILED_PLAN.md and all pre-softplus result files
  • Rewrote README.md to document current architecture and experiment workflow

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Copilot AI and others added 4 commits March 19, 2026 12:53
Co-authored-by: jacksonloper <2056977+jacksonloper@users.noreply.github.com>
Co-authored-by: jacksonloper <2056977+jacksonloper@users.noreply.github.com>
Co-authored-by: jacksonloper <2056977+jacksonloper@users.noreply.github.com>
…dal_diag.py

Co-authored-by: jacksonloper <2056977+jacksonloper@users.noreply.github.com>
Copilot AI changed the title [WIP] Retrain full pipelines in easier oracle mode Diagnose Phase II bootstrap instability: easy-setting retraining + oracle warm-start experiment Mar 19, 2026
Copilot AI requested a review from jacksonloper March 19, 2026 13:12
…ase_np95_pihat95)

Co-authored-by: jacksonloper <2056977+jacksonloper@users.noreply.github.com>
Copilot AI changed the title Diagnose Phase II bootstrap instability: easy-setting retraining + oracle warm-start experiment Parameterized experiment framework for gaubump case studies with Phase II optimizer restart Mar 19, 2026
Copilot AI and others added 2 commits March 19, 2026 16:30
The shape function now uses softplus(rho) * exp(...) instead of rho * exp(...).
Null marks use rho=-10 (softplus(-10) ≈ 4.5e-5) instead of rho=0, giving
real background-like noise and allowing the model to represent 'zero' with
a smooth gradient signal.

Changes applied consistently across:
- model.py (shape_fn, compute_X, compute_X_batched, sampling)
- run_modal_experiment.py (inline copies, diagnostics, plots)
- train.py (diagnostics, NaN replacement)
- run_modal.py, run_modal_easy.py, run_modal_oracle.py, run_modal_diag.py

Co-authored-by: jacksonloper <2056977+jacksonloper@users.noreply.github.com>
…t 0.95)

The softplus(rho) nonlinearity completely resolves the Phase II bootstrap
instability. Post-Phase-I frac=0.956 stays stable throughout 150k Phase II
steps, finishing at 0.952. Compare with old linear model where frac degraded
from 0.858 to 0.358.

Co-authored-by: jacksonloper <2056977+jacksonloper@users.noreply.github.com>
Copilot AI changed the title Parameterized experiment framework for gaubump case studies with Phase II optimizer restart softplus(rho) shape nonlinearity with rho=-10 null marks Mar 19, 2026
…gn doc

Deleted:
- results/case_np95_pihat95/ (pre-softplus experiment)
- All root-level results (diag_*, easy_*, oracle_*, main pipeline outputs)
- run_modal.py, run_modal_diag.py, run_modal_easy.py, run_modal_oracle.py
  (all superseded by the parameterized run_modal_experiment.py)
- DETAILED_PLAN.md (pre-softplus design notes)

Updated README.md to document:
- Softplus shape function and rho=-10 null marks
- Streamlined file listing (4 Python files + results/)
- How to run experiments and configure cases
- Current results (case_softplus_np95_pihat95)

Co-authored-by: jacksonloper <2056977+jacksonloper@users.noreply.github.com>
Agent-Logs-Url: https://github.com/prob-ml/admixture-identifiability/sessions/c51e3074-02a8-4128-ab3a-c8c53608aa7c
Copilot AI changed the title softplus(rho) shape nonlinearity with rho=-10 null marks Softplus shape nonlinearity, rho=-10 null marks, and cleanup Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants