quantuminformation / web-gen-bot

GAN to gen web pages
MIT License
4 stars 0 forks source link

Initial GAN investigations for tfjs #3

Open quantuminformation opened 5 years ago

generic-github-user commented 5 years ago

We probably want to use a recurrent generative adversarial network (RGAN) to generate the code of web pages so that we do not need to encode the whole input/output at once. For example, instead of having 2,000 one-hot encoded character inputs/outputs (say 200,000 inputs), we would only need 100 at a time. This helps us avoid needing to use billions (200,000 ^ 2 * 3 = 120 billion) of parameters and increases efficiency.

Both the generator and discriminator networks would be recurrent networks. The generator could have an arbitrary number of random noise inputs and a couple hundred one-hot encoded outputs, and the discriminator could have just as many inputs and one output. The networks could either automatically cycle through each character of the input, then the output, or have an attention mechanism that allows them to navigate through what they are writing (this would be much more difficult to do and would probably require a more complex reinforcement learning strategy).

This is an example of what such an architecture might look like, using an LSTM-based network.

image _(Source)_

We could also look into other strategies, like convolutional text-processing networks that use embeddings instead of one-hot encoded input/output values, or a combination of these and RNNs.

generic-github-user commented 5 years ago

You may also want to research "text generator network", "GAN text generator", or "recurrent GAN". Here are a couple links I found:

[If the webhook is working, this comment should be posted to the appropriate Discord channel]

quantuminformation commented 5 years ago

Great thanks for this.

generic-github-user commented 5 years ago

I also forgot to mention that we can use a regular supervised RNN instead of a GAN. The same encoding schema still applies. This type of setup is more inclined to complete some code that has already been written (instead of generating a completely random, original one from scratch), but we can create new pages by seeding it with different starting characters.

[Maybe this time]