When using pre-trained models, the key metrics to watch are training time and validation accuracy. Pre-trained models speed up training because they start with learned features, so they need fewer steps to reach good accuracy. Watching validation accuracy helps confirm the model is learning well without overfitting.
Why pre-trained models accelerate development in PyTorch - Why Metrics Matter
Example confusion matrix after fine-tuning a pre-trained model:
Predicted
Pos Neg
Actual
Pos 85 15
Neg 10 90
Total samples = 200
TP=85, FP=10, TN=90, FN=15
This shows the model correctly identified 85 positive and 90 negative cases, with some errors. Pre-trained models often improve these numbers faster than training from scratch.
Pre-trained models help balance precision and recall quickly. For example, in a medical image classifier, recall (catching all sick patients) is critical. A pre-trained model can reach high recall faster, reducing missed cases. In spam detection, precision (not marking good emails as spam) is key. Pre-trained models help tune this balance efficiently by starting with useful features.
Good: Validation accuracy above 85%, precision and recall balanced above 80%, and training time reduced by 50% compared to training from scratch.
Bad: Validation accuracy below 70%, large gap between precision and recall (e.g., precision 90% but recall 40%), and long training times similar to training from scratch.
- Accuracy paradox: High accuracy can be misleading if classes are imbalanced. Pre-trained models might seem good but fail on minority classes.
- Data leakage: Using test data during fine-tuning inflates metrics falsely.
- Overfitting: Very high training accuracy but low validation accuracy means the model memorized training data, not learned general features.
No, it is not good for fraud detection. The high accuracy likely comes from many normal cases, but the very low recall means the model misses most fraud cases. For fraud, catching fraud (high recall) is more important than overall accuracy.