research

recommendation guardrails

A post-model safety layer that rounds targets to real gym increments, clamps movement around recent anchor sets, widens uncertainty when confidence is low, and keeps sparse-history outputs conservative.

Why guardrails exist

The predictor does not send its raw output straight into the logger. logit adds a second layer whose job is not to be clever, but to keep recommendations within a believable working range for the next session.

That distinction matters. The predictor estimates where the anchor set should land. The guardrails decide how aggressively that estimate is allowed to move once it is translated into a real plate-loaded recommendation for today.

1. Gym-increment rounding

Every weighted recommendation is snapped to the increment the user can actually load in the gym. In logit that increment is five pounds in pound mode and 2.5 kilograms in kilogram mode.

g={5lb mode2.5kg modeg = \begin{cases}5 & \text{lb mode}\\2.5 & \text{kg mode}\end{cases}g={52.5​lb modekg mode​wround=round⁡ ⁣(wpredg)gw_{\mathrm{round}} = \operatorname{round}\!\left(\frac{w_{\mathrm{pred}}}{g}\right) gwround​=round(gwpred​​)g
Interpretation. g is the available gym increment in display units. The raw predicted load is rounded to the nearest loadable step before any clamp is applied.

Internally, stored loads remain pound-based. The product converts to the active display unit, rounds there, and then converts back to stored pounds so the displayed target and persisted value stay aligned.

2. Anchor clamp around recent reality

After rounding, the anchor recommendation is still not free to drift arbitrarily. Upward movement is limited to one increment above the most recent anchor. Downward movement gets a little more room because under-shooting is safer than over-shooting, especially after a layoff.

Δ+=g\Delta_+ = gΔ+​=gΔ−={2gd≤283gd>28\Delta_- = \begin{cases}2g & d \le 28\\3g & d > 28\end{cases}Δ−​={2g3g​d≤28d>28​w~=clamp⁡(wround,wrecent−Δ−,wrecent+Δ+)\tilde{w} = \operatorname{clamp}(w_{\mathrm{round}}, w_{\mathrm{recent}} - \Delta_-, w_{\mathrm{recent}} + \Delta_+)w~=clamp(wround​,wrecent​−Δ−​,wrecent​+Δ+​)
Interpretation. d is days since the last matching exposure. The final anchor load ŵ cannot jump more than one step above the recent anchor, and can only fall by two steps unless the layoff is longer than twenty-eight days.

3. Later-set shape constraints

Later visible sets are rebuilt from the anchor prediction using historical median backoff ratios and rep deltas. If a stable historical profile is missing, logit uses a conservative fallback structure instead of pretending the later sets are known.

w^j=min⁡ ⁣(w^anchor,w^anchorρj)\hat{w}_j = \min\!\left(\hat{w}_{\mathrm{anchor}}, \hat{w}_{\mathrm{anchor}} \rho_j\right)w^j​=min(w^anchor​,w^anchor​ρj​)r^j=max⁡(1,r^anchor+δj)\hat{r}_j = \max(1, \hat{r}_{\mathrm{anchor}} + \delta_j)r^j​=max(1,r^anchor​+δj​)
Interpretation. Each later set inherits the anchor estimate and is adjusted by the user's historical weight ratio ρ and rep delta δ. The later-set load is never allowed to exceed the anchor load.
Later-set fallbackWeight ratioRep delta
Set 20.970
Set 30.94-1
Set 40.92-2
Set 5+Steps down to a floor of 0.88Subtracts one more rep per set

4. Confidence-linked uncertainty bands

The surfaced recommendation is not just a single number. logit also shows a rep range whose width depends on the confidence label. Low confidence gets a wider band; medium and high confidence get a tighter one.

s={2low confidence1medium or high confidences = \begin{cases}2 & \text{low confidence}\\1 & \text{medium or high confidence}\end{cases}s={21​low confidencemedium or high confidence​range(r)=[max⁡(1,r−s),max⁡(1,r+s)]\mathrm{range}(r) = [\max(1, r - s), \max(1, r + s)]range(r)=[max(1,r−s),max(1,r+s)]
Interpretation. The range is a product-facing uncertainty band, not a second prediction target. It widens when the evidence is weak.

5. Conservative ceilings for sparse and bodyweight history

Some limits sit above the numeric score itself. A prediction based on only one matching session is always labeled low confidence, even if the raw score would have landed higher. Bodyweight-only predictions also cannot rise above medium confidence.

These rules are deliberate product choices. Sparse history can still be useful, but the interface should not dress a thin sample in high-certainty language.