File size: 7,205 Bytes
b245f96
 
 
 
 
 
 
99b26f2
b245f96
 
 
 
 
 
 
 
 
70108cc
b245f96
 
 
 
 
 
 
 
 
7c31b8d
b245f96
 
 
 
70108cc
b245f96
 
 
99b26f2
b245f96
99b26f2
b245f96
 
 
 
 
 
 
7c31b8d
 
99b26f2
 
 
70108cc
99b26f2
b245f96
 
 
25361a3
 
b245f96
 
7c31b8d
bfecc56
4da04b4
9784624
0ed2902
f1e982e
802989d
02738d4
4addf1a
dbe2a0c
da2e337
99b26f2
90b7426
e89fadc
b245f96
 
 
 
 
99b26f2
a570768
b245f96
7c31b8d
b245f96
 
 
 
 
a570768
1a7d185
a570768
b245f96
70108cc
 
b245f96
 
9dd3adb
b245f96
 
 
 
 
 
 
70108cc
b245f96
 
59ffdd1
b245f96
26dfceb
59ffdd1
b245f96
70108cc
 
b245f96
1a7d185
 
b245f96
 
 
 
 
 
 
 
9dd3adb
b245f96
 
 
 
9dd3adb
b08aa94
b340c55
b245f96
 
 
 
 
 
 
 
 
 
a570768
b245f96
 
 
b340c55
b245f96
 
 
 
 
 
 
 
 
 
 
 
 
b340c55
b245f96
 
 
 
 
 
 
 
 
b340c55
b245f96
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b340c55
b245f96
 
 
 
 
b340c55
b245f96
 
 
 
 
 
 
 
7c31b8d
99b26f2
 
 
 
b245f96
 
 
99b26f2
 
 
 
 
b245f96
 
df3e3f1
9dd3adb
b245f96
 
 
 
 
 
 
 
 
a570768
9dd3adb
b245f96
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
---
license: mit
tags:
- image-classification
- cifar100
- geometric-learning
- fractal-encoding
- trained
- no-attention
- no-cross-entropy
datasets:
- cifar100
metrics:
- accuracy
library_name: pytorch
pipeline_tag: image-classification
model-index:
- name: geo-beatrix-resnet34-step20-feats1000
  results:
  - task:
      type: image-classification
      name: Image Classification
    dataset:
      name: CIFAR-100
      type: cifar100
    metrics:
    - type: accuracy
      value: 56.12
      name: Test Accuracy
      verified: false
---

# geo-beatrix-resnet34-step20-feats1000

**Geometric Basin Classification for CIFAR-100**

πŸŽ‰ **Training Complete** πŸŽ‰

Final Status: Epoch 200/200

---

## Current Performance

| Metric | Value |
|--------|-------|
| **Best Test Accuracy** | **56.12%** |
| **Best Epoch** | 160 |
| **Current Train Accuracy** | 59.29% |
| **Current Test Accuracy** | 51.51% |
| **Current Ξ± (Cantor param)** | 0.4031 |
| **Total Parameters** | 28,561,101 |
| **Training Time** | 0:27:18 |

### All Training Runs

Autogen bug, they all have different test accs.

| Timestamp | Status | Best Epoch | Test Acc | Train Acc | Ξ± |
|-----------|--------|------------|----------|-----------|---|
| `20251010_203717` | βœ… | 160 | **56.12%** | 67.82% | 0.4481 |
| `20251010_211210` | πŸ”„ | 160 | **56.12%** | 16.21% | 0.3879 |
| `20251010_213807` | βœ… | 160 | **56.12%** | 64.44% | 0.4419 |
| `20251010_230300` | βœ… | 160 | **56.12%** | 52.13% | 0.4997 |
| `20251010_234239` | βœ… | 160 | **56.12%** | 73.34% | 0.4882 |
| `20251011_002858` | βœ… | 160 | **56.12%** | 46.05% | 0.4712 |
| `20251011_012453` | βœ… | 160 | **56.12%** | 40.18% | 0.4963 |
| `20251011_023128` | βœ… | 160 | **56.12%** | 54.65% | 0.5005 |
| `20251011_025919` | βœ… | 160 | **56.12%** | 57.80% | 0.4994 |
| `20251011_032343` | βœ… | 160 | **56.12%** | 53.80% | 0.4377 |
| `20251011_034748` | βœ… | 160 | **56.12%** | 65.10% | 0.4326 |
| `20251011_041716` | βœ… | 160 | **56.12%** | 59.29% | 0.4031 |
| `20251010_200842` | βœ… | 180 | **53.61%** | 67.53% | 0.4442 |
| `20251010_185133` | βœ… | 200 | **52.97%** | 69.87% | 0.4452 |

### Comparison to State-of-the-Art

| Model | Accuracy | Status |
|-------|----------|--------|
| **geo-beatrix (this model)** | **56.12%** | βœ… Complete |
| geo-beatrix (50M params) | 69.0% | Geometric Basin CONV architecture |

🎯 **Current target**: Beat geo-beatrix (69.0%) - Currently -12.88%

---

## Architecture

- **Base**: ResNet34 (torchvision)
- **Pretrained**: From scratch
- **Features**: 512-dim from ResNet34
- **Positional Encoding**: Devil's Staircase (Cantor function, 1883)
- **PE Levels**: 20
- **PE Features/Level**: 1000
- **Classification**: Geometric Basin Compatibility (NO cross-entropy)
- **Attention Mechanisms**: NONE
- **Mixing**: Standard (single patch)

---

## Training Configuration

```json
{
  "model_name": "geo-beatrix-resnet34-step20-feats1000",
  "model_type": "geometric_basin_classifier",
  "num_classes": 100,
  "batch_size": 512,
  "num_epochs": 200,
  "base_learning_rate": 0.001,
  "weight_decay": 0.05,
  "warmup_epochs": 10,
  "pe_levels": 20,
  "pe_features_per_level": 1000,
  "dropout": 0.1,
  "pretrained_resnet": false,
  "frozen_resnet": false,
  "a100_optimizations": {
    "mixed_precision": true,
    "torch_compile": false,
    "channels_last": true,
    "gradient_checkpointing": false
  },
  "alphamix": {
    "enabled": true,
    "fractal_mode": false,
    "range": [
      0.3,
      0.7
    ],
    "spatial_ratio": 0.1,
    "curriculum_start": 0.0,
    "curriculum_end": 0.75,
    "fractal_steps": [
      1,
      3
    ],
    "fractal_scales": [
      0.3333333333333333,
      0.1111111111111111,
      0.037037037037037035
    ]
  },
  "architecture": "ResNet34 + Devil's Staircase PE",
  "loss_function": "Geometric Basin Compatibility",
  "cross_entropy": false,
  "attention_mechanisms": false,
  "timestamp": "20251011_041716"
}
```

---

## Files Structure

```
β”œβ”€β”€ model.pt                 (BEST overall model - easy access!)
β”œβ”€β”€ model.safetensors        (BEST overall model - easy access!)
β”œβ”€β”€ best_model_info.json     (which epoch/run this came from)
β”œβ”€β”€ runs_history.json        (all training runs and their results)
β”œβ”€β”€ README.md
β”œβ”€β”€ weights/geo-beatrix-resnet34-step20-feats1000/20251011_041716/
β”‚   β”œβ”€β”€ model.pt                 (best from this training run)
β”‚   β”œβ”€β”€ model.safetensors        (best from this training run)
β”‚   β”œβ”€β”€ config.json
β”‚   β”œβ”€β”€ training_log.txt
β”‚   └── checkpoints/
β”‚       β”œβ”€β”€ checkpoint_epoch_50.safetensors
β”‚       β”œβ”€β”€ checkpoint_epoch_100.safetensors
β”‚       └── checkpoint_epoch_150.safetensors
β”‚       (snapshots every 10 epochs)
└── runs/geo-beatrix-resnet34-step20-feats1000/20251011_041716/
    β”œβ”€β”€ events.out.tfevents.*    (TensorBoard logs)
    └── metrics.csv              (training metrics)
```

**Note**: The root `model.pt` and `model.safetensors` always contain the best model across all training runs!

---

## Usage

```python
from huggingface_hub import hf_hub_download
import torch

# EASIEST: Download BEST overall model from root (recommended!)
from safetensors.torch import load_file
model_path = hf_hub_download(
    repo_id="AbstractPhil/geo-beatrix-resnet",
    filename="model.safetensors"
)
state_dict = load_file(model_path)
# model.load_state_dict(state_dict)

# Check which epoch/run the best model came from
info_path = hf_hub_download(
    repo_id="AbstractPhil/geo-beatrix-resnet",
    filename="best_model_info.json"
)
with open(info_path) as f:
    best_info = json.load(f)
    print(f"Best model: epoch {best_info['epoch']}, {best_info['test_accuracy']:.2f}%")

# Or download from specific training run
model_path = hf_hub_download(
    repo_id="AbstractPhil/geo-beatrix-resnet",
    filename="weights/geo-beatrix-resnet34-step20-feats1000/20251011_041716/model.safetensors"
)

# Download specific epoch checkpoint
epoch_checkpoint = hf_hub_download(
    repo_id="AbstractPhil/geo-beatrix-resnet",
    filename="weights/geo-beatrix-resnet34-step20-feats1000/20251011_041716/checkpoints/checkpoint_epoch_100.safetensors"
)
```

---

## Training History

### Best Checkpoint
- Epoch: 160
- Train Acc: 59.43%
- Test Acc: 51.64%
- Alpha: 0.4071
- Loss: 0.7570

### Latest 5 Epochs

- **Epoch 196**: Train 62.03%, Test 0.00%, Ξ±=0.4032, Loss=0.7300
- **Epoch 197**: Train 59.02%, Test 0.00%, Ξ±=0.4031, Loss=0.6201
- **Epoch 198**: Train 58.49%, Test 0.00%, Ξ±=0.4031, Loss=0.6571
- **Epoch 199**: Train 59.32%, Test 0.00%, Ξ±=0.4031, Loss=0.6543
- **Epoch 200**: Train 59.29%, Test 51.51%, Ξ±=0.4031, Loss=0.6505

### Training Milestones
- 🎯 **50% Accuracy** reached at epoch 120
- πŸ“Š **Ξ± β‰₯ 0.40** reached at epoch 17

---

## Innovation

βœ… **NO attention mechanisms**  
βœ… **NO cross-entropy loss**  
βœ… **Fractal positional encoding** (Cantor function from 1883)  
βœ… **Geometric compatibility classification**  
βœ… **ResNet34 backbone** (proven CNN architecture)


---

**Repository**: https://huggingface.co/AbstractPhil/geo-beatrix-resnet  
**Author**: AbstractPhil  
**Framework**: PyTorch