0
$\begingroup$

Shown here is the histogram of around 130K predictions of my deep neural network that is classifying some financial data. This is on the dev set but a similar distribution is also seen on the train set.

The output is a sigmoid function with a binary cross entropy loss. The output labels in the dataset are split 50:50 (1 or 0).

There is this large bar around 0.55 which is not mirrored by outputs that predict “negative”. Does that suggest something wrong with the network?

The performance of the network shows significant overfitting despite typical regularization techniques. The inputs are normalized using StandardScaler and I am not using batch normalization.

enter image description here

$\endgroup$

2 Answers 2

1
$\begingroup$

Ideally you want to see two Gaussian-like distributions: one with mean around zero, and another close to one.

enter image description here

  • In the figure, $x$ is not normalized between $0$ and $1$ but you can get the idea.
  • Basically, the more the two are separated the less misclassification errors you would get.

In your plot, the sigmoid is like stuck around $0.5$ meaning that your network is not confident enough about whether a sample is positive or negative. Indeed, you can still find a suitable threshold to find the positive class, e.g., by cross-validation on train sample. Try also to have a look at the ROC/PR curves, probably you would see a not so ideal shape at the beginning and/or low AUC.

What you can try to improve is to change weight initialization, and/or architecture of the network. Also, if the network is overfitting try reducing #parameters and add Dropout.

$\endgroup$
1
$\begingroup$

If you really care about the entire probability distribution and not only the predicted class, then you should definitely think about calibrating your model using for example Platt's scaling or isotonic regression. The raw distribution probability output by the model is often not usable as the model tend to be overconfident for example.

Also, having this big spike at 0.55 seems a bit weird, and almost no data has a high probability... Maybe your loss is not suitable for the problem, or the model is too small.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.