# PACE scientific protocol and interpretation

## Scientific question

The binary label is a sparse summary of a richer academic event. PACE asks whether denoising historical course identities and grades learns reusable information that transfers to failure ranking. It does not claim novel theoretical foundations or forecast improvement. Suite34's negative interaction result motivates changing supervision; it does not establish that chronology alone will help.

Three questions must remain separate:

1. Does the extra event corpus contain useful information beyond the canonical engineered vector? H1 versus H0 tests a simple form of this.
2. Does SSL learn useful representations beyond a random map or ordinary failure-supervised sequence encoder? H2 versus HR and N2/N3 versus N1 address this.
3. Does a learned chronology model improve the strongest same-run learner? H2 versus max(H0,H1,HR), followed by frozen retrospective evidence, is the primary practical test.

These contrasts do not uniquely isolate every mechanism: H2-versus-H1 also changes representation format; neural task heads have different parameter counts when embeddings are appended; H1 uses all admissible events while sequence truncation caps model histories. This makes H1 a useful strong information control, but it is not a proof that SSL alone caused a gain. Temporal architecture comparison uses the same event support/dimension, and prints rather than assumes parameter equivalence.

## Source contract and admissibility

For enrollment r=(student s, course c, semester t), admissible event history is

H(r) = {e: e.student=s, order(e.semester)<order(t), e.available_at<r.origin_at}.

Both tests are necessary. A prior semester can contain an outcome released too late. Missing outcomes are excluded, not replaced with zero. Every course attempt must have stable event identity; exact duplicate records are removed, conflicting versions are rejected. A later grade revision cannot be made safe merely by retaining its earlier entry timestamp: the event source must represent the value as actually known at availability, or declare an appropriate revision timeline before extraction. Source metadata is not automatically certified by passing a software assertion.

Student IDs are used only for joining/splitting; no trainable student embedding exists. Course IDs are string identifiers. Vocabularies are fitted from the applicable training event corpus; unseen courses map to UNK. Real classes start at code3; PAD0, UNK1, MASK2 remain separate. No final/current-semester outcome is included in H(r), even if a malformed timestamp would make it appear early.

The default native AQ mode follows the supplied earlier suites: observed earlier-semester grades are assumed available by the next semester. Global order is year*3+term-1 (term1,2,3), with internal ordinal timestamp carriers used only for comparisons. These are not observed dates or evidence of certified publication/revision timing. No external calendar is required. Portable normalized-input strict mode requires audited availability; its optional calendar embargo mode is a separately labeled proxy. String sorting of term IDs is never chronology.

Native enrollment snapshots use the common raw-column intersection plus the 17 verified numeric course fields. Full labeled training support is default, with optional legacy finite-CF-covered support; all same-run arms share support. Sidecar values retain their original aligned snapshots; missing rows use own static fields and strict prior-semester course statistics from the deduplicated canonical training-event registry. Reconstructed hist_std uses population standard deviation (ddof=0, singleton0) to match the preserved Suite17 sidecar definition; absent historical support remains missing except count0. The optional full transcript extends the sequence and deterministic-summary event corpus. Thus preserved course features and raw transcript histories have explicitly different provenance, documented by the source audit. Enrollment snapshots retain their canonical upstream engineered fields. Their provenance must be inspected separately: this package cannot undo future-aware imputations, target aggregates or previously leaked engineered features embedded in a joblib. Per-fold snapshots are never collapsed into a later snapshot.

## Inputs and shapes

A batch contains B students or enrollment histories. Retain at most S=16 recent semesters and C=32 deterministic course events per semester; actual padding is bounded by observed support. Repeated student/semester prefixes are prepared once per cohort and mapped back to registrations. Events within one semester have no intrinsic order. Sorting by course/event identity is only for deterministic cap selection; the aggregation is permutation invariant.

| Tensor | Shape | Values |
| --- | --- | --- |
| course | B×S×C | Course token |
| grade_band | B×S×C | Grade token |
| numeric | B×S×C×3 | grade/10, credits/10, attempt/5 |
| event_mask | B×S×C | Actual historical event |
| semester_mask | B×S | Actual historical semester |
| gaps | B×S | Elapsed calendar ranks since first retained semester |
| event embedding | B×S×C×128 | Common event MLP |
| semester embedding | B×S×128 | Event mean plus log1p event count |
| history embedding | B×128 | Encoder output or empty-history vector |
| neural probability | B | One failure probability per enrollment |

Grade bands are exactly zero; (0,4); [4,5); [5,7); [7,10]. Numeric grade is retained when visible. Band definitions never change after seeing retrospective outcomes.

Course embedding width32 and grade width16 are concatenated with3 numeric channels and4 missing/mask indicators, then projected through GELU/normalization into128 channels. Semester pooling takes the masked event mean and log1p event count. All architectures share this frontend:

- E0: cumulative mean/set context for pretext reconstruction, then a small MLP. Its final history vector is invariant to semester order and ignores explicit gaps/positions.
- E1: two-layer GRU with a learned transform of log1p elapsed-semester gaps.
- E2: two-layer,4-head, feed-forward width512 Transformer; sinusoidal slot position, learned gap transform, causal future mask, padding mask. Empty rows get a safe attention key internally and an explicit learned empty-history vector externally.

A student without previous events remains in all target rows. An empty-history vector has no SSL reconstruction targets and therefore receives no meaningful SSL update; N1/N3 can learn it through downstream supervision. H0/H1 remain strong fallbacks through the retained full engineered vector. No-history coverage and performance are printed.

## Self-supervised objectives

For each pretraining row, mask grade and course identity independently with probability .2 on eligible observed tokens. Every eligible minibatch has at least one token for each active objective; fixed validation masks remain the same across epochs. The student partition is deterministic by seed and stable student ID, not an event-level random split that shares a student's events across SSL train/validation.

Grade corruption sets grade_band=MASK and numeric_grade=0. No status/GPA/pass indicator is present in event inputs, so it cannot reveal the masked grade. Course corruption sets course=MASK and zeros credits and attempt. Independent simultaneous corruption is permitted. Visible grades and concurrent courses in the same *historical completed* semester are allowed denoising context. This task is not prospective prediction of that historical semester's grade. Across semesters every context remains causal.

The decoder combines the corrupted local event vector and its causal semester context. It projects only the selected masked event vectors to5 grade logits or K known-course logits; grade-only training does not allocate the course logits. Targets with unknown course identity are excluded and counted. Any active objective with zero eligible training or validation targets raises an explicit error; reconstruction cannot earn a zero loss through absence of evidence.

L_grade = mean masked-grade cross-entropy.
L_course = mean masked-known-course cross-entropy.
L_SSL = lambda_grade L_grade + lambda_course L_course.

Default lambdas are1,1. These are raw mean CE values, not CE/log K; class-count-normalized CE is a labeled diagnostic only. Raw CE sums can weight objectives differently as vocabulary changes, which is one reason grade-only/course-only/joint comparisons are mandatory. Frequency/majority baselines use only training token counts with explicit smoothing. Grade recall, course frequency strata, token support and history-length strata are reported. Reconstruction accuracy is not the downstream selection criterion.

AdamW3e-4, weight decay1e-3, gradient clip1, max20 epochs, patience4. NaN/Inf objectives or gradients fail immediately. Pretext checkpoint selection uses held-out fixed-mask reconstruction loss; model/task selection across the overall study uses only development transfer. The initial mask rate/weights are fixed protocol choices, not an unimplemented hyperparameter search.

## Chronological nested selection and fresh refits

For each target origin t:

1. Choose latest prior enrollment semester v with labels observed before t and earlier labeled support. Do not fall back to random validation.
2. Pretrain at cutoff v using events available strictly before v, training-only vocabulary and student-heldout reconstruction. Select SSL epoch count.
3. Reinitialize and refit SSL at v on all admissible students for the selected count. This matches the vocabulary/event support used by random/supervised history controls.
4. Train downstream selection models on historical labels published before v. Their per-row histories still end at their own enrollment origin. Validate only on v. Select neural epochs/HGB iteration budget by AP; record BCE fallback if AP is undefined because there are no failures.
5. Independently pretrain from scratch at cutoff t using the same frozen recipe and selected SSL epoch count. Refit downstream from scratch on all historical enrollment labels published before t.
6. Generate target histories using prefix H(r); predict once per target row. Compute target metrics only after fitting. Replay the saved model from raw engineered features and historical-prefix construction, not only from the already-generated feature matrix.

SSL artifacts share work only when cutoff, architecture, task, seed, scope, selected epoch budget and study identity agree. There is no warm start across cutoffs. F1–F5 development produces the one protocol freeze. All development selection outcomes must have been published before the earliest F6 origin. Fold IDs must increase with calendar chronology, and every faculty uses the same target semester for a fold. F6/F7 never alter the selected candidate or warning thresholds. Since prior AQ experiments already inspected these folds, results remain retrospective research evidence.

A historical training row's embedding is generated with encoder weights learned within its enclosing fit's admissible corpus, while its input history remains its own strict prefix. This is ordinary representation fitting within the training sample; embeddings are not claimed to be an independently pretrained artifact that existed at each historical training row's original date. The validation/target origins themselves have separate cutoff-valid encoders.

## Downstream recipe and policies

Full engineered inputs are median-imputed/standardized using only selection-training or final-refit rows, with one missing indicator per original field. HGB and neural controls receive the same transformed common information. H1 appends untruncated admissible history summary values; H2/HR append128 learned/random coordinates. HGB uses log loss, learning rate.05, max31 leaves, min20 samples/leaf, L2=1 and candidate iteration budgets50/100/200, with built-in random validation disabled.

Neural heads use a128-unit GELU/dropout MLP with BCE, AdamW3e-4, wd1e-3, max30 epochs, patience5 and clip1. N1 starts a new encoder; N2 freezes all encoder weights and keeps it in eval mode; N3 deep-copies the SSL encoder and fine-tunes. The shared SSL checkpoint is never mutated by another arm. Exact width/capacity matching of the enlarged head is not claimed.

Global per-arm F1/F2 thresholds maximize the corresponding score on seed-averaged development predictions, with deterministic conservative tie breaking. They remain unchanged for F6/F7. Primary selection uses AP, independent of threshold fitting. Alert budgets select exactly ceil(qN) rows with stable row-ID tie breaking; warning counts and realized fractions accompany precision/recall so tiny cohorts are interpretable.

## Interpretation and continuation

The evidence should support a specific mechanism, not a more elaborate model:

- H1>H0 with H2≤H1 suggests useful extra history but no demonstrated SSL advantage.
- N2>N1 and H2>HR support transferable pretraining; these remain controlled comparisons rather than proof of universal causal attribution.
- N3>N2 suggests adaptation helps; N3 gains with frozen transfer failing may reflect relearning rather than a reusable representation.
- GRU/Transformer gains over E0 plus an independently trained chronology placebo gap strengthen the chronology argument. Posthoc input corruption alone is not interpreted as a causal ablation.
- Low reconstruction loss with no consistent downstream gain does not justify scaling.
- Faculty-specific gains concentrated in a few cells or broad subgroup harms are printed and temper continuation.

Promotion requires ≥.01 mean development AP over each H0/H1/HR and wins versus the strongest control in≥60% of paired cells, after averaging seeds. Missing seed/cell/row support blocks promotion where evidence should be estimable. Undefined AP cells are explicitly non-estimable. Retrospective positive evidence is required before considering an operational pilot. This numerical threshold is a practical decision rule, not a significance guarantee.

Bootstrap intervals are descriptive faculty-fold resamples after seed averaging; overlapping students and expanding folds violate independent-cell interpretations. Histories correlate with cohort/survival/semester, so length/OOV/no-history strata do not establish a causal effect of additional history. Historical Suite22/25/34 comparisons require provenance and identical row support for a matched claim; otherwise they remain labeled archival.

## Technical references

Implementation follows the official PyTorch `TransformerEncoder` mask/padding API and scikit-learn `HistGradientBoostingClassifier` API:

- https://docs.pytorch.org/docs/stable/generated/torch.nn.TransformerEncoder.html
- https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.HistGradientBoostingClassifier.html

No unverified claim about TRACE publication timing or external academic performance is necessary for the implemented scientific hypothesis. This package uses no external pretrained weights and requires no API key.
