typedecide.data.augment¶
Option-order permutation for training and for auditing. Background: Position priors and debiasing.
typedecide.data.augment
¶
Permuting the options, because position is the easiest signal in the dataset.
If every row lists the correct answer first, the cheapest hypothesis consistent with the training data is "answer A", and a model will find it long before it finds the task. Randomising the order at training time removes that shortcut; enumerating the orders at evaluation time measures whether any of it survived.
answer_id is carried through every permutation untouched -- the answer is an option
id, not a position, which is the whole reason the schema works this way.
randomise_option_order
¶
One new ordering per decision. Same length, same ids, same answers.
The per-row generator is seeded from (seed, decision.id) rather than from the
row's position, so a row gets the same ordering whichever dataset it is part of
and whatever order it was loaded in.
Source code in src/typedecide/data/augment.py
all_rotations
¶
The n cyclic shifts of one decision, identity first.
A cyclic set puts every option in every position exactly once, so a position prior contributes the same total to each option and cancels when the probabilities are averaged per option id. n forward passes instead of n!.
Source code in src/typedecide/data/augment.py
all_permutations
¶
Every ordering of one decision's options, identity first.
Exact rather than cyclic, and factorially expensive: use it to audit a small
sample, and all_rotations for anything you run over a whole eval set.