maximuspowers commited on
Commit
82a2174
·
verified ·
1 Parent(s): c3ea2e8

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +88 -0
README.md ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - pattern-classification
4
+ - multi-label-classification
5
+ datasets:
6
+ - maximuspowers/muat-fourier-3
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-fourier-3](https://huggingface.co/datasets/maximuspowers/muat-fourier-3)
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 on:
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.2985
55
+ - **F1 Micro**: 0.2756
56
+ - **Hamming Accuracy**: 0.7292
57
+ - **Exact Match Accuracy**: 0.0250
58
+ - **BCE Loss**: 0.4709
59
+
60
+ ### Per-Pattern Performance (Test Set)
61
+
62
+ | Pattern | Precision | Recall | F1 Score |
63
+ |---------|-----------|--------|----------|
64
+ | palindrome | 14.1% | 90.0% | 24.4% |
65
+ | sorted_ascending | 49.1% | 62.1% | 54.8% |
66
+ | sorted_descending | 12.9% | 89.7% | 22.5% |
67
+ | alternating | 18.6% | 69.9% | 29.4% |
68
+ | contains_abc | 26.4% | 73.7% | 38.8% |
69
+ | starts_with | 9.6% | 84.7% | 17.3% |
70
+ | ends_with | 15.1% | 82.2% | 25.5% |
71
+ | no_repeats | 12.7% | 59.3% | 21.0% |
72
+ | has_majority | 56.2% | 34.6% | 42.9% |
73
+ | increasing_pairs | 27.6% | 66.7% | 39.0% |
74
+ | decreasing_pairs | 16.5% | 80.8% | 27.4% |
75
+ | vowel_consonant | 12.1% | 50.0% | 19.5% |
76
+ | first_last_match | 21.1% | 78.1% | 33.2% |
77
+ | mountain_pattern | 13.8% | 54.3% | 22.0% |
78
+
79
+ ## Usage
80
+
81
+ ```python
82
+ import torch
83
+ from huggingface_hub import hf_hub_download
84
+
85
+ # Download the model
86
+ checkpoint_path = hf_hub_download(repo_id='maximuspowers/muat-fourier-3-classifier', filename='best_model.pt')
87
+ checkpoint = torch.load(checkpoint_path)
88
+ ```