maximuspowers commited on
Commit
9f26366
·
verified ·
1 Parent(s): 3bfa9f4

Upload model, config, and documentation

Browse files
Files changed (3) hide show
  1. README.md +77 -0
  2. best_model.pt +3 -0
  3. config.yaml +111 -0
README.md ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - pattern-classification
4
+ - multi-label-classification
5
+ datasets:
6
+ - maximuspowers/muat-mean-std-pca-10-fourier-5
7
+ ---
8
+
9
+ # Pattern Classifier
10
+
11
+ This model was trained to classify which patterns a subject model was trained on, based on neuron activation signatures.
12
+
13
+ ## Dataset
14
+
15
+ - **Training Dataset**: [maximuspowers/muat-mean-std-pca-10-fourier-5](https://huggingface.co/datasets/maximuspowers/muat-mean-std-pca-10-fourier-5)
16
+ - **Input Mode**: signature
17
+ - **Number of Patterns**: 14
18
+
19
+ ## Patterns
20
+
21
+ The model predicts which of the following 14 patterns the subject model was trained to classify as positive:
22
+
23
+ 1. `palindrome`
24
+ 2. `sorted_ascending`
25
+ 3. `sorted_descending`
26
+ 4. `alternating`
27
+ 5. `contains_abc`
28
+ 6. `starts_with`
29
+ 7. `ends_with`
30
+ 8. `no_repeats`
31
+ 9. `has_majority`
32
+ 10. `increasing_pairs`
33
+ 11. `decreasing_pairs`
34
+ 12. `vowel_consonant`
35
+ 13. `first_last_match`
36
+ 14. `mountain_pattern`
37
+
38
+ ## Model Architecture
39
+
40
+ - **Signature Encoder**: [512, 256, 256, 128]
41
+ - **Activation**: relu
42
+ - **Dropout**: 0.2
43
+ - **Batch Normalization**: True
44
+
45
+ ## Training Configuration
46
+
47
+ - **Optimizer**: adam
48
+ - **Learning Rate**: 0.001
49
+ - **Batch Size**: 16
50
+ - **Loss Function**: BCE with Logits (with pos_weight for training, unweighted for validation)
51
+
52
+ ## Test Set Performance
53
+
54
+ - **F1 Macro**: 0.3432
55
+ - **F1 Micro**: 0.3193
56
+ - **Hamming Accuracy**: 0.7634
57
+ - **Exact Match Accuracy**: 0.0380
58
+ - **BCE Loss**: 0.4263
59
+
60
+ ### Per-Pattern Performance (Test Set)
61
+
62
+ | Pattern | Precision | Recall | F1 Score |
63
+ |---------|-----------|--------|----------|
64
+ | palindrome | 17.2% | 79.1% | 28.2% |
65
+ | sorted_ascending | 36.3% | 77.4% | 49.4% |
66
+ | sorted_descending | 16.7% | 92.0% | 28.2% |
67
+ | alternating | 23.3% | 74.4% | 35.5% |
68
+ | contains_abc | 29.7% | 90.6% | 44.8% |
69
+ | starts_with | 13.8% | 79.7% | 23.5% |
70
+ | ends_with | 35.5% | 75.3% | 48.3% |
71
+ | no_repeats | 14.3% | 70.1% | 23.8% |
72
+ | has_majority | 63.3% | 48.7% | 55.1% |
73
+ | increasing_pairs | 18.4% | 84.3% | 30.3% |
74
+ | decreasing_pairs | 16.7% | 83.0% | 27.9% |
75
+ | vowel_consonant | 14.3% | 31.6% | 19.7% |
76
+ | first_last_match | 32.5% | 67.5% | 43.9% |
77
+ | mountain_pattern | 12.7% | 82.5% | 22.1% |
best_model.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:30a2338d8e0c84ce555382fc514f6164de2bb0babdec49f8c6ff4b978df73f79
3
+ size 14024184
config.yaml ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataloader:
2
+ num_workers: 0
3
+ pin_memory: true
4
+ dataset:
5
+ cache_dir: .cache/classifier_data
6
+ hf_dataset: maximuspowers/muat-mean-std-pca-10-fourier-5
7
+ input_mode: signature
8
+ max_dimensions:
9
+ max_layers: 13
10
+ max_neurons_per_layer: 8
11
+ max_sequence_length: 5
12
+ neuron_profile:
13
+ methods:
14
+ fourier:
15
+ n_frequencies: 5
16
+ mean: {}
17
+ pca:
18
+ components: 10
19
+ std: {}
20
+ patterns:
21
+ - palindrome
22
+ - sorted_ascending
23
+ - sorted_descending
24
+ - alternating
25
+ - contains_abc
26
+ - starts_with
27
+ - ends_with
28
+ - no_repeats
29
+ - has_majority
30
+ - increasing_pairs
31
+ - decreasing_pairs
32
+ - vowel_consonant
33
+ - first_last_match
34
+ - mountain_pattern
35
+ random_seed: 42
36
+ test_split: 0.1
37
+ train_split: 0.8
38
+ val_split: 0.1
39
+ device:
40
+ type: auto
41
+ evaluation:
42
+ decision_threshold: 0.5
43
+ metrics:
44
+ - accuracy_exact_match
45
+ - accuracy_hamming
46
+ - precision_macro
47
+ - recall_macro
48
+ - f1_macro
49
+ - f1_micro
50
+ per_pattern_metrics: true
51
+ hub:
52
+ enabled: true
53
+ private: false
54
+ push_frequency: epoch
55
+ push_logs: true
56
+ push_metrics: true
57
+ push_model: true
58
+ repo_id: maximuspowers/muat-mean-std-pca-10-fourier-5-classifier
59
+ token: <REDACTED>
60
+ logging:
61
+ checkpoint:
62
+ enabled: true
63
+ mode: max
64
+ monitor: val_f1_macro
65
+ save_best_only: true
66
+ save_dir: ./checkpoints/classifier_all
67
+ tensorboard:
68
+ enabled: true
69
+ log_dir: ./runs/classifier_all
70
+ log_interval: 10
71
+ verbose: true
72
+ model:
73
+ fusion:
74
+ activation: relu
75
+ dropout: 0.2
76
+ hidden_dims:
77
+ - 128
78
+ - 64
79
+ output:
80
+ num_patterns: 14
81
+ signature_encoder:
82
+ activation: relu
83
+ dropout: 0.2
84
+ hidden_dims:
85
+ - 512
86
+ - 256
87
+ - 256
88
+ - 128
89
+ use_batch_norm: true
90
+ weight_encoder:
91
+ activation: relu
92
+ dropout: 0.2
93
+ training:
94
+ batch_size: 16
95
+ early_stopping:
96
+ enabled: true
97
+ mode: min
98
+ monitor: val_loss
99
+ patience: 50
100
+ epochs: 1000
101
+ learning_rate: 0.001
102
+ loss: bce_with_logits
103
+ lr_scheduler:
104
+ enabled: true
105
+ factor: 0.5
106
+ min_lr: 1.0e-05
107
+ patience: 20
108
+ type: reduce_on_plateau
109
+ optimizer: adam
110
+ pos_weight: null
111
+ weight_decay: 0.0001