COMPO · 4.04 · MASS CALIBRATION / TARGET SCORING / REGRESSION

Calibration,
scoring &
tests.

Финальный модуль темы 4: frozen calibration profiles для cross-object mass domain, explicit-target local mass fit и consolidated regression 4.00–4.04. Calibration не переопределяет source metrics, scorer не превращает mass в universal quality и не захватывает balance/hierarchy.

ModuleCompo 4.04
Scopecalibration + local scorer
Regression4.00–4.04
PrimarylocalMassFit
Topic4 · MASS
NextTOPIC 4 AUDIT

Calibration config + scorer + regression

00 / module api

4.04 закрывает тему 4, но не смешивает роли: calibration profile — frozen configuration, scorer — downstream consumer отношений 4.03, regression suite — contract oracle.

CALIBRATION

Приводит разнородные owner mass magnitudes к одному declared domain без перехвата ownership.

SCORING

Оценивает только explicit MassTarget; без target — N/A.

REGRESSION

Проверяет Topic 4.00–4.04 и anti-double-counting boundaries.

NO SAME-PASS LEARNING LOOP. CalibrationProfile не обучается на той же сцене, которую сейчас оценивает. Profile frozen during evaluation; изменение profile запускает новый recompute pass.

MassCalibrationProfile

01 / canonical domain

Point, line и shape могут иметь разные исходные числовые шкалы. Calibration делает их сопоставимыми, но исходные метрики остаются у своих owners.

Profile

MassCalibrationProfile {
  profileId,
  version,
  canonicalDomainRef,
  sourceAdapters{},
  fitDatasetRef?,
  validityScope,
  confidence,
  provenance,
  frozenDuringEvaluation:true
}

Adapter

source metric
  ↓
monotonic mapping
  ↓
CalibratedMassValue {
  sourceMassRef,
  calibratedValue,
  canonicalDomainRef,
  profileId/version,
  confidence
}
OWNER RETAINED. Calibration не превращает `Point.visualWeightBase` в metric 4.04. Она публикует derived calibrated evidence со ссылкой на owner source.

Mapping families

02 / mapping rules

Canonical profile должен быть воспроизводимым, положительным и по умолчанию monotonic.

KindReference formUse
IDENTITYy=xsource уже в canonical domain
LINEAR_POSITIVEy=a·x+b, constrained y≥0простая scale/offset calibration
LOG_AFFINE_POSITIVEy=exp(a·ln(x+ε)+b)широкий положительный dynamic range
PIECEWISE_MONOTONICmonotonic interpolation knotsempirical calibrated response
NO SCENE-SPECIFIC MIN-MAX NORMALIZATION. Нельзя каждый раз растягивать текущий set от 0 до 1: тогда relation magnitude зависит от состава сцены и исчезает cross-scene comparability.

Как calibration не создаёт цикл

03 / pass architecture

Файл 4.04 хранит profile contract, но runtime использует profile как upstream config.

STATIC CONFIG: 4.04 MassCalibrationProfile ↓ SOURCE BRANCHES: Point / Line owner evidence → 4.00 adapter Shape resolved geometry → 4.01 raw intrinsic mass ↓ 4.04 frozen calibration profile maps selected source evidence and PRESERVES stage + context lineage ↓ 4.02 contextual mass ↓ 4.03 relations ↓ 4.04 target-aware scorer If calibration profile changes: DO NOT patch final score only → dirty 4.00/4.01-adaptation as applicable → recompute 4.02 → recompute 4.03 → recompute 4.04

MassTarget

04 / explicit target

Все quality-like interpretations появляются только здесь и только относительно target.

MassTarget

{
  targetId,
  comparisonSetRef,
  absoluteBands?,
  pairTargets?,
  orderTargets?,
  shareTargets?,
  requiredComponents[],
  optionalComponents[],
  componentWeights{},
  missingEvidencePolicy,
  calibrationProfileRef,
  provenance
}

No target

mass magnitudes → available
relations → available
shares/order → available

absoluteBandFit = N/A
pairRelationFit = N/A
orderFit = N/A
shareFit = N/A
localMassFit = N/A

Четыре component families

05 / fit components

Каждый component — target-relative interpretation существующих descriptors.

ComponentInputMeaning
absoluteBandFitcalibrated/contextual massпопадает ли объект в explicit mass band
pairRelationFit4.03 logRatio/order/equivalenceсоответствует ли explicit pair relation target
orderFit4.03 orderingдоля выполненных precedence constraints
shareFit4.03 massShareпопадает ли set-relative share в target interval
NO IMPLICIT COMPONENT. Если target не содержит pair/order/share/absolute constraints, соответствующий fit = N/A, а не 1.

Composite-first localMassFit

06 / canonical export

Как и в зрелых частях COMPO, наружу идёт один primary composite vote.

PRIMARY

localMassFit

key:
  visualMass.system.localMassFit

owner:
  Compo4.04

scoringGroup:
  VISUAL_MASS_TARGET_FIT

composite: true
componentOf: null
independentVoteAllowed: false
COMPONENTS

Diagnostic by default

absoluteBandFit
pairRelationFit
orderFit
shareFit

componentOf:
  visualMass.system.localMassFit
localMassFit = weightedMeanApplicable([ absoluteBandFit, pairRelationFit, orderFit, shareFit ]) No explicit MassTarget → localMassFit = N/A

Coverage и confidence

07 / missing evidence

Отсутствующий required component не маскируется нулём.

targetCoverage = coveredExpectedComponentFamilies / expectedComponentFamilies evidenceCoverage = coveredExpectedTargetWeight / totalExpectedTargetWeight localMassConfidence = evidenceConfidence × calibrationConfidence × evidenceCoverage Missing policy: REQUIRE_REQUIRED DIAGNOSTIC_IF_REQUIRED_MISSING SCORE_WITH_COVERAGE
CONFIDENCE ≠ FIT. Candidate может очень хорошо соответствовать target по имеющимся данным, но иметь низкий confidence из-за слабой calibration/evidence coverage.

Mass fit всё ещё не global composition

08 / ownership barriers

Закрытие темы 4 не даёт права захватить balance/hierarchy.

TOPIC 5

Free space

Не участвует в 4.04 mass fit.

GLOBAL

Balance

Mass relations — вход для balance, но не его verdict.

GLOBAL

Hierarchy

Mass target может описать желаемую тяжесть, но не semantic importance.

GLOBAL

Eye flow

Никакой trajectory/attention path оценки здесь нет.

Topic 4 regression coverage

09 / regression matrix

4.04 проверяет всю цепочку 4.00–4.04, но suite не становится владельцем метрик предыдущих файлов.

ModuleBarrier
4.00point/line local weight ownership retained; evidence stages; anti-double-context
4.01hullOccupancy namespace; area normalization; alpha density; no area×occupancy double count
4.02owner-qualified context; missing≠neutral; upstream lineage suppression
4.03same domain/stage comparability; scale-invariant ratios/shares; mass order≠hierarchy
4.04frozen calibration; no target→N/A; composite-first; no global leakage

Visual Lab

10 / visual lab

Один relation set может хорошо подходить одному mass target и плохо другому — descriptors при этом не меняются.

A · SOURCE DOMAINS → CALIBRATION POINT .72 LINE 1.40 SHAPE .31 N² MassCalibrationProfile → canonical mass:v1 frozen during evaluation B · SAME MASS RELATIONS / DIFFERENT TARGETS relations fixed A > B > C TARGET X A dominant B≈0.6 A localMassFit HIGH TARGET Y A≈B≈C same descriptors localMassFit LOW target-relative fit ≠ universal quality balance / hierarchy / negative space remain outside Topic 4

Topic 4 consolidated regression

11 / deterministic tests

Reference runner проверяет calibration, target components, composite contract и ключевые boundaries всей темы.

Tests not run yet.

DATA FOR LAYOUT ENGINE

12 / machine contract

Финальный machine contract темы 4.

{
  "module": "Compo 4.04",
  "name": "visual_mass_calibration_target_scoring_and_regression",
  "version": "1.1-corrective",
  "scope": "CALIBRATION_PROFILE_PROVIDER_TARGET_AWARE_LOCAL_MASS_SCORING_AND_TOPIC4_REGRESSION",
  "consumes": [
    "Compo4.00.VisualMassDescriptor / MassEvidenceRef / stage model",
    "Compo4.01.ShapeGeometricMassResult",
    "Compo4.02.CrossObjectContextMassResult",
    "Compo4.03.MassRelationSet / PairMassRelation / MassOrderingResult",
    "legacy owner evidence from Compo1.01 / Compo2.06 through Compo4.00 adapters",
    "MassCalibrationProfile (static config owned here)",
    "MassTarget",
    "StylePreset.massTarget?"
  ],
  "provides": [
    "MassCalibrationProfile",
    "MassCalibrationRegistry",
    "CalibratedMassValue",
    "MassTarget",
    "MassTargetComponentResult[]",
    "MassTargetScoreResult",
    "MetricResult[visualMass.system.localMassFit]",
    "Topic4RegressionCase[]",
    "Topic4RegressionSuite",
    "MassScoringInput"
  ],
  "owns_metrics": [
    "visualMass.system.absoluteBandFit",
    "visualMass.system.pairRelationFit",
    "visualMass.system.orderFit",
    "visualMass.system.shareFit",
    "visualMass.system.localMassFit",
    "visualMass.system.confidence"
  ],
  "descriptors_only": [
    "visualMass.system.targetCoverage",
    "visualMass.system.evidenceCoverage",
    "visualMass.system.calibrationCoverage",
    "visualMass.system.componentBreakdown",
    "visualMass.system.suppressionLog",
    "visualMass.system.status",
    "visualMass.system.profileVersion"
  ],
  "calibration_profile_schema": {
    "profileId": "string",
    "version": "string",
    "canonicalDomainRef": "string",
    "sourceAdapters": "map sourceKind/metricRef -> monotonic mapping spec",
    "mappingKinds": [
      "IDENTITY",
      "LINEAR_POSITIVE",
      "LOG_AFFINE_POSITIVE",
      "PIECEWISE_MONOTONIC"
    ],
    "outputDomain": "finite >=0",
    "fitDatasetRef": "optional external empirical dataset reference",
    "validityScope": "declared population/rendering/style scope",
    "confidence": "0..1",
    "provenance": "EMPIRICAL|STYLE_PRESET|INITIAL_HEURISTIC|STANDARD",
    "frozenDuringEvaluation": "true"
  },
  "calibration_policy": {
    "goal": "map heterogeneous owner mass magnitudes to one declared comparable canonical domain without stealing owner metric ownership",
    "monotonicity": "required within each source adapter unless an explicit empirical profile documents otherwise; default canonical profiles require monotonic increasing mappings",
    "nonnegative_output": "required",
    "identity_when_already_domain_matched": "preferred",
    "profile_is_configuration": "profile is not learned/refit from the scene being scored in the same pass",
    "profile_change": "invalidates/adapts 4.00 evidence then recomputes 4.02, 4.03 and 4.04",
    "lineage_preservation": "calibration changes numeric domain only; stage/derivedFrom/already-applied context lineage must be preserved",
    "profile_version_propagation": "profileId@version must propagate into 4.02 contextual mass and 4.03 relation sets"
  },
  "calibrated_mass_schema": {
    "objectRef": "string",
    "sourceMassRef": "owner-qualified source metric ref",
    "sourceKind": "POINT|LINE|SHAPE|TEXT|IMAGE|GROUP|CUSTOM",
    "sourceValue": "finite >=0",
    "calibratedValue": "finite >=0",
    "canonicalDomainRef": "profile canonicalDomainRef",
    "profileId": "string",
    "profileVersion": "string",
    "confidence": "0..1",
    "provenance": "object",
    "inputStage": "INTRINSIC|LOCAL_CONTEXTUALIZED preserved from source evidence",
    "alreadyAppliedContextRefs": "refs[] preserved through calibration",
    "alreadyAppliedChannels": "channels[] preserved through calibration",
    "sourceDerivedFrom": "refs[] preserved from owner evidence"
  },
  "mass_target_schema": {
    "targetId": "string",
    "comparisonSetRef": "string",
    "absoluteBands": "optional map objectRef -> [min,max] in canonical calibrated domain",
    "pairTargets": "optional [{aRef,bRef,logRatioRange? | order? | equivalence?}]",
    "orderTargets": "optional ordered tiers / precedence constraints",
    "shareTargets": "optional map objectRef -> [minShare,maxShare]",
    "requiredComponents": "subset ABSOLUTE_BAND|PAIR_RELATION|ORDER|SHARE",
    "optionalComponents": "same enum",
    "componentWeights": "positive finite map",
    "missingEvidencePolicy": "REQUIRE_REQUIRED|DIAGNOSTIC_IF_REQUIRED_MISSING|SCORE_WITH_COVERAGE",
    "calibrationProfileRef": "required profile id/version",
    "provenance": "STYLE_PRESET|EMPIRICAL|INITIAL_HEURISTIC"
  },
  "metric_exports": {
    "primary_vote": {
      "key": "visualMass.system.localMassFit",
      "owner": "Compo4.04",
      "scoringGroup": "VISUAL_MASS_TARGET_FIT",
      "composite": true,
      "componentOf": null,
      "dependsOn": [
        "visualMass.system.absoluteBandFit",
        "visualMass.system.pairRelationFit",
        "visualMass.system.orderFit",
        "visualMass.system.shareFit"
      ],
      "derivedFrom": [
        "Compo4.03.MassRelationSet",
        "Compo4.02.CrossObjectContextMassResult[]",
        "MassTarget"
      ],
      "independentVoteAllowed": false
    },
    "components": [
      {
        "key": "visualMass.system.absoluteBandFit",
        "componentOf": "visualMass.system.localMassFit",
        "scoringGroup": "VISUAL_MASS_TARGET_FIT",
        "independentVoteAllowed": false
      },
      {
        "key": "visualMass.system.pairRelationFit",
        "componentOf": "visualMass.system.localMassFit",
        "scoringGroup": "VISUAL_MASS_TARGET_FIT",
        "independentVoteAllowed": false
      },
      {
        "key": "visualMass.system.orderFit",
        "componentOf": "visualMass.system.localMassFit",
        "scoringGroup": "VISUAL_MASS_TARGET_FIT",
        "independentVoteAllowed": false
      },
      {
        "key": "visualMass.system.shareFit",
        "componentOf": "visualMass.system.localMassFit",
        "scoringGroup": "VISUAL_MASS_TARGET_FIT",
        "independentVoteAllowed": false
      }
    ]
  },
  "scoring_policy": {
    "explicit_target_required": true,
    "no_target": "DIAGNOSTIC_ONLY_LOCAL_SCORE_NA",
    "profile_match_required": true,
    "component_fit_domain": "0..1",
    "primary_score": "weighted mean applicable component fits",
    "components_of_primary": "diagnostic-only when primary composite is active",
    "N_A": "exclude, never zero-fill",
    "required_missing": "handled only by MassTarget.missingEvidencePolicy",
    "targetCoverage": "covered expected component families / expected component families",
    "evidenceCoverage": "covered expected target weight / total expected target weight",
    "confidence": "evidence confidence × calibration confidence × evidenceCoverage",
    "higher_fit": "means closer to explicit mass target only; not universal composition quality"
  },
  "component_fit_policy": {
    "absoluteBandFit": "1 inside target band; bounded decay outside using band-relative distance",
    "pairRelationFit": "compare 4.03 logRatio/order/equivalence descriptors to explicit target",
    "orderFit": "fraction of explicit precedence constraints satisfied, weighted if supplied",
    "shareFit": "1 inside target share interval; bounded decay outside",
    "no_implicit_target": "if a component family has no target constraints, it is N/A and excluded",
    "constraint_coverage": "each component family tracks available explicit constraints / total explicit constraints; partial family evidence lowers evidenceCoverage and may block required components"
  },
  "regression_scope": {
    "covers": [
      "Compo4.00",
      "Compo4.01",
      "Compo4.02",
      "Compo4.03",
      "Compo4.04"
    ],
    "owns_design_metrics": false,
    "baseline_policy": "expected outputs change only with explicit documented contract migration",
    "required_barriers": [
      "legacy point/line ownership retained",
      "no double contextualization",
      "4.01 occupancy namespace remains hullOccupancy",
      "4.01 canonical mass does not multiply occupancy twice",
      "4.02 missing context is not neutral zero evidence",
      "4.03 mixed domains/stages are incomparable",
      "mass order is not hierarchy",
      "mass share is not balance",
      "calibration profile frozen during evaluation",
      "no-target score is N/A",
      "no global leakage"
    ]
  },
  "hard_constraints": [
    "calibration maps source metrics but does not re-own them",
    "calibration profile is immutable during one evaluation pass",
    "scene being scored must not be used to refit its own calibration profile in the same pass",
    "profile mappings must return finite nonnegative values",
    "canonical default mappings must be monotonic increasing",
    "cross-object scoring requires matching calibration profile/domain",
    "4.04 must not reapply 4.02 context modifiers",
    "4.04 must not recompute 4.01 area/density or 4.03 relations under new aliases",
    "ratio/logRatio/share/order remain descriptors and may only affect score through explicit MassTarget",
    "components of localMassFit are diagnostic-only when the composite is active",
    "no explicit MassTarget means localMassFit=N/A",
    "missing required evidence is never injected as zero",
    "high mass is not universally good; low mass is not universally good",
    "mass fit is local Topic4 fit, not global balance/hierarchy",
    "negative space remains Topic5",
    "global balance/hierarchy/eye-flow remain future owners",
    "no beautyScore",
    "CalibratedMassValue must preserve source MassEvidenceStage and already-applied context lineage",
    "scoring input comparisonSetRef must match MassTarget.comparisonSetRef",
    "scoring input calibrationProfileRef/profile version and canonicalDomainRef must match the active profile",
    "invalid/nonpositive component weights are target errors, not silently replaced with defaults",
    "partial evidence inside a target component family must not silently drop missing object/pair/share/order constraints",
    "pair target lookup must support a reversed 4.03 pair relation by mathematically reversing its descriptors",
    "default canonical LINEAR_POSITIVE and LOG_AFFINE_POSITIVE mappings must be monotonic increasing over the declared nonnegative source domain"
  ],
  "initial_heuristics": {
    "default_outside_band_decay": {
      "value": 1.0,
      "provenance": "INITIAL_HEURISTIC"
    },
    "default_component_weight": {
      "value": 1.0,
      "provenance": "INITIAL_HEURISTIC"
    },
    "calibration_confidence_floor_for_ranking": {
      "value": 0.25,
      "provenance": "INITIAL_HEURISTIC"
    },
    "score_epsilon": {
      "value": 0.015,
      "provenance": "INITIAL_HEURISTIC"
    }
  },
  "correction_policy": {
    "foreign_mass_mutation": "FORBIDDEN",
    "absolute_mass_mismatch": "emit desired calibrated-mass direction; solver chooses owner parameter later",
    "pair_relation_mismatch": "consume 4.03 relation and emit relation correction request",
    "order_mismatch": "emit precedence correction intent only",
    "share_mismatch": "emit set-relative share correction intent only",
    "calibration_mismatch": "request explicit compatible MassCalibrationProfile; do not auto-fit from current scene",
    "balance_issue": "route to future global balance owner",
    "hierarchy_issue": "route to future hierarchy owner"
  },
  "deferred_inputs": [
    "Topic5 positive/negative space",
    "future global balance",
    "future hierarchy/focal-point owner",
    "empirical perceptual calibration datasets",
    "future Text/Image/Group source adapters"
  ],
  "recompute_when": [
    "calibration profile/version changes",
    "calibrated source mass changes",
    "4.02 contextual mass changes",
    "4.03 relation set changes",
    "MassTarget changes",
    "component weights/missing evidence policy changes"
  ],
  "finality": "TOPIC4_CALIBRATION_LOCAL_SCORING_AND_REGRESSION_ONLY",
  "mass_scoring_input_schema": {
    "comparisonSetRef": "must match MassTarget.comparisonSetRef",
    "calibrationProfileRef": "must exactly match target profileId@version",
    "canonicalDomainRef": "must match active profile canonicalDomainRef",
    "masses": "map objectRef->finite calibrated/contextual mass",
    "pairRelations": "4.03 relations from same set/profile/domain",
    "ordering": "4.03 ordering from same set/profile/domain",
    "massShares": "4.03 shares from same set/profile/domain",
    "evidenceConfidence": "0..1"
  }
}
ARCHITECTURE CHECKPOINT · 4.04 OWNS STATIC/FROZEN MASS CALIBRATION PROFILE CONTRACT, TARGET-RELATIVE TOPIC4 FIT AND CONSOLIDATED REGRESSION ONLY. CALIBRATION MAPS OWNER METRICS WITHOUT RE-OWNING THEM. PROFILE IS NOT REFIT FROM THE CURRENT SCENE DURING THE SAME PASS. 4.04 DOES NOT REAPPLY 4.02 CONTEXT, RECOMPUTE 4.01 GEOMETRY OR 4.03 RELATIONS. LOCALMASSFIT IS ONE COMPOSITE PRIMARY VOTE AND IS N/A WITHOUT EXPLICIT TARGET. TOPIC5 FREE SPACE AND GLOBAL BALANCE/HIERARCHY/EYE-FLOW REMAIN DEFERRED. NO BEAUTYSCORE.
VISITS / ...