Normalization condition with a neural network

AI Thread Summary
The discussion focuses on building a neural network to approximate an unknown distribution, specifically aiming to ensure the output function is normalized. The proposed loss function includes a term to minimize the negative log probability while also addressing the normalization condition. To enforce normalization, suggestions include using standard normalization techniques or applying softmax. The conversation also touches on the potential structure of the neural network and its adaptability based on input. Efficient computation of the loss during training while maintaining normalization is a key concern.
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 sysprog
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.

Similar threads

Replies
2
Views
2K
Replies
1
Views
3K
Replies
1
Views
1K
Replies
3
Views
1K
Replies
5
Views
2K
Replies
8
Views
2K
Back
Top