Add honest roadmap to 22+ with bottleneck analysis and what's needed to get there
Browse files- medal-solvers/README.md +96 -25
medal-solvers/README.md
CHANGED
|
@@ -16,13 +16,92 @@ Each model that scores higher than the base adds points to the Kaggle leaderboar
|
|
| 16 |
|
| 17 |
## Current Score: 6093.19 (V107) | Target: 6100 (bronze) / 6500 (silver)
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
## Priority Tasks
|
| 20 |
|
| 21 |
-
| Task |
|
| 22 |
-
|------|-----------
|
| 23 |
-
| **092** | 13.
|
| 24 |
-
| **064** | 13.
|
| 25 |
-
| **280** | 13.
|
| 26 |
|
| 27 |
## Task 219: ABANDONED β
|
| 28 |
Do not retry. See LEARNING.md.
|
|
@@ -38,22 +117,15 @@ Do not retry. See LEARNING.md.
|
|
| 38 |
submission-6043.zip (LB ~6043)
|
| 39 |
+ 17 optimized hand-crafted models β v72 (LB 6073.29)
|
| 40 |
+ profiled best(v72, 6066) per task β v81 (LB 6086.67)
|
| 41 |
-
+ task243 hand-crafted ONNX (
|
| 42 |
-
+ task370 v6 ONNX (
|
| 43 |
+ 14 onnxsim models (+0.86) β V92 (LB 6090.76)
|
| 44 |
+ additional optimizations β V94 (LB 6092.55)
|
| 45 |
-
+ task202 optimized
|
| 46 |
-
+ task161 optimized (
|
| 47 |
```
|
| 48 |
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
The top-scoring base models use these ONNX tricks to minimize memory:
|
| 52 |
-
- **Float16 + Bool**: 2 bytes and 1 byte per element (vs 4 for float32)
|
| 53 |
-
- **Workspace slicing**: `Slice` input to 20Γ20 or 24Γ24, `Pad` output back to 30Γ30
|
| 54 |
-
- **MaxPool floods**: `MaxPool(x, kernel=[1,K], pads=[0,K-1,0,0])` = flood LEFT in 1 op
|
| 55 |
-
- **Gather reversal**: `Gather(x, reversed_indices, axis=N)` for opposite-direction flood
|
| 56 |
-
- **Iterative Conv(1Γ1)**: For local propagation across multiple objects (task 280)
|
| 57 |
|
| 58 |
## Quick Start
|
| 59 |
|
|
@@ -80,11 +152,10 @@ python build_merged_submission.py \
|
|
| 80 |
|
| 81 |
## Key Rules
|
| 82 |
|
| 83 |
-
1. **NEVER use static scoring** β
|
| 84 |
-
2. **NEVER predict Kaggle version numbers**
|
| 85 |
-
3. **submission-base.zip** = human-managed
|
| 86 |
-
4. **5 submissions/day
|
| 87 |
-
5. **
|
| 88 |
-
6. **
|
| 89 |
-
7. **
|
| 90 |
-
8. **Do NOT use global operations for task 280** β multiple rects per grid!
|
|
|
|
| 16 |
|
| 17 |
## Current Score: 6093.19 (V107) | Target: 6100 (bronze) / 6500 (silver)
|
| 18 |
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
## πΊοΈ ROADMAP TO 22+ (Honest Assessment)
|
| 22 |
+
|
| 23 |
+
### Where we are now:
|
| 24 |
+
```
|
| 25 |
+
Tasks 092/064/280 score: ~13 (memory 130-150k bytes)
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
### The three tiers:
|
| 29 |
+
|
| 30 |
+
```
|
| 31 |
+
TIER 1: Score 15-17 (ACHIEVABLE NOW β engineering work)
|
| 32 |
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 33 |
+
How: Restructure to [1,1,30,30] bool intermediates instead of [1,9,30,30]
|
| 34 |
+
Effort: 1-2 days per task
|
| 35 |
+
Gain: +2 to +4 per task (+6 to +12 total β BRONZE)
|
| 36 |
+
Status: Clear path, just needs implementation
|
| 37 |
+
|
| 38 |
+
TIER 2: Score 18-20 (HARD β requires algorithmic insight)
|
| 39 |
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 40 |
+
How: Reduce to 1-2 intermediates of [1,1,30,30] or use only [1,1,30,1] projections
|
| 41 |
+
Effort: Significant research into minimal-intermediate algorithms
|
| 42 |
+
Gain: +5 to +7 per task
|
| 43 |
+
Status: Possible but unproven. Need clever reformulation.
|
| 44 |
+
|
| 45 |
+
TIER 3: Score 22+ (UNKNOWN β requires breakthrough or external intel)
|
| 46 |
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 47 |
+
How: Single operation inputβoutput, zero intermediates, β€20 params
|
| 48 |
+
Effort: Unknown. May require competition-specific trick.
|
| 49 |
+
Gain: +9 per task (+27 total β SILVER/GOLD territory)
|
| 50 |
+
Status: See bottleneck analysis below.
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
### THE BOTTLENECK TO 22+
|
| 54 |
+
|
| 55 |
+
**Score 22+ requires memory + params β€ 20. That's ZERO spatial intermediates.**
|
| 56 |
+
|
| 57 |
+
The only architecture that achieves this: `input β [SINGLE OP] β output`
|
| 58 |
+
|
| 59 |
+
**Why this is hard for 092/064/280:**
|
| 60 |
+
|
| 61 |
+
These tasks have NONLINEAR rules:
|
| 62 |
+
- Task 092: "Fill BETWEEN two endpoints" = need to know there's a marker to the LEFT **AND** to the RIGHT. That AND is nonlinear.
|
| 63 |
+
- Task 064: "Draw line from marker to rectangle edge" = detect rect, find direction, fill. Multiple conditions.
|
| 64 |
+
- Task 280: "Extend beam in marker direction" = detect edge, determine width, fill directionally.
|
| 65 |
+
|
| 66 |
+
**What single ONNX ops CAN do:**
|
| 67 |
+
- `Conv`: Weighted sum of neighbors. LINEAR. Can't do "if A and B then fill."
|
| 68 |
+
- `MaxPool`: Running max (flood one direction). Can flood LEFT or RIGHT but not compute their intersection.
|
| 69 |
+
- `MatMul`: Matrix multiply. LINEAR.
|
| 70 |
+
- `Relu/Sigmoid`: Elementwise. No spatial context.
|
| 71 |
+
|
| 72 |
+
**What's needed (the AND operation):**
|
| 73 |
+
"Fill between" = (flood_from_left β₯ 1) AND (flood_from_right β₯ 1).
|
| 74 |
+
This requires at minimum: TWO floods + one AND/multiply = 2 intermediates.
|
| 75 |
+
Even bool intermediates of [1,9,30,30] = 2 Γ 8,100 = 16,200 β score 15.3 max with this approach.
|
| 76 |
+
|
| 77 |
+
### WHAT WOULD UNLOCK 22+:
|
| 78 |
+
|
| 79 |
+
| # | What's Needed | How You Can Help |
|
| 80 |
+
|---|---|---|
|
| 81 |
+
| 1 | **See a top scorer's actual .onnx file** | Download from Kaggle if someone shared their submission |
|
| 82 |
+
| 2 | **Kaggle discussion hints** | Top scorers often drop clues about their approach in comments |
|
| 83 |
+
| 3 | **Confirm task 092 specifically scores 22+** | Maybe the 5 people cover only the LINEAR tasks, nobody has 22+ on 092? |
|
| 84 |
+
| 4 | **Unknown ONNX op or trick** | Maybe `BitShift`, `BitwiseAnd`, or a graph construction trick we haven't considered |
|
| 85 |
+
| 5 | **Scorer loophole** | Does declaring wrong shapes in value_info still work? Does ORT optimize away intermediates? |
|
| 86 |
+
| 6 | **Different mathematical formulation** | Maybe "fill between" CAN be expressed linearly with the right encoding? |
|
| 87 |
+
|
| 88 |
+
### SPECIFIC QUESTIONS FOR THE HUMAN:
|
| 89 |
+
|
| 90 |
+
1. **Can you check the Kaggle discussion** for any hints about how people achieve 22+ on complex tasks? Even one comment like "I use MatMul" or "trick with the profiler" would change everything.
|
| 91 |
+
|
| 92 |
+
2. **Do you know if the top 5 people score 22+ on ALL 400 tasks each, or do they each cover ~80 different tasks?** This changes whether 22+ on 092 is proven possible or just assumed.
|
| 93 |
+
|
| 94 |
+
3. **Can you access any top scorer's actual submission .onnx files?** Reverse-engineering one 22+ model for a nonlinear task would crack this wide open.
|
| 95 |
+
|
| 96 |
+
---
|
| 97 |
+
|
| 98 |
## Priority Tasks
|
| 99 |
|
| 100 |
+
| Task | Current | Tier 1 Target | Strategy |
|
| 101 |
+
|------|---------|---------------|----------|
|
| 102 |
+
| **092** | 13.07 | 15-17 | Collapse channels β spatial ops β expand |
|
| 103 |
+
| **064** | 13.21 | 15-17 | Eliminate [1,10] intermediates |
|
| 104 |
+
| **280** | 13.16 | 15-17 | Powers-of-2 Conv doubling |
|
| 105 |
|
| 106 |
## Task 219: ABANDONED β
|
| 107 |
Do not retry. See LEARNING.md.
|
|
|
|
| 117 |
submission-6043.zip (LB ~6043)
|
| 118 |
+ 17 optimized hand-crafted models β v72 (LB 6073.29)
|
| 119 |
+ profiled best(v72, 6066) per task β v81 (LB 6086.67)
|
| 120 |
+
+ task243 hand-crafted ONNX (+2.03) β V88 (LB 6088.70)
|
| 121 |
+
+ task370 v6 ONNX (+1.20) β V91 (LB 6089.90)
|
| 122 |
+ 14 onnxsim models (+0.86) β V92 (LB 6090.76)
|
| 123 |
+ additional optimizations β V94 (LB 6092.55)
|
| 124 |
+
+ task202 optimized (+0.208) β V106 (LB 6092.75)
|
| 125 |
+
+ task161 optimized (+0.429) β V107 (LB 6093.19)
|
| 126 |
```
|
| 127 |
|
| 128 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
|
| 130 |
## Quick Start
|
| 131 |
|
|
|
|
| 152 |
|
| 153 |
## Key Rules
|
| 154 |
|
| 155 |
+
1. **NEVER use static scoring** β off by 50%+. Profile on Kaggle only.
|
| 156 |
+
2. **NEVER predict Kaggle version numbers.**
|
| 157 |
+
3. **submission-base.zip** = human-managed. Don't overwrite.
|
| 158 |
+
4. **5 submissions/day** β profile first.
|
| 159 |
+
5. **5000+ random input tests** before profiling.
|
| 160 |
+
6. **β€ 1.44 MB** per model file.
|
| 161 |
+
7. **Don't work on task 219.**
|
|
|