How to Improve Accuracy and Balance Recall and Specificity for DNABERT-2-117M Binary Classification?
I’m fine-tuning the DNABERT-2-117M model on a binary classification task with 12,000 DNA sequences (each 100 bp long). Here are my training settings:
batch_size=128
learning_rate=1e-5
weight_decay=0.01
num_train_epochs=10
On the validation set, the metrics are as follows:
eval_loss: 0.6446, eval_accuracy: 0.627, eval_f1: 0.696, eval_precision: 0.594, eval_recall: 0.841.
However, on the test set (1,200 samples), I noticed that among the sequences predicted as class 1, 408 samples have predicted probabilities between 0.4 and 0.8, which indicates uncertainty and makes it hard to achieve high accuracy and balanced performance.
Does anyone have suggestions on how to improve accuracy while balancing recall and specificity?
Any insights are greatly appreciated—thank you!