Overfitting on NLP ask

@ptrblck
I am working on Nlp TASK
Could you please let me know if my model is overfitting:

train accuracy:96

valid accuray:83

test accuracy:87

@ptrblck Thanks in advance

You should probably provide more details than just your metrics… what is the NLP task you’re working on, what does the data look like, what kind of model are you using?

Anyway, based of those metrics, do you think your model is over fitting?

I am working on text classification on bert model, I am confused is my model is overfitting based on the above score, Any suggestion, please

Yes it probably is. Why? Because your train accuracy is significantly above your validation or test accuracy. Try investigating something known as early stopping to stop your model from overfitting

Thanks, After doing early stopping, now
train accuracy = 96
val = 83
test = 92
now is it overfitting?

Overfitting isn’t a difficult concept at all - I suggest you take a read through some resources (here’s one: Overfitting in Machine Learning: What It Is and How to Prevent It) to understand when your model is overfitting and strategies to prevent it from doing so