COMPO · 29.01 · SHAPE / SIZE SIMILARITY

Compare by channel.
Keep the evidence source.

29.01 создаёт первые channel-local `SimilarityRelation` для SHAPE и SIZE. Shape использует explicit normalized comparator evidence, SIZE — симметричный descriptor `|ln(sizeA/sizeB)|`. Distance остаётся descriptor, а similarity score, thresholds и clusters пока отсутствуют.

Module29.01
Progress2/5 local
ChannelsSHAPE · SIZE
Relationssymmetric
Metricsnone
Next29.02 only

Two channel-local comparison contracts

29.00 remains immutable. Comparisons are explicit, bounded and pair-specific.

00 / contract
29.00 feature schema + explicit unordered pair request + exact same channel / same feature slot + SHAPE comparator evidence OR SIZE value evidence → feature distance → symmetric SimilarityRelation NO Cartesian pair generation NO cross-slot inference NO shape+size averaging NO thresholding NO clustering NO scoring

Pair identity is canonical and unordered

A↔B and B↔A refer to one comparison identity. Unrequested pairs remain absent.

01 / explicit pair

Only requested pair materializes

ABCA↔B requestedB↔C absentrequest ≠ Cartesian product

Shape metric remains comparator-owned

29.01 accepts normalized [0,1] shape-distance evidence with comparator identity. It does not invent a universal contour/embedding metric.

02 / SHAPE
shape payload A

29.00 lineage

+
shape payload B

same slot

→
comparator owner

distance + normalization contract

→
29.01

0 ≤ d ≤ 1

d=0

Comparator equality

Equality under that comparator only.

d=.4

Descriptor

Not an automatic “60% similar”.

d=1

Not universal

Maximum only under the supplied normalization contract.

Size uses absolute log ratio

For positive values in the same explicit unit, the distance is symmetric and scale-invariant.

03 / SIZE
sizeRatio = max(a,b) / min(a,b) sizeDistance = | ln(a/b) | 100 ↔ 100 → 0 100 ↔ 200 → ln(2) ≈ 0.693147 100 ↔ 400 → ln(4) ≈ 1.386294 range = [0,+∞) no clamping no perceptual-law claim

Equal size vs 2× ratio

d=0d=ln(2)

Like-with-like requires one exact slot

Primary shape cannot be silently compared with alternate contour; one size definition cannot be mixed with another.

OK

primary ↔ primary

Same channel and same `featureSlotRef`.

N_A

primary ↔ alternate

No automatic cross-slot comparison.

`SimilarityRelation` carries distance lineage only

Channel-local relation stays symmetric; score, threshold and cluster fields remain null/empty.

05 / relation

Relation shell

SimilarityRelationchannel = SHAPE | SIZEdistanceValue = descriptorsimilarityScore = nullthresholdDecision = nullclusterRefs = []

Zero is evidence; N_A is absence

Equal sizes or comparator equality can legitimately yield zero. Missing evidence or unit mismatch yields N_A; nonpositive size evidence is invalid.

OK

distance=0

Valid equality observation.

N_A

missing / unit mismatch

No numeric distance fabricated.

INVALID

size≤0

Malformed size-value evidence.

Similarity relation ≠ proximity edge

Repeated objects may be far apart; adjacent objects may be dissimilar. Topic 28 topology is not read or mutated.

07 / firewall

Far but similar

low shape distance possible

Near but dissimilar

proximity does not force similarity

29.01 regression suite

Canonical pair identity, shape evidence bounds, positive same-unit size evidence, log-ratio symmetry, slot/channel lineage, immutable 29.00 schema and strict absence of cross-channel aggregation, clustering and scoring.

08 / runtime
Tests not run yet.

DATA FOR LAYOUT ENGINE

Machine contract for Topic29 shape/size layer.

09 / machine
{
  "module": "Compo 29.01",
  "canonical_main_title": "Shape/size similarity",
  "topic": "29_СХОДСТВО_И_ПОВТОРЯЕМОСТЬ",
  "scope": "EXPLICIT_SHAPE_AND_SIZE_PAIR_COMPARISON_OVER_IMMUTABLE_29_00_FEATURE_SCHEMA_WITH_CHANNEL_LOCAL_DISTANCES_ONLY",
  "main_topic_contract": {
    "topic_title": "Сходство и повторяемость",
    "topic_goal": "Измеряет сходство по независимым каналам — shape, size, color, tone, orientation, texture/style — и формирует similarity groups без потери источника сигнала.",
    "expected_output": "SimilarityRelation[], feature distances, similarity clusters",
    "planned_files": [
      "29.00 Similarity feature schema",
      "29.01 Shape/size similarity",
      "29.02 Color/tone similarity",
      "29.03 Orientation/texture/style similarity",
      "29.04 Multi-channel groups and tests"
    ]
  },
  "ownership": {
    "owner": "Compo29.01",
    "owns": [
      "SimilarityShapeSizePairRequest",
      "SimilarityShapeDistanceEvidence",
      "SimilaritySizeValueEvidence",
      "SimilarityFeatureDistanceDescriptor for SHAPE/SIZE",
      "SimilarityRelation for SHAPE/SIZE",
      "SimilarityShapeSizeRelationSet",
      "canonical unordered subject-pair identity",
      "exact same-channel feature binding",
      "exact same-slot comparison rule",
      "owner-normalized shape-distance validation",
      "absolute log size-ratio distance",
      "same-unit validation",
      "zero-distance semantics",
      "bounded explicit pair resolution",
      "non-mutating correction request"
    ],
    "does_not_own": [
      "feature extraction",
      "shape descriptor generation",
      "shape comparator internals",
      "automatic shape metric selection",
      "automatic size unit conversion",
      "color/tone similarity — Compo29.02",
      "orientation/texture/style similarity — Compo29.03",
      "multi-channel aggregation — Compo29.04",
      "similarity thresholds — Compo29.04",
      "similarity clusters — Compo29.04",
      "cross-channel weighting — Compo29.04",
      "automatic pair Cartesian product",
      "proximity grouping — Topic28",
      "attention flow — Topic27",
      "universal similarity quality",
      "universal beautyScore"
    ]
  },
  "supported_channels": [
    "SHAPE",
    "SIZE"
  ],
  "distance_kinds": [
    "OWNER_NORMALIZED_SHAPE_DISTANCE",
    "ABSOLUTE_LOG_SIZE_RATIO"
  ],
  "distance_semantics": {
    "shape": {
      "source": "explicit owner-qualified comparator evidence",
      "range": "[0,1]",
      "zero": "identical under the named comparator contract",
      "one": "maximum only inside that comparator normalization contract",
      "universal_metric_claim": false
    },
    "size": {
      "source": "explicit positive scalar SIZE evidence",
      "formula": "abs(ln(sizeA / sizeB))",
      "range": "[0,+infinity)",
      "zero": "equal positive values in same unit",
      "scale_invariant": true,
      "unit_conversion": "NONE",
      "perceptual_law_claim": false
    },
    "relation": {
      "pair_identity": "unordered canonical subject pair A↔B",
      "symmetric": true,
      "same_channel_required": true,
      "same_feature_slot_required": true,
      "similarityScore": null,
      "thresholdDecision": null,
      "clusterMembership": "DEFERRED_TO_29_04"
    }
  },
  "policy": {
    "max_pair_requests": [
      1,
      131072
    ],
    "max_shape_distance_evidence": [
      0,
      131072
    ],
    "max_size_value_evidence": [
      0,
      262144
    ],
    "overflow": "N_A_NO_TRUNCATION",
    "auto_pair_cartesian": false,
    "auto_shape_metric_selection": false,
    "auto_shape_distance_computation": false,
    "auto_size_unit_conversion": false,
    "auto_cross_slot_comparison": false,
    "auto_cross_channel_aggregation": false,
    "auto_thresholding": false,
    "auto_clustering": false,
    "auto_scoring": false
  },
  "status_semantics": {
    "OK": "valid 29.00 feature lineage plus valid SHAPE/SIZE evidence resolves one symmetric channel-local distance",
    "N_A": "missing evidence, feature/subject/slot mismatch, unit mismatch or bounds overflow",
    "INVALID": "malformed request/evidence, self-pair, duplicate identity, nonpositive size value, unsupported channel or invalid upstream schema",
    "zero": "distance 0 is valid equality evidence and never substitutes for N_A"
  },
  "firewalls": [
    "shape distance != shape similarity score",
    "size log-ratio distance != size similarity score",
    "distance zero != N_A",
    "shape distance one != universal maximum visual difference",
    "size distance != perceptual importance",
    "same shape slot != same shape value",
    "same size slot != same size value",
    "feature distance != threshold decision",
    "SimilarityRelation != similarity cluster",
    "SHAPE relation != SIZE relation",
    "shape and size relations cannot be averaged automatically",
    "pair request != Cartesian pair generation",
    "same-slot comparison != cross-slot inference",
    "unit mismatch != automatic conversion",
    "size zero value != missing size",
    "Topic29 similarity != Topic28 proximity",
    "Topic29 similarity relation != Topic28 neighbor relation",
    "Topic29 similarity != Topic27 attention flow",
    "N_A != 0",
    "INVALID != 0",
    "descriptor != score",
    "local != global",
    "geometry != interpretation",
    "heuristic != law",
    "no universal similarity threshold",
    "no universal beautyScore"
  ],
  "owns_metrics": [],
  "independent_numeric_votes": 0,
  "topic29ProgressAfterThisModule": "2/5 local",
  "next_module": "Compo 29.02 — Color/tone similarity",
  "topic30_started": false,
  "publication": "NOT_VERIFIED"
}
VISITS / ...