In the classification problem, when the training accuracy reach nearly 100%,the testing accuracy is about 50% and continued to increase. Does it mean that my model is overfitted? But the testing loss is still decreasing?

nikiguo93: <p>Hi guys, I used multi-task model to do regression and classification.<br>
for the classification, when the training accuracy reach nearly 100%,the testing accuracy is about 50% and continued to increase.  Does it mean that my model is overfitted? But the total testing loss is still decreasing?<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/f/e/fe5bf5e40f904e7806f69d2e2d052e9b6b8b8deb.png" data-download-href="https://discuss.pytorch.org/uploads/default/fe5bf5e40f904e7806f69d2e2d052e9b6b8b8deb" title="1648500389(1)"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/f/e/fe5bf5e40f904e7806f69d2e2d052e9b6b8b8deb_2_690x244.png" alt="1648500389(1)" data-base62-sha1="AiaiIOqN9Xc41K9W2PE7tnY9p4T" width="690" height="244" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/f/e/fe5bf5e40f904e7806f69d2e2d052e9b6b8b8deb_2_690x244.png, https://discuss.pytorch.org/uploads/default/original/3X/f/e/fe5bf5e40f904e7806f69d2e2d052e9b6b8b8deb.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/f/e/fe5bf5e40f904e7806f69d2e2d052e9b6b8b8deb.png 2x" data-dominant-color="FAF9F8"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">1648500389(1)</span><span class="informations">848×300 21.7 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
<img src="https://discuss.pytorch.org/uploads/default/original/3X/1/a/1a96417d860c9f38bedcaa6a717c92a653337638.png" alt="1648500422(1)" data-base62-sha1="3NckOZcKXrLhQrXzNf5odtPO53G" width="425" height="299"><br>
<img src="https://discuss.pytorch.org/uploads/default/original/3X/4/7/47a1dca288745731d1dc67782bcb7706c534c6f3.png" alt="1648500452(1)" data-base62-sha1="adGGE0qvG5wnEnMPvJqjSZvG0Nl" width="425" height="306"></p>

KFrank: <p>Hi Nikiguo!</p>
<aside class="quote no-group" data-username="nikiguo93" data-post="1" data-topic="147686" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/nikiguo93/48/30791_2.png" class="avatar"> nikiguo93:</div>
<blockquote>
<p>Does it mean that my model is overfitted? But the total testing loss is still decreasing?</p>
</blockquote>
</aside>
<p>I don’t know if there is an “official” definition of overfitting.  (Maybe there<br>
is – I just don’t know.)</p>
<p>But here’s how I look at it:</p>
<p>“Overfitting” means not just that your results (loss, accuracy, and / or<br>
other performance metrics) are better for your training set than for<br>
your test (or validation) set, but, furthermore, as you continue to train,<br>
your test-set results actually get <em>worse</em>.</p>
<p>We expect the training-set results to be better – after all, the network<br>
has already seen the training samples – so that’s okay.  What we <em>don’t</em><br>
want is for the network to focus so much on “learning” specific features<br>
of the specific samples that happen to be in the training set that it degrades<br>
its ability to “learn” the features that are relevant to making predictions for<br>
samples it hasn’t yet seen (such as those in the test set).</p>
<p>You can’t really prevent your network from learning test-set-specific<br>
features.  In isolation, I don’t call this overfitting.  As long as the network<br>
is still also learning those features relevant to your real problem, then<br>
you’re still doing fine – at least as I see it.</p>
<p>So as long as your test-set loss is still going down (or other performance<br>
metrics are still improving) with further training, you haven’t yet hit what I<br>
would call “overfitting” (and you’re still making useful progress on the<br>
problem you’re trying to solve).</p>
<p>Best.</p>
<p>K. Frank</p>