EGG-0.5.1 · Numerical performance research
A small CPU model for estimating ad CTR deterioration from daily numerical history. Research release; human review required.
EGG-0.5.1 uses histogram gradient-boosted trees with sigmoid calibration. It is not an LLM or a ModernBERT fine-tune, and is not input-compatible with EGG-0.5. It does not consume images, creative text, brand names or campaign names.
Run locally
Download this repository's files, then run with Python 3.11 or newer. Inference uses only the Python standard library; no GPU, cloud API, pickle deserialization or package installation is needed.
python inference.py --input synthetic_example.json
python -m unittest test_release.py -v
Or use Python:
from inference import predict
result = predict({"history": [None] * 21 + [
{"impressions": 1000, "inline_link_clicks": 10}
for _ in range(7)
]})
print(result)
This example is synthetic. Do not supply brand names, IDs, URLs or customer text. Unknown extra fields are rejected.
Input and meaning
Supply exactly {"history": [...]}. History has 28 daily positions, oldest first, ending on D−1. An unknown day is null; a known day contains exactly nonnegative integer impressions and inline_link_clicks. Clicks must not exceed impressions. A verified zero-delivery day is { "impressions": 0, "inline_link_clicks": 0 }, not null.
All latest seven days must be present, with at least 5,000 total impressions and 30 total clicks. Earlier days may be missing. CTR is calculated from summed counts, not averaged daily percentages. Inputs must use Meta inline-link clicks, the app-promotion objective, and consistent reporting-day boundaries. Google clicks and other objectives have not been validated.
Target: aggregate CTR over D+1, D+2 and D+3 below 75% of aggregate CTR over D−7 through D−1. Prediction day D is excluded. Research outcome eligibility required three complete outcome days, at least 3,000 impressions and at least 20 expected clicks under historical CTR. These future filters cannot be known at prediction time; measured performance does not cover every live ad.
The result includes deterioration_probability, uncalibrated_score, research_only: true, deployment_approved: false, and automatic_action: null. The probability was calibrated on a separate historical partition; calibration is not guaranteed on a new population. No production alert threshold or automatic budget action is provided.
Architecture and training
28 numerical features: count/CTR summaries and coverage for 1/3/7/14/28-day windows plus three CTR trends. Missing values follow learned tree branches. 150 histogram gradient-boosted trees, learning rate 0.05, at most 15 leaves per tree, minimum 50 samples per leaf, L2 regularization 1, seed 42; random early stopping disabled. Scikit-learn 1.7.2 trained the model on local CPU. The JSON export contains inference parameters only, not retained training examples or per-leaf sample counts.
Training: 14,327 examples; validation: 4,424; calibration: 4,167, from two brands. Four fixed candidates were compared; enriched trees were selected by validation average precision. Sigmoid calibration was fitted afterward. No pretrained language-model weights were used.
Evidence: improvement with limits
Average precision (AP) is a ranking metric, not accuracy. Scores from different populations are not directly comparable.
| Model | Validation AP | September, two seen brands AP | Third brand absent from training AP |
|---|---|---|---|
| Original logistic regression | 0.2463 | 0.2569 | 0.2654 |
| Original numerical tree | 0.3034 | 0.2529 | 0.2961 |
| Enriched logistic regression | 0.2641 | 0.2506 | Not evaluated |
| EGG-0.5.1 enriched tree | 0.3230 | 0.2647 | 0.3278 |
September seen-brand evaluation: 12,321 examples, 1,619 positives. AP gain over the original tree: +0.01185; paired ad-cluster bootstrap 95% interval −0.00466 to +0.02957, which includes zero. Calibrated Brier score is 0.10884; original logistic regression is better at 0.10805.
Third-brand evaluation: 5,586 examples, 490 positives, 665 ads. The model was frozen before evaluation on this brand. AP gain: +0.03169; 95% interval +0.00306 to +0.05483. Precision at the top 10% is 31.48% versus 31.13% for the original tree—a small difference. One brand does not establish broad generalization. No eligible example in this brand has complete 28-day history.
Intervals use 500 paired ad-cluster bootstrap draws; the two-brand analysis is stratified by brand. They do not resolve all temporal or creative-family dependence. See benchmarks.json for aggregate metrics and TESTING.md for package validation.
Limitations and intended use
- Historical latest-state snapshots, not verified point-in-time inputs; timezone mapping and upstream reconciliation remain unresolved.
- September was previously inspected; the third brand was previously audited. Neither is a preregistered blind prospective study.
- Overlapping daily windows are correlated; creative-family overlap has not been established.
- Only Meta app-promotion and inline-link click CTR were studied. No conversion, profit, spend, causal uplift or budget optimization claims.
- No automatic campaign actions. Use as a research comparator or in a human-reviewed shadow evaluation.
- Customer datasets, source identifiers, private maps and per-ad predictions are not distributed. Removing names does not prove model anonymity; no differential-privacy guarantee is made.
Release and licensing
EGG-0.5.1 is a public research artifact, released separately from EGG-0.5. No open-source license is granted by this release; public availability alone does not grant redistribution or commercial-use rights. Contact Hawky for licensing. Scikit-learn is a training dependency; its source code is not bundled.
- Downloads last month
- 27