training loss decreases but training accuracy is also decreasing with epochs

I am working on the classification problem where by I am having a hinge loss function + other loss terms to optimize for which the input is the output from tanh layer at the end. But I can't reveal all the terms of loss, just can mention that it has representation learning loss + hinge loss + regularization terms. It is a binary classification problem. The weird behaviour is that the training loss is decreasing with every epoch, but training accuracy is also decreasing in third or fourth place after decimal point. What could be the probable cause? I am unable to understand this behaviour and the test accuracy is little higher than training accuracy after the complete training. for reference, I am attaching the loss plot and accuracy curves in the same order.

what is the reason for decreasing training accuracy? Due to this I feel I am not getting good results.

• Could you tell us a little bit more about the classification problem? Do you have many or only two classes? And what does the loss function look like exactly? Commented Jul 18, 2022 at 13:42
• @NiklasvMoers : I have edited the post, pls see. Commented Jul 18, 2022 at 15:29
• One possible problem might be that your loss function favors one of the two predictions and your model is overfitting. As an easy example, consider the loss function $f(x, \hat{x}) = 1_{\{x \neq \hat{x}\}} \cdot (w_A 1_{\{x = A\}} + w_B 1_{\{x=B\}})$ with two classes A and B and two different weights $w_A$ and $w_B$. If $w_A > w_B$, your loss function encourages guessing A because it punishes guessing B when the actual class is A more than it punishes guessing A when the actual class is B. Commented Jul 18, 2022 at 15:38
• As you are dealing with a binary classification problem, the loss function can only take 4 different values with $f(x, x) = 0$, so you only need to calculate $f(A, B)$ and $f(B, A)$. If those two are not the same, the above scenario applies. Commented Jul 18, 2022 at 15:40