---
title: "coref-score-metrics — Mova code model"
description: "Mova code model of coref/src/score.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/coref/src/score.rs.groupant/metrics.groupant/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Research](https://md.research.elamur.ai/free/en/) · **Groupants**

This page as HTML: <https://groupants.elamur.ai/free/en/mova/coref/src/score.rs.groupant/metrics.groupant/>

# coref-score-metrics

The groupant beside coref/src/score.rs in the Mova repository: what the code computes, what it never does, how to go back from its outputs, its invariants, cost and checks.

## Facts

- **kind:** groupant_fragment
- **status:** partial source bound model
- **source:** [`coref/src/score.rs`](https://github.com/ElamurAI/mova-free/blob/main/coref/src/score.rs)
- **source SHA-256:** `da0433c1ce72ec0e…`
- **covers:** Map mention ids to response entities; count MUC partitions, B3 intersections and entity overlap matrix. Duplicate membership retains last owner as in legacy. (bytes 1815–4036)
- **part of:** [coref-score](https://md.groupants.elamur.ai/free/en/mova/coref/src/score.rs.groupant/)
- **repository folder:** [`coref/src/score.rs.groupant/metrics.groupant`](https://github.com/ElamurAI/mova-free/tree/main/coref/src/score.rs.groupant/metrics.groupant)
- **repository commit:** `48f2e6f74146`

> **Implementation material.** A Mova code model describes this code at one source revision: partial models, finite checks and their stated scope. It is not a reviewed general exposition, and its labels are shown as written, never raised.

## Components

| component | label | where |
|---|---|---|
| **approximant** | partial source model | [forward](#forward) |
| **ast** | partial | `../syntax.json` |
| **composition** | partial source model | [composition](#composition) |
| **cost** | partial source model | [cost](#cost) |
| **descriptant** | partial source model | [epoch-memory](#epoch-memory) |
| **invariant** | partial source model | [invariant](#invariant) |
| **tests** | partial source model | [checks](#checks) |

## Obernants

The typed relations around the forward model: the behaviour complement (what the code never does), the reverse reconstruction (every input compatible with an output) and specialised views.

| id | type | label | where |
|---|---|---|---|
| `coref-score-metrics-behavior-complement` | behavior_complement | partial source model | [behavior-complement](#behavior-complement) |
| `coref-score-metrics-reverse-reconstruction` | reverse_reconstruction | partial source model | [reverse-reconstruction](#reverse-reconstruction) |
| `coref-score-metrics-tie-selection` | tie_selection | partial source model | [tie-selection](#tie-selection) |
| `coref-score-metrics-resource-partition` | resource_partition | partial source model | [resource-partition](#resource-partition) |
| `coref-score-metrics-state-reset` | state_reset | partial source model | [state-reset](#state-reset) |
| `coref-score-metrics-observation-projection` | observation_projection | partial source model | [observation-projection](#observation-projection) |

## Model text


### forward
Map mention ids to response entities; count MUC partitions, B3 intersections and entity overlap matrix. Duplicate membership retains last owner as in legacy.

### invariant
Inputs are immutable. Matching never reuses a gold mention and never crosses key buckets. Scratch lifetime changes preserve row-entry values; each successful augmenting path increases matched rows by one. Metric ratios retain zero-denominator behavior.

### behavior-complement
On admitted normally terminating inputs, excluded observations include reused gold identities, cross-bucket pairs, a residual selection preceding a strictly higher-priority available edge, and changed assignment objective under scratch reuse. This is a necessary-condition inner model of absent outputs, not exhaustive behavior enumeration.

### reverse-reconstruction
An output admits many compatible antecedents: unmatched mentions and nonselected edge weights can vary while leaving decisions unchanged; scalar metrics forget concrete mention labels. The preimage consists of inputs inducing the same ordered exact/greedy choices and numeric counts. Uniform label renaming gives compatible partition metrics, but recovering original inputs uniquely is impossible.

### tie-selection
Exact-span matches use first available gold input; residual priorities are (negative overlap, prediction ordinal, gold ordinal). Unique edge keys remove dependence on heap stability. Hungarian strict slack improvements and ascending scans remain unchanged.

### resource-partition
Residual min side below 128, checked product above 262144 or reserve error selects original scan before mutation. Successful static ordering has at most 262144 three-usize edges and two masks. This does not bound original group maps or runtime of fallback.

### state-reset
Persistent minv and used vectors are refilled each row. Equality to freshly allocated vectors at the loop boundary gives equal subsequent operations. Values from previous rows must not leak into current search.

### observation-projection
The full matching vector and exact f64 bits are differential observations; checking only overlap totals would miss identity changes. CEAF-e fractions are not quantized. Counts and output labels are separate observables.

### cost
Legacy residual scan O(PG min(P,G)); admitted sorted path O(PG log(PG)) time/O(PG) storage. Exact-span first pass unchanged. Assignment O(r²c) time/O(r+c) scratch; two scratch allocations replace 2r. Dense overlap O(KR+mentions) space/time terms remain. Pilot threshold16 regressions led to admission128; warmed final timing remains pending.

### composition
Metrics depend on matched identities, not merely overlap objective. Exact matching then residual priority establishes ids before score_doc partitions. Hungarian component alignment retains original arithmetic order. This fragment is part of the parent scorer; fragment correctness alone does not prove end-to-end metric interpretation.

### checks
Nine focused Rust tests twice debug/release; 2694 external differential cases twice debug/release. Independent assignment enumeration and residual choice oracle, explicit tie and resource gates. Compiled mutants and restoration recorded in parent evidence.

### epoch-memory
2026-10-30 initial prospective threshold16 and resource model preceded edits; exploratory regressions at16/32 prompted prospective amendment128, the lowest measured winning size, not an optimal crossover. See epoch1-evidence.md and prospective.md for retained history. Initial zero-slack mutant survived existing nonnegative assignment oracle; the negative-cost row-reset witness detects it. Preserve signed-domain fixtures when refactoring assignment scratch.

### limitations
Valid partitions assumed for metric interpretations. Sparse-index optimization and deterministic floating reduction are not introduced. Partial syntax projection has no semantic resolution, macro expansion or general correctness proof. No corpus, teacher, GPU, model or database test. No numeric approximant attached: outputs are exact categorical/float identity comparisons rather than an approximate substitute.
