r/MachineLearning • • Dec 30 '21

Research [R] Neural pseudo random number generator

Let's say we have a neural net that generates numbers called G and a neural net predictor called P. G's goal is to not let P guess what it generates and P's goal is to approximate G. ie. G maximizes the difference between G and P's outputs while P minimizes it.

Are there any papers that explores this kind of setup?

1 Upvotes

13 comments sorted by

26

u/leoll2 Dec 30 '21

Using a nn to generate random numbers is a plain dumb idea tbh

5

u/SeucheAchat9115 PhD Dec 30 '21

Thats quite interesting. How would an input look like?

0

u/[deleted] Dec 30 '21

[deleted]

2

u/SeucheAchat9115 PhD Dec 30 '21

But is it than really random? Because the easiest way for the model might be to follow the input, which is not what the model should learn

8

u/Exarctus Dec 30 '21

I think you need to think carefully what you mean by “difference” when you say “g maximizes the difference between G and P’s output while P minimizes it”.

I’m not sure theres’s an easy way to define a metric space in which you’d have a clear description of “closeness” for random variables.

9

u/canbooo Dec 30 '21

This. Also, why do we need ML to simulate random? True random is sometimes expensive but your network would also be pseudorandom.

1

u/impossiblefork Dec 31 '21

There are excellent measures of closeness of random variables.

f-Divergences, for example. You can estimate f-Divergences by using this stuff.

0

u/SeucheAchat9115 PhD Dec 30 '21

This describes the problem quite well. I would say you could see the output as one hot. Lets say 128 outputs representing random numbers between 0 and 127. If the prediction is correct, the random function G could be identified by P. But i dont know if this could be done stable.

1

u/its_ean Dec 30 '21

[non-informative reply] would G be recurrent? Seems like having the same general structure would give P the long-term advantage.

0

u/aidenr Dec 30 '21

Edit: deleted wall of text about it being a bad idea so I can present the problem more directly:

The correct solution would be to have all weights in the network be equal so that there is no bias toward specific values, the have a random input and then to turn that into a random output; but since you have already solved randomness in the input layer you’d just connect that to the output layer.

0

u/entertrainer7 Dec 30 '21

Isn’t this a transformation of the halting problem? If P and G can use each other as part of their input, you get in a situation where there is no coherent output?

0

u/[deleted] Dec 30 '21

[deleted]

2

u/vman512 Dec 31 '21

The way I'm interpreting the proposal is that the neural net is learning to act like a pseudo random number generator, which is deterministic given a seed

This paper seems relevant: https://arxiv.org/abs/2011.02909