Skip to content

For the people who decide which imported lots get opened

No contaminated meat or poultry gets in. Which boxes should we open?

Thousands of lots arrive, and a handful of cartons from each can be opened. The public data about the plants that send them is rich, and it sits in CSV files, PDFs and web pages across the Food and Drug Administration (FDA), the Food Safety and Inspection Service (FSIS) and foreign regulators.

You know how reinspection works far better than we do. This is what we have tried with the public data, what held up, what did not, and what we still cannot answer.

Opened at random2 of 30 refused lots found in 50 opened
Opened by rank20 of 30 refused lots found in 50 opened

Illustration at the measured rates: 1,000 lots, 30 refused, 50 opened. Held-out result: the ranked 5% caught 66% of refused lines; random catches about 7%.

Three shortcuts, and where each runs out in the public data

Past refusals, and recent activity

Rules built on a site's recent lines looked strong at first. The rule “last line 27 to 191 days ago” scored 0.298 until we fixed how refusals were dated; then it scored 0.174. Most of that signal was the label leaking, not the sender.

Country alone

Country and product together are the strongest thing we have. Country alone treats every plant in it alike, and inside one country and product group the senders still differ: behaviour orders them about 4 times better than random (0.29 against 0.075).

The carton and the paperwork

In FSIS’s public refusal records, 59% of refused lots were shipping damage and 20% were missing or illegible marks. A pathogen appears 79 times in 13 years. The public record mostly describes the box, not what is in it.

A small model can rank a month’s arriving lots for decision support, with the reason beside each flag, and be checked every month against what was actually refused.

Published, but not joined

The records exist at the level of one plant, but across agencies and formats. Until they are joined, each lot is judged with a fraction of what is public about its sender.

Every month is a free test, unused

Each month the refusals mature into an answer key for the lots that arrived before. Without a model to score in advance, that answer key checks nothing.

What we built

A ranking of the month’s lots, to sit beside the inspector’s draw.

A decision-support list: which lots look most like the ones that were opened and refused before, and why. The inspector and the system that assigns reinspection stay in charge.

FDA shipment lines FDA import refusals, with charges FDA charge-code table FDA inspections FDA compliance actions FDA import alerts and 6 more Joinone plant, one record Precomputefeatures per plant ranked lots next month’s refusals check this month’s ranking
  1. Join. Twelve public sources feed the model today, with plants matched across them: FDA’s shipment lines, refusals, inspections, import alerts, and FSIS’s lots, foreign audits and establishment lists.
  2. Precompute. Each plant gets features as of the day a lot arrives: country and product mix, which customs filers work for it, how many industries it ships in, and identity features built with a small judging model, then carried to 253,464 sites.
  3. Rank and test. A small gradient-boosted model ranks the month’s arrivals. It trains only on refusals at least 3 months old, and each newly matured month becomes another test.

What a flag looks like

One ranked lot, with its reasons and its limit.

A score alone asks for trust. Each row carries the features that moved it, so an inspector can disagree with a reason as well as a number.

  1. 1 Its place in the month’s arrivals, with the denominator.
  2. 2 The reasons, in plain words, strongest first.
  3. 3 The limit, on the row itself.
ranking/2026-08/row-312.json
{  "rank": 312, "of_lots": 9870, "position": "top 3.2%",1  "site": "FEI 30•••••", "country": "…", "product": "…",  "score": 0.41,  "reasons": [2    "country + product group refused at 4.1x the base rate, last 24 months",    "new customs filer this quarter",    "ships across 5 industries"  ],3  "limits": "a correlation, not a cause; ranks sites inside the month's arrivals"}
The shape of a row. Values are illustrative and the site is masked; the reasons use the features the model has.

Over time the question changes from “does this work?” to “how much better did it do last month?” Every matured month is one more test, in the open.

What held up on months the model never saw

Random 0.07
Sender behaviour alone 0.55 which customs filers work for a site, and how many industries it ships in
Country + product mix 0.66 the main ranker
Behaviour + sender identity 0.66 identity features from our judging model: legal form, seller kind, name, address
Country + mix + behaviour 0.69 +0.02 to +0.03; the 95% interval includes zero

Share of refused lines caught when opening the top 5% of lines, on 2 held-out arrival months (2025-11 and 2026-02, 4,886 refused lines) that no column choice saw. The column search chose on 5 earlier months; 3 searches on shuffled labels peaked at 0.09 to 0.11, against 0.41 for the real one.

Behaviour mostly finds what country and product already find

At a 5% budget, both approaches catch about 2,200 refused lines. Only country and product mix catches about 1,050, only behaviour about 450, and about 1,200 are caught by neither. Behaviour is a second layer, a way to rank senders inside one country and product, and a reason to show beside a flag.

Our first results were a leak, and we retracted them

We first counted a refusal in the month it was recorded. 93.6% of refused lines had arrived earlier, so a model could score well by noticing lots already held. The label now counts a refusal within 90 days of arrival, which covers 75% of refusals, and a no-model canary rule stays in the check.

Where it stands

What runs, and what we are still researching.

The ranker
Gradient-boosted trees, three learners checked side by side. The frozen scorer ranked 148,658 sites with a lot arriving in 2026-08, including first-time senders: 23% of sites and 1.7% of lines, scored with their features missing.
The sources
12 public sources feed the model today. 22 more are collected and not yet in it, including FSIS sampling results, FSIS inspection tasks, FSIS recalls and alerts, FDA recalls, FDA warning letters, FDA pesticide monitoring, USDA Pesticide Data Program, EU RASFF notifications, EU DG SANTE audits, EFSA pesticide monitoring, China GACC refusals, Japan MHLW violations, Korea MFDS rejections, Taiwan TFDA failures, Hong Kong CFS alerts, Australia DAFF failing food and 6 more.
Specialist models
A small judging model labels a few thousand sites and small classifiers carry the answers to the rest. We are testing fine-tuned open models for that step, including a local model that agrees with the judging model on 75.6% of questions. None of them decides a lot; the trained ranker does.

Open questions, where your staff know the answer and we do not

  1. The public FSIS record describes cartons more than contents. Does a ranking trained on FDA’s hazard-coded lines carry over to meat, poultry and egg products at all?
  2. Pathogen results for imported lots are public only as national percent-positive totals. Which results would tell us whether a ranking finds contamination rather than paperwork?
  3. Should country and product mix be the main ranker, with sender behaviour as a second layer? The +0.02 to +0.03 is inside the noise of two test months.
  4. Where would a ranking sit next to the assignment the inspector draws at the import establishment, if anywhere?

A test that takes weeks: we score last month’s lots in advance and compare them with what your inspectors found.

No system access and no change to how lots are drawn. The ranker runs on a laptop, and the result is yours to keep either way.

In one sentence

“A small model ranks each month’s arriving lots from public data, shows why, and is checked every month against what was actually refused.”
Tell us what we are missing

We would like to help with the mission, and to learn where this is wrong.