Downloads · 30 days
0
nahommohan/usif-doordash-ads
usif-doordash-ads is a machine learning model from nahommohan. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
0
Access
Public
Updated Apr 27, 2026
Repo size
2 MB
Likes
0
Public
Click a slice to open those files.
.png2 MB · 82%
From the Hugging Face model README
Transitions DoorDash Ads from DashCLIP embeddings to hierarchical Semantic IDs (SIDs) processed by autoregressive Transformers with auction-aware multi-task heads.
Transforms the ads platform from a retrieval engine into a self-healing, autonomous orchestration layer for the "Agent-to-Agent" (A2A) economy — targeting the $2.6B advertising revenue goal for 2027.
┌─────────────────────────────────────────────────────────────────────────┐
│ USIF + Agentic Marketplace │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ USIF Core (Stages 1-4) │
│ ┌────────┐ ┌─────┐ ┌──────────┐ ┌───────────┐ ┌────────────┐ │
│ │DashCLIP│→│ DST │→│ RQ-VAE │→│ SID │→│ eCPM │ │
│ │(frozen)│ │ MI │ │ Sinkhorn │ │ Transformer│ │ Ranker │ │
│ └────────┘ └─────┘ └──────────┘ │ Hier.RoPE │ │ pClick×pOrd│ │
│ └───────────┘ └────────────┘ │
│ │
│ Agentic Extensions (Layers 1-3) │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────┐ │
│ │ 🐝 Swarm │ │ 🔧 Self- │ │ ⚽ Event-Driven │ │
│ │ Layer │ │ Healing │ │ Contextual Bandits │ │
│ │ │ │ │ │ │ │
│ │ MCP Server │ │ Enhanced │ │ LinUCB / Decay / │ │
│ │ A2A Protocol │ │ Anomaly Det. │ │ HybridBandit / │ │
│ │ Agent Swarm │ │ Segmented │ │ Thompson Sampling │ │
│ │ Thompson Bid │ │ RCA Engine │ │ R=α·rel+β·del+γ·evt │ │
│ └──────────────┘ └──────────────┘ └──────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────┘
| Class | Module | Description | Key Result |
|---|---|---|---|
| DecayLinUCB | contextual_bandit.py | LinUCB with exponential decay (γ=0.999) for non-stationary data | 59.2% regret reduction vs standard LinUCB |
| HybridBandit | contextual_bandit.py | Ensemble of DecayLinUCB + Thompson Sampling with adaptive EMA weighting | Robust across all 20+ tested datasets |
| EXP3Bandit 🆕 | contextual_bandit.py | Adversarial bandit — zero distributional assumptions, IPS reward estimation | O(√(KT log K)) regret, no stationarity needed |
| EnhancedAnomalyDetector | rca_engine.py | Correlation-aware scoring + adaptive per-metric thresholds | 5.5x more detections on correlated anomalies |
| SegmentedAnomalyDetector | rca_engine.py | Per-entity (equipment/host) detector isolation | 27% F1 improvement on multi-equipment data |
| IsolationForestScorer 🆕 | rca_engine.py | Pure numpy Isolation Forest (Liu et al. 2008) for tree-based anomaly scoring | 3.1x F1 improvement (0.098→0.301) on credit card data |
| — | — | Ground-truth CATE evaluation on synthetic uplift data | Validates causal inference accuracy |
| # | Dataset | HF ID | Rows Tested | Category | Key Finding |
|---|---|---|---|---|---|
| 1 | Frappe Mobile App | reczoo/Frappe_x1 | 5,000 | CTR/Context | LinUCB=0.179, rich weather/time/location context |
| 2 | Ebnerd News (RecSys'23) | reczoo/Ebnerd_XLong | 5,000 | News CTR | 8.08% base CTR, hourly CTR range 3.4%–15.4% |
| 3 | UNSW-NB15 Network | rdpahalavan/UNSW-NB15 | 8,000 | Network Intrusion | 7 attack types, F1=0.43, root cause: sload |
| 4 | Industrial Sensors | Petsteb/industrial-sensor-anomaly-data | 10,000 | Equipment Anomaly | 5 equipment, 5 anomaly types, worst: EQ-005 |
| 5 | RetailHero Uplift | pytorch-lifestream/retailhero-uplift | 5,000 | Causal/A/B Test | Real ATE=4.04%, 50K client demographics joined |
| 6 | Synthetic CATE | augmentgerald/uplift_synthetic_data_100trials | 8,000 | Causal Inference | Ground-truth CATE eval, 55.7% targeting quality |
| 7 | StockTicks S&P500 | AI4FinTech/StockTicks | 500 steps | Financial Streaming | 336 tickers, 15 max concurrent anomalies, ACN→A.N causal |
| 8 | Segmented Industrial | (same sensor data) | 10,000 | Per-Equipment | F1: 0.077→0.098 with per-equipment isolation |
| 9 | iPinYou RTB 🆕 | reczoo/iPinYou_x1 | 5,000 | Real-Time Bidding | 0.04% CTR, slot prices, 3 ad exchanges |
| 10 | MovieLens 🆕 | reczoo/MovielensLatest_x1 | 8,000 | Recommendation | 2391 users, 3618 items, LinUCB=0.207 |
| 11 | Credit Card Default 🆕 | imodels/credit-card | 30,000 | Payment Fraud | 21.9% default rate, 6-month payment time series |
| 12 | Electricity Market 🆕 | inria-soda/tabular-benchmark | 38,474 | Market Demand | 99.9% bandit acc, NSW/VIC price causal links |
| 13 | Amazon Electronics 🆕 | reczoo/AmazonElectronics_x1 | 5,000 | Sequential Rec | 481 categories, 7.7 avg browse history |
| Dataset | Source | Key Result |
|---|---|---|
| Avazu CTR (10K rows) | reczoo/Avazu_x4 | LinUCB=0.1005, TS CTR=17.8% |
| Criteo Attribution (20K rows) | criteo/criteo-attribution-dataset | Temporal degradation found, DecayLinUCB fixes |
| Criteo Uplift (5K rows) | criteo/criteo-uplift | 3-arm treatment bandit, 3x random baseline |
| PSM eBay (87K test) | thuml/Time-Series-Library | z_threshold tuned to 4.0 for high-variance data |
| Energy Plants (60K train) | lifelonglab/continual-energy-plants-anomaly-detection | 10 concept clusters, 14K detections |
| SWaT (51 sensors) | thuml/Time-Series-Library | P205 root cause, 2,104 anomalies |
| Bundesliga + ESPN | Live APIs | 31 real goals, multi-sport coverage |
Vision: By mid-2026, personal AI assistants negotiate with merchant APIs in "Zero-Click" commerce. Our system "convinces" the user's AI agent that a specific merchant offers the best value.
| Module | Purpose |
|---|---|
MCP Server (mcp_connector.py) | JSON-RPC 2.0 server exposing 5 tools, 4 resources, 2 prompts via Model Context Protocol |
Agent Swarm (agent_swarm.py) | Decentralized merchant ad-agents with A2A Agent Cards, value proposition negotiation, Thompson Sampling bidding |
query_merchant_catalog — Query items by vertical, price, dietary filterssubmit_bid — Place a bid with budget awarenesscheck_delivery_capacity — Real-time Dasher availabilitynegotiate_value_proposition — Generate multi-dimensional value propget_real_time_bid_strategy — USIF-powered bid optimizationMerchant Agents (5+) → Generate Value Propositions → User Agent Evaluates
→ Multi-Round Negotiation (max 3 rounds) → Winner Selection by Composite Score
→ Thompson Sampling Belief Update → Budget Deduction
Result: Sub-1ms auction latency, Thompson Sampling converges to optimal bids, event-driven bid multipliers (FIFA goal → 2x bid boost).
Vision: Achieve DoorDash's 2026 goal of 10-minute incident resolution. Every minute of Ads Platform downtime costs millions.
Metric Stream → Anomaly Detection (z-score + CUSUM) → Causal Graph (Granger)
→ Root Cause Attribution → Hypothesis Generation → Remediation Suggestion
| Module | Technique | Performance |
|---|---|---|
| AnomalyDetector | EMA z-score + CUSUM drift detection | Base detector for single-entity monitoring |
| EnhancedAnomalyDetector 🆕 | Correlation-aware + adaptive thresholds | 5.5x more detections on correlated failures |
| SegmentedAnomalyDetector 🆕 | Per-entity detector isolation | 27% F1 improvement on multi-equipment data |
| IsolationForestScorer 🆕 | Pure numpy Isolation Forest (tree-based) | 3.1x F1 on credit card data (0.098→0.301) |
| CausalGraphBuilder | Lagged cross-correlation (Granger proxy) | Identifies cpu→latency→error chains |
| RCAEngine | Full investigation pipeline | 14ms average resolution (<<10 min target) |
| Dataset | Type | Anomalies | Key Result |
|---|---|---|---|
| SWaT | Water treatment | 2,104 / 2K rows | P205 root cause, 1.000 confidence |
| PSM eBay | Server metrics | Multi-metric | z_threshold=4.0, feature_17 (disk) root cause |
| UNSW-NB15 🆕 | Network intrusion | 447 / 8K rows | 7 attack types, F1=0.43, sload root cause |
| Industrial 🆕 | Equipment sensors | 379 / 10K rows | 5 anomaly types, EQ-005 worst equipment |
| StockTicks 🆕 | Financial streams | 1,034 across 50 tickers | 15 max concurrent, ACN→A.N causal link |
| Credit Card 🆕 | Payment default | 1,313 / 30K rows | IsolationForest F1=0.301 (3.1x z-score) |
Vision: As Official Tournament Supporter, deploy real-time ad re-ranking synced with live match data.
R = α·relevance + β·delivery_feasibility + γ·event_alignment + δ·revenue
| Algorithm | Use Case | Key Property |
|---|---|---|
| LinUCB | Stationary environments | O(d²) Sherman-Morrison updates |
| DecayLinUCB 🆕 | Non-stationary (user drift) | γ=0.999 exponential decay, 59.2% regret reduction |
| Thompson Sampling | Exploration-heavy scenarios | Gaussian posterior sampling |
| HybridBandit 🆕 | Unknown stationarity | Adaptive ensemble of Decay + TS |
| EXP3Bandit 🆕 | Adversarial rewards | Zero distributional assumptions, IPS estimation |
| EventDrivenBanditSystem | FIFA match integration | Multi-objective reward + live events |
| Match Event | Watch Party | Goal Celebration | Beer Promo | Comfort Food |
|---|---|---|---|---|
| ⚽ Goal | 0.7 | 1.0 | 0.8 | — |
| ⏸️ Halftime | 0.5 | — | — | — |
| 🏁 Match End | — | — | — | — |
| 😰 Close Score | — | — | 0.8 | 0.9 |
| 🎯 Penalty Shootout | — | — | 0.9 | 1.0 |
| Dataset | Type | Rows | Key Result |
|---|---|---|---|
| Avazu | Display ads | 10K | LinUCB=0.1005, TS CTR=17.8% |
| Criteo Attribution | Ad attribution | 20K | Temporal degradation → DecayLinUCB fix |
| Criteo Uplift | Treatment effects | 5K | 3x random baseline |
| Frappe 🆕 | Mobile app CTR | 5K | Weather/time/location context, pos_rate=33.1% |
| Ebnerd 🆕 | News recommendation | 5K | 8.08% CTR, hourly range 3.4%–15.4% |
| RetailHero 🆕 | Promo uplift | 5K | Real ATE=4.04%, 50K demographics |
| Synthetic CATE 🆕 | Causal inference | 8K | Ground-truth eval, 55.7% targeting |
| iPinYou RTB 🆕🆕 | Real-time bidding | 5K | 0.04% CTR, slot prices, 3 ad exchanges |
| MovieLens 🆕🆕 | Recommendation | 8K | 2391 users, 3618 items, LinUCB=0.207 |
| Amazon Electronics 🆕🆕 | Sequential rec | 5K | 481 categories, 7.7 avg browse history |
| Electricity Market 🆕🆕 | Demand/price | 38K | 99.9% bandit accuracy, causal structure |
| Bundesliga | Live soccer | 9 matches | 31 goals, CTR=12.2% |
| ESPN Soccer | Live EPL | 5 matches | Multi-sport bandit |
| ESPN NBA | Live basketball | 4 games | Cross-sport coverage |
| Credit Card Default 🆕🆕 | Payment fraud | 30K | 21.9% default rate, F1=0.098 |
├── usif/ # USIF Core (Stages 1-4)
│ ├── stage1/ # Item Tokenization
│ │ ├── sinkhorn.py # Sinkhorn-stabilized VQ
│ │ ├── rq_vae.py # Residual Quantization VAE
│ │ ├── disentangled_tokenizer.py # DST with MI constraint
│ │ ├── dashclip_encoder.py # Frozen DashCLIP wrapper
│ │ └── item_tokenizer.py # End-to-end pipeline
│ ├── stage2/ # Generative Retrieval
│ │ ├── hierarchical_rope.py # Hierarchical RoPE
│ │ ├── sid_transformer.py # Autoregressive SID Transformer
│ │ └── generative_retriever.py # Cross-vertical retrieval
│ ├── stage3/ # Auction Integration
│ │ ├── auction_heads.py # pClick/pOrder heads
│ │ ├── ecpm_ranker.py # eCPM ranking
│ │ ├── control_tokens.py # Ad/organic control tokens
│ │ └── multi_task_model.py # Unified model
│ ├── stage4/ # Production
│ │ ├── fabricator.py # YAML pipeline framework
│ │ ├── sibyl_serving.py # Sibyl deployment config
│ │ ├── guardrails.py # Adaptive monitoring
│ │ └── shadow_validator.py # Relevance Tax measurement
│ ├── configs/ # YAML/JSON configs
│ └── tests/test_e2e.py # 5/5 stages pass ✅
│
├── agentic_marketplace/ # Agentic Extensions (Layers 1-3)
│ ├── swarm_layer/ # A2A Economy
│ │ ├── mcp_connector.py # MCP Server (JSON-RPC 2.0)
│ │ └── agent_swarm.py # Merchant/User agent swarm
│ ├── self_healing/ # 10-min Resolution
│ │ └── rca_engine.py # Anomaly + Enhanced + Segmented + Causal + RCA
│ ├── event_bandits/ # FIFA World Cup
│ │ └── contextual_bandit.py # LinUCB + DecayLinUCB + HybridBandit + Thompson
│ └── tests/
│ ├── test_full.py # 6/6 tests pass ✅ (Wave 1 real data)
│ ├── test_novel_datasets_v2.py # 9/9 tests pass ✅ (Wave 2 novel datasets)
│ └── test_novel_datasets_v3.py # 5/5 tests pass ✅ (Wave 3 novel datasets)
| Suite | Tests | Status |
|---|---|---|
| USIF Core (5 stages) | 5/5 | ✅ 70+ checks |
| Agentic Marketplace (Wave 1) | 6/6 | ✅ Real Avazu, SWaT, Bundesliga |
| Novel Datasets (Wave 2) | 9/9 | ✅ 8 new datasets + algorithm validation |
| Novel Datasets (Wave 3) | 5/5 | ✅ iPinYou RTB, MovieLens, Credit Card, Electricity, Amazon |
| Combined | 25/25 | ✅ |
| Bug | Dataset | Root Cause | Fix |
|---|---|---|---|
| Temporal degradation | Criteo Attribution | LinUCB accumulates stale data | Created DecayLinUCB (γ=0.999) |
| NoneType crash | PSM eBay | None feature values | Added null-safe float conversion |
| False positive flood | PSM eBay | z_threshold=2.5 too low | Raised to 4.0, warmup to 5000 |
| Cross-equipment confusion | Industrial Sensors | Pooled detector confuses equipment baselines | Created SegmentedAnomalyDetector |
| Treatment-only data | Criteo Uplift | First 500K rows all treatment=1 | Switched to 3-arm within-treatment eval |
| Metric | Target | Mechanism |
|---|---|---|
| $2.6B Ad Revenue (2027) | Swarm agents optimize for "Machine Customers" in A2A economy | |
| 10-min Incident Resolution | Agentic RCA achieves 14ms with causal chain attribution | |
| FIFA World Cup 2026 | Event-driven bandits sync promotions with live match state | |
| Sub-100ms Latency | Sibyl C++ JNI + batch prediction + adaptive scaling | |
| Non-stationary Ad Markets | DecayLinUCB reduces regret by 59.2% on shifting distributions | |
| Adversarial Bid Defense | EXP3 handles adversarial reward shifts without stationarity assumptions | |
| Payment Fraud Detection | IsolationForest achieves 3.1x F1 improvement on credit card defaults | |
| Multi-Equipment Monitoring | SegmentedAnomalyDetector isolates per-entity baselines | |
| Correlated Failure Detection | EnhancedAnomalyDetector catches cascading failures 5.5x better |