Ranking and calibration
A frequency ranking and a position/order discriminant set the candidate order with equal weights, and a temperature softmax gives the confidence within the reference bank.
Ranker
The ranker calculates two scores for each model in the reference bank: the frequency ranking and the position/order discriminant . It standardizes each score across the candidates and adds them with equal weights:
The frequency ranking has three parts:
- LDA: a linear discriminant projection of the features of the first 128 integers, averaged over the answers.
- Nearest neighbors: the mean of the 7 smallest squared distances to the reference answers of the model, with the median over the answers.
- Nuisance-free centroids: the prompt environment shifts the whole distribution of a model. When the bank is built, SVD estimates a nuisance subspace of at most 2 dimensions from the mean offsets of the environments. At scoring time, the ranker first projects out this subspace, then calculates the cosine similarity to each model centroid. The position-block features are also compared with the model templates of each environment.
The position/order discriminant is an LDA with shrinkage 0.5. It uses four feature blocks with 751 dimensions in total:
| Block | Dimensions | Weight | Content |
|---|---|---|---|
| Value distribution | 355 | 0.6 | The same Hellinger embedding as the frequency ranking |
| Positions and final digits | 74 | 0.15 | The same block distribution as the frequency ranking |
| Position kernel | 102 | 0.125 | 24 value RBFs and 10 final-digit indicators, each multiplied by 3 relative-position polynomials and averaged. It shows whether a type of number occurs more often at the start, middle, or end |
| Sequence | 220 | 0.125 | Correlation, step size, and equality rates at 8 lags; transition matrices of 8 value bins and of final digits, with marginals removed; up/down persistence; bin coverage in short windows |
Each block is standardized and normalized to unit length, then concatenated with its weight. The ranker standardizes the discriminant values of each answer across the candidates, then averages them over the answers.
The ranking score sets the candidate order. The weights of the two scores and the shrinkage come from leave-one-environment-out cross-validation on the reference bank. The fixed evaluation set does not take part in this selection.
Confidence calibration
The confidence is calculated only when all three answers are valid and the calibration in data/shared_detector.bin matches the detector. It is a temperature softmax within the reference bank:
fpd retrain fits the temperature offline. It holds out each of the 12 environments, then each pair of environments, and refits the ranker 78 times. The held-out results give the estimate of . The nested held-out binary NLL must be lower than a constant baseline, and the AUC must be greater than 0.75. Otherwise, retraining does not replace the current detector. is distributed only among the models in the reference bank: all candidates add up to 100%, and models outside the bank are not included. It is not the probability that the service really is that model. When the calibration does not match the detector, the result gives the ranking only, without confidence.
Reference bank and detector
| File | Content |
|---|---|
data/unified_reference.jsonl | Reference batches. Each line holds the model, channel, request parameters, and answers |
data/unified_bank.json | Statistics derived from the reference batches |
data/shared_detector.bin | Frozen ranker and calibration parameters (binary), bound to the reference data by SHA-256. The CLI and the website both decode it with shared/detector-codec.ts |
data/enrollment-suite.json | The 36 fixed sampling challenges |
If the reference bank does not match the detector (for example, a custom bank from --bank), detection stops with an error; run fpd retrain --data-dir DIR first. See Data files for the format and change log of the data files.
Last updated on
Overview
How the detector turns an answer into a comparable fingerprint, from challenge prompts and integer parsing to numeric features.
Tokenizer probe
The probe cancels hidden input with differential counts, makes a Bayesian open-set decision between 62 open tokenizer classes and "unlisted", and picks probe texts by a pairwise upper bound on the error. The result is reference information shown next to the ranking and checked against the model you entered.