KatInterview

Probabilistic Triage Model for Disputed Order Claims

Machine LearningModel answer
MediumModel answerMachine Learningbayesian-inferencecalibrationmissing-data

Last updated

Design a calibrated probabilistic model that scores dispute cases for fraud despite informative missing data, shifting base rates, and cost-sensitive routing decisions.

Context

An online marketplace has a trust and safety group that handles buyer-filed dispute cases. Each case is either a fraudulent claim (Y = 1) or a genuine one (Y = 0). Only a small share of cases ever get a human review, so labels are scarce. Each case carries evidence from three sources: free text, structured transaction fields, and buyer and seller history.

You must build a model that outputs the probability P(Y = 1 | X) for every new case. That probability directly drives two actions: cases above one threshold go to senior investigators, and cases below a much lower threshold are resolved automatically. Wrong decisions in either direction have different costs, so the numbers must behave like real probabilities, not just a ranking.

Complications

  1. Missingness carries information. Many fields are absent, and the absence is not random. Genuine one-time buyers often have no history. Accounts that repeatedly commit fraud tend to hide particular fields on purpose.
  2. The base rate moves. The weekly fraud rate swings between roughly 1% and 12% because of promotions and coordinated attack waves.
  3. Calibration is a hard requirement. Downstream thresholds are set in probability units.

What to cover

  1. Model family. Decide between a generative approach (naive Bayes, a Bayesian graphical model) and a discriminative model with Bayesian priors over its parameters (Bayesian logistic regression, Bayesian neural network). Justify the choice given the mixed feature types.
  2. Missingness. Give a mathematical treatment that uses the missingness pattern as evidence, without dropping incomplete cases and without assuming data are missing completely at random.
  3. Changing base rate. Explain how to track the fraud prior in near real time without refitting the part of the model that describes P(X | Y).
  4. Evaluation and calibration. Lay out a validation protocol covering ranking quality (for example PR-AUC) and calibration (for example expected calibration error and reliability diagrams), and describe how you would detect and repair calibration drift in production.

Hints

Hint 1

Write the posterior in log-odds form: prior log-odds plus a log-likelihood ratio. Ask which piece changes weekly and which should stay stable.

Hint 2

You do not need to model why data are missing. Model the joint of the observed values and the missingness indicators, and let the indicator pattern be a feature or a mixture component.

Hint 3

Under label shift, the prior update is an additive logit offset. Think about how to estimate the new prior when reviewed cases were chosen by the model itself (selection bias).

Hint 4

With a 1 to 12 percent base rate, equal-width calibration bins are nearly useless. Also consider the order of operations: recalibrate first, then apply the prior shift.