Part I

The room that moved without moving

At 08:12, a control-room dashboard marks storage room C4 as the second-highest heat risk on a site. Four fields support the ranking: 31, (18, 6), 7 and 0.64.

The first number is a temperature in degrees Celsius. The pair is the room’s location on a site map. The third is a fault code. The fourth is a modelled probability of spoilage within six hours. Every field is numerical. None has the same meaning, and none supports the same operations.

During a software migration, the temperature display changes to Fahrenheit, the site map is rotated to align north with the top of a new screen, fault codes are reissued, and the probability service starts returning log odds. The physical room, sensor state, fault and forecast have not changed. Yet the dashboard now ranks C4 ninth.

The bug is not in any conversion. Each new value can encode the same information as the old one. The bug lies downstream. A threshold remained at 30 after Celsius became Fahrenheit. A routing rule still used the first coordinate as a proxy for distance. The fault code entered a weighted average as if larger identifiers meant greater severity. A probability threshold of 0.6 was applied directly to log odds.

Numbers inherit no universal meaning. A number can measure, locate, label or express uncertainty. Its legitimate use depends on the structure that produced it and the transformations under which the intended claim should survive.

The hidden assumption in a clean dashboard

A dashboard encourages a simple intuition: once observations have become numbers, they can be sorted, averaged, thresholded and combined. That intuition is sometimes correct. Lengths measured in metres may be added. Probabilities may be marginalised. Coordinates may be transformed. It fails when the operation does not belong to the representation.

The hidden assumption is that the numerical surface preserves the empirical relation we care about, and that the next operation preserves it again. A display can look precise while breaking either bridge.

Mechanism

A representation creates an algebra

Representation is an intervention on the space of possible operations. It selects what counts as identical, ordered, adjacent, distant, probable or decodable. Software then exploits those formal relations. When the selected relation does not match the decision, the calculation is exact and the conclusion is wrong.

A four-stage causal chain runs from phenomenon through instrument and representation to decision. Each stage has a distinct failure: vague target, unvalidated bridge, erased type or a rule that does not transform with the representation.

Figure 2. The causal chain from world to action.Most representation errors occur after a valid observation has been converted into a formally convenient object. The critical question is not only whether the value is correct, but whether the downstream operation belongs to its type.Method proposed here, informed by metrological measurement models and construct-validity literature.

This leads to the paper’s central claim: conversion is not preservation unless the downstream rule transforms too. The same empirical content may have many valid expressions. A defensible decision must depend on what those expressions preserve, not on their accidental numerals.

Part II

Four instruments, four contracts

The words quantity, coordinate, code and probability are often used as if they named four file formats. They name four different ways of making a phenomenon tractable. Each has a target, an admissible transformation and a set of operations that survive that transformation.

Quantity: comparison through a reference

The International Vocabulary of Metrology defines a quantity as a property with a magnitude expressible as a number and a reference. The current SI framework also treats a reported measurement result as an estimated value accompanied by uncertainty, not as a naked exact number.1, 2, 3 A temperature reading therefore contains at least a target quantity, a unit, a measurement procedure, a value and an uncertainty claim.

A quantity is not just a numeral. “31” becomes a temperature only through a reference such as degrees Celsius and a bridge from sensor behaviour to thermodynamic temperature. Even then, the number may describe the sensor, a local air pocket or an inferred room average. The measurand must be named.

Thought experiment 1

The room at two temperatures

Room A is 10 °C and Room B is 20 °C. Is B twice as hot? Now convert them to Fahrenheit: 50 °F and 68 °F. The ratio changes from 2 to 1.36 although nothing physical changed. The ratio was never invariant under the admissible Celsius-to-Fahrenheit transformation. Temperature differences survive affine conversion when transformed correctly; raw ratios do not. Kelvin may support ratio statements about thermodynamic temperature, but it still does not follow that perceived warmth or spoilage risk doubles.

Stevens’s influential scale typology distinguished nominal, ordinal, interval and ratio scales by their admissible transformations.4 The typology is not the final word on measurement, but its durable lesson is useful: scale type controls valid algebra. An order can survive every monotone relabelling while a difference cannot. An interval can survive a change of origin and unit while a ratio cannot. Additive conjoint measurement went further by showing that attributes without direct physical concatenation can admit numerical representation when observable comparisons satisfy demanding axioms.5

Worked example 1 · Toy scale

Three cups and an illegal average

A taster ranks cups as cool < warm < hot. Encoding them as 1, 2 and 3 preserves the order. Encoding them as 10, 20 and 100 also preserves it. The average of “warm” and “hot” is 2.5 under the first code and 60 under the second. Neither result identifies a meaningful intermediate sensation. The order was measured; equal intervals were invented.

Four measurement rulers with different admissible transformations Nominal, ordinal, interval and ratio rulers are shown as distinct tracks. Each track marks what survives a valid re-expression and which operations are not licensed. What must remain true when the marks change? Nominal identity only A ↔ 42B ↔ 7C ↔ 100 Survives: same / differentNot licensed: order, mean, distance Ordinal order lowmediumhigh Survives: ranking under monotone remappingNot licensed: equal gaps Interval equal differences same gapsame gap Survives: difference after affine conversionNot licensed: raw ratio Ratio equal ratios and fixed zero zero ×1×2 Survives: ratios under unit scalingStill needs a valid measurand
Figure 3. The ruler is part of the result.The marks alone do not determine what can be calculated. Valid operations follow from the empirical relations preserved under admissible transformations, not from the fact that the marks happen to be numerals.Conceptual synthesis after Stevens (1946) and representational measurement theory. The figure does not claim that all measurement fits only four levels.

Coordinate: location relative to a frame

A coordinate is not a property carried by an object in isolation. It locates an object relative to an origin, axes, basis, chart or reference frame. Rotate the map and the coordinates change. Translate the origin and they change again. The relation of the room to an exit can remain fixed.

Coordinates are descriptions relative to a frame. Their power comes from exposing geometry to calculation. Their danger comes from treating frame-dependent components as if they were intrinsic properties.

Thought experiment 2

The rotating city

A rescue drone is at (4, 1) and a clinic is at (1, 5). A rule says “dispatch when the drone’s x-coordinate exceeds the clinic’s x-coordinate”. Rotate the map by 90 degrees. The same physical locations become (-1, 4) and (-5, 1), so the rule may still fire for this pair, but another rotation or origin shift can reverse it. A rule based on Euclidean distance, with the rotation applied consistently, survives. The first rule depended on the drawing; the second depended on the geometry.

Worked example 2 · Small calculation

A 90-degree rotation

For a point (x, y), a 90-degree counter-clockwise rotation gives (-y, x). The point (3, 4) becomes (-4, 3). Its distance from the origin remains √(3² + 4²) = 5 because √((-4)² + 3²) is also 5. The x-component changed from 3 to -4. Distance is invariant under this rotation; the component is equivariant because it changes predictably with the frame.

This distinction now appears explicitly in machine learning. Equivariant architectures are designed so that transforming an input produces a corresponding transformation of internal or output representations, while invariant outputs remain unchanged where the task requires it.6, 7 The design question is not “can the model ignore rotation?” It is “which parts should ignore it, and which should move with it?”

The same route in two rotated coordinate frames Two grids show a drone and clinic before and after a ninety-degree rotation. Their coordinate components change while the connecting distance remains the same. Frame A Frame B: rotated 90° drone (4,1) clinic (1,5) distance = 5 drone (-1,4) clinic (-5,1) distance = 5 Components move with the frame. The route length does not.
Figure 4. The map turns, the route does not.A coordinate transformation can alter every component while preserving the decision-relevant relation. Using a raw component as a proxy for distance creates a frame-dependent policy.Illustrative geometry. Rotation is exact and the shown distance is synthetic.

Code: a designed partition of possibilities

A code associates distinctions with symbols. A fault may be represented as 7, FAN_STALL, a bit pattern or a sentence. If the mapping is one-to-one and shared, the receiver can recover the selected distinction. That does not make the code’s numeric order, spacing or internal fragments meaningful.

Shannon’s communication theory deliberately separated the engineering problem of transmitting selected messages from the semantic question of what those messages mean.8 This separation remains essential. A code can preserve decodability while destroying neighbourhood, morphology, emphasis or context.

Codes preserve distinctions, not meaning. Meaning may be carried by a code in a larger system, but it does not follow from the code values alone.

Thought experiment 3

The codebook swap

A maintenance system uses 1 for “fan stall”, 2 for “door open” and 3 for “sensor drift”. A new vendor maps the same faults to 42, 7 and 100. A semantic lookup produces identical maintenance actions. A rule that escalates any code above 20 now treats fan stall and sensor drift as severe while ignoring door open. The labels were permuted; the policy smuggled in an order the code never promised.

Thought experiment 4

The bilingual warning at the context boundary

Two warnings express the same operational instruction in different languages. A tokenizer breaks one into 11 subword units and the other into 24. A model with a fixed token budget truncates only the second. The semantic intention may be equivalent, yet the code changes sequence length, fragment boundaries and computational exposure. Subword tokenisation was introduced partly to handle rare and unseen words, but every segmentation also defines which fragments the model sees as reusable units.9

The instruction replace the overheated fan now is split into five word tokens, eight illustrative subword tokens and many byte codes. The message can be reconstructed, but sequence length and boundaries differ.

Figure 5. A code changes the path through a machine.Equivalent recoverable text can occupy different sequence lengths and expose different reusable fragments. A token count measures the chosen encoding, not an intrinsic amount of meaning.Illustrative segmentation, informed by Shannon (1948) and Sennrich, Haddow and Birch (2016).

Learned codes add another complication. A latent coordinate may predict a concept without uniquely representing it. Locatello et al. showed that unsupervised disentanglement is not identifiable without inductive biases in the model and data.10 Several internal representations can explain the same observations. A neat axis in a latent space is therefore evidence about a chosen model and probe, not automatic discovery of nature’s own variables.

Probability: uncertainty attached to a proposition

A probability is neither a physical amount inside an event nor a decorative confidence badge. It is a formal assignment to an event or proposition under a model, information state and sample space. It supports operations such as conditioning, marginalisation, expectation and scoring. Those operations require the event and model to remain clear.

Probability is a claim about uncertainty under a model. The value 0.64 is incomplete until we know: probability of what, within which horizon, conditional on which evidence, for which population, estimated how, and evaluated under what deployment conditions?

Thought experiment 5

The perfectly calibrated dull forecaster

Suppose rain occurs on 30 per cent of days. A forecaster says “30 per cent” every day. Over time, the forecast can be perfectly calibrated: among all days assigned 0.3, rain occurs about 30 per cent of the time. Yet the forecast does not distinguish storm fronts from clear skies. Calibration is necessary for interpreting repeated probability claims, but it is not sufficient for sharpness, resolution or usefulness. Proper scoring rules reward honest probability distributions while balancing such properties.11, 12

Worked example 3 · Probability parameter

A threshold in log odds

A spoilage probability of 0.64 corresponds to log odds log(0.64/0.36) ≈ 0.575. A probability threshold of 0.60 corresponds to log odds log(0.60/0.40) ≈ 0.405. Comparing 0.575 with 0.60 is wrong because the value changed representation while the threshold did not. Comparing 0.575 with 0.405 preserves the action.

Modern neural classifiers can be miscalibrated even when accurate, and calibration may degrade under dataset shift.13, 14 This matters because a decision threshold combines probability with losses. If unnecessary inspection costs 1 unit and missed spoilage costs 9, an expected-loss rule may justify intervention above 0.1, not 0.5. “High probability” is not a decision rule.

Reliability diagram comparing calibrated and overconfident forecasts A chart plots predicted probability against observed frequency. A diagonal calibrated line is compared with an overconfident curve below it. A decision threshold is shown, and a small sharpness histogram sits below. policy threshold 0.60 predicted probability observed frequency 00.20.40.60.81.0 00.20.40.60.81.0 forecast concentration calibratedoverconfident
Figure 6. Probability needs both a reliability relation and a decision context.The diagonal marks calibration. The coral curve is overconfident because observed frequencies fall below stated probabilities. Even a calibrated curve does not determine the action threshold; losses and constraints do.Synthetic reliability diagram. Concepts follow Dawid (1982), Gneiting and Raftery (2007), Guo et al. (2017) and Ovadia et al. (2019).
Part III

What survives a change of representation

The four instruments now share one deeper question: what must remain unchanged when the representation changes? The answer is not always a value. It may be an order, distance, identity, decoded message, probability distribution or action.

A useful formal ideal begins with an empirical state e and a representation R(e). Let g be an admissible transformation of the representation: a unit conversion, coordinate change, label permutation or invertible probability parameterisation. Let A be a decision rule with parameters θ, such as a threshold or codebook.

A(R(e), θ) = A(g(R(e)), g*(θ))

The notation g*(θ) means “transform the rule’s associated parameters coherently”. Celsius becomes Fahrenheit, so the temperature threshold must also become Fahrenheit. Probability becomes log odds, so the probability threshold must become log odds. A label code is permuted, so the semantic lookup must use the new codebook. The decision is representation-respecting when both sides agree for the cases that matter.

Decision invariance is the practical test. It asks whether the action belongs to the empirical relation or to an accidental feature of its expression. Exact equality is not always required. Compression, sampling and finite precision may justify a declared tolerance. What matters is that the permitted deviation follows from the representation contract rather than appearing by surprise.

Invariants, equivariants and discarded structure

An invariant does not change under the selected transformation. A route length is invariant under rigid rotation. Category identity is invariant under a consistent relabelling. A decoded message is invariant under a lossless recoding. The represented probability distribution is invariant under switching from probability to log odds, provided the transformation is invertible.

An equivariant object changes in a predictable way. Coordinate components rotate with the axes. A bounding box rotates with an image. A temperature value changes with its unit. Equivariance is not a defect. It is often the correct relation between representation and transformation.

Discarded structure is what the representation cannot recover. Rounding 31.47 °C to 31 °C discards precision. Mapping a continuous risk to red, amber or green discards within-band order. Tokenising text discards some candidate boundaries while highlighting others. Collapsing a distribution to its mean discards spread and tail shape. No later calculation can retrieve discarded structure without new assumptions.

Decision rule

Ask three questions before doing arithmetic

Which relation is intended to survive? Which transformations count as equivalent re-expression? Which operation is guaranteed to respect that relation? The numeral itself answers none of them.

A configured system: heatwatch

Consider a synthetic site-monitoring system called HeatWatch. It receives a temperature sensor value, a room coordinate, a fault code and a model probability. A planner proposes an inspection route. An authority rule approves dispatch when expected avoided loss exceeds travel and inspection cost.

The system can be correct at every component boundary and still fail as a whole. The sensor service may validly convert Celsius to Fahrenheit. The map service may validly rotate the site. The maintenance service may validly version its codebook. The model service may validly expose log odds. The compound failure arises when the orchestrator erases the types and assumes every field remains directly comparable to the old rule.

Worked example 4 · Realistic configured system

One case, four coherent transformations

C4 has temperature 31 °C against a 30 °C alert threshold; location (18, 6) relative to exit (15, 2); fault code 7 meaning fan stall, and spoilage probability 0.64 against an expected-loss threshold of 0.10. After migration, the values become 87.8 °F with threshold 86 °F; rotated coordinates (-6, 18) and (-2, 15), whose distance remains 5; code 42 with a versioned lookup that still resolves fan stall, and log odds 0.575 against threshold -2.197. Every action remains the same when the rules are co-transformed.

HeatWatch system boundary with representation contracts and failure paths Four input services provide typed temperature, coordinate, fault and probability values to an orchestration boundary. Solid paths carry typed contracts to an authority rule. Dashed coral paths show failures caused by erased units, frames, codebooks and probability parameters. Observed services Typed orchestration boundary Authority and effect Temperature service31 °C ± 0.4 °Cunit · measurand · uncertainty Map service(18, 6) in frame v3origin · axes · metric Fault service7 → FAN_STALLcodebook id · version Risk serviceP(spoil in 6h | e)=0.64event · horizon · model · calibration Representation contracts Targetwhat property or event? Frameunit, basis, codebook, model Transformadmissible re-expression Invariantrelation that must survive Operationlicensed calculation Decisionrule and co-transformed θ Authority gateexpected avoided lossexceeds action cost Typed actioninspect room C4with route and receipt adversarial shortcut: strip types, compare raw numerals
Figure 7. HeatWatch succeeds only when representation contracts cross the system boundary.Solid paths preserve type, transformation and decision semantics. Dotted coral paths show a plausible shortcut in which valid source values become unsafe after units, frames, codebooks or probability parameters are erased.Synthetic configured-system example. No deployment or operating result is claimed.

Failure case: the threshold survives while the queue moves

Worked scenario · Configured-system counterexample

A correct conversion can still reverse operational priority

HeatWatch monitors two zones with different permitted temperatures. Room C4 reads 31 °C against a 30 °C threshold. Cold room D2 reads 10.4 °C against a 10 °C threshold. Both alerts are valid. The dispatch service must decide which room enters a one-place inspection queue first.

An engineer defines severity as the displayed temperature divided by its threshold. In Celsius, C4 scores 31 / 30 = 1.033, while D2 scores 10.4 / 10 = 1.040. D2 therefore goes first. A later interface migration converts the readings and thresholds correctly: C4 becomes 87.8 °F against 86 °F, and D2 becomes 50.72 °F against 50 °F. The alert predicates remain true, yet the ratios become 1.021 and 1.014. C4 now goes first. The queue reverses although every physical state and every threshold decision is unchanged.

The failure is subtler than forgetting to convert a threshold. Celsius and Fahrenheit are interval representations with different origins. Differences transform coherently, but ratios of their displayed values do not. Co-transforming the numerator and denominator therefore preserves the Boolean test T > θ while failing to preserve the ranking rule T / θ. The ranking borrowed an operation that the scale did not license.

Ordinary component tests are likely to miss this case. The sensor test proves that 31 °C becomes 87.8 °F. The configuration test proves that 30 °C becomes 86 °F. The alert test proves that both representations trigger the same room. Even a shadow run can pass if it compares only the number of alerts. The defect appears only when two rooms with different thresholds compete for scarce authority and the test asks whether their order survives the admissible transformation.

The operating consequence can be serious. Suppose D2 contains material whose tolerated excursion is narrow, while C4 has more thermal inertia. A unit migration can silently defer the more time-sensitive inspection. The resulting decision receipt would show valid inputs, valid conversions and an authorised dispatch, yet still record the wrong priority because the comparison rule was representationally unstable. This is not evidence of an actual deployment. It is a synthetic failure injection that identifies a release condition.

The repair begins by naming the intended comparison. If the team needs normalised threshold excess, it can use (T - θ) / Δ, where Δ is a domain-approved excursion width expressed as a temperature difference. Differences convert by scale without inheriting the arbitrary origin. If time-to-spoilage is the real target, a validated thermal-risk model should replace the proxy altogether. In either case, transformation tests must compare the complete ordered queue, not merely each alert in isolation.

The smallest useful release test needs at least two zones, distinct thresholds and a constrained action budget. Generate temperatures on both sides of each threshold, calculate the original queue, convert every reading, threshold and difference scale, then calculate the queue again. The metamorphic oracle is equality of alert membership and ordering, except where the contract explicitly permits a frame-dependent result. A passing test permits the team to claim stability only for the sampled transformation family and operating range. A failure does not show that the source readings are wrong. It localises an unlicensed operation between representation and allocation, which is precisely where ordinary accuracy checks have no reason to look.

Release decision

Do not release a representation migration because individual values and predicates agree. Hold the cases fixed, transform every companion object, and compare the final allocation of scarce action. A ranking, route, approval or resource assignment that claims frame independence must remain unchanged. If it does not, either repair the operation or declare the frame dependence as part of the decision contract.

Representation debt

Most systems do not make one representation choice once. A score is created for a research study, copied into a dashboard, used as a threshold, converted into a target, joined with another score and later fed into a model. Each reuse can add an assumption about what the score means and which operations it supports.

Representation debt is the accumulated gap between the original representation contract and the operations now performed on the value. The debt is invisible while decisions happen to remain stable. A unit migration, codebook change, population shift or new objective reveals it.

This is related to underspecification in machine learning. Several models can achieve similar held-out performance while behaving differently under deployment conditions.15 Representation debt adds a systems-level route to the same surprise: several encodings or transformations can look equivalent on the validation path while exposing different downstream behaviour.

Representation debt increasing across reuse stages A timeline curves upward from instrument design through dashboard, threshold, optimisation target and autonomous action. The distance between the documented contract and actual use grows until a transformation exposes decision divergence. decision dependence reuse over time instrumentdashboardthresholdoptimisation targetaction policy unit or codebook change reveals hidden assumptions actual dependence on representationdocumented contract
Figure 8. Representation debt compounds through reuse.The original instrument may support a modest claim. As the same value becomes a ranking, threshold, target and action trigger, undocumented assumptions accumulate. A later re-expression exposes the divergence.Open practitioner hypothesis. The curves are conceptual, not measured data.
Open research hypothesis

Transformation testing will expose failures that ordinary accuracy tests miss

For compound AI and decision systems, add admissible representation transformations to the test suite: unit changes, basis rotations, codebook permutations, lossless recodings and probability reparameterisations. Hold the empirical case fixed and co-transform valid rules. The hypothesis is strengthened if these tests reveal action divergence in systems that pass ordinary validation. It is weakened if representation transformations add no failures beyond conventional perturbation tests. A rival explanation is ordinary software state drift rather than representational dependence.

The strongest boundary: invariance can preserve the wrong thing

A stable decision is not automatically a valid or ethical decision. A perfectly invariant score may measure the wrong construct. A coordinate-independent rule may still optimise an unjust objective. A calibrated probability may concern a poorly defined event or a population for which action is unauthorised.

Construct-validity traditions insist that observed scores require an argument connecting them to the intended attribute and its theoretical relations.16, 17 Measurement modelling in algorithmic systems likewise asks what construct is operationalised, how indicators relate to it and where social choices enter.18 The causal conception proposed by Borsboom et al. is one strong position: variation in the attribute should cause variation in the measure. Other validity traditions place more weight on interpretive arguments and nomological relations.

Boundary condition

Invariance is necessary, not sufficient

Invariance is necessary, not sufficient. The audit can show that a decision does not depend on arbitrary re-expression. It cannot by itself establish that the represented property exists, that the instrument measures it, that the model is causal, that the action is fair, or that the objective deserves optimisation.

There is also a legitimate class of frame-dependent decisions. “Move east” depends on an agreed orientation. “Use code 42” depends on a codebook. “Trigger above 30 °C” depends on a unit-labelled threshold. Such dependence is not an error when the frame is part of the target and remains explicit. The error is accidental dependence on a frame that the decision claims to ignore.

Part IV

Audit the representation before the result

The practical response is not to avoid numbers. It is to make their contracts visible. The representation-choice notebook below turns the central thesis into a repeatable review. It can be used for a sensor, score, embedding, token stream, probability service or business metric.

The representation-choice notebook

Complete the notebook before implementing the downstream calculation. Begin with the decision, not the available field. The instrument should be selected because it preserves the relation the decision needs.

An eight-field representation-choice notebook covers target, measurement bridge, type and frame, admissible transformations, preserved relations, licensed operations, decision rule and re-expression test.

Figure 9. The representation-choice notebook.The notebook makes representation assumptions reviewable before they disappear inside schemas and calculations. Its decisive field is the re-expression test: the same empirical cases should lead to the same action after coherent transformation.New decision instrument proposed in this paper.

The notebook is deliberately stricter than a data dictionary. A data dictionary may say that risk_score is a float between zero and one. The notebook asks whether it is a calibrated probability, a rank-preserving score, an arbitrary model output or a normalised composite. Those types permit different decisions.

Type the value before you compute with it. A field named “score” should not cross an action boundary until its target, transformation behaviour and licensed operations are known.

Run the audit in three passes

The first pass is semantic. Hold the intended phenomenon fixed and ask whether two teams would name the same target. “Customer risk”, “room temperature” and “model confidence” are not yet precise targets. Specify the event, quantity, boundary, horizon and population. Then identify plausible rival targets that the instrument could be measuring instead. This pass catches construct substitution before algebra makes it look settled.

The second pass is representational. Generate equivalent expressions without changing the case: convert units, shift or rotate the frame, permute nominal labels, change a lossless code, or move between probability and log odds. Transform every legitimate companion object, including thresholds, covariance matrices, codebooks and utility parameters. The purpose is not random perturbation. It is a controlled test of the equivalence class the design already claims.

The third pass is operational. Replay cases near decision boundaries, not only comfortable examples. Compare rankings, routes, abstentions, approvals and typed actions. Record where small representational loss becomes consequential, such as rounding near a threshold or token expansion near a context limit. Repeat the test across schema and model versions. A representation contract that passes once but cannot survive versioned replay is documentation, not assurance.

Executable lab: decision-invariance audit

The browser lab runs four synthetic scenarios. In coherent mode, it transforms both the representation and its associated rule. In bug mode, it transforms only the value or applies an operation the type never licensed. A positive result means the tested action survived the selected re-expression. A negative result identifies representational dependence that requires redesign or an explicit justification.

Representation-invariance lab

Choose an instrument and compare coherent transformation with a representation bug. All cases are synthetic.

Decision stable
Original representation
Transformed representation
Original decision
Transformed decision
Preserved relation
Diagnostic

The lab tests one narrow property: action stability under declared transformations. It encodes the assumption that the transformation preserves the relevant empirical content. A passing result permits the claim that this decision is not sensitive to the tested re-expression. It does not prove measurement validity, model calibration, causal correctness or ethical legitimacy. A failing result does not prove the source value is wrong. It shows that the downstream rule depends on how the value was written.

Python · representation_audit.py
from __future__ import annotations

from dataclasses import dataclass
from math import log
from typing import Callable, Generic, Iterable, TypeVar

State = TypeVar("State")
Rep = TypeVar("Rep")
Rule = TypeVar("Rule")

@dataclass(frozen=True)
class RepresentationSpec(Generic[State, Rep, Rule]):
    name: str
    represent: Callable[[State], Rep]
    transform: Callable[[Rep], Rep]
    transform_rule: Callable[[Rule], Rule]
    decide: Callable[[Rep, Rule], bool]
    relation: str

@dataclass(frozen=True)
class AuditResult(Generic[Rep]):
    original: Rep
    transformed: Rep
    decision_before: bool
    decision_after: bool
    stable: bool


def audit(
    spec: RepresentationSpec[State, Rep, Rule],
    states: Iterable[State],
    rule: Rule,
    *,
    co_transform_rule: bool = True,
) -> list[AuditResult[Rep]]:
    """Test action stability under an admissible re-expression.

    Invariant: the empirical state is held fixed. Only its representation
    changes. A legitimate rule parameter is transformed with the value.
    """
    transformed_rule = spec.transform_rule(rule) if co_transform_rule else rule
    results: list[AuditResult[Rep]] = []

    for state in states:
        original = spec.represent(state)
        transformed = spec.transform(original)
        before = spec.decide(original, rule)
        after = spec.decide(transformed, transformed_rule)
        results.append(AuditResult(
            original=original,
            transformed=transformed,
            decision_before=before,
            decision_after=after,
            stable=(before == after),
        ))
    return results


# Quantity example: alert above 30 °C, then re-express in °F.
quantity = RepresentationSpec[float, float, float](
    name="temperature",
    represent=lambda c: c,
    transform=lambda c: 1.8 * c + 32.0,
    transform_rule=lambda threshold_c: 1.8 * threshold_c + 32.0,
    decide=lambda value, threshold: value > threshold,
    relation="order relative to a co-transformed threshold",
)

# Probability example: act above p=0.60, then use log odds.
probability = RepresentationSpec[float, float, float](
    name="spoilage_probability",
    represent=lambda p: p,
    transform=lambda p: log(p / (1.0 - p)),
    transform_rule=lambda p: log(p / (1.0 - p)),
    decide=lambda value, threshold: value > threshold,
    relation="event ordering under an invertible parameterisation",
)

if __name__ == "__main__":
    for spec, states, threshold in [
        (quantity, [29.0, 31.0], 30.0),
        (probability, [0.55, 0.64], 0.60),
    ]:
        good = audit(spec, states, threshold, co_transform_rule=True)
        bad = audit(spec, states, threshold, co_transform_rule=False)
        print(spec.name, "coherent:", [r.stable for r in good])
        print(spec.name, "bug:", [r.stable for r in bad])

The Python version makes the hidden logic explicit: the empirical state is fixed, the representation changes, and legitimate rule parameters travel with it. Extend it with tolerances for lossy or approximate transformations.

Optional depth: extending the audit beyond exact equality

For lossy compression, stochastic encodings or finite-precision measurement, replace Boolean equality with a decision-distance function and a declared tolerance. The tolerance must be tied to action consequences. A 0.1 °C representation error may be harmless far from a safety threshold and material near it. For probabilistic outputs, compare expected loss, calibration bands or proper scores rather than individual labels alone. For learned representations, test a family of admissible transformations and interventions because observational equivalence may hide different mechanisms.

How to use the result

A positive audit result permits a limited statement: under the tested transformations, with the associated rules transformed correctly, the action was stable. It supports release evidence for that representation boundary. It does not authorise extrapolation to untested populations, transformations or decisions.

A negative result has three common meanings. The first is a simple implementation defect, such as a threshold left in the old unit. The second is type confusion, such as arithmetic on category identifiers. The third is a deeper mismatch: the representation fails to preserve the relation the decision requires. The first needs a patch, the second a schema and contract change, and the third a new instrument or decision design.

The smallest useful implementation is a transformation test beside every consequential field contract. Generate equivalent expressions, replay the same cases, and compare proposed actions. Store the transformation, co-transformed parameters and verdict as a decision receipt. This turns representation choice from an undocumented modelling preference into operating evidence.

The decision this changes

When a team receives a new metric, embedding, coordinate, code or probability, the usual first question is: “How accurate is it?” That question comes too late. First ask what formal object has been created and what operations it licenses.

The changed decision is concrete: do not approve a downstream calculation until the representation contract and re-expression test are present. Require the target, bridge, type, frame, admissible transformations, preserved relations, uncertainty and co-transformed decision rule.

A number is useful because it forgets most of the world. It becomes dangerous when we forget what it forgot. The discipline is not to distrust abstraction. It is to make the abstraction answerable to the relations and decisions it was built to preserve.

The final rule is simple: change the unit, rotate the frame, permute the labels or reparameterise the probability. If the phenomenon is the same but the action changes, the decision belongs to the representation, not yet to the world.

Glossary

Admissible transformation
A change of representation that preserves the empirical content claimed by the instrument, such as converting Celsius to Fahrenheit or consistently permuting category labels.
Code
A mapping between selected distinctions and symbols. The code may support recovery or communication without giving numerical meaning to its identifiers.
Coordinate
A component or tuple locating an object relative to a chosen origin, basis, chart or frame.
Equivariant
Changing predictably with a transformation rather than remaining fixed.
Invariant
A relation or decision that remains unchanged under the selected admissible transformations.
Measurement bridge
The procedure and assumptions connecting a phenomenon or attribute to an observed value.
Measurand
The quantity intended to be measured, specified precisely enough to distinguish it from nearby alternatives.
Representation debt
The accumulated gap between a value’s original contract and the later operations, decisions and objectives imposed on it.

References

Open the source register and extended notes
  1. Joint Committee for Guides in Metrology. (2012). International vocabulary of metrology: Basic and general concepts and associated terms, 3rd ed. JCGM 200:2012. doi:10.59161/JCGM200-2012.
  2. Bureau International des Poids et Mesures. (2019, updated 2026). The International System of Units (SI Brochure), 9th ed. doi:10.59161/AUEZ1291.
  3. Joint Committee for Guides in Metrology. (2023). Guide to the expression of uncertainty in measurement, Part 1: Introduction. JCGM GUM-1:2023. doi:10.59161/JCGMGUM-1-2023. See also JCGM GUM-6:2020 on measurement models.
  4. Stevens, S. S. (1946). On the theory of scales of measurement. Science, 103(2684), 677–680. doi:10.1126/science.103.2684.677.
  5. Luce, R. D., & Tukey, J. W. (1964). Simultaneous conjoint measurement: A new type of fundamental measurement. Journal of Mathematical Psychology, 1(1), 1–27. doi:10.1016/0022-2496(64)90015-X.
  6. Cohen, T., & Welling, M. (2016). Group equivariant convolutional networks. Proceedings of Machine Learning Research, 48, 2990–2999. Primary paper and code links.
  7. Bronstein, M. M., Bruna, J., Cohen, T., & Veličković, P. (2021). Geometric deep learning: Grids, groups, graphs, geodesics, and gauges. arXiv:2104.13478.
  8. Shannon, C. E. (1948). A mathematical theory of communication. Bell System Technical Journal, 27, 379–423 and 623–656. doi:10.1002/j.1538-7305.1948.tb01338.x.
  9. Sennrich, R., Haddow, B., & Birch, A. (2016). Neural machine translation of rare words with subword units. Proceedings of ACL 2016, 1715–1725. doi:10.18653/v1/P16-1162.
  10. Locatello, F., Bauer, S., Lucic, M., Rätsch, G., Gelly, S., Schölkopf, B., & Bachem, O. (2019). Challenging common assumptions in the unsupervised learning of disentangled representations. Proceedings of Machine Learning Research, 97, 4114–4124. Primary paper.
  11. Dawid, A. P. (1982). The well-calibrated Bayesian. Journal of the American Statistical Association, 77(379), 605–610. doi:10.1080/01621459.1982.10477856.
  12. Gneiting, T., & Raftery, A. E. (2007). Strictly proper scoring rules, prediction, and estimation. Journal of the American Statistical Association, 102(477), 359–378. doi:10.1198/016214506000001437.
  13. Guo, C., Pleiss, G., Sun, Y., & Weinberger, K. Q. (2017). On calibration of modern neural networks. Proceedings of Machine Learning Research, 70, 1321–1330. Primary paper.
  14. Ovadia, Y., Fertig, E., Ren, J., Nado, Z., Sculley, D., Nowozin, S., Dillon, J. V., Lakshminarayanan, B., & Snoek, J. (2019). Can you trust your model’s uncertainty? Evaluating predictive uncertainty under dataset shift. Advances in Neural Information Processing Systems, 32. Primary paper.
  15. D’Amour, A., Heller, K., Moldovan, D., et al. (2022). Underspecification presents challenges for credibility in modern machine learning. Journal of Machine Learning Research, 23(226), 1–61. Primary paper.
  16. Cronbach, L. J., & Meehl, P. E. (1955). Construct validity in psychological tests. Psychological Bulletin, 52(4), 281–302. doi:10.1037/h0040957.
  17. Borsboom, D., Mellenbergh, G. J., & van Heerden, J. (2004). The concept of validity. Psychological Review, 111(4), 1061–1071. doi:10.1037/0033-295X.111.4.1061.
  18. Jacobs, A. Z., & Wallach, H. (2021). Measurement and fairness. Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency, 375–385. doi:10.1145/3442188.3445901.