geppo / PROTOCOL.md
grokked-it's picture
Add GEPPO mean-pooling pointer-head verification release
e6742a5 verified
|
Raw History Blame Contribute Delete
7.2 kB
# Semantic decision experiment
This experiment keeps Emma-6 as the backbone. It evaluates matching a request
to candidate descriptions, including intents absent from this training run.
It does not reproduce Jev's private training recipe or claim equivalent quality.
## Architecture and sources
Read-only source snapshots and revisions are recorded in `upstream/revisions.json`.
- [Kev](https://github.com/jaredpalmer/kev): causal branch masks, shared positions,
pointer readouts, adapter training, and option isolation motivate this study.
- [Laya](https://github.com/NandhaKishorM/laya): typed decisions and proper probability
scoring motivate explicit probability evaluation. Its encoder is not substituted
for Emma. No claim that GEPPO uses the same architecture or RLCD.
- [MASSIVE](https://huggingface.co/datasets/AmazonScience/massive): localized Italian
utterances and intent annotations. Original archive and locale are pinned by hash.
- Existing pinned Kev translation: only its training and development partitions
are replayed. Existing synthetic regression cases remain marked as regressions.
Each question gets a causal prefix with state, instructions and a canonical list
of candidate descriptions. Candidate spans are separate branches: they see only
that prefix and their own earlier tokens, with their position IDs restarting after
the prefix. IDs remain output handles. Text markers use Emma's existing tokenizer.
This mask is evaluated numerically against separate ordinary causal forwards.
## Data and exclusions
MASSIVE intents are shuffled with seed 5301 into 40 train / 10 validation / 10 test.
Held-intent names and their exact candidate descriptions are absent from training.
Training uses official train utterances; validation/calibration use official dev;
test uses official test. Normalized duplicate states across partitions and states
with conflicting intent labels are excluded. Within a partition the same state
may produce both choice and yes/no questions, which are correlated observations.
Conflict filtering is corpus-level curation using released annotations from all
official partitions, before this subset is built. An audit found 10 earlier
states whose conflict is revealed only by official test annotations. This is
another reason not to describe the corpus as an entirely blind benchmark; these
annotations do not enter model inputs or training targets for held intents.
Choice requests use similar-intent distractors where available, variable option
counts, shuffled opaque IDs and a none candidate. In approximately 15% of choice
questions the true intent is removed and none is the labelled answer. Yes/no
requests alternate matching and nonmatching candidate descriptions.
The active corpus is `data/semantic-v2/`. Choice handles were replaced by
independent opaque aliases before final prediction. All 6,301 questions were
reencoded and checked against the earlier corpus: tokens, positions, masks,
readout order and target indices are identical. The proof is recorded in
`results/semantic/opaque-id-equivalence.json`; existing feature caches and the
first adapter run remain numerically applicable. Handles never enter Emma.
Removing a true candidate changes the option count. In particular, the smallest
choice requests occur only among negative examples; this is a shortcut available
in the generated task. Report held-intent positive choices and no-match choices
separately. This experiment does not establish robust open-set rejection.
MASSIVE and the regression cases have been evaluated earlier in this project.
The intent split is new; the dataset is not an entirely fresh blind benchmark.
Held labels are unseen to this training; the base pretraining corpus is unknown.
## Selection before test predictions
Frozen ablations: shared scalar linear, scalar MLP 2048→128→1, and pointer 2048→64,
each with seeds 53 and 54. Compare final candidate token versus mean of candidate
branch tokens; the query remains the last prefix state. This pooling comparison
was added during the first adapter run, before any final test prediction.
Feature normalization is fitted on training only.
Train cross entropy with 65% total weight on MASSIVE and 35% equally distributed
over auxiliary sources. Maximum 60 head epochs, patience 10, AdamW 3e-4.
Selection score: 50% macro accuracy over held-intent **choice** labels in validation,
50% mean accuracy over the other validation sources. Ties use mean source NLL.
For the final model choice, NLL is rounded to four decimals and an equivalent
frozen checkpoint is preferred to an adapter, avoiding meaningless numerical ties.
This prevents easy binary questions from hiding failed held-intent choice decisions.
Adapter trials use rank 8 / alpha 16:
1. `qv4`: best final-token frozen head available at launch (`pointer-53`);
query/value of the last 4 layers, max LR 5e-5. Mean-pooling trials were not
finished when this run began.
2. `all8`: best shared scalar scorer across both poolings by the same validation criterion; all
attention/MLP projections of the last 8 layers, max LR 1e-4.
These are alternative recipes, not a controlled attribution of gains to head
choice versus adapter coverage. Both initializations are chosen before test.
Both use the whole 4,411-question corpus, 3 epochs, head LR max 1e-4,
OneCycle scheduling, accumulation 8, clipping 1, FP32 on MPS. Epoch zero is eligible.
The `all8` trial groups up to four rows per forward, reducing to fewer rows for
long inputs; optimizer groups still contain eight questions with the same weighted
mean loss. Batched branch features are checked against independent forwards.
Adapter gradients and a frozen base-weight reference are checked. No new epoch,
architecture or loss selection is made after this study's test predictions.
## Calibration and evaluation
After model selection, split calibration by a deterministic hash of the state:
all questions about a state stay together. Fit temperature separately per question
type on one half and audit NLL on the other half. Require at least 30 fit and 30
audit questions; otherwise keep temperature 1. Apply a fitted temperature only
if it reduces audit NLL. No final refitting on the audit or test. This is a
limited calibration audit, not a universal confidence guarantee.
Final reporting separates seen/held intents, question types and regression sources.
Report NLL, Brier score and expected-score MAE in addition to accuracy. Reevaluate
the previous pointer on the same requests, with its original input format, instead
of comparing aggregate percentages from different tests. The primary checkpoint
is chosen by validation and exported separately from all earlier experiments.
The selected model is also tested on the same MASSIVE utterances with a second,
assistant-authored set of Italian descriptions fixed before final test evaluation.
This paired paraphrase stress test is not an additional independent sample.
The earlier 158-question translated Kev test is also reevaluated as an explicit
regression, including its 20 BoolQ questions absent from training. These earlier
test outcomes are not used to choose this study's model or calibration.