Downloads · 30 days
3
4% of all-time downloads
TiMauzi/EraClassifierBiLSTM-134M
EraClassifierBiLSTM-134M is a audio classification model from TiMauzi. Use it for the audio classification task on the model card, and read the license before you ship it in a product. The card lists the license as cc-by-sa-4.0.
This model is a bidirectional LSTM neural network designed for musical era classification from MIDI data. It achieves the following results on the evaluation set: - Loss: 1.0162 - Accuracy: 0.6572 - F1: 0.5121
Downloads · 30 days
3
4% of all-time downloads
All-time downloads
78
Public
Parameters
134M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.bin1.1 GB · 50%
From the Hugging Face model README
This model is a bidirectional LSTM neural network designed for musical era classification from MIDI data. It achieves the following results on the evaluation set:
The EraClassifierBiLSTM-134M is a bidirectional LSTM neural network specifically designed for classifying musical compositions into historical eras based on MIDI data analysis. This large model variant (~134M parameters) offers superior performance compared to the compact 4.76M version, making it suitable for applications requiring higher accuracy.
The model processes 8 key MIDI features per message, automatically selected as the most frequent features across the dataset:
Numerical Features (7):
Categorical Features (1):
All numerical features are normalized using dataset statistics (mean and standard deviation), while categorical features are encoded using learned ID mappings.
The model uses a sliding window approach to capture temporal patterns in musical structure that are characteristic of different historical periods. Each MIDI file is processed into multiple overlapping sequences, allowing the model to learn both local and global musical patterns.
Compared to the 4.76M model, this larger variant shows significant improvements:
Below is the confusion matrix for the best-performing checkpoint, visually highlighting these misclassifications (click to enlarge):
<img src="confusion_matrix_best.png" alt="Confusion Matrix" width="500"/>
The numbers 0 through 5 correspond to each era's index during inference.
The model was trained on 6,992 MIDI files from the IMSLP dataset with the following era distribution:
Era thresholding was applied (minimum 150 samples per era), with rare eras like "Early 20th century" (125 samples) and "Medieval" (5 samples) mapped to the "Other" category to maintain classification stability.
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|---|---|---|---|---|---|
| 1.1478 | 0.1031 | 2000 | 1.1945 | 0.5275 | 0.3487 |
| 0.9699 | 0.2063 | 4000 | 1.0621 | 0.6357 | 0.4551 |
| 0.9049 | 0.3094 | 6000 | 1.0657 | 0.5898 | 0.4074 |
| 0.8577 | 0.4126 | 8000 | 1.0708 | 0.6032 | 0.4562 |
| 0.8293 | 0.5157 | 10000 | 1.0425 | 0.6096 | 0.4274 |
| 0.8002 | 0.6188 | 12000 | 1.0197 | 0.6157 | 0.4464 |
| 0.7799 | 0.7220 | 14000 | 1.0540 | 0.6103 | 0.4576 |
| 0.7545 | 0.8251 | 16000 | 1.0288 | 0.6266 | 0.4682 |
| 0.7415 | 0.9283 | 18000 | 1.0332 | 0.6206 | 0.4614 |
| 0.7205 | 1.0314 | 20000 | 1.0262 | 0.6333 | 0.4734 |
| 0.7005 | 1.1345 | 22000 | 0.9989 | 0.6363 | 0.4840 |
| 0.6924 | 1.2377 | 24000 | 1.0136 | 0.6347 | 0.4647 |
| 0.6541 | 1.3408 | 26000 | 0.9917 | 0.6466 | 0.4951 |
| 0.6261 | 1.4440 | 28000 | 0.9876 | 0.6465 | 0.4924 |
| 0.6271 | 1.5471 | 30000 | 1.0057 | 0.6449 | 0.4976 |
| 0.6124 | 1.6503 | 32000 | 0.9994 | 0.6494 | 0.5007 |
| 0.6137 | 1.7534 | 34000 | 1.0015 | 0.6493 | 0.4976 |
| 0.604 | 1.8565 | 36000 | 1.0058 | 0.6524 | 0.4997 |
| 0.6063 | 1.9597 | 38000 | 1.0046 | 0.6512 | 0.5032 |
| 0.5859 | 2.0628 | 40000 | 1.0162 | 0.6572 | 0.5121 |
| 0.5778 | 2.1660 | 42000 | 1.0052 | 0.6591 | 0.5089 |
| 0.5679 | 2.2691 | 44000 | 1.0288 | 0.6539 | 0.5044 |
| 0.5646 | 2.3722 | 46000 | 1.0247 | 0.6559 | 0.5085 |
| 0.5693 | 2.4754 | 48000 | 1.0250 | 0.6581 | 0.5096 |
| 0.5607 | 2.5785 | 50000 | 1.0296 | 0.6573 | 0.5069 |
| 0.5641 | 2.6817 | 52000 | 1.0266 | 0.6573 | 0.5080 |
| 0.5601 | 2.7848 | 54000 | 1.0268 | 0.6577 | 0.5098 |
| 0.5607 | 2.8879 | 56000 | 1.0263 | 0.6539 | 0.5060 |
| 0.5582 | 2.9911 | 58000 | 1.0269 | 0.6593 | 0.5103 |
Below is the full training metrics plot, showing loss, accuracy, and F1-score trends over the entire training process (click to enlarge):
<img src="training_metrics.png" alt="Training Metrics" width="500"/>
The training shows decent convergence with the model reaching its best performance around step 40,000 (epoch 2.06). The larger model capacity allows for faster learning and better final performance compared to the 4.76M variant. The training loss decreases more rapidly while validation metrics show stable improvement, indicating effective use of the increased model capacity without overfitting. The model achieves its peak F1 score of 0.5121 at step 40,000, which was selected as the best checkpoint.