Advertisement
Data Processing

The False Friend: a viscosity merge scores its best result ever, and 120 of the recovered rows are the wrong quantity

The merge report was the best the register had ever produced: 246 of 300 rows recovered, zero false merges, no errors. It was also wrong in a way no m...

The merge report was the best the register had ever produced: 246 of 300 rows recovered, zero false merges, no errors. It was also wrong in a way no merge report can show. The register holds dynamic viscosity in millipascal-seconds. Two of its five spelling blocks — centistokes and stokes — are not spellings of dynamic viscosity at all; they are the units of kinematic viscosity, a different physical quantity, which in this register happen to carry the same digits. The parser converted them faithfully, matched them perfectly, and recovered 120 rows of a quantity the register does not contain. Every check on the report passed, because the report only asks whether the numbers came home — never whether they were the right numbers.

What The False Friend means

The False Friend is the condition in which a unit that belongs to a neighbouring quantity shares a numerical relationship with the register's unit — here, an exact one-to-one digit correspondence — so a converter recovers its rows flawlessly while silently changing what the values mean. In this measurement the register held 300 dynamic viscosities from 1.00 to 10,000.00 millipascal-seconds on a two-decimal grid (checksum of values 1,531,689.91). Its centipoise copies, a true unit of the same quantity at the same size, recovered 60 of 60; its centistokes and stokes copies, units of kinematic viscosity written with the dynamic values' digits, also recovered 60 of 60 each; its poise copies, a true unit a hundred times larger at three decimals, recovered 6 (Source: evidence/sd_batch29_results.json, group AN37).

The nearest prior concept is The Relabelled Row, which named rows that recovered under a new label with their digits untouched — a change of name, not of substance. The False Friend goes one step further and is correspondingly harder to catch. A relabelled row is the same quantity wearing a synonym; a false-friend row is a different quantity wearing the same digits. Kinematic and dynamic viscosity are related — dynamic is kinematic times density — so the digits are not even wrong by accident: for a fluid of density exactly 1 g/cm3 they would coincide. For every other fluid they diverge, and the merge has no way to know which fluid it was holding.

1. Stop the bleeding: freeze the two kinematic blocks today

The immediate move, before any analysis, is to quarantine the centistokes and stokes blocks: mark every row they contributed as unverified, and stop the merged register from feeding any downstream calculation. This is not because the rows are known to be wrong — it is because their correctness depends on a fact the register does not record, the density of each fluid at measurement temperature. Until that fact exists per row, a recovered centistokes row is a claim, not a value. The freeze costs nothing to reverse and everything to skip: a viscosity that enters a pump sizing or a formulation with a silent 13 percent error does not announce which rows carried it.

2. The workaround: treat kinematic rows as candidates, priced with a stated density

While the register is frozen, work can continue under an explicit assumption. Each kinematic row is converted using a declared density — the register's example row, spelled "4835.49 cSt", at a density of 0.87 g/cm3, corresponds to a dynamic viscosity of 4,206.88 millipascal-seconds, not the 4,835.49 the parser recovered: an error of 13.00 percent, exactly the density's distance from 1. Under the workaround, every converted row carries its assumed density beside it, results computed from those rows are labelled as density-assumed, and any row whose true density is later measured is recomputed and the label removed. The workaround's virtue is not accuracy; it is that the assumption is written where the number is used, instead of being hidden inside a unit label.

3. The root-cause fix: store the quantity kind, not just the unit

The root cause is a schema failure, not a parser failure. The register stored a number and a unit string, and "cSt" and "mPa·s" sat in the same column as if they were interchangeable labels for one thing. The fix has three parts. First, the register gains a quantity-kind field — dynamic or kinematic — and the parser refuses to convert across kinds without a density. Second, density becomes a first-class column, recorded with the temperature it was measured at, since the two quantities are only bridgeable through it. Third, the unit column is validated against the quantity kind at write time, so a centistokes value can never again be filed as a dynamic viscosity by a tired hand or an eager import script. Parsers merge spellings; only schemas can merge meanings, and this register's schema had silently promised that all five of its units meant the same thing.

4. Verification: what a corrected merge must show

The corrected run must show three things the original could not. The stage table changes shape: exact matching still recovers 60, the unit-aware stage recovers the centipoise block and the six poise rows the step allows — 126 in total, as the second stage of this measurement already showed — and the kinematic blocks contribute zero recoveries and 120 explicit rejections, each naming the missing density. The example row is the acceptance test: "4835.49 cSt" must come back flagged, not matched, and when its density of 0.87 is supplied it must land on 4,206.88, not on 4,835.49. And the report must print the rejection count beside the recovery count, so a future reader sees 126 recovered and 120 held, rather than a single reassuring 246.

SpellingQuantity it actually measuresStep in mPa·s termsRows recovered of 60
millipascal-secondsdynamic0.01 (the grid)60
centipoisedynamic0.0160
poise, 3 decimalsdynamic0.16
centistokeskinematicdigits identical60 — falsely
stokes, 4 decimalskinematicdigits identical60 — falsely

> Source: evidence/sd_batch29_results.json (batch 29 SD measurement run, group AN37).

The False Friend: a viscosity merge scores its best result ever, and 120 of the recovered rows are the wrong quantity

How this measurement was run

Three hundred values were drawn on a two-decimal grid between 1.00 and 10,000.00 and treated as dynamic viscosities in millipascal-seconds. Each was written in five spellings: millipascal-seconds and centipoise at two decimals (the centipoise being exactly equal in size), poise at three decimals, and — the register's defect reproduced deliberately — centistokes at two decimals and stokes at four, carrying the same digits although they name the kinematic quantity. Three parsers ran in sequence: exact string equality, a unit-aware pass over the dynamic units, and a full converter that also accepted the kinematic labels at face value. Recovery, false merges and per-spelling counts were recorded at each stage; the density illustration uses the example row at 0.87 g/cm3, a typical light-oil density, chosen for this article. The script and result file ship with the article, and re-running the script reproduces the result file byte for byte.

Questions on The False Friend, answered

1. If the digits recover exactly, in what sense is the row wrong? The digits are the dynamic value's digits written next to a kinematic unit. Read as what the label says, the row asserts a kinematic viscosity; the register stores it as a dynamic one. The two are equal only for a fluid of density 1 g/cm3, so the row is a true statement about almost no real fluid.

2. Why did the poise block, a genuine unit, recover only 6 rows? Its step: poise at three decimals steps by 0.1 millipascal-seconds against a 0.01 grid, so only values that are whole tenths survive the round trip. The honest unit failed on resolution while the false friends sailed through on identical digits — resolution and correctness are separate axes.

3. Can't the parser just check the unit names? It can check names against a list, and should — but the deeper defect is the schema's missing quantity kind. A parser that rejects "cSt" today will accept the next neighbouring unit tomorrow; a register that records what quantity each row measures rejects the whole class of error at once.

The decision rule to keep

When a spelling recovers perfectly, ask what quantity its unit measures before counting the recovery: a block that converts without loss and without a density is not a success to report but a decision to make — hold the rows, declare the assumption, or fix the schema — and the one option that is never available is counting them as recovered and moving on.

Know someone who needs this? Share it.

Advertisement