Normalization condition with a neural network

Click For Summary

Discussion Overview

The discussion revolves around the challenge of ensuring that a neural network approximates an unknown distribution while maintaining a normalization condition for the predicted probability function. Participants explore methods to incorporate normalization into the loss function during training.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant proposes a loss function that includes a term for normalization, suggesting that the overall loss should account for the integral of the predicted function to ensure it sums to one.
  • Another participant inquires about the structure of the neural network being used, asking if it will adapt its complexity based on input and requesting any relevant code or pseudocode.
  • A different participant references an external document related to scanning for objects in 2D frames, suggesting it may contain relevant insights for the problem at hand.
  • One participant suggests using standard normalization or softmax as a potential method to impose the normalization condition on the predicted outputs.

Areas of Agreement / Disagreement

Participants have not reached a consensus on the best method for imposing normalization, and multiple approaches are being discussed without resolution.

Contextual Notes

There are limitations regarding the assumptions made about the neural network's structure and the specifics of the normalization methods proposed, which remain unresolved.

kelly0303
Messages
573
Reaction score
33
Hello! I have some data points generated from an unknown distribution (say a 1D Gaussian for example) and I want to build a neural network able to approximate the underlaying distribution i.e. for any given ##x## as input to the neural network, I want the output to be as close as possible to the real ##p(x)##, as given by the real (unknown distribution). I have in my loss function so far this: $$L = -\sum_i \log(p(x_i))$$ where the sum is over a minibatch. This loss, when minimized, should come close to the real distribution. However, I need to ensure that the predicted function is normalized i.e. $$\int_{-\infty}^{+\infty} p(x)dx = 1$$ otherwise ##p(x)=1## would minimize the loss function the way it is now. So I need my overall loss function to be something like this $$L = -\sum_i \log(p(x_i)) + |\int_{-\infty}^{+\infty} p(x)dx - 1|$$ How can I numerically impose the normalization condition such that to efficiently compute the loss during the training of the neural network? Thank you!
 
Technology news on Phys.org
What is the structure of your contemplated neural net? Will it dynamically adapt its structural complexity based on the input? Do you have any code or pseudocode that you could post?
 
You could try imposing the normalization by bruteforce using standard normalization or softmax:
 
  • Like
Likes   Reactions: sysprog

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
Replies
3
Views
2K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K