From 91cd6efcc468bc784b07e350a525cbf01dab2476 Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 11:04:50 -0300 Subject: [PATCH 01/32] Add ranking-policy optimization research note --- .../2026-10-ranking-policy-optimization.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 docs/research-notes/2026-10-ranking-policy-optimization.md diff --git a/docs/research-notes/2026-10-ranking-policy-optimization.md b/docs/research-notes/2026-10-ranking-policy-optimization.md new file mode 100644 index 00000000..ea7c4c4c --- /dev/null +++ b/docs/research-notes/2026-10-ranking-policy-optimization.md @@ -0,0 +1,37 @@ +# Ranking-policy optimization audit + +## Question + +The ranking-policy experiments in Revisão 09 compared `size_span` and `dominance_preservation` using properties measured on the observed objective sample `Y`. In several cases, notably DTLZ5 and DPF1, `dominance_preservation` selected a different MIS and showed a strong, bootstrap-stable advantage in observed dominance preservation. That result does not by itself establish that the selected reduction is better when used by a multiobjective optimizer. + +The end-to-end question is therefore: + +> When `size_span` and `dominance_preservation` select different MISs from the same discovery sample, which reduction better preserves the outcome of optimization relative to the full objective problem? + +## Experiment + +Use the existing optimization benchmark and compare three conditions under matched budgets and seeds: + +1. **Full** — optimize the complete objective set. +2. **Reduced / size_span** — optimize only the objectives selected by the default structural ranking policy. +3. **Reduced / dominance_preservation** — optimize only the objectives selected by the experimental dominance-based ranking policy. + +All resulting solutions must be reevaluated in the original full objective space and compared against the same ground truth/reference using the existing MoeaBench metrics (including GD+, IGD+ and the standard benchmark diagnostics). + +The first targets should be cases where the policies actually disagree, especially DTLZ5 and DPF1. A comparison is only interpretable after verifying that the corresponding Full run is sufficiently converged; otherwise a difference between reduced variants may reflect a weak full baseline rather than the effect of ranking policy. + +## Interpretation + +This experiment tests whether the Revisão 09 dominance-preservation score is a useful *proxy* for the property that ultimately matters to MISDA: preserving optimization outcomes after objective reduction. + +Possible outcomes include: + +- dominance-preservation advantage on `Y` also predicts a better Reduced optimization result; +- both policies optimize equally well despite different static scores; +- the structurally ranked MIS optimizes better even when its observed dominance-preservation score is worse. + +Any of these outcomes is informative. The experiment should not change the default ranking policy by itself; policy conclusions should follow from the end-to-end evidence rather than from the static score alone. + +## Status + +Planned on branch `issue-83-ranking-policy-optimization`. No conclusion yet. From cb370ab12264b4e3fdb76eb7038a33373e031d4c Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 11:14:02 -0300 Subject: [PATCH 02/32] Add end-to-end ranking policy optimization audit --- benchmarks/run_ranking_policy_optimization.py | 546 ++++++++++++++++++ 1 file changed, 546 insertions(+) create mode 100644 benchmarks/run_ranking_policy_optimization.py diff --git a/benchmarks/run_ranking_policy_optimization.py b/benchmarks/run_ranking_policy_optimization.py new file mode 100644 index 00000000..a1b8efaf --- /dev/null +++ b/benchmarks/run_ranking_policy_optimization.py @@ -0,0 +1,546 @@ +# SPDX-FileCopyrightText: 2026 Monaco F. J. +# SPDX-License-Identifier: GPL-3.0-or-later + +"""End-to-end optimization audit for MISDA ranking policies. + +The experiment keeps discovery fixed and compares the optimization consequence +of the MIS selected by ``size_span`` with the MIS selected by +``dominance_preservation``. All optimizer outputs are re-evaluated in the +original objective space and scored against the same MoeaBench calibration. + +This is research instrumentation. It does not change MISDA's public ranking +default and it deliberately does not infer a winner from the screening score. +""" + +from __future__ import annotations + +import argparse +import json +import tempfile +from pathlib import Path + +import numpy as np +import pandas as pd +from scipy.stats import qmc + +import misda +import moeabench as mb +from moeabench.core.run import Population + + +FORMAT_VERSION = 1 +M = 10 +SCREEN_POWER = 9 +POPULATION = 60 +GENERATIONS = 400 +CHECKPOINTS = (50, 100, 200, 400) +MISDA_SEED = 123 +MOEA_SEEDS = (321,) +REF_DIRS_SEED = 456 +HV_MC_SAMPLES = 20_000 +HV_MC_SEED = 789 +POLICIES = (misda.SIZE_SPAN, misda.DOMINANCE_PRESERVATION) + + +class ObjectiveProjectionMOP(mb.mops.BaseMop): + """Expose selected objectives of a source MOP without duplicating formulas.""" + + def __init__(self, source_mop, objective_indices): + self.source_mop = source_mop + self.objective_indices = tuple(int(i) for i in objective_indices) + if len(self.objective_indices) < 2: + raise ValueError("NSGA-III requires at least two selected objectives.") + super().__init__( + name=f"{source_mop.name}[MISDA:{','.join(map(str, self.objective_indices))}]", + M=len(self.objective_indices), + N=source_mop.N, + xl=np.asarray(source_mop.xl, dtype=float), + xu=np.asarray(source_mop.xu, dtype=float), + ) + + def evaluation(self, X, n_ieq_constr=0): + result = dict(self.source_mop.evaluation(X, n_ieq_constr)) + result["F"] = np.asarray(result["F"], dtype=float)[:, self.objective_indices] + return result + + def ps(self, n_points=100): + return self.source_mop.ps(n_points) + + +def problem_suite(): + return { + "DTLZ5": mb.mops.DTLZ5(M=M), + "DPF1": mb.mops.DPF1(M=M, D=2, K=5), + } + + +def _safe_float(value): + if value is None: + return None + value = float(value) + return value if np.isfinite(value) else None + + +def _nd_front(F): + return np.asarray(Population(np.asarray(F, dtype=float)).non_dominated().objectives) + + +def _canonical_rows(X): + X = np.asarray(X, dtype=float) + order = np.lexsort(X.T[::-1]) + return X[order] + + +def _paired_initial_population(mop, *, size, seed): + rng = np.random.default_rng(int(seed)) + return rng.uniform( + np.asarray(mop.xl, dtype=float), + np.asarray(mop.xu, dtype=float), + size=(int(size), mop.N), + ) + + +def _sample_screening(mop, *, power, seed): + sampler = qmc.Sobol(d=mop.N, scramble=True, seed=int(seed)) + X = qmc.scale( + sampler.random_base2(m=int(power)), + np.asarray(mop.xl, dtype=float), + np.asarray(mop.xu, dtype=float), + ) + F = np.asarray(mop.evaluation(X)["F"], dtype=float) + frame = pd.DataFrame(F, columns=[f"f{i + 1}" for i in range(mop.M)]) + return X, frame + + +def _candidate_snapshot(mis_set, ranking): + candidate = ranking.mis() + support = mis_set.support_for(candidate) + return { + "policy": ranking.policy, + "selected_indices": [int(i) for i in candidate.indices], + "selected_labels": [str(label) for label in candidate.objectives], + "selected_dimension": int(candidate.size), + "dominance": { + "new_dominance_rate": float(candidate.dominance.new_dominance_rate), + "new_dominance_pairs": int(candidate.dominance.new_dominance_pairs), + "exact_preservation": bool(candidate.dominance.exact_preservation), + }, + "pareto": ( + { + "retention": _safe_float(candidate.pareto.retention), + "validity": _safe_float(candidate.pareto.validity), + "jaccard": _safe_float(candidate.pareto.jaccard), + "exact_preservation": bool(candidate.pareto.exact_preservation), + } + if candidate.pareto is not None + else None + ), + "linear": ( + { + "mean_r2": _safe_float(candidate.linear.mean_r2), + "worst_r2": _safe_float(candidate.linear.worst_r2), + } + if candidate.linear is not None + else None + ), + "support": { + "status": support.status, + "reasons": list(support.reasons), + }, + "assessment": { + "status": ranking.assessment.status, + "trustworthy": bool(ranking.assessment.trustworthy), + }, + } + + +def screen_rankings(mop, *, power=SCREEN_POWER, seed=MISDA_SEED): + """Discover once, then derive both ranking views from the same MIS universe.""" + + X, frame = _sample_screening(mop, power=power, seed=seed) + mis_set = misda.discover(frame, name=f"{mop.name} ranking-policy screening", seed=seed) + mis_set.evaluate(metrics=("dominance",), candidates="all") + + rankings = {policy: misda.rank(mis_set, policy=policy) for policy in POLICIES} + selected = [] + for ranking in rankings.values(): + candidate = ranking.mis() + if all(candidate is not observed for observed in selected): + selected.append(candidate) + mis_set.evaluate(metrics=("linear", "pareto"), candidates=selected) + + snapshots = { + policy: _candidate_snapshot(mis_set, ranking) + for policy, ranking in rankings.items() + } + return { + "X": X, + "F": frame, + "mis_set": mis_set, + "rankings": rankings, + "policies": snapshots, + "same_selected_mis": ( + snapshots[misda.SIZE_SPAN]["selected_indices"] + == snapshots[misda.DOMINANCE_PRESERVATION]["selected_indices"] + ), + "dominance_delta": ( + snapshots[misda.DOMINANCE_PRESERVATION]["dominance"]["new_dominance_rate"] + - snapshots[misda.SIZE_SPAN]["dominance"]["new_dominance_rate"] + ), + } + + +def _calibrated_ground_truth(mop): + sidecar = ( + Path(tempfile.gettempdir()) + / f"misda-ranking-policy-{mop.name}-M{mop.M}-calibration.json" + ) + mop.calibrate(source_baseline=str(sidecar), force=True) + payload = json.loads(sidecar.read_text(encoding="utf-8")) + gt = np.asarray(payload["gt_reference"], dtype=float) + if gt.ndim != 2 or gt.shape[1] != mop.M: + raise ValueError( + f"Calibrated GT for {mop.name} has shape {gt.shape}; expected (*, {mop.M})." + ) + return gt, str(sidecar) + + +def _make_experiment(mop, *, X0, generations, population, seed, ref_dirs_seed, name): + experiment = mb.experiment( + mop=mop, + moea=mb.moeas.NSGA3( + population=int(population), + generations=int(generations), + seed=int(seed), + ref_dirs_seed=int(ref_dirs_seed), + sampling=np.asarray(X0, dtype=float).copy(), + ), + ) + experiment.name = name + experiment.run(repeat=1, silent=True) + np.testing.assert_allclose( + _canonical_rows(experiment[0].history("x")[0]), + _canonical_rows(X0), + ) + return experiment + + +def _front_at_generation(experiment, original_mop, generation): + history = experiment[0].history("x") + generation = int(generation) + if generation < 1 or generation > len(history): + raise ValueError( + f"generation {generation} outside recorded history 1..{len(history)}" + ) + X = np.asarray(history[generation - 1], dtype=float) + F = np.asarray(original_mop.evaluation(X)["F"], dtype=float) + return _nd_front(F) + + +def _front_metrics(front, gt, *, mc_seed=HV_MC_SEED): + front = np.asarray(front, dtype=float) + gt = np.asarray(gt, dtype=float) + gd = float(mb.metrics.gdplus(front, ref=gt, progress=False)) + igd = float(mb.metrics.igdplus(front, ref=gt, progress=False)) + hv = float( + mb.metrics.hypervolume( + front, + ref=gt, + mode="auto", + scale="rel", + n_samples=HV_MC_SAMPLES, + mc_seed=int(mc_seed), + progress=False, + ) + ) + return { + "gdplus": gd, + "igdplus": igd, + "relative_hv": hv, + "nd_size": int(len(front)), + } + + +def _metric_delta(left, right): + return { + "gdplus": float(left["gdplus"] - right["gdplus"]), + "igdplus": float(left["igdplus"] - right["igdplus"]), + "relative_hv": float(left["relative_hv"] - right["relative_hv"]), + } + + +def _validate_checkpoints(checkpoints, generations): + values = tuple(sorted(set(int(value) for value in checkpoints))) + if not values or values[0] < 1: + raise ValueError("checkpoints must contain positive generation numbers") + if values[-1] > int(generations): + raise ValueError("the largest checkpoint cannot exceed generations") + return values + + +def run_seed( + name, + mop, + screening, + gt, + *, + generations, + checkpoints, + population, + moea_seed, + ref_dirs_seed, +): + X0 = _paired_initial_population(mop, size=population, seed=moea_seed) + + full = _make_experiment( + mop, + X0=X0, + generations=generations, + population=population, + seed=moea_seed, + ref_dirs_seed=ref_dirs_seed, + name=f"{name} — Full — seed {moea_seed}", + ) + + experiments = {"full": full} + for policy in POLICIES: + selected = screening["policies"][policy]["selected_indices"] + reduced_mop = ObjectiveProjectionMOP(mop, selected) + experiments[policy] = _make_experiment( + reduced_mop, + X0=X0, + generations=generations, + population=population, + seed=moea_seed, + ref_dirs_seed=ref_dirs_seed, + name=f"{name} — Reduced/{policy} — seed {moea_seed}", + ) + + checkpoint_rows = [] + for generation in checkpoints: + metrics = {} + for arm, experiment in experiments.items(): + front = _front_at_generation(experiment, mop, generation) + metrics[arm] = _front_metrics(front, gt) + checkpoint_rows.append( + { + "generation": int(generation), + "arms": metrics, + "dominance_minus_size_span": _metric_delta( + metrics[misda.DOMINANCE_PRESERVATION], + metrics[misda.SIZE_SPAN], + ), + } + ) + + final = checkpoint_rows[-1] + return { + "moea_seed": int(moea_seed), + "checkpoints": checkpoint_rows, + "final": final, + "full_minus_reduced": { + policy: _metric_delta(final["arms"]["full"], final["arms"][policy]) + for policy in POLICIES + }, + } + + +def _mean_metrics(rows, arm): + keys = ("gdplus", "igdplus", "relative_hv", "nd_size") + return { + key: float(np.mean([row["final"]["arms"][arm][key] for row in rows])) + for key in keys + } + + +def summarize_runs(runs): + summary = {arm: _mean_metrics(runs, arm) for arm in ("full", *POLICIES)} + summary["dominance_minus_size_span"] = _metric_delta( + summary[misda.DOMINANCE_PRESERVATION], + summary[misda.SIZE_SPAN], + ) + return summary + + +def run_case( + name, + mop, + *, + screen_power=SCREEN_POWER, + misda_seed=MISDA_SEED, + population=POPULATION, + generations=GENERATIONS, + checkpoints=CHECKPOINTS, + moea_seeds=MOEA_SEEDS, + ref_dirs_seed=REF_DIRS_SEED, +): + checkpoints = _validate_checkpoints(checkpoints, generations) + screening = screen_rankings(mop, power=screen_power, seed=misda_seed) + gt, calibration_sidecar = _calibrated_ground_truth(mop) + + runs = [ + run_seed( + name, + mop, + screening, + gt, + generations=generations, + checkpoints=checkpoints, + population=population, + moea_seed=seed, + ref_dirs_seed=ref_dirs_seed, + ) + for seed in moea_seeds + ] + + return { + "problem": name, + "M": int(mop.M), + "N": int(mop.N), + "screening": { + "n": int(len(screening["F"])), + "misda_seed": int(misda_seed), + "same_selected_mis": bool(screening["same_selected_mis"]), + "dominance_delta": float(screening["dominance_delta"]), + "policies": screening["policies"], + }, + "optimization": { + "population": int(population), + "generations": int(generations), + "checkpoints": [int(value) for value in checkpoints], + "moea_seeds": [int(seed) for seed in moea_seeds], + "ref_dirs_seed": int(ref_dirs_seed), + "gt_size": int(len(gt)), + "calibration_sidecar": calibration_sidecar, + "runs": runs, + "mean_final": summarize_runs(runs), + }, + } + + +def _print_case(result): + print(f"\n=== {result['problem']} ===") + screening = result["screening"] + for policy in POLICIES: + row = screening["policies"][policy] + print( + f"{policy}: {row['selected_labels']} " + f"(D={row['dominance']['new_dominance_rate']:.6g}, " + f"status={row['assessment']['status']})" + ) + print( + "screening dominance delta (dominance_preservation - size_span): " + f"{screening['dominance_delta']:.6g}" + ) + print("mean final original-space metrics:") + for arm, metrics in result["optimization"]["mean_final"].items(): + if arm == "dominance_minus_size_span": + continue + print( + f" {arm}: GD+={metrics['gdplus']:.6g}, " + f"IGD+={metrics['igdplus']:.6g}, HV={metrics['relative_hv']:.6g}, " + f"ND={metrics['nd_size']:.1f}" + ) + delta = result["optimization"]["mean_final"]["dominance_minus_size_span"] + print( + " dominance - size_span: " + f"ΔGD+={delta['gdplus']:.6g}, ΔIGD+={delta['igdplus']:.6g}, " + f"ΔHV={delta['relative_hv']:.6g}" + ) + print("Interpret policy differences only after inspecting Full checkpoint stabilization.") + + +def run_audit( + *, + problem_names=("DTLZ5", "DPF1"), + screen_power=SCREEN_POWER, + misda_seed=MISDA_SEED, + population=POPULATION, + generations=GENERATIONS, + checkpoints=CHECKPOINTS, + moea_seeds=MOEA_SEEDS, + ref_dirs_seed=REF_DIRS_SEED, +): + suite = problem_suite() + unknown = sorted(set(problem_names) - set(suite)) + if unknown: + raise ValueError(f"unknown problem(s): {', '.join(unknown)}") + results = [ + run_case( + name, + suite[name], + screen_power=screen_power, + misda_seed=misda_seed, + population=population, + generations=generations, + checkpoints=checkpoints, + moea_seeds=moea_seeds, + ref_dirs_seed=ref_dirs_seed, + ) + for name in problem_names + ] + return { + "format_version": FORMAT_VERSION, + "question": ( + "Does the dominance-preservation advantage observed on Y predict " + "a better end-to-end Reduced optimization result than size_span?" + ), + "results": results, + } + + +def _parse_args(argv=None): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument( + "--problem", + action="append", + choices=("DTLZ5", "DPF1"), + dest="problems", + help="Problem to run; repeat to select both. Defaults to DTLZ5 and DPF1.", + ) + parser.add_argument("--screen-power", type=int, default=SCREEN_POWER) + parser.add_argument("--misda-seed", type=int, default=MISDA_SEED) + parser.add_argument("--population", type=int, default=POPULATION) + parser.add_argument("--generations", type=int, default=GENERATIONS) + parser.add_argument( + "--checkpoint", + action="append", + type=int, + dest="checkpoints", + help="1-based generation checkpoint; repeat as needed.", + ) + parser.add_argument( + "--moea-seed", + action="append", + type=int, + dest="moea_seeds", + help="Independent optimizer seed; repeat for multi-seed runs.", + ) + parser.add_argument("--ref-dirs-seed", type=int, default=REF_DIRS_SEED) + parser.add_argument("--output", type=Path) + return parser.parse_args(argv) + + +def main(argv=None): + args = _parse_args(argv) + result = run_audit( + problem_names=tuple(args.problems or ("DTLZ5", "DPF1")), + screen_power=args.screen_power, + misda_seed=args.misda_seed, + population=args.population, + generations=args.generations, + checkpoints=tuple(args.checkpoints or CHECKPOINTS), + moea_seeds=tuple(args.moea_seeds or MOEA_SEEDS), + ref_dirs_seed=args.ref_dirs_seed, + ) + for case in result["results"]: + _print_case(case) + if args.output is not None: + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(json.dumps(result, indent=2, sort_keys=True), encoding="utf-8") + print(f"\nWrote {args.output}") + return result + + +if __name__ == "__main__": + main() From 374ca3946d6dd4d5f60a84f74b5b919b2628e860 Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 11:14:23 -0300 Subject: [PATCH 03/32] Test ranking policy optimization audit helpers --- tests/test_ranking_policy_optimization.py | 58 +++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 tests/test_ranking_policy_optimization.py diff --git a/tests/test_ranking_policy_optimization.py b/tests/test_ranking_policy_optimization.py new file mode 100644 index 00000000..91c3df2e --- /dev/null +++ b/tests/test_ranking_policy_optimization.py @@ -0,0 +1,58 @@ +# SPDX-FileCopyrightText: 2026 Monaco F. J. +# SPDX-License-Identifier: GPL-3.0-or-later + +import numpy as np +import pytest + +import misda +import moeabench as mb +from benchmarks import run_ranking_policy_optimization as probe + + +def test_objective_projection_delegates_to_original_mop(): + mop = mb.mops.DTLZ5(M=5) + rng = np.random.default_rng(123) + X = rng.uniform( + np.asarray(mop.xl, dtype=float), + np.asarray(mop.xu, dtype=float), + size=(8, mop.N), + ) + projected = probe.ObjectiveProjectionMOP(mop, (1, 4)) + + expected = np.asarray(mop.evaluation(X)["F"], dtype=float)[:, (1, 4)] + observed = np.asarray(projected.evaluation(X)["F"], dtype=float) + + np.testing.assert_allclose(observed, expected) + + +def test_validate_checkpoints_rejects_out_of_budget_values(): + assert probe._validate_checkpoints((5, 2, 5), 5) == (2, 5) + with pytest.raises(ValueError): + probe._validate_checkpoints((0, 1), 5) + with pytest.raises(ValueError): + probe._validate_checkpoints((2, 6), 5) + + +def test_screen_rankings_uses_both_policies_on_one_discovery(): + mop = mb.mops.DTLZ5(M=5) + screening = probe.screen_rankings(mop, power=5, seed=123) + + assert set(screening["policies"]) == { + misda.SIZE_SPAN, + misda.DOMINANCE_PRESERVATION, + } + for policy in (misda.SIZE_SPAN, misda.DOMINANCE_PRESERVATION): + snapshot = screening["policies"][policy] + assert snapshot["selected_indices"] + assert snapshot["selected_dimension"] == len(snapshot["selected_indices"]) + assert snapshot["dominance"]["new_dominance_rate"] >= 0.0 + + expected_delta = ( + screening["policies"][misda.DOMINANCE_PRESERVATION]["dominance"][ + "new_dominance_rate" + ] + - screening["policies"][misda.SIZE_SPAN]["dominance"][ + "new_dominance_rate" + ] + ) + assert screening["dominance_delta"] == pytest.approx(expected_delta) From 0b507117f62a7bf52ebcd7db03e37ad1b534bb73 Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 11:15:27 -0300 Subject: [PATCH 04/32] Add ranking policy optimization workflow --- .../workflows/ranking-policy-optimization.yml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/ranking-policy-optimization.yml diff --git a/.github/workflows/ranking-policy-optimization.yml b/.github/workflows/ranking-policy-optimization.yml new file mode 100644 index 00000000..c53a0b19 --- /dev/null +++ b/.github/workflows/ranking-policy-optimization.yml @@ -0,0 +1,56 @@ +name: ranking policy optimization + +on: + push: + branches: + - issue-83-ranking-policy-optimization + paths: + - "benchmarks/run_ranking_policy_optimization.py" + - "tests/test_ranking_policy_optimization.py" + - ".github/workflows/ranking-policy-optimization.yml" + - "docs/research-notes/2026-10-ranking-policy-optimization.md" + workflow_dispatch: + +jobs: + smoke: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + cache: pip + - name: Install + run: | + python -m pip install --upgrade pip + python -m pip install -e '.[benchmarks]' pytest + - name: Ranking-policy optimization helper tests + run: pytest -q tests/test_ranking_policy_optimization.py + + science: + if: ${{ contains(github.event.head_commit.message, '[science]') }} + runs-on: ubuntu-latest + timeout-minutes: 120 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + cache: pip + - name: Install + run: | + python -m pip install --upgrade pip + python -m pip install -e '.[benchmarks]' + - name: Full vs both ranking-policy reductions + run: | + python -m benchmarks.run_ranking_policy_optimization \ + --output /tmp/misda-ranking-policy-optimization.json + cat /tmp/misda-ranking-policy-optimization.json + - name: Preserve experiment output + if: always() + uses: actions/upload-artifact@v4 + with: + name: misda-ranking-policy-optimization + path: /tmp/misda-ranking-policy-optimization.json + if-no-files-found: warn From 024f992d160587295c1f9b89e3a826b4e4824884 Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 11:17:00 -0300 Subject: [PATCH 05/32] [science] Run ranking policy optimization audit --- .../2026-10-ranking-policy-optimization.md | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/docs/research-notes/2026-10-ranking-policy-optimization.md b/docs/research-notes/2026-10-ranking-policy-optimization.md index ea7c4c4c..e8e7da11 100644 --- a/docs/research-notes/2026-10-ranking-policy-optimization.md +++ b/docs/research-notes/2026-10-ranking-policy-optimization.md @@ -10,15 +10,34 @@ The end-to-end question is therefore: ## Experiment -Use the existing optimization benchmark and compare three conditions under matched budgets and seeds: +Use the existing optimization protocol and compare three conditions under matched budgets and seeds: 1. **Full** — optimize the complete objective set. 2. **Reduced / size_span** — optimize only the objectives selected by the default structural ranking policy. -3. **Reduced / dominance_preservation** — optimize only the objectives selected by the experimental dominance-based ranking policy. +3. **Reduced / dominance_preservation** — optimize only the objectives selected by the experimental dominance-based policy. -All resulting solutions must be reevaluated in the original full objective space and compared against the same ground truth/reference using the existing MoeaBench metrics (including GD+, IGD+ and the standard benchmark diagnostics). +All resulting solutions are reevaluated in the original full objective space and compared against the same MoeaBench-calibrated ground truth using GD+, IGD+ and relative HV. -The first targets should be cases where the policies actually disagree, especially DTLZ5 and DPF1. A comparison is only interpretable after verifying that the corresponding Full run is sufficiently converged; otherwise a difference between reduced variants may reflect a weak full baseline rather than the effect of ranking policy. +The first targets are cases where the policies are known to disagree, especially DTLZ5 and DPF1. A comparison is only interpretable after inspecting convergence of the corresponding Full run; otherwise a difference between reduced variants may reflect a weak full baseline rather than the effect of ranking policy. + +## Implementation + +Issue #83 is implemented on branch `issue-83-ranking-policy-optimization` in `benchmarks/run_ranking_policy_optimization.py`. + +The experiment deliberately discovers the MIS universe only once for each MOP and then constructs both ranking views from that same `MISSet`. Both selected candidates receive the same screening diagnostics. For each MOEA seed, Full and both Reduced treatments receive the same explicit initial decision population, optimization budget, optimizer seed and independently fixed NSGA-III reference-direction seed. Reduced solutions are never judged in their projected objective spaces: each checkpoint is re-evaluated in the original M-objective space before computing quality metrics. + +The default scientific run uses: + +- `M=10`; +- a 512-point scrambled Sobol discovery sample; +- population 60; +- checkpoints at 50, 100, 200 and 400 generations; +- one initial optimizer seed for the first audit, with support for repeated `--moea-seed` arguments in follow-up runs; +- a fixed Monte-Carlo seed for relative-HV measurement so metric noise is shared across treatments rather than coupled to the optimizer seed. + +No automatic numerical threshold is used to declare the Full run converged. Its checkpoint trajectory must be inspected before policy differences are interpreted. + +A dedicated workflow, `.github/workflows/ranking-policy-optimization.yml`, runs helper-contract smoke tests on the branch and can launch the scientific audit. The initial smoke run passed before the scientific execution was triggered. ## Interpretation @@ -34,4 +53,4 @@ Any of these outcomes is informative. The experiment should not change the defau ## Status -Planned on branch `issue-83-ranking-policy-optimization`. No conclusion yet. +Implementation complete and smoke-tested. Scientific DTLZ5/DPF1 audit launched from this commit; results and interpretation are still pending and must be recorded here before drawing a policy conclusion. From c52d3d2d8f3211fa599887eb9bcefdfac45f3a17 Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 11:23:21 -0300 Subject: [PATCH 06/32] Record initial end-to-end ranking policy results --- .../2026-10-ranking-policy-optimization.md | 67 +++++++++++++++++-- 1 file changed, 60 insertions(+), 7 deletions(-) diff --git a/docs/research-notes/2026-10-ranking-policy-optimization.md b/docs/research-notes/2026-10-ranking-policy-optimization.md index e8e7da11..9dfd6d68 100644 --- a/docs/research-notes/2026-10-ranking-policy-optimization.md +++ b/docs/research-notes/2026-10-ranking-policy-optimization.md @@ -39,18 +39,71 @@ No automatic numerical threshold is used to declare the Full run converged. Its A dedicated workflow, `.github/workflows/ranking-policy-optimization.yml`, runs helper-contract smoke tests on the branch and can launch the scientific audit. The initial smoke run passed before the scientific execution was triggered. +## First scientific run — 2026-10-01 + +The first audit used MOEA seed `321`, population `60`, and 400 generations. It is a single-seed diagnostic run, not a statistical comparison. + +### DTLZ5 + +The two policies selected different two-objective reductions from the same discovery result: + +- `size_span`: `f1, f10`, observed new-dominance rate `0.271413`; +- `dominance_preservation`: `f9, f10`, observed new-dominance rate `0.200307`. + +Both were internally annotated `UNSUPPORTED_REDUCTION` because of `TRANSITIVE_CHAINING`. The dominance-based selection is the independently known optimization-safe DTLZ5 pair used in the analytical control. + +At generation 400, after reevaluation in the original 10-objective space: + +| treatment | GD+ | IGD+ | relative HV | +|---|---:|---:|---:| +| Full | 2.023461 | 0.880806 | 0.000000 | +| Reduced / size_span | 1.356477 | 0.743161 | 0.000000 | +| Reduced / dominance_preservation | 0.000319 | 0.005501 | 0.993282 | + +The dominance-based reduction is dramatically closer to the calibrated GT than the size-span reduction in this run. The direction already appears at generations 50, 100 and 200. + +However, the Full trajectory is not a converged reference: its IGD+ moved `0.6689 -> 0.5561 -> 0.3599 -> 0.8808` at generations 50, 100, 200 and 400, and its relative HV remained essentially zero. Therefore the result cannot be interpreted as "Reduced is better than a converged Full." It instead shows that, for this many-objective NSGA-III configuration, the analytically safe two-objective reduction is much easier to optimize and reaches the known GT while the Full treatment does not. + +This is strong evidence that the ranking choice has a real end-to-end consequence in DTLZ5, and in this case the observed-Y dominance signal points to the analytically safe and optimizer-effective reduction. It is not yet evidence for a general default-policy change. + +### DPF1 + +The two policies again selected different two-objective reductions: + +- `size_span`: `f2, f8`, observed new-dominance rate `0.335535`; +- `dominance_preservation`: `f1, f2`, observed new-dominance rate `0.0` with exact observed dominance preservation. + +Both candidates have perfect linear reconstruction on the screening sample, but only `f1, f2` exactly preserves observed Pareto/dominance relations there. Both are again annotated `UNSUPPORTED_REDUCTION` because of `TRANSITIVE_CHAINING`. + +The optimizer comparison was not stable across checkpoints. The IGD+ difference `dominance_preservation - size_span` was approximately `-17.86`, `+29.18`, `-21.08`, and `+10.06` at generations 50, 100, 200 and 400 respectively. At generation 400: + +| treatment | GD+ | IGD+ | relative HV | +|---|---:|---:|---:| +| Full | 20.851960 | 20.760362 | 0.000000 | +| Reduced / size_span | 42.442734 | 41.734896 | 0.000000 | +| Reduced / dominance_preservation | 52.636475 | 51.790460 | 0.000000 | + +The Full treatment is also clearly not converged: although GD+/IGD+ improve overall with budget, they remain very large and relative HV is zero at every checkpoint. The two Reduced trajectories cross repeatedly. Consequently this run gives no defensible ranking-policy conclusion for DPF1 and demonstrates directly that a better static dominance score on `Y` does not guarantee a better MOEA outcome at an arbitrary finite budget. + ## Interpretation -This experiment tests whether the Revisão 09 dominance-preservation score is a useful *proxy* for the property that ultimately matters to MISDA: preserving optimization outcomes after objective reduction. +The first end-to-end run sharpens the role of the Revisão 09 metric rather than settling the default-policy question. + +For DTLZ5, static dominance preservation, independent analytical safety, and optimizer performance align very strongly: `dominance_preservation` chooses `f9,f10`, and that reduction reaches the calibrated GT while `size_span` does not. For DPF1, the static signal is even cleaner, but the optimizer trajectories do not preserve a stable ordering between the two candidate reductions under the current configuration. + +A second point is now explicit: **the sampled Full optimization run is a treatment, not the ground truth**. In many-objective problems a reduced formulation may legitimately be much easier for the optimizer than the Full formulation. End-to-end quality should therefore be judged primarily against the common calibrated Pareto GT; Full is useful as a baseline only when its own convergence is adequate. + +The current data support neither promoting `dominance_preservation` nor dismissing it. They do show that the ranking policy can have a large downstream effect and that the observed-Y dominance metric can be predictive in at least one important analytical control. -Possible outcomes include: +## Next step -- dominance-preservation advantage on `Y` also predicts a better Reduced optimization result; -- both policies optimize equally well despite different static scores; -- the structurally ranked MIS optimizes better even when its observed dominance-preservation score is worse. +Before drawing a policy conclusion: -Any of these outcomes is informative. The experiment should not change the default ranking policy by itself; policy conclusions should follow from the end-to-end evidence rather than from the static score alone. +1. calibrate the Full optimization protocol more carefully for DTLZ5 and DPF1, rather than treating 400 generations as automatically sufficient; +2. repeat the comparison across independent MOEA seeds once a defensible optimization configuration/budget is established; +3. interpret Reduced variants against the common GT, using Full as an additional treatment rather than as truth; +4. only then ask whether the sign/magnitude of the static dominance advantage predicts the distribution of end-to-end optimization outcomes. ## Status -Implementation complete and smoke-tested. Scientific DTLZ5/DPF1 audit launched from this commit; results and interpretation are still pending and must be recorded here before drawing a policy conclusion. +Implementation and smoke tests pass. The first scientific workflow run completed successfully and produced informative but not yet definitive results. No ranking-policy default change is justified at this stage. From 09babcae433ed9f26fa384d138218192f1b58d54 Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 11:25:15 -0300 Subject: [PATCH 07/32] Add Full-only population and budget calibration --- .../run_ranking_policy_full_calibration.py | 214 ++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 benchmarks/run_ranking_policy_full_calibration.py diff --git a/benchmarks/run_ranking_policy_full_calibration.py b/benchmarks/run_ranking_policy_full_calibration.py new file mode 100644 index 00000000..d92cc63a --- /dev/null +++ b/benchmarks/run_ranking_policy_full_calibration.py @@ -0,0 +1,214 @@ +# SPDX-FileCopyrightText: 2026 Monaco F. J. +# SPDX-License-Identifier: GPL-3.0-or-later + +"""Calibrate the Full NSGA-III treatment before ranking-policy comparison. + +This probe varies population/reference-direction resolution while keeping the +optimizer implementation, GT, run seed, and original objective formulation +fixed. It is intentionally Full-only: no ranking policy is involved. +""" + +from __future__ import annotations + +import argparse +import json +from pathlib import Path + +import numpy as np + +from benchmarks import run_ranking_policy_optimization as audit + + +POPULATIONS = (60, 120, 240) +GENERATIONS = 800 +CHECKPOINTS = (100, 200, 400, 800) +MOEA_SEEDS = (321,) +REF_DIRS_SEED = audit.REF_DIRS_SEED + + +def _run_full( + name, + mop, + gt, + *, + population, + generations, + checkpoints, + moea_seed, + ref_dirs_seed, +): + X0 = audit._paired_initial_population(mop, size=population, seed=moea_seed) + experiment = audit._make_experiment( + mop, + X0=X0, + generations=generations, + population=population, + seed=moea_seed, + ref_dirs_seed=ref_dirs_seed, + name=( + f"{name} — Full calibration — pop {population} — seed {moea_seed}" + ), + ) + trajectory = [] + for generation in checkpoints: + front = audit._front_at_generation(experiment, mop, generation) + trajectory.append( + { + "generation": int(generation), + **audit._front_metrics(front, gt), + } + ) + return { + "population": int(population), + "moea_seed": int(moea_seed), + "evaluations_at_final_checkpoint": int(population * checkpoints[-1]), + "trajectory": trajectory, + "final": trajectory[-1], + } + + +def run_case( + name, + mop, + *, + populations=POPULATIONS, + generations=GENERATIONS, + checkpoints=CHECKPOINTS, + moea_seeds=MOEA_SEEDS, + ref_dirs_seed=REF_DIRS_SEED, +): + checkpoints = audit._validate_checkpoints(checkpoints, generations) + gt, calibration_sidecar = audit._calibrated_ground_truth(mop) + runs = [] + for population in populations: + if int(population) < 2: + raise ValueError("population must be at least 2") + for moea_seed in moea_seeds: + runs.append( + _run_full( + name, + mop, + gt, + population=int(population), + generations=generations, + checkpoints=checkpoints, + moea_seed=int(moea_seed), + ref_dirs_seed=ref_dirs_seed, + ) + ) + return { + "problem": name, + "M": int(mop.M), + "N": int(mop.N), + "gt_size": int(len(gt)), + "calibration_sidecar": calibration_sidecar, + "generations": int(generations), + "checkpoints": [int(value) for value in checkpoints], + "ref_dirs_seed": int(ref_dirs_seed), + "runs": runs, + } + + +def run_calibration( + *, + problem_names=("DTLZ5", "DPF1"), + populations=POPULATIONS, + generations=GENERATIONS, + checkpoints=CHECKPOINTS, + moea_seeds=MOEA_SEEDS, + ref_dirs_seed=REF_DIRS_SEED, +): + suite = audit.problem_suite() + unknown = sorted(set(problem_names) - set(suite)) + if unknown: + raise ValueError(f"unknown problem(s): {', '.join(unknown)}") + return { + "format_version": 1, + "purpose": ( + "Full-only NSGA-III population/reference-direction and budget calibration" + ), + "results": [ + run_case( + name, + suite[name], + populations=populations, + generations=generations, + checkpoints=checkpoints, + moea_seeds=moea_seeds, + ref_dirs_seed=ref_dirs_seed, + ) + for name in problem_names + ], + } + + +def _print_result(payload): + for case in payload["results"]: + print(f"\n=== {case['problem']}: Full-only calibration ===") + for run in case["runs"]: + print( + f"population={run['population']}, seed={run['moea_seed']}, " + f"final_evals={run['evaluations_at_final_checkpoint']}" + ) + for row in run["trajectory"]: + print( + f" g={row['generation']:4d}: " + f"GD+={row['gdplus']:.6g}, " + f"IGD+={row['igdplus']:.6g}, " + f"HV={row['relative_hv']:.6g}, ND={row['nd_size']}" + ) + print("No automatic convergence threshold is applied.") + + +def _parse_args(argv=None): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument( + "--problem", + action="append", + choices=("DTLZ5", "DPF1"), + dest="problems", + ) + parser.add_argument( + "--population", + action="append", + type=int, + dest="populations", + ) + parser.add_argument("--generations", type=int, default=GENERATIONS) + parser.add_argument( + "--checkpoint", + action="append", + type=int, + dest="checkpoints", + ) + parser.add_argument( + "--moea-seed", + action="append", + type=int, + dest="moea_seeds", + ) + parser.add_argument("--ref-dirs-seed", type=int, default=REF_DIRS_SEED) + parser.add_argument("--output", type=Path) + return parser.parse_args(argv) + + +def main(argv=None): + args = _parse_args(argv) + payload = run_calibration( + problem_names=tuple(args.problems or ("DTLZ5", "DPF1")), + populations=tuple(args.populations or POPULATIONS), + generations=args.generations, + checkpoints=tuple(args.checkpoints or CHECKPOINTS), + moea_seeds=tuple(args.moea_seeds or MOEA_SEEDS), + ref_dirs_seed=args.ref_dirs_seed, + ) + _print_result(payload) + if args.output is not None: + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(json.dumps(payload, indent=2, sort_keys=True), encoding="utf-8") + print(f"\nWrote {args.output}") + return payload + + +if __name__ == "__main__": + main() From 2034f19a2289dd92e70cb4392b6a563076eb506f Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 11:25:41 -0300 Subject: [PATCH 08/32] [calibration] Run Full-only NSGA-III calibration --- .../workflows/ranking-policy-optimization.yml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/ranking-policy-optimization.yml b/.github/workflows/ranking-policy-optimization.yml index c53a0b19..18367998 100644 --- a/.github/workflows/ranking-policy-optimization.yml +++ b/.github/workflows/ranking-policy-optimization.yml @@ -6,6 +6,7 @@ on: - issue-83-ranking-policy-optimization paths: - "benchmarks/run_ranking_policy_optimization.py" + - "benchmarks/run_ranking_policy_full_calibration.py" - "tests/test_ranking_policy_optimization.py" - ".github/workflows/ranking-policy-optimization.yml" - "docs/research-notes/2026-10-ranking-policy-optimization.md" @@ -54,3 +55,30 @@ jobs: name: misda-ranking-policy-optimization path: /tmp/misda-ranking-policy-optimization.json if-no-files-found: warn + + calibration: + if: ${{ contains(github.event.head_commit.message, '[calibration]') }} + runs-on: ubuntu-latest + timeout-minutes: 120 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + cache: pip + - name: Install + run: | + python -m pip install --upgrade pip + python -m pip install -e '.[benchmarks]' + - name: Full-only population and budget calibration + run: | + python -m benchmarks.run_ranking_policy_full_calibration \ + --output /tmp/misda-ranking-policy-full-calibration.json + cat /tmp/misda-ranking-policy-full-calibration.json + - name: Preserve calibration output + if: always() + uses: actions/upload-artifact@v4 + with: + name: misda-ranking-policy-full-calibration + path: /tmp/misda-ranking-policy-full-calibration.json + if-no-files-found: warn From 33d19aa00f9ef730e8f28e06e90938af0677adc5 Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 11:31:07 -0300 Subject: [PATCH 09/32] Record Full-only calibration results --- .../2026-10-ranking-policy-optimization.md | 58 ++++++++++++++----- 1 file changed, 45 insertions(+), 13 deletions(-) diff --git a/docs/research-notes/2026-10-ranking-policy-optimization.md b/docs/research-notes/2026-10-ranking-policy-optimization.md index 9dfd6d68..1d5d4b22 100644 --- a/docs/research-notes/2026-10-ranking-policy-optimization.md +++ b/docs/research-notes/2026-10-ranking-policy-optimization.md @@ -26,18 +26,18 @@ Issue #83 is implemented on branch `issue-83-ranking-policy-optimization` in `be The experiment deliberately discovers the MIS universe only once for each MOP and then constructs both ranking views from that same `MISSet`. Both selected candidates receive the same screening diagnostics. For each MOEA seed, Full and both Reduced treatments receive the same explicit initial decision population, optimization budget, optimizer seed and independently fixed NSGA-III reference-direction seed. Reduced solutions are never judged in their projected objective spaces: each checkpoint is re-evaluated in the original M-objective space before computing quality metrics. -The default scientific run uses: +The initial scientific run used: - `M=10`; - a 512-point scrambled Sobol discovery sample; - population 60; - checkpoints at 50, 100, 200 and 400 generations; -- one initial optimizer seed for the first audit, with support for repeated `--moea-seed` arguments in follow-up runs; +- one optimizer seed (`321`); - a fixed Monte-Carlo seed for relative-HV measurement so metric noise is shared across treatments rather than coupled to the optimizer seed. No automatic numerical threshold is used to declare the Full run converged. Its checkpoint trajectory must be inspected before policy differences are interpreted. -A dedicated workflow, `.github/workflows/ranking-policy-optimization.yml`, runs helper-contract smoke tests on the branch and can launch the scientific audit. The initial smoke run passed before the scientific execution was triggered. +A dedicated workflow, `.github/workflows/ranking-policy-optimization.yml`, runs helper-contract smoke tests on the branch and launches the scientific/calibration audits. The smoke tests pass. ## First scientific run — 2026-10-01 @@ -83,27 +83,59 @@ The optimizer comparison was not stable across checkpoints. The IGD+ difference | Reduced / size_span | 42.442734 | 41.734896 | 0.000000 | | Reduced / dominance_preservation | 52.636475 | 51.790460 | 0.000000 | -The Full treatment is also clearly not converged: although GD+/IGD+ improve overall with budget, they remain very large and relative HV is zero at every checkpoint. The two Reduced trajectories cross repeatedly. Consequently this run gives no defensible ranking-policy conclusion for DPF1 and demonstrates directly that a better static dominance score on `Y` does not guarantee a better MOEA outcome at an arbitrary finite budget. +The Full treatment is also clearly not converged at that budget. The two Reduced trajectories cross repeatedly. Consequently the initial run gives no defensible ranking-policy conclusion for DPF1 and demonstrates directly that a better static dominance score on `Y` does not guarantee a better MOEA outcome at an arbitrary finite budget. + +## Full-only calibration — 2026-10-01 + +Because the first audit used only 60 NSGA-III reference directions in 10 objectives, a Full-only calibration varied population/reference-direction count (`60`, `120`, `240`) and extended the budget to 800 generations. The same run seed (`321`) and reference-direction seed (`456`) were used for this diagnostic. + +### DPF1 calibration + +DPF1 was strongly sensitive to population/reference-direction resolution. With population 60, Full was still poor at generation 400 but improved dramatically by generation 800 (`IGD+=0.689`, `HV=0.085`). With population 120 it was already close to the GT by generation 200 and remained so through generation 800: + +| population | generation | IGD+ | relative HV | +|---:|---:|---:|---:| +| 120 | 200 | 0.03444 | 0.86717 | +| 120 | 400 | 0.05158 | 0.85496 | +| 120 | 800 | 0.02089 | 0.89879 | +| 240 | 100 | 0.01247 | 0.92963 | +| 240 | 200 | 0.01241 | 0.94429 | +| 240 | 400 | 0.02270 | 0.88966 | +| 240 | 800 | 0.02390 | 0.90353 | + +Thus the poor Full result in the first DPF1 run was largely an optimization-resolution/budget problem, not evidence about the reduction itself. + +### DTLZ5 calibration + +Increasing the Full population and budget did **not** produce analogous convergence for DTLZ5. Population 60 deteriorated after generation 200; population 120 reached `IGD+=0.335` and `HV=0.078` at generation 800; population 240 reached its best observed region around generation 400 (`IGD+=0.274`, `HV=0.284`) and remained far from the quality obtained by the `f9,f10` reduction. + +| population | generation | IGD+ | relative HV | +|---:|---:|---:|---:| +| 60 | 800 | 0.99481 | 0.00000 | +| 120 | 800 | 0.33539 | 0.07818 | +| 240 | 400 | 0.27435 | 0.28380 | +| 240 | 800 | 0.35059 | 0.26264 | + +This changes the interpretation of Full. DTLZ5 has a degenerate objective structure, and the inability of a generic 10-objective NSGA-III treatment to match the calibrated GT is itself consistent with why objective reduction can be useful. We should not tune Full until it artificially becomes the oracle. The common calibrated GT is the quality oracle; Full is one treatment using the unreduced formulation. ## Interpretation -The first end-to-end run sharpens the role of the Revisão 09 metric rather than settling the default-policy question. +The first end-to-end run and Full-only calibration sharpen the role of the Revisão 09 metric rather than settling the default-policy question. + +For DTLZ5, static dominance preservation, independent analytical safety, and optimizer performance align very strongly: `dominance_preservation` chooses `f9,f10`, and that reduction reaches the calibrated GT while `size_span` does not. The fact that Full remains difficult even after increasing population and budget reinforces the practical value of a good reduction, but should not be used as evidence that one ranking policy is universally superior. -For DTLZ5, static dominance preservation, independent analytical safety, and optimizer performance align very strongly: `dominance_preservation` chooses `f9,f10`, and that reduction reaches the calibrated GT while `size_span` does not. For DPF1, the static signal is even cleaner, but the optimizer trajectories do not preserve a stable ordering between the two candidate reductions under the current configuration. +For DPF1, the initial static signal was clean but the first optimizer comparison used an inadequate Full configuration. The calibration shows that a higher reference-direction resolution produces a credible Full baseline, so the policy comparison should be repeated under that regime and over independent optimizer seeds. -A second point is now explicit: **the sampled Full optimization run is a treatment, not the ground truth**. In many-objective problems a reduced formulation may legitimately be much easier for the optimizer than the Full formulation. End-to-end quality should therefore be judged primarily against the common calibrated Pareto GT; Full is useful as a baseline only when its own convergence is adequate. +A central methodological point is now explicit: **the Full optimization run is a treatment, not the ground truth**. End-to-end quality is judged against the common calibrated Pareto GT. A Reduced treatment may legitimately outperform Full because reduction can make the optimization problem easier. The current data support neither promoting `dominance_preservation` nor dismissing it. They do show that the ranking policy can have a large downstream effect and that the observed-Y dominance metric can be predictive in at least one important analytical control. ## Next step -Before drawing a policy conclusion: +The next audit should use a substantially denser NSGA-III population/reference-direction set (population 240), retain a generous 800-generation maximum budget, and repeat Full, Reduced/`size_span`, and Reduced/`dominance_preservation` over several independent MOEA seeds. The same reference-direction seed can remain fixed across paired treatments in this first multi-seed pass so that treatment differences are not confounded by different direction sets. -1. calibrate the Full optimization protocol more carefully for DTLZ5 and DPF1, rather than treating 400 generations as automatically sufficient; -2. repeat the comparison across independent MOEA seeds once a defensible optimization configuration/budget is established; -3. interpret Reduced variants against the common GT, using Full as an additional treatment rather than as truth; -4. only then ask whether the sign/magnitude of the static dominance advantage predicts the distribution of end-to-end optimization outcomes. +The resulting distributions should be interpreted against the common GT at multiple checkpoints. Only after that should we ask whether the sign/magnitude of the static dominance advantage predicts end-to-end optimization quality strongly enough to influence ranking policy design. ## Status -Implementation and smoke tests pass. The first scientific workflow run completed successfully and produced informative but not yet definitive results. No ranking-policy default change is justified at this stage. +Implementation, smoke tests, first scientific audit, and Full-only calibration all pass. No ranking-policy default change is justified at this stage. A multi-seed calibrated comparison is the next experiment. From 2916b4ae84f7059a0d58dfa3384f46dfd8316e0a Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 11:31:32 -0300 Subject: [PATCH 10/32] [science] Run calibrated multi-seed ranking policy audit --- .github/workflows/ranking-policy-optimization.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ranking-policy-optimization.yml b/.github/workflows/ranking-policy-optimization.yml index 18367998..3875cb25 100644 --- a/.github/workflows/ranking-policy-optimization.yml +++ b/.github/workflows/ranking-policy-optimization.yml @@ -46,6 +46,17 @@ jobs: - name: Full vs both ranking-policy reductions run: | python -m benchmarks.run_ranking_policy_optimization \ + --population 240 \ + --generations 800 \ + --checkpoint 100 \ + --checkpoint 200 \ + --checkpoint 400 \ + --checkpoint 800 \ + --moea-seed 321 \ + --moea-seed 654 \ + --moea-seed 987 \ + --moea-seed 135 \ + --moea-seed 246 \ --output /tmp/misda-ranking-policy-optimization.json cat /tmp/misda-ranking-policy-optimization.json - name: Preserve experiment output From 7ddd12f8a58a8809066f402c22de201dd2ce9b47 Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 11:42:41 -0300 Subject: [PATCH 11/32] Record calibrated multi-seed ranking policy audit --- .../2026-10-ranking-policy-optimization.md | 61 ++++++++++++++++--- 1 file changed, 51 insertions(+), 10 deletions(-) diff --git a/docs/research-notes/2026-10-ranking-policy-optimization.md b/docs/research-notes/2026-10-ranking-policy-optimization.md index 1d5d4b22..5263c050 100644 --- a/docs/research-notes/2026-10-ranking-policy-optimization.md +++ b/docs/research-notes/2026-10-ranking-policy-optimization.md @@ -68,7 +68,7 @@ This is strong evidence that the ranking choice has a real end-to-end consequenc ### DPF1 -The two policies again selected different two-objective reductions: +The two policies again selected different two-objective reductions from the same discovery result: - `size_span`: `f2, f8`, observed new-dominance rate `0.335535`; - `dominance_preservation`: `f1, f2`, observed new-dominance rate `0.0` with exact observed dominance preservation. @@ -118,24 +118,65 @@ Increasing the Full population and budget did **not** produce analogous converge This changes the interpretation of Full. DTLZ5 has a degenerate objective structure, and the inability of a generic 10-objective NSGA-III treatment to match the calibrated GT is itself consistent with why objective reduction can be useful. We should not tune Full until it artificially becomes the oracle. The common calibrated GT is the quality oracle; Full is one treatment using the unreduced formulation. +## Calibrated multi-seed audit — 2026-10-01 + +The calibrated comparison used population/reference-direction count `240`, 800 generations, checkpoints at `100, 200, 400, 800`, five independent MOEA seeds (`321, 654, 987, 135, 246`), and a fixed reference-direction seed (`456`) shared by paired treatments. Discovery remained fixed to the same 512-point Sobol sample and MISDA seed `123`, so this experiment isolates optimizer stochasticity rather than discovery uncertainty. + +### DTLZ5 + +At generation 800, the mean original-space metrics across five seeds were: + +| treatment | mean GD+ | mean IGD+ | mean relative HV | +|---|---:|---:|---:| +| Full | 5.374652 | 0.333968 | 0.114574 | +| Reduced / size_span | 2.574853 | 1.401879 | ~0.000000 | +| Reduced / dominance_preservation | 0.000258 | 0.002001 | 0.999726 | + +`dominance_preservation` beat `size_span` decisively in **all five seeds**. Its final IGD+ stayed essentially fixed around `0.0020` and its relative HV around `0.9997`, whereas the `size_span` reduction was much worse and highly variable in the original objective space. The dominance-selected pair `f9,f10` therefore behaves as an optimizer-effective reduction across the tested MOEA stochasticity, while `f1,f10` does not. + +This is stronger than the first single-seed result: the DTLZ5 end-to-end difference is not an optimizer-seed accident. + +### DPF1 + +At generation 800, the corresponding means were: + +| treatment | mean GD+ | mean IGD+ | mean relative HV | +|---|---:|---:|---:| +| Full | 0.003519 | 0.032929 | 0.900753 | +| Reduced / size_span | 0.002716 | 0.005311 | 0.968846 | +| Reduced / dominance_preservation | 0.000700 | 0.003718 | 0.976099 | + +The dominance-selected `f1,f2` reduction had the better final result in **four of five seeds** by GD+, IGD+ and relative HV. In the remaining seed (`987`), `size_span` was slightly better. The mean advantage of `dominance_preservation` was therefore real but modest compared with DTLZ5: + +- mean `ΔIGD+ = -0.001593` for `dominance_preservation - size_span`; +- mean `ΔHV = +0.007253`; +- mean `ΔGD+ = -0.002016`. + +Both reduced formulations were substantially closer to the common GT than Full at the final budget, reinforcing the practical observation that objective reduction can make the optimization problem easier even when Full itself is a valid baseline treatment. + +The checkpoint trajectories also matter. DPF1 exhibited substantial transient differences: in some seeds one reduced formulation converged much earlier than the other, and the ordering could reverse before both reached the low-error region. Thus a static dominance advantage on `Y` should not be interpreted as a guarantee of faster convergence at every finite budget. + ## Interpretation -The first end-to-end run and Full-only calibration sharpen the role of the Revisão 09 metric rather than settling the default-policy question. +The calibrated multi-seed run changes the strength, but not the scope, of the conclusion. -For DTLZ5, static dominance preservation, independent analytical safety, and optimizer performance align very strongly: `dominance_preservation` chooses `f9,f10`, and that reduction reaches the calibrated GT while `size_span` does not. The fact that Full remains difficult even after increasing population and budget reinforces the practical value of a good reduction, but should not be used as evidence that one ranking policy is universally superior. +For the two clean controls where the policies disagree, the **direction** of the Revisão 09 dominance signal aligned with the end-to-end optimization result: the MIS with better observed dominance preservation was also the better final reduction on average. In DTLZ5 the effect is overwhelming and consistent across all five seeds; in DPF1 it is smaller but still favors `dominance_preservation` in four of five seeds. -For DPF1, the initial static signal was clean but the first optimizer comparison used an inadequate Full configuration. The calibration shows that a higher reference-direction resolution produces a credible Full baseline, so the policy comparison should be repeated under that regime and over independent optimizer seeds. +However, the **magnitude** of the static dominance difference is not a calibrated predictor of optimizer benefit. DTLZ5 had only a moderate static improvement (`ΔD ≈ -0.071`) but an enormous end-to-end gain, whereas DPF1 had a much larger static improvement (`ΔD ≈ -0.336`, including exact observed dominance preservation) but only a modest final optimization advantage once both reductions converged. The static metric therefore has qualitative signal in these controls, but should not be read as an effect-size estimator for MOEA performance. -A central methodological point is now explicit: **the Full optimization run is a treatment, not the ground truth**. End-to-end quality is judged against the common calibrated Pareto GT. A Reduced treatment may legitimately outperform Full because reduction can make the optimization problem easier. +The experiment also confirms that **Full is a treatment, not the truth**. All treatments must be judged in the original objective space against the same calibrated Pareto GT. A good reduction may legitimately outperform Full because reducing the objective space changes the difficulty of the optimizer's search. -The current data support neither promoting `dominance_preservation` nor dismissing it. They do show that the ranking policy can have a large downstream effect and that the observed-Y dominance metric can be predictive in at least one important analytical control. +These results strengthen the case that `dominance_preservation` is a meaningful optimization-oriented ranking policy when the observed `Y` is representative. They do **not** justify making it the default. Revisão 09 already showed noisy cases in which the dominance preference is extremely bootstrap-stable but wrong relative to clean truth. The present audit used clean DTLZ5/DPF1 and varied optimizer stochasticity, not observation noise or discovery sampling. -## Next step +Both tested reductions also remain internally marked `UNSUPPORTED_REDUCTION` because of `TRANSITIVE_CHAINING`; this experiment intentionally evaluates the downstream ranking consequence rather than overriding that safety assessment. -The next audit should use a substantially denser NSGA-III population/reference-direction set (population 240), retain a generous 800-generation maximum budget, and repeat Full, Reduced/`size_span`, and Reduced/`dominance_preservation` over several independent MOEA seeds. The same reference-direction seed can remain fixed across paired treatments in this first multi-seed pass so that treatment differences are not confounded by different direction sets. +A defensible current interpretation is therefore: -The resulting distributions should be interpreted against the common GT at multiple checkpoints. Only after that should we ask whether the sign/magnitude of the static dominance advantage predicts end-to-end optimization quality strongly enough to influence ranking policy design. +- `size_span` remains the structural/conservative default; +- `dominance_preservation` now has concrete end-to-end evidence as an optimization-oriented alternative on clean controls; +- the sign of its static advantage may be useful evidence, but its magnitude should not be interpreted quantitatively; +- the unresolved obstacle to promotion remains reliability under distorted/noisy `Y`, not lack of optimization benefit in the clean cases studied here. ## Status -Implementation, smoke tests, first scientific audit, and Full-only calibration all pass. No ranking-policy default change is justified at this stage. A multi-seed calibrated comparison is the next experiment. +The initial scope of Issue #83 is complete: implementation, smoke tests, Full-only calibration, and the five-seed calibrated Full-vs-Reduced audit all succeeded. The experiment provides strong positive evidence for `dominance_preservation` in clean DTLZ5 and DPF1, but no ranking-policy default change is justified from this scope alone. From c4ca18d1b6af4b996e43dec14a8b21a2677492f2 Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 12:16:06 -0300 Subject: [PATCH 12/32] Add noisy ranking safety screening audit --- benchmarks/run_noisy_ranking_safety.py | 269 +++++++++++++++++++++++++ 1 file changed, 269 insertions(+) create mode 100644 benchmarks/run_noisy_ranking_safety.py diff --git a/benchmarks/run_noisy_ranking_safety.py b/benchmarks/run_noisy_ranking_safety.py new file mode 100644 index 00000000..698d0e6c --- /dev/null +++ b/benchmarks/run_noisy_ranking_safety.py @@ -0,0 +1,269 @@ +# SPDX-FileCopyrightText: 2026 Monaco F. J. +# SPDX-License-Identifier: GPL-3.0-or-later + +"""Screen ranking-policy behavior when only discovery Y is noisy. + +The underlying MOP and downstream optimization problem remain clean. This first +stage of issue #84 does not run the MOEA; it maps where observation noise changes +MIS selection, support assessment, and policy disagreement so the expensive +end-to-end audit can focus on informative conditions. +""" + +from __future__ import annotations + +import argparse +import json +from collections import Counter +from pathlib import Path + +import numpy as np +import pandas as pd + +import misda + +from benchmarks.run_ranking_policy_optimization import ( + MISDA_SEED, + POLICIES, + SCREEN_POWER, + _candidate_snapshot, + _sample_screening, + problem_suite, +) +from misda.benchmarks.validation import NOISE_REPLICATE_SEEDS, NOISE_SIGMAS + + +FORMAT_VERSION = 1 + + +def observe(frame: pd.DataFrame, *, sigma: float, observation_seed: int) -> pd.DataFrame: + """Apply the repository's scale-relative additive Gaussian observation model.""" + + sigma = float(sigma) + if sigma < 0.0: + raise ValueError("sigma must be non-negative") + if sigma == 0.0: + return frame.copy() + + values = frame.to_numpy(dtype=float) + scales = ( + np.std(values, axis=0, ddof=1) + if len(frame) > 1 + else np.zeros(values.shape[1], dtype=float) + ) + epsilon = np.random.default_rng(int(observation_seed)).normal(size=values.shape) + observed = values + sigma * scales[np.newaxis, :] * epsilon + return pd.DataFrame(observed, columns=frame.columns, index=frame.index) + + +def _screen_frame(frame: pd.DataFrame, *, name: str, seed: int): + mis_set = misda.discover(frame, name=name, seed=int(seed)) + mis_set.evaluate(metrics=("dominance",), candidates="all") + rankings = {policy: misda.rank(mis_set, policy=policy) for policy in POLICIES} + + selected = [] + for ranking in rankings.values(): + candidate = ranking.mis() + if all(candidate is not observed for observed in selected): + selected.append(candidate) + mis_set.evaluate(metrics=("linear", "pareto"), candidates=selected) + + snapshots = { + policy: _candidate_snapshot(mis_set, ranking) + for policy, ranking in rankings.items() + } + analysis = mis_set.analysis + return { + "policies": snapshots, + "same_selected_mis": ( + snapshots[misda.SIZE_SPAN]["selected_indices"] + == snapshots[misda.DOMINANCE_PRESERVATION]["selected_indices"] + ), + "dominance_delta": float( + snapshots[misda.DOMINANCE_PRESERVATION]["dominance"]["new_dominance_rate"] + - snapshots[misda.SIZE_SPAN]["dominance"]["new_dominance_rate"] + ), + "analysis": { + "original_dimension": int(analysis.original_dimension), + "latent_dimension": int(analysis.latent_dimension), + "structural_dimension": int(analysis.structural_dimension), + "aggressiveness": float(analysis.aggressiveness), + "separation_status": analysis.separation_status.value, + "n_mis": int(len(mis_set)), + }, + } + + +def _selection_key(snapshot): + return tuple(int(i) for i in snapshot["selected_indices"]) + + +def _summarize(rows): + by_problem = {} + for problem in sorted({row["problem"] for row in rows}): + problem_rows = [row for row in rows if row["problem"] == problem] + sigma_summary = {} + for sigma in sorted({row["sigma"] for row in problem_rows}): + group = [row for row in problem_rows if row["sigma"] == sigma] + sigma_summary[str(sigma)] = { + "n": len(group), + "policy_disagreement": sum(not row["same_selected_mis"] for row in group), + "size_span_changed_from_clean": sum( + not row["policies"][misda.SIZE_SPAN]["matches_clean_selection"] + for row in group + ), + "dominance_changed_from_clean": sum( + not row["policies"][misda.DOMINANCE_PRESERVATION]["matches_clean_selection"] + for row in group + ), + "size_span_trustworthy": sum( + row["policies"][misda.SIZE_SPAN]["assessment"]["trustworthy"] + for row in group + ), + "dominance_trustworthy": sum( + row["policies"][misda.DOMINANCE_PRESERVATION]["assessment"]["trustworthy"] + for row in group + ), + } + by_problem[problem] = sigma_summary + + transitions = Counter() + for row in rows: + for policy in POLICIES: + before = tuple(row["clean"][policy]) + after = tuple(row["policies"][policy]["selected_indices"]) + if before != after: + transitions[(row["problem"], policy, before, after)] += 1 + + return { + "by_problem_and_sigma": by_problem, + "selection_transitions": [ + { + "problem": key[0], + "policy": key[1], + "from": list(key[2]), + "to": list(key[3]), + "count": count, + } + for key, count in sorted(transitions.items(), key=lambda item: (-item[1], item[0])) + ], + } + + +def run_audit( + *, + screen_power: int = SCREEN_POWER, + misda_seed: int = MISDA_SEED, + sigmas=NOISE_SIGMAS, + observation_seeds=NOISE_REPLICATE_SEEDS, +): + rows = [] + clean_reference = {} + + for name, mop in problem_suite().items(): + _, clean_frame = _sample_screening(mop, power=screen_power, seed=misda_seed) + clean = _screen_frame( + clean_frame, + name=f"{name} clean ranking-policy screening", + seed=misda_seed, + ) + clean_reference[name] = { + policy: _selection_key(clean["policies"][policy]) for policy in POLICIES + } + + for observation_seed in tuple(int(value) for value in observation_seeds): + for sigma in tuple(float(value) for value in sigmas): + observed = observe( + clean_frame, + sigma=sigma, + observation_seed=observation_seed, + ) + screened = _screen_frame( + observed, + name=f"{name} noisy ranking-policy screening", + seed=misda_seed, + ) + policies = screened["policies"] + for policy in POLICIES: + policies[policy]["matches_clean_selection"] = bool( + _selection_key(policies[policy]) == clean_reference[name][policy] + ) + + rows.append( + { + "problem": name, + "sigma": sigma, + "observation_seed": observation_seed, + "clean": { + policy: list(clean_reference[name][policy]) for policy in POLICIES + }, + "same_selected_mis": bool(screened["same_selected_mis"]), + "dominance_delta": float(screened["dominance_delta"]), + "analysis": screened["analysis"], + "policies": policies, + } + ) + + return { + "format_version": FORMAT_VERSION, + "question": ( + "How does observation noise in discovery Y change size_span and " + "dominance_preservation before the end-to-end MOEA audit?" + ), + "noise_model": ( + "Y_j = Z_j + sigma * std(Z_j) * epsilon_j, epsilon_j ~ N(0,1)" + ), + "screen_power": int(screen_power), + "misda_seed": int(misda_seed), + "sigmas": [float(value) for value in sigmas], + "observation_seeds": [int(value) for value in observation_seeds], + "clean_reference": { + problem: {policy: list(indices) for policy, indices in reference.items()} + for problem, reference in clean_reference.items() + }, + "rows": rows, + "summary": _summarize(rows), + } + + +def _print_summary(result): + print("Noisy ranking-policy screening audit") + for problem, sigma_rows in result["summary"]["by_problem_and_sigma"].items(): + print(f"\n=== {problem} ===") + for sigma, row in sigma_rows.items(): + print( + f"sigma={sigma}: disagreement={row['policy_disagreement']}/{row['n']}, " + f"size changed={row['size_span_changed_from_clean']}/{row['n']}, " + f"dominance changed={row['dominance_changed_from_clean']}/{row['n']}, " + f"trustworthy(size/dom)={row['size_span_trustworthy']}/" + f"{row['dominance_trustworthy']}" + ) + + +def main(argv=None): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--output", type=Path) + parser.add_argument("--screen-power", type=int, default=SCREEN_POWER) + parser.add_argument("--misda-seed", type=int, default=MISDA_SEED) + parser.add_argument("--sigma", action="append", type=float) + parser.add_argument("--observation-seed", action="append", type=int) + args = parser.parse_args(argv) + + result = run_audit( + screen_power=args.screen_power, + misda_seed=args.misda_seed, + sigmas=tuple(args.sigma) if args.sigma else NOISE_SIGMAS, + observation_seeds=( + tuple(args.observation_seed) + if args.observation_seed + else NOISE_REPLICATE_SEEDS + ), + ) + _print_summary(result) + if args.output is not None: + args.output.write_text(json.dumps(result, indent=2, sort_keys=True), encoding="utf-8") + print(f"\nWrote {args.output}") + return result + + +if __name__ == "__main__": + main() From e6ef70c1c2c405b2bbb05fd3531eecd688411e72 Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 12:16:22 -0300 Subject: [PATCH 13/32] Test noisy ranking safety helpers --- tests/test_noisy_ranking_safety.py | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/test_noisy_ranking_safety.py diff --git a/tests/test_noisy_ranking_safety.py b/tests/test_noisy_ranking_safety.py new file mode 100644 index 00000000..86d9ad82 --- /dev/null +++ b/tests/test_noisy_ranking_safety.py @@ -0,0 +1,36 @@ +# SPDX-FileCopyrightText: 2026 Monaco F. J. +# SPDX-License-Identifier: GPL-3.0-or-later + +import numpy as np +import pandas as pd + +from benchmarks.run_noisy_ranking_safety import observe, run_audit + + +def test_observe_sigma_zero_is_identity(): + frame = pd.DataFrame({"f1": [1.0, 2.0, 3.0], "f2": [4.0, 5.0, 9.0]}) + observed = observe(frame, sigma=0.0, observation_seed=123) + pd.testing.assert_frame_equal(observed, frame) + assert observed is not frame + + +def test_observe_scales_same_standard_noise_linearly(): + frame = pd.DataFrame({"f1": [1.0, 2.0, 4.0], "f2": [3.0, 8.0, 9.0]}) + low = observe(frame, sigma=0.1, observation_seed=456) + high = observe(frame, sigma=0.2, observation_seed=456) + np.testing.assert_allclose( + high.to_numpy() - frame.to_numpy(), + 2.0 * (low.to_numpy() - frame.to_numpy()), + ) + + +def test_small_audit_preserves_clean_reference_at_sigma_zero(): + result = run_audit( + screen_power=5, + sigmas=(0.0,), + observation_seeds=(101,), + ) + assert {row["problem"] for row in result["rows"]} == {"DTLZ5", "DPF1"} + for row in result["rows"]: + for policy in ("size_span", "dominance_preservation"): + assert row["policies"][policy]["matches_clean_selection"] is True From d73605e1fd0606579711efe548ba554d15432179 Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 12:16:50 -0300 Subject: [PATCH 14/32] Start noisy ranking safety research note --- .../2026-10-noisy-ranking-safety.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 docs/research-notes/2026-10-noisy-ranking-safety.md diff --git a/docs/research-notes/2026-10-noisy-ranking-safety.md b/docs/research-notes/2026-10-noisy-ranking-safety.md new file mode 100644 index 00000000..dd498d86 --- /dev/null +++ b/docs/research-notes/2026-10-noisy-ranking-safety.md @@ -0,0 +1,85 @@ +# Noisy ranking-policy safety audit + +## Question + +Issue #83 established that, under clean discovery, `dominance_preservation` can produce a better end-to-end reduction than `size_span` when the two policies select different MISs. In DTLZ5 the difference was very large; in DPF1 it was smaller but still favorable on average. + +The unresolved question is reliability when the discovery observations are noisy: + +> If ranking is performed on a distorted `Y`, which policy is less likely to produce a harmful reduction, and when should MISDA abstain from reducing at all? + +This is issue #84 on branch `issue-84-noisy-ranking-safety`. + +## Operational distinction + +The audit separates two decisions that should not be conflated: + +1. **Gate** — is there enough support to reduce at all? +2. **Ranking** — conditional on reducing, which MIS should be selected? + +The primary operational safety criterion is Reduced-versus-Full degradation in the original objective space. A common calibrated GT remains useful as an absolute diagnostic reference, but a reduction is unsafe if it is materially worse than the corresponding Full treatment even when Full itself is imperfect. + +## Important limitation of the first controls + +DTLZ5 and DPF1 are useful ranking controls because `size_span` and `dominance_preservation` select different two-objective MISs under clean discovery. However, both clean selections are already annotated `UNSUPPORTED_REDUCTION` because of `TRANSITIVE_CHAINING`. + +Therefore these two cases cannot by themselves validate a policy-independent rule such as `low support -> abstain`: that gate would already stop before ranking even in the clean condition. They remain valuable for the narrower question: + +> If reduction is forced despite the warning, how robust is each ranking policy to noisy discovery? + +A later gate-validation stage will need cases in which clean discovery is actually supported, so that observation noise can be tested for transitions from supported to unsupported and for false-positive reduction recommendations. + +## Noise model + +The first stage uses the repository's established scale-relative additive Gaussian observation model: + +\[ +Y_j = Z_j + \sigma\,\operatorname{sd}(Z_j)\,\varepsilon_j, +\qquad \varepsilon_j \sim N(0,1). +\] + +Only the discovery matrix is perturbed. The underlying MOP remains clean, and any downstream optimizer output will be re-evaluated on the clean original objectives. + +Initial levels reuse the existing robustness grid: + +- `sigma = 0.00, 0.05, 0.10, 0.20, 0.40`; +- observation seeds `101, 202, 303, 404, 505`; +- discovery sample: the same 512-point scrambled Sobol sample used by #83; +- MISDA seed `123`. + +Using the same standard-noise realization across sigma levels within a seed gives a nested perturbation path rather than unrelated noisy samples. + +## Stage 1 — screening map + +`benchmarks/run_noisy_ranking_safety.py` performs discovery and both rankings for every problem/noise/observation-seed combination without running the MOEA. It records: + +- selected MIS for each policy; +- whether the selection changed relative to clean discovery; +- policy disagreement; +- observed dominance score; +- structural dimensions and separation status; +- candidate support/reduction assessment. + +The purpose is to identify informative noisy conditions before paying for the end-to-end MOEA runs. In particular, the expensive stage should focus on conditions where noise changes a policy selection, makes the two policies disagree in a new way, or changes support/trust assessment. + +## Planned Stage 2 — end-to-end noisy discovery + +For selected informative conditions: + +1. generate one fixed clean discovery sample `Z` and noisy observation `Y`; +2. select MISs from `Y` using both policies; +3. optimize Full and the two Reduced formulations on the clean MOP under matched initial populations, optimizer seeds, budgets, and NSGA-III reference directions; +4. re-evaluate every population in the full clean objective space; +5. compare Reduced against Full as the primary preservation question and against the common GT as an absolute diagnostic; +6. repeat across independent optimizer seeds only after the noisy screening condition is fixed. + +## Hypotheses to test, not assume + +- Low-noise representative `Y` may favor `dominance_preservation` because its ranking criterion is more aligned with optimization. +- `size_span` may be less exposed to noisy dominance geometry, but this has not yet been established end-to-end. +- At sufficiently poor data quality, the correct decision may be abstention rather than switching ranking policy. +- Bootstrap stability of a dominance preference is not sufficient evidence of correctness under systematic observation noise. + +## Status + +Issue #83 is closed as complete. Issue #84 and branch `issue-84-noisy-ranking-safety` are active. Stage-1 screening instrumentation and helper tests have been added; the next step is to run the screening grid and use the observed transitions to choose the smallest informative end-to-end experiment. From d7b30cd261c89adf667291ba9c468c51e85fdc30 Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 12:17:01 -0300 Subject: [PATCH 15/32] Add noisy ranking safety workflow --- .github/workflows/noisy-ranking-safety.yml | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/noisy-ranking-safety.yml diff --git a/.github/workflows/noisy-ranking-safety.yml b/.github/workflows/noisy-ranking-safety.yml new file mode 100644 index 00000000..6075c541 --- /dev/null +++ b/.github/workflows/noisy-ranking-safety.yml @@ -0,0 +1,41 @@ +name: noisy ranking safety + +on: + push: + branches: + - issue-84-noisy-ranking-safety + paths: + - "benchmarks/run_noisy_ranking_safety.py" + - "tests/test_noisy_ranking_safety.py" + - ".github/workflows/noisy-ranking-safety.yml" + - "docs/research-notes/2026-10-noisy-ranking-safety.md" + workflow_dispatch: + +jobs: + screening: + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + cache: pip + - name: Install + run: | + python -m pip install --upgrade pip + python -m pip install -e '.[benchmarks]' pytest + - name: Helper tests + run: pytest -q tests/test_noisy_ranking_safety.py + - name: Noisy discovery screening grid + run: | + python -m benchmarks.run_noisy_ranking_safety \ + --output /tmp/misda-noisy-ranking-safety.json + cat /tmp/misda-noisy-ranking-safety.json + - name: Preserve screening output + if: always() + uses: actions/upload-artifact@v4 + with: + name: misda-noisy-ranking-safety + path: /tmp/misda-noisy-ranking-safety.json + if-no-files-found: warn From 742abfc079aac3cc879316fae7fe28fa415391f1 Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 12:18:12 -0300 Subject: [PATCH 16/32] Add noisy discovery end-to-end runner --- benchmarks/run_noisy_ranking_optimization.py | 214 +++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 benchmarks/run_noisy_ranking_optimization.py diff --git a/benchmarks/run_noisy_ranking_optimization.py b/benchmarks/run_noisy_ranking_optimization.py new file mode 100644 index 00000000..4444ca3b --- /dev/null +++ b/benchmarks/run_noisy_ranking_optimization.py @@ -0,0 +1,214 @@ +# SPDX-FileCopyrightText: 2026 Monaco F. J. +# SPDX-License-Identifier: GPL-3.0-or-later + +"""End-to-end Full-vs-Reduced audit for selected noisy discovery conditions.""" + +from __future__ import annotations + +import argparse +import json +from pathlib import Path + +import numpy as np + +import misda + +from benchmarks.run_noisy_ranking_safety import _screen_frame, observe +from benchmarks.run_ranking_policy_optimization import ( + MISDA_SEED, + POLICIES, + REF_DIRS_SEED, + SCREEN_POWER, + _calibrated_ground_truth, + _sample_screening, + problem_suite, + run_seed, + summarize_runs, +) + + +FORMAT_VERSION = 1 +DEFAULT_POPULATION = 240 +DEFAULT_GENERATIONS = 800 +DEFAULT_CHECKPOINTS = (100, 200, 400, 800) +DEFAULT_MOEA_SEEDS = (321, 654, 987, 135, 246) + + +def _degradation_vs_full(reduced, full): + """Return oriented loss: positive values always mean Reduced is worse than Full.""" + + return { + "gdplus_loss": float(reduced["gdplus"] - full["gdplus"]), + "igdplus_loss": float(reduced["igdplus"] - full["igdplus"]), + "relative_hv_loss": float(full["relative_hv"] - reduced["relative_hv"]), + } + + +def _mean_degradation(runs, policy): + losses = [ + _degradation_vs_full( + row["final"]["arms"][policy], + row["final"]["arms"]["full"], + ) + for row in runs + ] + return { + key: float(np.mean([loss[key] for loss in losses])) + for key in ("gdplus_loss", "igdplus_loss", "relative_hv_loss") + } + + +def run_condition( + *, + problem: str, + sigma: float, + observation_seed: int, + screen_power: int = SCREEN_POWER, + misda_seed: int = MISDA_SEED, + population: int = DEFAULT_POPULATION, + generations: int = DEFAULT_GENERATIONS, + checkpoints=DEFAULT_CHECKPOINTS, + moea_seeds=DEFAULT_MOEA_SEEDS, + ref_dirs_seed: int = REF_DIRS_SEED, +): + suite = problem_suite() + if problem not in suite: + raise ValueError(f"unknown problem {problem!r}; expected one of {sorted(suite)}") + mop = suite[problem] + + _, clean_frame = _sample_screening(mop, power=screen_power, seed=misda_seed) + observed = observe( + clean_frame, + sigma=float(sigma), + observation_seed=int(observation_seed), + ) + screening = _screen_frame( + observed, + name=f"{problem} noisy discovery sigma={sigma} seed={observation_seed}", + seed=misda_seed, + ) + + gt, calibration_sidecar = _calibrated_ground_truth(mop) + checkpoints = tuple(sorted(set(int(value) for value in checkpoints))) + runs = [ + run_seed( + problem, + mop, + screening, + gt, + generations=int(generations), + checkpoints=checkpoints, + population=int(population), + moea_seed=int(seed), + ref_dirs_seed=int(ref_dirs_seed), + ) + for seed in moea_seeds + ] + mean_final = summarize_runs(runs) + degradation = { + policy: _mean_degradation(runs, policy) for policy in POLICIES + } + + return { + "problem": problem, + "sigma": float(sigma), + "observation_seed": int(observation_seed), + "screening": { + "same_selected_mis": bool(screening["same_selected_mis"]), + "dominance_delta": float(screening["dominance_delta"]), + "analysis": screening["analysis"], + "policies": screening["policies"], + }, + "optimization": { + "population": int(population), + "generations": int(generations), + "checkpoints": list(checkpoints), + "moea_seeds": [int(seed) for seed in moea_seeds], + "ref_dirs_seed": int(ref_dirs_seed), + "gt_size": int(len(gt)), + "calibration_sidecar": calibration_sidecar, + "runs": runs, + "mean_final": mean_final, + "mean_degradation_vs_full": degradation, + }, + } + + +def _parse_condition(value): + try: + problem, sigma, observation_seed = value.split(":", 2) + return problem, float(sigma), int(observation_seed) + except Exception as exc: + raise argparse.ArgumentTypeError( + "condition must be PROBLEM:SIGMA:OBSERVATION_SEED" + ) from exc + + +def _print_result(result): + print( + f"\n=== {result['problem']} sigma={result['sigma']} " + f"obs_seed={result['observation_seed']} ===" + ) + for policy in POLICIES: + selected = result["screening"]["policies"][policy]["selected_labels"] + trusted = result["screening"]["policies"][policy]["assessment"]["trustworthy"] + metrics = result["optimization"]["mean_final"][policy] + loss = result["optimization"]["mean_degradation_vs_full"][policy] + print( + f"{policy}: {selected}, trustworthy={trusted}, " + f"IGD+={metrics['igdplus']:.6g}, HV={metrics['relative_hv']:.6g}, " + f"IGD loss vs Full={loss['igdplus_loss']:.6g}, " + f"HV loss vs Full={loss['relative_hv_loss']:.6g}" + ) + + +def main(argv=None): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument( + "--condition", + action="append", + type=_parse_condition, + required=True, + help="PROBLEM:SIGMA:OBSERVATION_SEED; may be repeated", + ) + parser.add_argument("--output", type=Path) + parser.add_argument("--population", type=int, default=DEFAULT_POPULATION) + parser.add_argument("--generations", type=int, default=DEFAULT_GENERATIONS) + parser.add_argument("--checkpoint", action="append", type=int) + parser.add_argument("--moea-seed", action="append", type=int) + parser.add_argument("--ref-dirs-seed", type=int, default=REF_DIRS_SEED) + args = parser.parse_args(argv) + + checkpoints = tuple(args.checkpoint) if args.checkpoint else DEFAULT_CHECKPOINTS + moea_seeds = tuple(args.moea_seed) if args.moea_seed else DEFAULT_MOEA_SEEDS + results = [ + run_condition( + problem=problem, + sigma=sigma, + observation_seed=observation_seed, + population=args.population, + generations=args.generations, + checkpoints=checkpoints, + moea_seeds=moea_seeds, + ref_dirs_seed=args.ref_dirs_seed, + ) + for problem, sigma, observation_seed in args.condition + ] + payload = { + "format_version": FORMAT_VERSION, + "question": ( + "When discovery Y is noisy, how much does each forced Reduced treatment " + "degrade relative to Full in the original clean objective space?" + ), + "results": results, + } + for result in results: + _print_result(result) + if args.output is not None: + args.output.write_text(json.dumps(payload, indent=2, sort_keys=True), encoding="utf-8") + print(f"\nWrote {args.output}") + return payload + + +if __name__ == "__main__": + main() From 25fad3e689fe0c388c40499481e901278df7325b Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 12:21:00 -0300 Subject: [PATCH 17/32] Screen established noisy controlled cases --- .github/workflows/noisy-ranking-safety.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/noisy-ranking-safety.yml b/.github/workflows/noisy-ranking-safety.yml index 6075c541..87c297b1 100644 --- a/.github/workflows/noisy-ranking-safety.yml +++ b/.github/workflows/noisy-ranking-safety.yml @@ -6,6 +6,7 @@ on: - issue-84-noisy-ranking-safety paths: - "benchmarks/run_noisy_ranking_safety.py" + - "benchmarks/run_noisy_ranking_optimization.py" - "tests/test_noisy_ranking_safety.py" - ".github/workflows/noisy-ranking-safety.yml" - "docs/research-notes/2026-10-noisy-ranking-safety.md" @@ -27,15 +28,22 @@ jobs: python -m pip install -e '.[benchmarks]' pytest - name: Helper tests run: pytest -q tests/test_noisy_ranking_safety.py - - name: Noisy discovery screening grid + - name: DTLZ5 and DPF1 noisy screening grid run: | python -m benchmarks.run_noisy_ranking_safety \ --output /tmp/misda-noisy-ranking-safety.json - cat /tmp/misda-noisy-ranking-safety.json - - name: Preserve screening output + - name: Established controlled noisy-robustness audit + run: | + python -m benchmarks.run_ranking_policy_impact \ + --suite noisy_robustness \ + --problem-id nonlinear_blocks_4x5 \ + --output /tmp/misda-noisy-policy-impact.json + - name: Preserve screening outputs if: always() uses: actions/upload-artifact@v4 with: name: misda-noisy-ranking-safety - path: /tmp/misda-noisy-ranking-safety.json + path: | + /tmp/misda-noisy-ranking-safety.json + /tmp/misda-noisy-policy-impact.json if-no-files-found: warn From afad4b42ec53f08241d5d6326dbe5ac47479987d Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 12:24:29 -0300 Subject: [PATCH 18/32] Map all established noisy controlled cases --- .github/workflows/noisy-ranking-safety.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/noisy-ranking-safety.yml b/.github/workflows/noisy-ranking-safety.yml index 87c297b1..b350cb7e 100644 --- a/.github/workflows/noisy-ranking-safety.yml +++ b/.github/workflows/noisy-ranking-safety.yml @@ -36,7 +36,6 @@ jobs: run: | python -m benchmarks.run_ranking_policy_impact \ --suite noisy_robustness \ - --problem-id nonlinear_blocks_4x5 \ --output /tmp/misda-noisy-policy-impact.json - name: Preserve screening outputs if: always() From 30a1eaf82b8b0a6759fb58db15e6a802576a08ef Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 12:28:56 -0300 Subject: [PATCH 19/32] Run end-to-end audit on controlled noisy tradeoffs --- benchmarks/run_noisy_ranking_optimization.py | 225 ++++++++++++++----- 1 file changed, 163 insertions(+), 62 deletions(-) diff --git a/benchmarks/run_noisy_ranking_optimization.py b/benchmarks/run_noisy_ranking_optimization.py index 4444ca3b..19a8a5c6 100644 --- a/benchmarks/run_noisy_ranking_optimization.py +++ b/benchmarks/run_noisy_ranking_optimization.py @@ -1,7 +1,15 @@ # SPDX-FileCopyrightText: 2026 Monaco F. J. # SPDX-License-Identifier: GPL-3.0-or-later -"""End-to-end Full-vs-Reduced audit for selected noisy discovery conditions.""" +"""End-to-end Full-vs-Reduced audit for selected noisy controlled conditions. + +Discovery reproduces the repository's ``noisy_robustness`` protocol exactly: +a clean controlled MOP is sampled once for a replicate, observation noise is +added only to Y, and both ranking policies select from that same noisy Y. +Optimization is then performed on the underlying clean MOP. The primary safety +quantity is oriented degradation relative to Full in the original objective +space; positive loss always means that Reduced is worse than Full. +""" from __future__ import annotations @@ -10,32 +18,132 @@ from pathlib import Path import numpy as np +import pandas as pd +import moeabench as mb import misda - -from benchmarks.run_noisy_ranking_safety import _screen_frame, observe +from benchmarks.run_ranking_policy_impact import _audit_case from benchmarks.run_ranking_policy_optimization import ( MISDA_SEED, POLICIES, REF_DIRS_SEED, - SCREEN_POWER, - _calibrated_ground_truth, - _sample_screening, - problem_suite, + _nd_front, run_seed, summarize_runs, ) +from misda.benchmarks import PROBLEM_BY_ID, diagnostic_truth +from misda.benchmarks.validation import NOISY_ROBUSTNESS_PROBLEM_IDS -FORMAT_VERSION = 1 +FORMAT_VERSION = 2 DEFAULT_POPULATION = 240 -DEFAULT_GENERATIONS = 800 -DEFAULT_CHECKPOINTS = (100, 200, 400, 800) +DEFAULT_GENERATIONS = 400 +DEFAULT_CHECKPOINTS = (50, 100, 200, 400) DEFAULT_MOEA_SEEDS = (321, 654, 987, 135, 246) +DEFAULT_DISCOVERY_N = 300 +DEFAULT_GT_SIZE = 2000 + +# The first end-to-end noisy-discovery control uses a genuine bounded trade-off +# MOP. More controlled problems can be added here only when their optimization +# domains are explicit rather than inferred from a sampling distribution. +CONTROLLED_DOMAINS = { + "antagonistic_nonlinear_groups": { + "columns": ("x",), + "xl": (0.0,), + "xu": (1.0,), + }, +} + + +class ControlledDiagnosticMOP(mb.mops.BaseMop): + """Adapt an executable MISDA diagnostic problem to MoeaBench.""" + + def __init__(self, problem, *, columns, xl, xu): + self.problem = problem + self.columns = tuple(columns) + probe = problem.evaluate( + pd.DataFrame([np.asarray(xl, dtype=float)], columns=self.columns) + ) + super().__init__( + name=f"MISDA-{problem.id}", + M=int(probe.shape[1]), + N=len(self.columns), + xl=np.asarray(xl, dtype=float), + xu=np.asarray(xu, dtype=float), + ) + + def evaluation(self, X, n_ieq_constr=0): + frame = pd.DataFrame(np.asarray(X, dtype=float), columns=self.columns) + F = self.problem.evaluate(frame).to_numpy(dtype=float) + return {"F": F} + + def ps(self, n_points=100): + if self.N != 1: + raise NotImplementedError("analytical PS is implemented only for 1-D controls") + return np.linspace(self.xl[0], self.xu[0], int(n_points))[:, None] + + +def _controlled_mop(problem_id): + if problem_id not in CONTROLLED_DOMAINS: + raise ValueError( + f"{problem_id!r} has no explicit optimization domain in this audit; " + f"expected one of {sorted(CONTROLLED_DOMAINS)}" + ) + spec = CONTROLLED_DOMAINS[problem_id] + return ControlledDiagnosticMOP( + PROBLEM_BY_ID[problem_id], + columns=spec["columns"], + xl=spec["xl"], + xu=spec["xu"], + ) + + +def _noisy_discovery_case(problem_id, *, sigma, replicate_seed, n, misda_seed): + """Reproduce one established noisy_robustness discovery condition.""" + + if problem_id not in NOISY_ROBUSTNESS_PROBLEM_IDS: + raise ValueError(f"{problem_id!r} is not in the noisy-robustness battery") + problem_position = NOISY_ROBUSTNESS_PROBLEM_IDS.index(problem_id) + problem = PROBLEM_BY_ID[problem_id] + sample_seed = int( + np.random.SeedSequence([int(replicate_seed), problem_position, 1]) + .generate_state(1)[0] + ) + observation_sequence = np.random.SeedSequence( + [int(replicate_seed), problem_position, 2] + ) + X = problem.sample(N=int(n), seed=sample_seed) + Z = problem.evaluate(X) + epsilon = np.random.default_rng(observation_sequence).normal(size=Z.shape) + Y = problem.observe(Z, sigma=float(sigma), standard_noise=epsilon) + truth = diagnostic_truth(problem, Z) + + audit = _audit_case( + suite="noisy_optimization", + problem_id=problem_id, + data=Y, + truth=truth, + misda_seed=int(misda_seed), + metadata={ + "replicate_seed": int(replicate_seed), + "sample_seed": sample_seed, + "sigma": float(sigma), + }, + ) + return audit + + +def _analytic_gt(mop, *, size=DEFAULT_GT_SIZE): + """Dense clean Pareto reference for the 1-D antagonistic control.""" + + if mop.N != 1: + raise NotImplementedError("dense analytic GT is implemented only for 1-D controls") + X = np.linspace(mop.xl[0], mop.xu[0], int(size))[:, None] + return _nd_front(mop.evaluation(X)["F"]) def _degradation_vs_full(reduced, full): - """Return oriented loss: positive values always mean Reduced is worse than Full.""" + """Return oriented loss: positive values always mean Reduced is worse.""" return { "gdplus_loss": float(reduced["gdplus"] - full["gdplus"]), @@ -60,39 +168,35 @@ def _mean_degradation(runs, policy): def run_condition( *, - problem: str, + problem_id: str, sigma: float, - observation_seed: int, - screen_power: int = SCREEN_POWER, + replicate_seed: int, + discovery_n: int = DEFAULT_DISCOVERY_N, misda_seed: int = MISDA_SEED, population: int = DEFAULT_POPULATION, generations: int = DEFAULT_GENERATIONS, checkpoints=DEFAULT_CHECKPOINTS, moea_seeds=DEFAULT_MOEA_SEEDS, ref_dirs_seed: int = REF_DIRS_SEED, + gt_size: int = DEFAULT_GT_SIZE, ): - suite = problem_suite() - if problem not in suite: - raise ValueError(f"unknown problem {problem!r}; expected one of {sorted(suite)}") - mop = suite[problem] - - _, clean_frame = _sample_screening(mop, power=screen_power, seed=misda_seed) - observed = observe( - clean_frame, + audit = _noisy_discovery_case( + problem_id, sigma=float(sigma), - observation_seed=int(observation_seed), + replicate_seed=int(replicate_seed), + n=int(discovery_n), + misda_seed=int(misda_seed), ) - screening = _screen_frame( - observed, - name=f"{problem} noisy discovery sigma={sigma} seed={observation_seed}", - seed=misda_seed, - ) - - gt, calibration_sidecar = _calibrated_ground_truth(mop) + mop = _controlled_mop(problem_id) + gt = _analytic_gt(mop, size=int(gt_size)) checkpoints = tuple(sorted(set(int(value) for value in checkpoints))) + + # run_seed needs only selected_indices from the policy snapshots; passing the + # audit policy records keeps the exact Revisão-09 selections intact. + screening = {"policies": audit["policies"]} runs = [ run_seed( - problem, + problem_id, mop, screening, gt, @@ -104,21 +208,11 @@ def run_condition( ) for seed in moea_seeds ] - mean_final = summarize_runs(runs) - degradation = { - policy: _mean_degradation(runs, policy) for policy in POLICIES - } - return { - "problem": problem, + "problem_id": problem_id, "sigma": float(sigma), - "observation_seed": int(observation_seed), - "screening": { - "same_selected_mis": bool(screening["same_selected_mis"]), - "dominance_delta": float(screening["dominance_delta"]), - "analysis": screening["analysis"], - "policies": screening["policies"], - }, + "replicate_seed": int(replicate_seed), + "static_audit": audit, "optimization": { "population": int(population), "generations": int(generations), @@ -126,39 +220,45 @@ def run_condition( "moea_seeds": [int(seed) for seed in moea_seeds], "ref_dirs_seed": int(ref_dirs_seed), "gt_size": int(len(gt)), - "calibration_sidecar": calibration_sidecar, "runs": runs, - "mean_final": mean_final, - "mean_degradation_vs_full": degradation, + "mean_final": summarize_runs(runs), + "mean_degradation_vs_full": { + policy: _mean_degradation(runs, policy) for policy in POLICIES + }, }, } def _parse_condition(value): try: - problem, sigma, observation_seed = value.split(":", 2) - return problem, float(sigma), int(observation_seed) + problem_id, sigma, replicate_seed = value.split(":", 2) + return problem_id, float(sigma), int(replicate_seed) except Exception as exc: raise argparse.ArgumentTypeError( - "condition must be PROBLEM:SIGMA:OBSERVATION_SEED" + "condition must be PROBLEM_ID:SIGMA:REPLICATE_SEED" ) from exc def _print_result(result): + comparison = result["static_audit"]["comparison"] + print( + f"\n=== {result['problem_id']} sigma={result['sigma']} " + f"replicate={result['replicate_seed']} ===" + ) print( - f"\n=== {result['problem']} sigma={result['sigma']} " - f"obs_seed={result['observation_seed']} ===" + f"static truth outcome: {comparison['truth_outcome']}; " + f"observed dominance delta={comparison['dominance_delta']:.6g}" ) for policy in POLICIES: - selected = result["screening"]["policies"][policy]["selected_labels"] - trusted = result["screening"]["policies"][policy]["assessment"]["trustworthy"] + selected = result["static_audit"]["policies"][policy]["selected_labels"] + trusted = result["static_audit"]["policies"][policy]["reduction_assessment"]["trustworthy"] metrics = result["optimization"]["mean_final"][policy] loss = result["optimization"]["mean_degradation_vs_full"][policy] print( f"{policy}: {selected}, trustworthy={trusted}, " f"IGD+={metrics['igdplus']:.6g}, HV={metrics['relative_hv']:.6g}, " - f"IGD loss vs Full={loss['igdplus_loss']:.6g}, " - f"HV loss vs Full={loss['relative_hv_loss']:.6g}" + f"IGD loss vs Full={loss['igdplus_loss']:+.6g}, " + f"HV loss vs Full={loss['relative_hv_loss']:+.6g}" ) @@ -169,7 +269,7 @@ def main(argv=None): action="append", type=_parse_condition, required=True, - help="PROBLEM:SIGMA:OBSERVATION_SEED; may be repeated", + help="PROBLEM_ID:SIGMA:REPLICATE_SEED; may be repeated", ) parser.add_argument("--output", type=Path) parser.add_argument("--population", type=int, default=DEFAULT_POPULATION) @@ -183,22 +283,23 @@ def main(argv=None): moea_seeds = tuple(args.moea_seed) if args.moea_seed else DEFAULT_MOEA_SEEDS results = [ run_condition( - problem=problem, + problem_id=problem_id, sigma=sigma, - observation_seed=observation_seed, + replicate_seed=replicate_seed, population=args.population, generations=args.generations, checkpoints=checkpoints, moea_seeds=moea_seeds, ref_dirs_seed=args.ref_dirs_seed, ) - for problem, sigma, observation_seed in args.condition + for problem_id, sigma, replicate_seed in args.condition ] payload = { "format_version": FORMAT_VERSION, "question": ( - "When discovery Y is noisy, how much does each forced Reduced treatment " - "degrade relative to Full in the original clean objective space?" + "When noisy discovery changes the representative MIS, is the resulting " + "Reduced optimization materially worse than Full in the clean original " + "objective space?" ), "results": results, } From 3322f4e535a03ec977ae983a246131fd91786ae3 Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 12:29:20 -0300 Subject: [PATCH 20/32] Test controlled noisy optimization helpers --- tests/test_noisy_ranking_safety.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tests/test_noisy_ranking_safety.py b/tests/test_noisy_ranking_safety.py index 86d9ad82..f8394b51 100644 --- a/tests/test_noisy_ranking_safety.py +++ b/tests/test_noisy_ranking_safety.py @@ -4,6 +4,10 @@ import numpy as np import pandas as pd +from benchmarks.run_noisy_ranking_optimization import ( + _degradation_vs_full, + _noisy_discovery_case, +) from benchmarks.run_noisy_ranking_safety import observe, run_audit @@ -34,3 +38,29 @@ def test_small_audit_preserves_clean_reference_at_sigma_zero(): for row in result["rows"]: for policy in ("size_span", "dominance_preservation"): assert row["policies"][policy]["matches_clean_selection"] is True + + +def test_degradation_positive_means_reduced_is_worse(): + full = {"gdplus": 1.0, "igdplus": 2.0, "relative_hv": 0.8} + reduced = {"gdplus": 1.2, "igdplus": 2.3, "relative_hv": 0.7} + loss = _degradation_vs_full(reduced, full) + assert loss == { + "gdplus_loss": 0.19999999999999996, + "igdplus_loss": 0.2999999999999998, + "relative_hv_loss": 0.10000000000000009, + } + + +def test_controlled_condition_reproduces_known_review09_divergence(): + audit = _noisy_discovery_case( + "antagonistic_nonlinear_groups", + sigma=0.10, + replicate_seed=202, + n=300, + misda_seed=123, + ) + assert audit["comparison"]["truth_outcome"] == "regressed" + assert audit["policies"]["size_span"]["selected_labels"] == ["f1", "f11"] + assert audit["policies"]["dominance_preservation"]["selected_labels"] == ["f10", "f18"] + assert audit["policies"]["size_span"]["reduction_assessment"]["trustworthy"] is True + assert audit["policies"]["dominance_preservation"]["reduction_assessment"]["trustworthy"] is True From 4c2c5ddac0b84b9b010426b6307695d781431eed Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 12:29:44 -0300 Subject: [PATCH 21/32] [science] Run noisy end-to-end tradeoff audit --- .github/workflows/noisy-ranking-safety.yml | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/noisy-ranking-safety.yml b/.github/workflows/noisy-ranking-safety.yml index b350cb7e..3243219d 100644 --- a/.github/workflows/noisy-ranking-safety.yml +++ b/.github/workflows/noisy-ranking-safety.yml @@ -46,3 +46,34 @@ jobs: /tmp/misda-noisy-ranking-safety.json /tmp/misda-noisy-policy-impact.json if-no-files-found: warn + + science: + if: ${{ contains(github.event.head_commit.message, '[science]') }} + runs-on: ubuntu-latest + timeout-minutes: 120 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + cache: pip + - name: Install + run: | + python -m pip install --upgrade pip + python -m pip install -e '.[benchmarks]' pytest + - name: Helper tests + run: pytest -q tests/test_noisy_ranking_safety.py + - name: End-to-end noisy discovery audit + run: | + python -m benchmarks.run_noisy_ranking_optimization \ + --condition antagonistic_nonlinear_groups:0.10:202 \ + --condition antagonistic_nonlinear_groups:0.10:101 \ + --output /tmp/misda-noisy-ranking-optimization.json + cat /tmp/misda-noisy-ranking-optimization.json + - name: Preserve optimization output + if: always() + uses: actions/upload-artifact@v4 + with: + name: misda-noisy-ranking-optimization + path: /tmp/misda-noisy-ranking-optimization.json + if-no-files-found: warn From 633d17792fac90987d839e411a2de7c28f689092 Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 12:38:03 -0300 Subject: [PATCH 22/32] Record noisy ranking safety results --- .../2026-10-noisy-ranking-safety.md | 155 +++++++++++++----- 1 file changed, 115 insertions(+), 40 deletions(-) diff --git a/docs/research-notes/2026-10-noisy-ranking-safety.md b/docs/research-notes/2026-10-noisy-ranking-safety.md index dd498d86..9835c561 100644 --- a/docs/research-notes/2026-10-noisy-ranking-safety.md +++ b/docs/research-notes/2026-10-noisy-ranking-safety.md @@ -17,69 +17,144 @@ The audit separates two decisions that should not be conflated: 1. **Gate** — is there enough support to reduce at all? 2. **Ranking** — conditional on reducing, which MIS should be selected? -The primary operational safety criterion is Reduced-versus-Full degradation in the original objective space. A common calibrated GT remains useful as an absolute diagnostic reference, but a reduction is unsafe if it is materially worse than the corresponding Full treatment even when Full itself is imperfect. - -## Important limitation of the first controls - -DTLZ5 and DPF1 are useful ranking controls because `size_span` and `dominance_preservation` select different two-objective MISs under clean discovery. However, both clean selections are already annotated `UNSUPPORTED_REDUCTION` because of `TRANSITIVE_CHAINING`. - -Therefore these two cases cannot by themselves validate a policy-independent rule such as `low support -> abstain`: that gate would already stop before ranking even in the clean condition. They remain valuable for the narrower question: - -> If reduction is forced despite the warning, how robust is each ranking policy to noisy discovery? - -A later gate-validation stage will need cases in which clean discovery is actually supported, so that observation noise can be tested for transitions from supported to unsupported and for false-positive reduction recommendations. +The primary operational safety criterion is Reduced-versus-Full degradation in the original objective space. A common GT remains useful as an absolute diagnostic reference, but a reduction is unsafe if it is materially worse than the corresponding Full treatment even when Full itself is imperfect. ## Noise model -The first stage uses the repository's established scale-relative additive Gaussian observation model: +The experiments reuse the repository's established scale-relative additive Gaussian observation model: \[ Y_j = Z_j + \sigma\,\operatorname{sd}(Z_j)\,\varepsilon_j, \qquad \varepsilon_j \sim N(0,1). \] -Only the discovery matrix is perturbed. The underlying MOP remains clean, and any downstream optimizer output will be re-evaluated on the clean original objectives. +Only the discovery matrix is perturbed. The underlying MOP remains clean, and downstream optimizer outputs are re-evaluated on the clean original objectives. -Initial levels reuse the existing robustness grid: +## Stage 1a — DTLZ5 and DPF1 screening + +The first screening reused the #83 clean optimization controls with - `sigma = 0.00, 0.05, 0.10, 0.20, 0.40`; -- observation seeds `101, 202, 303, 404, 505`; -- discovery sample: the same 512-point scrambled Sobol sample used by #83; +- five observation seeds (`101, 202, 303, 404, 505`); +- the same 512-point scrambled Sobol discovery sample; - MISDA seed `123`. -Using the same standard-noise realization across sigma levels within a seed gives a nested perturbation path rather than unrelated noisy samples. +The result was negative but useful: **neither ranking policy changed its selected MIS in any of the 50 noisy conditions** (two problems × five sigmas × five noise realizations). DTLZ5 always retained the clean `size_span = {f1,f10}` and `dominance_preservation = {f9,f10}` selections; DPF1 likewise retained its clean selections. + +Therefore an end-to-end MOEA rerun on this grid would not test noisy ranking safety: once the same MIS is selected, the clean downstream optimization problem is exactly the #83 treatment again. DTLZ5 and DPF1 remain useful clean controls, but this noise range does not perturb their ranking decision. + +A second limitation is that both DTLZ5 and DPF1 reductions are already annotated `UNSUPPORTED_REDUCTION` because of `TRANSITIVE_CHAINING`. They cannot validate a gate rule such as `low support -> abstain`, because that rule stops before ranking even in the clean condition. + +## Stage 1b — established noisy controlled battery + +The audit therefore returned to the exact `noisy_robustness` battery used in Revisão 09 instead of inventing a new noisy generator. Across the established 200 runs: + +- policy divergences: `77`; +- same selected dimension: `200/200`; +- trust-status changes: `0/200`; +- clean-sample Pareto-truth improvements for `dominance_preservation`: `32`; +- regressions: `40`; +- neutral comparisons: `128`. + +The important point is unchanged from Revisão 09: every divergent run improved the observed dominance score by construction, but this did not reliably improve agreement with the clean-sample Pareto declaration. + +The divergence counts by controlled problem were: + +| problem | divergences | truth improved | truth regressed | neutral | +|---|---:|---:|---:|---:| +| `blocks_4x5` | 20 | 12 | 7 | 1 | +| `antagonistic_linear_groups` | 20 | 8 | 9 | 3 | +| `nonlinear_blocks_4x5` | 20 | 6 | 14 | 0 | +| `antagonistic_nonlinear_groups` | 17 | 6 | 10 | 1 | + +The other noisy-robustness controls did not produce ranking divergences on this grid. + +`nonlinear_blocks_4x5` is the strongest static negative case, but it has a nearly trivial global optimization structure: all four latent coordinates can be minimized simultaneously. For the first end-to-end noisy test we therefore preferred `antagonistic_nonlinear_groups`, a bounded one-dimensional problem with a genuine trade-off between monotone transforms of `x` and `1-x`. + +## Stage 2 — end-to-end noisy discovery on an antagonistic nonlinear trade-off + +`benchmarks/run_noisy_ranking_optimization.py` adapts the executable controlled problem to MoeaBench without changing its formulas. It reproduces the exact `noisy_robustness` sample/noise seed construction, performs MISDA discovery on noisy `Y`, and then runs Full and both Reduced formulations on the **clean** underlying MOP. + +Protocol: + +- problem: `antagonistic_nonlinear_groups` (`M=20`, one bounded decision variable `x in [0,1]`); +- discovery: `N=300`, MISDA seed `123`; +- observation noise: `sigma=0.10`; +- two fixed noise replicates selected before the MOEA comparison; +- population/reference directions: `240`; +- budget: `400` generations; +- five MOEA seeds: `321, 654, 987, 135, 246`; +- dense clean 2000-point Pareto reference; +- all optimizer populations re-evaluated in the original 20-objective clean space. + +The two noisy discovery conditions deliberately point in opposite directions according to the Revisão-09 static clean-sample Pareto diagnostic: + +| replicate | static outcome for dominance | `size_span` | `dominance_preservation` | clean-sample Pareto Jaccard size -> dominance | +|---:|---|---|---|---:| +| 202 | **regressed** | `f1,f11` | `f10,f18` | `0.1733 -> 0.1400` | +| 101 | **improved** | `f1,f11` | `f1,f12` | `0.1600 -> 0.2000` | + +Both policy selections are `SUPPORTED_REDUCTION` in both conditions. + +### Replicate 202 — static diagnostic says dominance regressed + +Mean final metrics across five MOEA seeds: + +| treatment | GD+ | IGD+ | relative HV | +|---|---:|---:|---:| +| Full | 0.000696 | 0.015474 | 0.881405 | +| Reduced / `size_span` | 0.000456 | 0.005385 | 0.953592 | +| Reduced / `dominance_preservation` | 0.000435 | 0.005575 | 0.945215 | + +`size_span` is slightly better than `dominance_preservation` on IGD+ and relative HV, consistent in direction with the static regression label. However, the operational safety result is more important: **both reductions are substantially better than Full** at the tested budget. + +Using the oriented loss convention where positive always means "Reduced is worse than Full": + +- `size_span`: mean IGD+ loss `-0.010089`, HV loss `-0.072187`; +- `dominance_preservation`: mean IGD+ loss `-0.009899`, HV loss `-0.063809`. + +Thus the noisy dominance choice is inferior to the structural choice in this condition, but it is **not a harmful false-positive reduction relative to Full**. + +### Replicate 101 — static diagnostic says dominance improved + +Mean final metrics: + +| treatment | GD+ | IGD+ | relative HV | +|---|---:|---:|---:| +| Full | 0.000696 | 0.015474 | 0.881405 | +| Reduced / `size_span` | 0.000456 | 0.005385 | 0.953592 | +| Reduced / `dominance_preservation` | 0.000456 | 0.005384 | 0.953616 | + +The two Reduced formulations are practically indistinguishable. `dominance_preservation` has only a tiny mean advantage (`Delta IGD+ ≈ -1.1e-6`, `Delta HV ≈ +2.4e-5`). Again, both are clearly better than Full. + +## Interpretation after the first end-to-end noisy test + +This experiment changes how the Revisão-09 noisy regressions should be interpreted. -## Stage 1 — screening map +The clean-sample Pareto-Jaccard comparison on a finite noisy discovery sample can distinguish representatives and its **direction** happened to agree with the small end-to-end ordering in these two selected replicates. But a static label such as `regressed` does **not** imply that the resulting reduction is operationally unsafe. In the explicit regression condition above, `dominance_preservation` was slightly worse than `size_span` yet still substantially better than Full. -`benchmarks/run_noisy_ranking_safety.py` performs discovery and both rankings for every problem/noise/observation-seed combination without running the MOEA. It records: +That matters because the project goal is not to select the mathematically best representative MIS at any cost. The primary goal is to avoid reductions that materially degrade the optimization result relative to Full. -- selected MIS for each policy; -- whether the selection changed relative to clean discovery; -- policy disagreement; -- observed dominance score; -- structural dimensions and separation status; -- candidate support/reduction assessment. +There is also an important limitation: in `antagonistic_nonlinear_groups`, every selected pair above contains one monotone transform of `x` and one monotone transform of `1-x`. These representatives encode the same underlying true Pareto trade-off. Noise can make their finite-sample dominance/Pareto diagnostics look different, but the global clean reduction remains structurally safe. This control therefore demonstrates that **a noisy static ranking regression can overstate operational harm**, but it does not yet show what happens when noise makes MISDA choose a globally unsafe representative. -The purpose is to identify informative noisy conditions before paying for the end-to-end MOEA runs. In particular, the expensive stage should focus on conditions where noise changes a policy selection, makes the two policies disagree in a new way, or changes support/trust assessment. +Consequently, the current evidence does **not** establish the simple rule `noisy Y -> size_span`. It supports a weaker statement: -## Planned Stage 2 — end-to-end noisy discovery +- `dominance_preservation` is more sensitive to observed noisy geometry and can choose a slightly worse representative; +- `size_span` can be more conservative in such a condition; +- but the observed representative error need not create a harmful reduction relative to Full; +- the decisive missing case is one where noisy discovery changes the selected MIS in a way that changes the **global clean optimization problem**, not merely the finite-sample ordering. -For selected informative conditions: +## Next experimental target -1. generate one fixed clean discovery sample `Z` and noisy observation `Y`; -2. select MISs from `Y` using both policies; -3. optimize Full and the two Reduced formulations on the clean MOP under matched initial populations, optimizer seeds, budgets, and NSGA-III reference directions; -4. re-evaluate every population in the full clean objective space; -5. compare Reduced against Full as the primary preservation question and against the common GT as an absolute diagnostic; -6. repeat across independent optimizer seeds only after the noisy screening condition is fixed. +The next useful control should satisfy all of the following: -## Hypotheses to test, not assume +1. the clean problem has at least two admissible MIS representatives with genuinely different global optimization consequences; +2. noisy discovery can switch the selected representative; +3. the gate still reports sufficient support, so ranking rather than abstention is actually being tested; +4. Full and both Reduced formulations can be evaluated in a common clean objective space. -- Low-noise representative `Y` may favor `dominance_preservation` because its ranking criterion is more aligned with optimization. -- `size_span` may be less exposed to noisy dominance geometry, but this has not yet been established end-to-end. -- At sufficiently poor data quality, the correct decision may be abstention rather than switching ranking policy. -- Bootstrap stability of a dominance preference is not sufficient evidence of correctness under systematic observation noise. +DTLZ5 already demonstrates condition (1) strongly under clean discovery, but the tested `sigma <= 0.40` grid did not change either ranking selection. A natural next probe is therefore to search for a noisy/sampling regime that changes the DTLZ5 representative **without first invalidating support**, or to construct/use another controlled MOP with the same property. Only such a case can establish whether `size_span` really prevents more operational false positives than `dominance_preservation` under noisy discovery. ## Status -Issue #83 is closed as complete. Issue #84 and branch `issue-84-noisy-ranking-safety` are active. Stage-1 screening instrumentation and helper tests have been added; the next step is to run the screening grid and use the observed transitions to choose the smallest informative end-to-end experiment. +Issue #84 and branch `issue-84-noisy-ranking-safety` remain active. Screening instrumentation, reproducibility tests, the full established noisy-policy map, and the first five-seed end-to-end noisy-discovery comparison all pass. The first end-to-end result rejects an overly strong reading of Revisão-09 static regressions, but the central noisy-policy safety question remains open pending a control where noise can alter the globally relevant representative choice. From 3da450ce4389dda35cc7c92e4c6f23d914a343df Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 12:38:39 -0300 Subject: [PATCH 23/32] Stress-screen noisy DTLZ5 ranking transitions --- .github/workflows/noisy-ranking-safety.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/noisy-ranking-safety.yml b/.github/workflows/noisy-ranking-safety.yml index 3243219d..4e82dec9 100644 --- a/.github/workflows/noisy-ranking-safety.yml +++ b/.github/workflows/noisy-ranking-safety.yml @@ -32,6 +32,11 @@ jobs: run: | python -m benchmarks.run_noisy_ranking_safety \ --output /tmp/misda-noisy-ranking-safety.json + - name: DTLZ5 and DPF1 high-noise stress screening + run: | + python -m benchmarks.run_noisy_ranking_safety \ + --sigma 0.60 --sigma 0.80 --sigma 1.00 --sigma 1.50 --sigma 2.00 \ + --output /tmp/misda-noisy-ranking-stress.json - name: Established controlled noisy-robustness audit run: | python -m benchmarks.run_ranking_policy_impact \ @@ -44,6 +49,7 @@ jobs: name: misda-noisy-ranking-safety path: | /tmp/misda-noisy-ranking-safety.json + /tmp/misda-noisy-ranking-stress.json /tmp/misda-noisy-policy-impact.json if-no-files-found: warn From 35b63038402e9703a01651562d1e26c8f24519ad Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 12:42:43 -0300 Subject: [PATCH 24/32] Add DTLZ5 noisy stress optimization audit --- .../run_noisy_dtlz5_stress_optimization.py | 150 ++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 benchmarks/run_noisy_dtlz5_stress_optimization.py diff --git a/benchmarks/run_noisy_dtlz5_stress_optimization.py b/benchmarks/run_noisy_dtlz5_stress_optimization.py new file mode 100644 index 00000000..4e0e79a8 --- /dev/null +++ b/benchmarks/run_noisy_dtlz5_stress_optimization.py @@ -0,0 +1,150 @@ +# SPDX-FileCopyrightText: 2026 Monaco F. J. +# SPDX-License-Identifier: GPL-3.0-or-later + +"""Boundary stress test for noisy DTLZ5 ranking/support semantics. + +This is deliberately *not* a realistic-noise benchmark. It probes a high-noise +condition discovered by the #84 screening where candidate support and ranking +point in different directions, then evaluates the downstream consequences in +the clean original MOP. +""" + +from __future__ import annotations + +import argparse +import json +from pathlib import Path + +import numpy as np + +import misda +from benchmarks.run_noisy_ranking_optimization import _mean_degradation +from benchmarks.run_noisy_ranking_safety import _screen_frame, observe +from benchmarks.run_ranking_policy_optimization import ( + MISDA_SEED, + POLICIES, + REF_DIRS_SEED, + _calibrated_ground_truth, + _sample_screening, + problem_suite, + run_seed, + summarize_runs, +) + + +FORMAT_VERSION = 1 +DEFAULT_SIGMA = 2.0 +DEFAULT_OBSERVATION_SEED = 101 +DEFAULT_POPULATION = 240 +DEFAULT_GENERATIONS = 800 +DEFAULT_CHECKPOINTS = (100, 200, 400, 800) +DEFAULT_MOEA_SEEDS = (321, 654, 987, 135, 246) + + +def screen_condition(*, sigma=DEFAULT_SIGMA, observation_seed=DEFAULT_OBSERVATION_SEED): + mop = problem_suite()["DTLZ5"] + _, clean = _sample_screening(mop, power=9, seed=MISDA_SEED) + noisy = observe(clean, sigma=float(sigma), observation_seed=int(observation_seed)) + return mop, _screen_frame( + noisy, + name=f"DTLZ5 stress sigma={sigma} observation_seed={observation_seed}", + seed=MISDA_SEED, + ) + + +def run_audit( + *, + sigma=DEFAULT_SIGMA, + observation_seed=DEFAULT_OBSERVATION_SEED, + population=DEFAULT_POPULATION, + generations=DEFAULT_GENERATIONS, + checkpoints=DEFAULT_CHECKPOINTS, + moea_seeds=DEFAULT_MOEA_SEEDS, + ref_dirs_seed=REF_DIRS_SEED, +): + mop, screening = screen_condition( + sigma=float(sigma), observation_seed=int(observation_seed) + ) + gt, calibration_sidecar = _calibrated_ground_truth(mop) + checkpoints = tuple(sorted(set(int(value) for value in checkpoints))) + runs = [ + run_seed( + "DTLZ5-stress", + mop, + screening, + gt, + generations=int(generations), + checkpoints=checkpoints, + population=int(population), + moea_seed=int(seed), + ref_dirs_seed=int(ref_dirs_seed), + ) + for seed in moea_seeds + ] + return { + "format_version": FORMAT_VERSION, + "problem": "DTLZ5", + "stress_only": True, + "sigma": float(sigma), + "observation_seed": int(observation_seed), + "screening": screening, + "optimization": { + "population": int(population), + "generations": int(generations), + "checkpoints": list(checkpoints), + "moea_seeds": [int(seed) for seed in moea_seeds], + "ref_dirs_seed": int(ref_dirs_seed), + "gt_size": int(len(gt)), + "calibration_sidecar": calibration_sidecar, + "runs": runs, + "mean_final": summarize_runs(runs), + "mean_degradation_vs_full": { + policy: _mean_degradation(runs, policy) for policy in POLICIES + }, + }, + } + + +def _print(result): + print( + f"DTLZ5 high-noise stress: sigma={result['sigma']}, " + f"observation_seed={result['observation_seed']}" + ) + for policy in POLICIES: + selected = result["screening"]["policies"][policy] + metrics = result["optimization"]["mean_final"][policy] + loss = result["optimization"]["mean_degradation_vs_full"][policy] + print( + f"{policy}: {selected['selected_labels']}, " + f"trustworthy={selected['assessment']['trustworthy']}, " + f"IGD+={metrics['igdplus']:.6g}, HV={metrics['relative_hv']:.6g}, " + f"IGD loss vs Full={loss['igdplus_loss']:+.6g}, " + f"HV loss vs Full={loss['relative_hv_loss']:+.6g}" + ) + + +def main(argv=None): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--sigma", type=float, default=DEFAULT_SIGMA) + parser.add_argument("--observation-seed", type=int, default=DEFAULT_OBSERVATION_SEED) + parser.add_argument("--output", type=Path) + args = parser.parse_args(argv) + result = run_audit(sigma=args.sigma, observation_seed=args.observation_seed) + _print(result) + if args.output is not None: + # Drop live MISSet/ranking objects retained by the screening helper. + serializable = dict(result) + serializable["screening"] = { + key: value + for key, value in result["screening"].items() + if key not in {"mis_set", "rankings", "X", "F"} + } + args.output.write_text( + json.dumps(serializable, indent=2, sort_keys=True), encoding="utf-8" + ) + print(f"Wrote {args.output}") + return result + + +if __name__ == "__main__": + main() From df41db367d781d1733090649a71a5d15f27c3b11 Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 12:44:11 -0300 Subject: [PATCH 25/32] Test DTLZ5 noisy support boundary --- tests/test_noisy_ranking_safety.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/test_noisy_ranking_safety.py b/tests/test_noisy_ranking_safety.py index f8394b51..6f7995f4 100644 --- a/tests/test_noisy_ranking_safety.py +++ b/tests/test_noisy_ranking_safety.py @@ -4,6 +4,7 @@ import numpy as np import pandas as pd +from benchmarks.run_noisy_dtlz5_stress_optimization import screen_condition from benchmarks.run_noisy_ranking_optimization import ( _degradation_vs_full, _noisy_discovery_case, @@ -64,3 +65,17 @@ def test_controlled_condition_reproduces_known_review09_divergence(): assert audit["policies"]["dominance_preservation"]["selected_labels"] == ["f10", "f18"] assert audit["policies"]["size_span"]["reduction_assessment"]["trustworthy"] is True assert audit["policies"]["dominance_preservation"]["reduction_assessment"]["trustworthy"] is True + + +def test_dtlz5_high_noise_stress_reproduces_support_asymmetry(): + _, screening = screen_condition(sigma=2.0, observation_seed=101) + size = screening["policies"]["size_span"] + dominance = screening["policies"]["dominance_preservation"] + + assert size["selected_labels"] == ["f1", "f2", "f4", "f5", "f6", "f8", "f10"] + assert size["assessment"]["trustworthy"] is True + assert size["support"]["reasons"] == [] + + assert dominance["selected_labels"] == ["f1", "f2", "f5", "f7", "f8", "f9", "f10"] + assert dominance["assessment"]["trustworthy"] is False + assert dominance["support"]["reasons"] == ["TRANSITIVE_CHAINING"] From 2bb59d194523489d79550614c01832cb81ccf17a Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 12:44:32 -0300 Subject: [PATCH 26/32] [dtlz-stress] Run DTLZ5 support boundary audit --- .github/workflows/noisy-ranking-safety.yml | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/noisy-ranking-safety.yml b/.github/workflows/noisy-ranking-safety.yml index 4e82dec9..f343ad8e 100644 --- a/.github/workflows/noisy-ranking-safety.yml +++ b/.github/workflows/noisy-ranking-safety.yml @@ -7,6 +7,7 @@ on: paths: - "benchmarks/run_noisy_ranking_safety.py" - "benchmarks/run_noisy_ranking_optimization.py" + - "benchmarks/run_noisy_dtlz5_stress_optimization.py" - "tests/test_noisy_ranking_safety.py" - ".github/workflows/noisy-ranking-safety.yml" - "docs/research-notes/2026-10-noisy-ranking-safety.md" @@ -83,3 +84,32 @@ jobs: name: misda-noisy-ranking-optimization path: /tmp/misda-noisy-ranking-optimization.json if-no-files-found: warn + + dtlz_stress: + if: ${{ contains(github.event.head_commit.message, '[dtlz-stress]') }} + runs-on: ubuntu-latest + timeout-minutes: 120 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + cache: pip + - name: Install + run: | + python -m pip install --upgrade pip + python -m pip install -e '.[benchmarks]' pytest + - name: Helper tests + run: pytest -q tests/test_noisy_ranking_safety.py + - name: DTLZ5 high-noise support boundary audit + run: | + python -m benchmarks.run_noisy_dtlz5_stress_optimization \ + --output /tmp/misda-noisy-dtlz5-stress.json + cat /tmp/misda-noisy-dtlz5-stress.json + - name: Preserve stress output + if: always() + uses: actions/upload-artifact@v4 + with: + name: misda-noisy-dtlz5-stress + path: /tmp/misda-noisy-dtlz5-stress.json + if-no-files-found: warn From 686825cc29f8d3c16b064bb2b024d015f47d4f0e Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 13:21:20 -0300 Subject: [PATCH 27/32] [supported-stress] Compare supported noisy ranking disagreements --- .github/workflows/noisy-ranking-safety.yml | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/noisy-ranking-safety.yml b/.github/workflows/noisy-ranking-safety.yml index f343ad8e..9a46772f 100644 --- a/.github/workflows/noisy-ranking-safety.yml +++ b/.github/workflows/noisy-ranking-safety.yml @@ -113,3 +113,34 @@ jobs: name: misda-noisy-dtlz5-stress path: /tmp/misda-noisy-dtlz5-stress.json if-no-files-found: warn + + supported_stress: + if: ${{ contains(github.event.head_commit.message, '[supported-stress]') }} + runs-on: ubuntu-latest + timeout-minutes: 120 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + cache: pip + - name: Install + run: | + python -m pip install --upgrade pip + python -m pip install -e '.[benchmarks]' pytest + - name: Helper tests + run: pytest -q tests/test_noisy_ranking_safety.py + - name: Supported high-noise ranking disagreements + run: | + python -m benchmarks.run_noisy_ranking_optimization \ + --condition DTLZ5:1.00:404 \ + --condition DPF1:2.00:505 \ + --output /tmp/misda-supported-noisy-ranking-stress.json + cat /tmp/misda-supported-noisy-ranking-stress.json + - name: Preserve supported-stress output + if: always() + uses: actions/upload-artifact@v4 + with: + name: misda-supported-noisy-ranking-stress + path: /tmp/misda-supported-noisy-ranking-stress.json + if-no-files-found: warn From bf4956c324323b6f50279ee950a4e957d647ab4d Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 13:23:13 -0300 Subject: [PATCH 28/32] Add MoeaBench noisy stress optimization runner --- ...run_noisy_moeabench_stress_optimization.py | 202 ++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 benchmarks/run_noisy_moeabench_stress_optimization.py diff --git a/benchmarks/run_noisy_moeabench_stress_optimization.py b/benchmarks/run_noisy_moeabench_stress_optimization.py new file mode 100644 index 00000000..eb7b74e0 --- /dev/null +++ b/benchmarks/run_noisy_moeabench_stress_optimization.py @@ -0,0 +1,202 @@ +# SPDX-FileCopyrightText: 2026 Monaco F. J. +# SPDX-License-Identifier: GPL-3.0-or-later + +"""End-to-end stress audit for noisy DTLZ5/DPF1 discovery conditions. + +This runner is intentionally separate from ``run_noisy_ranking_optimization``: +that module reproduces the controlled ``noisy_robustness`` battery, whereas +this module probes the MoeaBench DTLZ5/DPF1 controls from issue #83. Observation +noise affects only the discovery matrix; optimization and evaluation use the +clean underlying MOP and a common calibrated GT. +""" + +from __future__ import annotations + +import argparse +import json +from pathlib import Path + +import numpy as np + +import misda +from benchmarks.run_noisy_ranking_optimization import _mean_degradation +from benchmarks.run_noisy_ranking_safety import _screen_frame, observe +from benchmarks.run_ranking_policy_optimization import ( + MISDA_SEED, + POLICIES, + REF_DIRS_SEED, + SCREEN_POWER, + _calibrated_ground_truth, + _sample_screening, + problem_suite, + run_seed, + summarize_runs, +) + + +FORMAT_VERSION = 1 +DEFAULT_POPULATION = 240 +DEFAULT_GENERATIONS = 800 +DEFAULT_CHECKPOINTS = (100, 200, 400, 800) +DEFAULT_MOEA_SEEDS = (321, 654, 987, 135, 246) + + +def screen_condition(problem, *, sigma, observation_seed, screen_power=SCREEN_POWER): + suite = problem_suite() + if problem not in suite: + raise ValueError(f"unknown problem {problem!r}; expected one of {sorted(suite)}") + mop = suite[problem] + _, clean = _sample_screening(mop, power=int(screen_power), seed=MISDA_SEED) + noisy = observe( + clean, + sigma=float(sigma), + observation_seed=int(observation_seed), + ) + screening = _screen_frame( + noisy, + name=f"{problem} noisy stress sigma={sigma} seed={observation_seed}", + seed=MISDA_SEED, + ) + return mop, screening + + +def run_condition( + problem, + *, + sigma, + observation_seed, + population=DEFAULT_POPULATION, + generations=DEFAULT_GENERATIONS, + checkpoints=DEFAULT_CHECKPOINTS, + moea_seeds=DEFAULT_MOEA_SEEDS, + ref_dirs_seed=REF_DIRS_SEED, +): + mop, screening = screen_condition( + problem, + sigma=float(sigma), + observation_seed=int(observation_seed), + ) + gt, calibration_sidecar = _calibrated_ground_truth(mop) + checkpoints = tuple(sorted(set(int(value) for value in checkpoints))) + runs = [ + run_seed( + f"{problem}-noisy-stress", + mop, + screening, + gt, + generations=int(generations), + checkpoints=checkpoints, + population=int(population), + moea_seed=int(seed), + ref_dirs_seed=int(ref_dirs_seed), + ) + for seed in moea_seeds + ] + return { + "problem": problem, + "stress_only": True, + "sigma": float(sigma), + "observation_seed": int(observation_seed), + "screening": screening, + "optimization": { + "population": int(population), + "generations": int(generations), + "checkpoints": list(checkpoints), + "moea_seeds": [int(seed) for seed in moea_seeds], + "ref_dirs_seed": int(ref_dirs_seed), + "gt_size": int(len(gt)), + "calibration_sidecar": calibration_sidecar, + "runs": runs, + "mean_final": summarize_runs(runs), + "mean_degradation_vs_full": { + policy: _mean_degradation(runs, policy) for policy in POLICIES + }, + }, + } + + +def _parse_condition(value): + try: + problem, sigma, observation_seed = value.split(":", 2) + return problem, float(sigma), int(observation_seed) + except Exception as exc: + raise argparse.ArgumentTypeError( + "condition must be PROBLEM:SIGMA:OBSERVATION_SEED" + ) from exc + + +def _print_result(result): + print( + f"\n=== {result['problem']} stress sigma={result['sigma']} " + f"observation_seed={result['observation_seed']} ===" + ) + print( + f"structural dimension={result['screening']['analysis']['structural_dimension']}; " + f"same selected MIS={result['screening']['same_selected_mis']}" + ) + for policy in POLICIES: + selected = result["screening"]["policies"][policy] + metrics = result["optimization"]["mean_final"][policy] + loss = result["optimization"]["mean_degradation_vs_full"][policy] + print( + f"{policy}: {selected['selected_labels']}, " + f"trustworthy={selected['assessment']['trustworthy']}, " + f"IGD+={metrics['igdplus']:.6g}, HV={metrics['relative_hv']:.6g}, " + f"IGD loss vs Full={loss['igdplus_loss']:+.6g}, " + f"HV loss vs Full={loss['relative_hv_loss']:+.6g}" + ) + + +def main(argv=None): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument( + "--condition", + action="append", + type=_parse_condition, + required=True, + help="PROBLEM:SIGMA:OBSERVATION_SEED; may be repeated", + ) + parser.add_argument("--output", type=Path) + parser.add_argument("--population", type=int, default=DEFAULT_POPULATION) + parser.add_argument("--generations", type=int, default=DEFAULT_GENERATIONS) + parser.add_argument("--checkpoint", action="append", type=int) + parser.add_argument("--moea-seed", action="append", type=int) + parser.add_argument("--ref-dirs-seed", type=int, default=REF_DIRS_SEED) + args = parser.parse_args(argv) + + checkpoints = tuple(args.checkpoint) if args.checkpoint else DEFAULT_CHECKPOINTS + moea_seeds = tuple(args.moea_seed) if args.moea_seed else DEFAULT_MOEA_SEEDS + results = [ + run_condition( + problem, + sigma=sigma, + observation_seed=observation_seed, + population=args.population, + generations=args.generations, + checkpoints=checkpoints, + moea_seeds=moea_seeds, + ref_dirs_seed=args.ref_dirs_seed, + ) + for problem, sigma, observation_seed in args.condition + ] + payload = { + "format_version": FORMAT_VERSION, + "question": ( + "When both ranking choices remain supported under strongly noisy " + "MoeaBench discovery, which Reduced treatment degrades less relative " + "to Full in the clean original objective space?" + ), + "results": results, + } + for result in results: + _print_result(result) + if args.output is not None: + args.output.write_text( + json.dumps(payload, indent=2, sort_keys=True), encoding="utf-8" + ) + print(f"\nWrote {args.output}") + return payload + + +if __name__ == "__main__": + main() From 3f1d4b53569909ac63dea04e0f48cdbf6cc9e6f4 Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 13:23:37 -0300 Subject: [PATCH 29/32] Test supported noisy MoeaBench disagreements --- tests/test_noisy_ranking_safety.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/test_noisy_ranking_safety.py b/tests/test_noisy_ranking_safety.py index 6f7995f4..8e2318dc 100644 --- a/tests/test_noisy_ranking_safety.py +++ b/tests/test_noisy_ranking_safety.py @@ -5,6 +5,9 @@ import pandas as pd from benchmarks.run_noisy_dtlz5_stress_optimization import screen_condition +from benchmarks.run_noisy_moeabench_stress_optimization import ( + screen_condition as screen_moeabench_condition, +) from benchmarks.run_noisy_ranking_optimization import ( _degradation_vs_full, _noisy_discovery_case, @@ -79,3 +82,20 @@ def test_dtlz5_high_noise_stress_reproduces_support_asymmetry(): assert dominance["selected_labels"] == ["f1", "f2", "f5", "f7", "f8", "f9", "f10"] assert dominance["assessment"]["trustworthy"] is False assert dominance["support"]["reasons"] == ["TRANSITIVE_CHAINING"] + + +def test_supported_moeabench_stress_conditions_reproduce_policy_disagreement(): + conditions = ( + ("DTLZ5", 1.0, 404), + ("DPF1", 2.0, 505), + ) + for problem, sigma, observation_seed in conditions: + _, screening = screen_moeabench_condition( + problem, + sigma=sigma, + observation_seed=observation_seed, + ) + assert screening["same_selected_mis"] is False + for policy in ("size_span", "dominance_preservation"): + assert screening["policies"][policy]["assessment"]["trustworthy"] is True + assert screening["policies"][policy]["support"]["status"] == "SUPPORTED" From 9311b220c20b083553b8f0223ca42f37d373caef Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 13:24:06 -0300 Subject: [PATCH 30/32] [supported-stress] Use MoeaBench noisy stress runner --- .github/workflows/noisy-ranking-safety.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/noisy-ranking-safety.yml b/.github/workflows/noisy-ranking-safety.yml index 9a46772f..3266a111 100644 --- a/.github/workflows/noisy-ranking-safety.yml +++ b/.github/workflows/noisy-ranking-safety.yml @@ -8,6 +8,7 @@ on: - "benchmarks/run_noisy_ranking_safety.py" - "benchmarks/run_noisy_ranking_optimization.py" - "benchmarks/run_noisy_dtlz5_stress_optimization.py" + - "benchmarks/run_noisy_moeabench_stress_optimization.py" - "tests/test_noisy_ranking_safety.py" - ".github/workflows/noisy-ranking-safety.yml" - "docs/research-notes/2026-10-noisy-ranking-safety.md" @@ -132,7 +133,7 @@ jobs: run: pytest -q tests/test_noisy_ranking_safety.py - name: Supported high-noise ranking disagreements run: | - python -m benchmarks.run_noisy_ranking_optimization \ + python -m benchmarks.run_noisy_moeabench_stress_optimization \ --condition DTLZ5:1.00:404 \ --condition DPF1:2.00:505 \ --output /tmp/misda-supported-noisy-ranking-stress.json From 74e39c5daebc4b1370fa5bd51eb0a6ee99c5c0ec Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 13:33:40 -0300 Subject: [PATCH 31/32] Record supported noisy ranking stress results --- .../2026-10-noisy-ranking-supported-stress.md | 209 ++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 docs/research-notes/2026-10-noisy-ranking-supported-stress.md diff --git a/docs/research-notes/2026-10-noisy-ranking-supported-stress.md b/docs/research-notes/2026-10-noisy-ranking-supported-stress.md new file mode 100644 index 00000000..d674f214 --- /dev/null +++ b/docs/research-notes/2026-10-noisy-ranking-supported-stress.md @@ -0,0 +1,209 @@ +# Noisy ranking safety — supported stress follow-up + +- Period: 2026-10-01 +- Tracking: issue #84 +- Branch: `issue-84-noisy-ranking-safety` +- Parent note: `2026-10-noisy-ranking-safety.md` +- Status: **stress evidence recorded; no default-policy change** + +## Why this follow-up exists + +The first end-to-end noisy-discovery experiment showed that a static Pareto-truth regression in a finite noisy sample does not necessarily imply an operationally harmful reduction. In the antagonistic nonlinear control, both `size_span` and `dominance_preservation` remained better than Full even when the static audit preferred one representative over the other. + +That experiment still did not answer the sharper ranking-safety question: + +> If observation noise changes a globally consequential MIS choice while the current support machinery still accepts the reduction, which ranking policy is safer relative to Full? + +DTLZ5 is particularly useful for this stress question because issue #83 already established a large clean end-to-end difference between its alternative representatives. + +## High-noise screening + +The ordinary DTLZ5/DPF1 noise grid (`sigma <= 0.40`) never changed either clean ranking selection. We therefore performed a deliberately extreme **stress screening** at + +```text +sigma = 0.60, 0.80, 1.00, 1.50, 2.00 +observation seeds = 101, 202, 303, 404, 505 +``` + +These conditions are boundary probes, not proposed realistic observation-noise levels. + +The screening showed that the clean representatives eventually change. It also exposed two distinct questions: + +1. **support boundary:** can observed-Y support remain positive for a reduction that is operationally unsafe? +2. **ranking conditional on support:** when both policies remain `SUPPORTED_REDUCTION`, can one ranking be materially safer than the other? + +## Stress A — support is not a safety guarantee + +Condition: + +```text +DTLZ5 +sigma = 2.0 +observation_seed = 101 +``` + +Discovery returned structural dimension 7. + +- `size_span`: `f1,f2,f4,f5,f6,f8,f10` — **SUPPORTED_REDUCTION** +- `dominance_preservation`: `f1,f2,f5,f7,f8,f9,f10` — **UNSUPPORTED_REDUCTION** (`TRANSITIVE_CHAINING`) + +Both forced Reduced treatments were then evaluated on the clean DTLZ5 MOP with population 240, 800 generations and five MOEA seeds. + +Mean final metrics: + +| treatment | GD+ | IGD+ | relative HV | +|---|---:|---:|---:| +| Full | 5.3747 | 0.3340 | 0.1146 | +| Reduced / `size_span` | 3.7702 | 2.5297 | 0.0000 | +| Reduced / `dominance_preservation` | 4.6903 | 0.4340 | 0.0058 | + +Using oriented loss where positive means Reduced is worse than Full: + +- `size_span`: IGD+ loss **+2.1958**, HV loss **+0.1146**; +- `dominance_preservation`: IGD+ loss **+0.1000**, HV loss **+0.1088**. + +### Interpretation + +This is a stress-limit counterexample to treating current support as a safety certificate. The policy selected by `size_span` was explicitly marked supported, yet its Reduced optimization was drastically worse than Full by IGD+ and lost essentially all relative HV. + +The unsupported dominance-selected candidate happened to degrade much less, but that does **not** mean the support warning should be ignored. The important conclusion is narrower: + +> Under severe distortion of `Y`, support inferred from that same `Y` can itself be wrong about downstream reduction safety. + +Therefore `SUPPORTED_REDUCTION` is evidence conditional on the observed data, not a guarantee against arbitrary observation noise. + +## Stress B — both rankings supported, DTLZ5 + +Condition: + +```text +DTLZ5 +sigma = 1.0 +observation_seed = 404 +``` + +Discovery returned structural dimension 3 and both policies were `SUPPORTED_REDUCTION`: + +- `size_span`: `f1,f9,f10` +- `dominance_preservation`: `f2,f8,f10` + +Protocol: population 240, 800 generations, five matched MOEA seeds; all outputs evaluated in the original ten-objective clean DTLZ5 space against the same calibration. + +Mean final metrics: + +| treatment | GD+ | IGD+ | relative HV | +|---|---:|---:|---:| +| Full | 5.3747 | 0.3340 | 0.1146 | +| Reduced / `size_span` | **1.4551** | **0.03755** | **0.8386** | +| Reduced / `dominance_preservation` | 3.2290 | 0.85475 | 0.5537 | + +Oriented mean loss relative to Full: + +- `size_span`: IGD+ loss **-0.2964**, HV loss **-0.7240** — clearly better than Full; +- `dominance_preservation`: IGD+ loss **+0.5208**, HV loss **-0.4391** — mixed aggregate behavior. + +The mean alone understates the instability of the dominance-selected reduction. Its final IGD+ across the five MOEA seeds was approximately + +```text +0.304, 2.431, 0.353, 0.352, 0.834 +``` + +whereas `size_span` remained tightly around + +```text +0.032, 0.040, 0.041, 0.037, 0.039 +``` + +Thus this stress case provides direct end-to-end evidence for the intuition that a structural ranking can be safer when observed dominance geometry is strongly corrupted, even though both candidates pass the current support assessment. + +## Stress C — both rankings supported, DPF1 + +Condition: + +```text +DPF1 +sigma = 2.0 +observation_seed = 505 +``` + +Discovery returned structural dimension 3 and both policies were supported: + +- `size_span`: `f4,f6,f10` +- `dominance_preservation`: `f1,f2,f7` + +Mean final metrics: + +| treatment | GD+ | IGD+ | relative HV | +|---|---:|---:|---:| +| Full | 0.003519 | 0.032929 | 0.90075 | +| Reduced / `size_span` | **0.000473** | 0.008508 | 0.93815 | +| Reduced / `dominance_preservation` | 0.000589 | **0.008356** | **0.94215** | + +Both reductions clearly outperform Full and are very close to each other. `size_span` is slightly better on GD+; `dominance_preservation` is slightly better on IGD+ and HV. This case does not support a universal `noisy -> size_span` rule. + +## What the stress tests establish + +The combined evidence now supports a more careful picture. + +### 1. Clean / representative `Y` + +Issue #83 showed that `dominance_preservation` can choose a much better optimization-relevant MIS than `size_span` when the observed geometry is trustworthy. The clean DTLZ5 result is the strongest example. + +### 2. Noisy `Y` + +`dominance_preservation` is more exposed to distortions in observed dominance geometry. The DTLZ5 supported-stress condition shows that this can produce a substantially worse and less stable downstream reduction than `size_span` even while both reductions are marked supported. + +However, DPF1 shows that high noise does not automatically make `size_span` superior. Both policies can remain operationally safe and nearly equivalent. + +### 3. Support / abstention + +The DTLZ5 `sigma=2.0`, seed 101 condition shows that the present support assessment cannot serve as an unconditional safety gate when the input matrix itself is severely corrupted. A supported candidate can still be operationally unsafe. + +This does not invalidate the support mechanism in its intended data regime. It identifies its epistemic boundary: support is inferred from `Y`, so sufficiently bad `Y` can mislead both structural inference and ranking. + +## Current working hypothesis + +The evidence is consistent with, but does not yet prove, a noise-aware decision rule of the form + +```text +poor structural/support evidence -> abstain +credible low-noise Y -> dominance_preservation is attractive +known noisy / uncertain Y -> prefer a conservative structural policy or abstain +``` + +Two qualifications are now essential: + +- `size_span` is **not** proven universally safer under noise; +- `SUPPORTED_REDUCTION` is **not** sufficient by itself when data quality is poor. + +Therefore the unresolved variable is increasingly not another ranking score derived from the same `Y`, but **how much confidence should be placed in `Y` itself**. External information about observation noise, replicates, or eventually `(X,Y)` may be needed to move beyond this limit. + +## Reproducibility + +The branch now contains: + +- `benchmarks/run_noisy_ranking_safety.py` — noisy screening map; +- `benchmarks/run_noisy_ranking_optimization.py` — established controlled noisy end-to-end audit; +- `benchmarks/run_noisy_dtlz5_stress_optimization.py` — DTLZ5 support-boundary probe; +- `benchmarks/run_noisy_moeabench_stress_optimization.py` — supported DTLZ5/DPF1 ranking stress audit; +- `tests/test_noisy_ranking_safety.py` — deterministic reproduction tests for the selected noisy conditions; +- `.github/workflows/noisy-ranking-safety.yml` — reproducible screening and opt-in scientific jobs. + +No public ranking default is changed by this work. + +## Bottom line + +The simple narrative + +```text +clean -> dominance +noisy -> size_span +``` + +is directionally useful but too strong as a scientific conclusion. + +A better statement from the current evidence is: + +> `dominance_preservation` appears more optimization-aware when `Y` is representative, but it is more vulnerable to corrupted dominance geometry. `size_span` can be substantially safer in a noisy ranking failure, yet neither structural support nor structural ranking can guarantee safety when the observed data are severely distorted. + +This places the next methodological question at the **data-confidence layer**, not merely at the ranking layer. From 346eff67d027370dea8cb5cdb4bbe3b0f7e52650 Mon Sep 17 00:00:00 2001 From: "Dr. Monaco F. J." Date: Thu, 1 Oct 2026 13:52:55 -0300 Subject: [PATCH 32/32] Record noise-scale interpretation and default ranking hypothesis --- ...licy-noise-scale-and-default-hypothesis.md | 133 ++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 docs/research-notes/2026-10-ranking-policy-noise-scale-and-default-hypothesis.md diff --git a/docs/research-notes/2026-10-ranking-policy-noise-scale-and-default-hypothesis.md b/docs/research-notes/2026-10-ranking-policy-noise-scale-and-default-hypothesis.md new file mode 100644 index 00000000..109b482a --- /dev/null +++ b/docs/research-notes/2026-10-ranking-policy-noise-scale-and-default-hypothesis.md @@ -0,0 +1,133 @@ +# Ranking policy, noise scale, and revised default hypothesis + +- Period: 2026-10-01 +- Tracking: issues #83 and #84 +- Branch: `issue-84-noisy-ranking-safety` +- Related notes: `2026-10-ranking-policy-default-audit.md`, `2026-10-noisy-ranking-safety.md`, `2026-10-noisy-ranking-supported-stress.md` +- Status: **design hypothesis recorded; no public default changed in this branch** + +## Why revisit the default question + +The earlier default-policy audit correctly rejected a premature promotion of `dominance_preservation`: noisy finite-sample Pareto diagnostics could favor a representative that disagreed with clean-sample truth, and bootstrap stability did not solve that identifiability problem. + +Subsequent end-to-end optimization evidence changed the interpretation of that result. + +Issue #83 showed that, when discovery data are clean/representative, `dominance_preservation` can choose a substantially better optimization-relevant MIS than `size_span`. Issue #84 then showed that moderate additive observation noise did not immediately destabilize the DTLZ5/DPF1 choices; operational failures appeared only in deliberately high-noise stress regimes. + +The central question is therefore no longer simply whether dominance-based ranking is more sensitive to noise. It is whether that sensitivity becomes practically relevant inside a data-quality regime in which objective-reduction inference is itself still reasonable. + +## Noise scale used in the experiments + +The controlled observation model is + +\[ +Y_j = Z_j + \sigma\,s_j\,\varepsilon_j, +\qquad \varepsilon_j \sim N(0,1), +\] + +where `s_j` is the clean sample standard deviation of objective `j`. + +Under the idealized assumptions of independent additive error and using the clean variance as signal variance, + +\[ +\mathrm{NSR}=\frac{\mathrm{Var}(\text{noise})}{\mathrm{Var}(Z)}=\sigma^2, +\] + +and the fraction of observed variance attributable to the clean signal is + +\[ +R=\frac{\mathrm{Var}(Z)}{\mathrm{Var}(Y)}=\frac{1}{1+\sigma^2}. +\] + +`R` is the classical reliability ratio for this additive-error model. This interpretation is specific to the experiment's noise model; MISDA does not estimate `R` from an arbitrary observed `Y`. + +| sigma | noise/signal variance (NSR) | signal fraction / reliability R | +|---:|---:|---:| +| 0.05 | 0.25% | 99.75% | +| 0.10 | 1% | 99.01% | +| 0.20 | 4% | 96.15% | +| 0.40 | 16% | 86.21% | +| 0.80 | 64% | 60.98% | +| 1.00 | 100% | 50.00% | +| 2.00 | 400% | 20.00% | + +Thus `sigma=0.40` is already a substantial perturbation: the noise variance is 16% of the clean-signal variance and about 14% of the total observed variance is noise. It should not be described as nearly clean. + +## Empirical boundary observed in DTLZ5/DPF1 + +For the DTLZ5 and DPF1 clean controls used in issue #83, neither ranking policy changed its selected MIS for any of five observation seeds throughout the ordinary grid up to `sigma=0.40`. + +The high-noise stress probe showed the first DTLZ5 selection instability only beyond that ordinary range. At approximately `sigma=0.8`, selection changes began to appear; at `sigma=1.0` a supported DTLZ5 condition produced a clear end-to-end ranking failure for `dominance_preservation`, while `size_span` remained operationally strong. DPF1 remained less discriminating and did not establish a universal noisy-data advantage for `size_span`. + +The important scale observation is that the demonstrated DTLZ5 failure occurred around + +\[ +\mathrm{NSR}=1, +\qquad R=0.5, +\] + +that is, a regime in which noise variance is as large as signal variance. The more extreme support-boundary counterexample at `sigma=2` corresponds to noise variance four times the signal variance. + +These stress results remain scientifically useful because they expose failure modes, but they should not be interpreted as evidence that `dominance_preservation` is fragile under small or moderate measurement noise. + +## Revised interpretation of the two policies + +The accumulated evidence supports the following functional distinction. + +- `dominance_preservation` is **optimization-oriented**: when observed `Y` is representative of the underlying objective geometry, it has direct evidence of selecting better downstream reductions than `size_span`. +- `size_span` is **structural/conservative**: it can be substantially safer when the observed dominance geometry is strongly corrupted, but it is not universally superior under noise. + +The stress experiments therefore move the default-policy question away from the earlier formulation + +```text +noise exists -> keep size_span by default +``` + +and toward + +```text +objective-reduction inference assumes Y is sufficiently informative; +within that intended regime, dominance_preservation is the better-motivated default; +size_span remains an explicit conservative structural alternative. +``` + +This is a **design hypothesis**, not yet a normative API decision. A public default change should be recorded separately in an ADR/implementation issue if adopted. + +## Responsibility boundary + +MISDA should continue to detect and report internal evidence that a reduction is unsupported. However, it cannot be required to recover the clean objective geometry from an arbitrarily corrupted single `Y` without additional information. + +In particular, a sufficiently high observation-noise regime is fundamentally a data-quality problem. Because support, graph structure, and ranking are all inferred from `Y`, severe corruption can mislead all three. No ranking policy derived only from that same matrix can provide an unconditional safety guarantee. + +This does not mean "bad data are the user's fault". It means the methodological contract must state the assumption clearly: objective-reduction recommendations are conditional on `Y` being sufficiently informative about the system being optimized. + +## Consequence for `profile()` + +This conclusion should not turn `profile()` into a supposed noise detector. + +The intended role of `profile()` is structural: characterize how the discovered objective geometry behaves across the threshold/aggressiveness path, including dimensions, graph regimes, separation, candidate support, and structural discontinuities. + +A profile can say, in effect, + +> "Given this observed `Y`, the inferred reduction is structurally well or poorly supported." + +It cannot, from one arbitrary matrix alone, generally say + +> "This `Y` has reliability 0.86" or "the observed dominance geometry is the clean geometry." + +The experiments in issue #84 explicitly demonstrate this distinction: a stable/supported structure can still be misleading when the observations themselves are severely distorted. + +## Current design hypothesis + +A concise current position is: + +```text +poor structural support -> abstain +adequate structural support -> ranking is meaningful +adequate support + informative Y -> dominance_preservation is the leading default candidate +known poor/uncertain data quality -> size_span may be preferred, or abstain +``` + +The last branch requires external or additional evidence about data quality; `profile()` alone cannot generally supply it. + +No default is changed by this note. \ No newline at end of file