Skip to content

Preprocessing Choices Move HR@10 by 1.8 Points

THE ARGUMENT

Preprocessing is not a delivery detail: fix the title format, which loses on every measure once normalized, and treat demographic balancing as a per-attribute claim to disclose and check, never to assume.

On this page

You have 1,000,209 movie ratings in hand, the contract says deliver in the original format, but what does that clause actually promise? Nothing. Most people read preprocessing as the vendor's housekeeping: rename a field, tidy a title, none of it the buyer's business while the row count matches. That reading fails on one step. Move the article to the front of each title, so Matrix, The (1999) becomes The Matrix (1999), and hit rate falls from 12.47% to 10.67%.[1]

Preprocessing is a contract term, not vendor housekeeping

The paper's claim fits one line: preprocessing is not a preparation step but a design choice that shifts quality and demographic gaps together.[1] Its three switches are how a title is written, how many examples each group gets, and whether item knowledge enters the corpus.

The first switch looks like a non-issue. MovieLens keeps the article at the end, as in Matrix, The (1999); many pipelines normalize it, the catalog stays the same, and the text reads better.

The result runs backwards.

Keep the original form and hit rate reaches 12.47% with coverage at 47.88%; normalize and they fall to 10.67% and 41.36%, while distinct films ever recommended drop from 1,859 to 1,606.[1] The 1.8 points is my subtraction of those endpoints, which the paper never writes down. So the clause is not a catch-all; it hands that decision to the vendor's habit, and your baseline moves without a signature.

Three single-variable runs on one million ratings

MovieLens-1M supplies 6,040 users, 3,883 films and 1,000,209 ratings, with 4 or higher counted as positive.[1] Dropping users with fewer than 22 positives leaves 4,995.

Twenty samples per user give 99,900 examples; 3,432 films (88.4%) appear in training and 451 (11.6%) never do. Llama-3-8B-Instruct, QLoRA, rank 16, one pass.

A prefix tree locks generation to titles that exist in the catalog, so the model cannot invent a film, a mechanism called catalog-constrained decoding; 37 templates in 6 families keep it from latching onto one phrasing.

Two metrics need plain words. HR@10 asks whether the film a user watched next lands in the ten offered, so it measures aim; Coverage@10 asks what share of the catalog appears at least once, so it measures reach. The pipeline then has its own numbers: plain SFT hits 7.47% HR@10 with only 0.06% of lists holding ten items; constrained decoding takes out-of-catalog picks from 2.08% to 0.00% with hit rate flat at 7.43%; constrained training reaches 100% exact-ten and 9.89%; prompt augmentation lifts hit rate to 10.67% and cuts repeats from 10.56% to 8.01%.[1] Headline runs decode greedily at temperature zero against a fixed checkpoint, so one pass is comparable across variants.

Which switch gained, which one bought nothing

Each comparison flips one switch on the same pipeline and catalog.

ChangeHR@10Coverage@10Group gap (points)What it bought
Original titles (base)12.47%47.88%gender 0.45 / age 0.69reference row
Normalized titles10.67%41.36%not reportedless aim, less reach
Gender-balanced11.32%not reported0.45 up to 1.21worse aim, wider gap
Age-balanced12.39%not reported0.69 down to 0.38same aim, narrower gap
Knowledge-enriched12.24%not reportedgender 0.10 / age 0.320.23 points for two smaller gaps

The title row is a straight loss. Normalization rewrites 714 of 3,883 titles and stacks 715 of them, 18.4% of the catalog, behind one opening token, where the original form has no token above 1.8%.[1] Early branching leaves the decoder more room.

SNSR is a consistency dial: group users by the attribute, measure each group's overlap between neutral and attribute-conditioned lists, then take the spread across groups; pair Jaccard is how far two lists for the same history diverge under two descriptor values.[1]

Gender balancing is the counter-example: 49,950 examples per group, so 3,620 male users supply 13.8 each and 1,375 female users 36.3.[1] Hit rate slides to 11.32%, the gap widens from 0.45 to 1.21 points, SNSR rises to 0.0636, pair Jaccard falls to 0.7918. Five measures, none better.

Age balancing holds hit rate at 12.39% and narrows the gap from 0.69 to 0.38, with pair Jaccard up from 0.8407 to 0.8471; only SNSR worsens, from 0.0017 to 0.0077.[1] Same 99,900 examples: 2,152 older users at 23.2 each, 2,843 younger at 17.6.

Knowledge enrichment adds 7,683 item question-answer pairs, genres from MovieLens and plots from TMDB, taking the corpus from 119,056 to 126,739; hit rate falls 0.23 points to 12.24.[1] The gender gap drops from 0.45 to 0.10, the age gap from 0.69 to 0.32, and age SNSR rises to 0.0123. Three switches, three bills.

What to write in the spec, what to check at acceptance

Back to the contract, where each clause can be rechecked by a third party.

  1. Name the title form with an example: preserve the MovieLens surface form, article at the end, as in Matrix, The (1999); no article fronting. One sentence removes 1.8 points of interpretation.
  2. Split balancing by attribute. Equal counts after a 35-year split is checkable; demographically balanced is not, since gender and age point opposite ways here.
  3. Say whether knowledge is added or substituted: the paper appends 7,683 pairs to 99,900 examples, and a swap would move size and mix at once.
  4. Add four acceptance columns: HR@10, Coverage@10, a gap per attribute, SNSR. Reporting only the first misses the title case.
  5. Ask for per-group counts. Equal examples can hide 3,620 users against 1,375, so the per-user repeat count differs and no note would show it.

Coverage rarely appears in procurement templates, yet this run loses 1.80 points of aim and 6.52 points of coverage at once; the 6.52 is my subtraction, and the paper reports only the endpoints.

Where these numbers stop applying

Four limits. The first: one dataset, one task. Every number comes from top-10 film recommendation on MovieLens-1M, 3,883 items over 4,995 users, Llama-3-8B-Instruct with QLoRA in a single run; in groceries or job listings the prefix structure differs, so the 1.8 points does not travel.

Two attributes, both binary: gender in two groups, age cut at 35. The authors ask for work beyond binary groups, and real age bands may not reproduce the pattern.

The enrichment run is not clean: 7,683 pairs take the corpus from 119,056 to 126,739, so size and mix move together.

Every fairness measure here is a behavioural signal, not proof of discrimination; a group gap or a Jaccard score shows output shifting with a demographic line, nothing more. The measure does not apply as legal evidence.

One line to screenshot: preprocessing is not the closing chore of a delivery; it is part of the performance you paid for, and every clause you leave out is a column you cannot reconcile.

References

  1. Preprocessing Choices in Fine-Tuning Data Matter: Utility and Demographic Sensitivity in LLM-Based Recommendation

Read next

All articles

Sign in to Padda

A code in your inbox. No password to remember.

Connecting to sign-in…