liveBook · Manning

Generative modeling

As explained in Deep Learning with R, Third Edition

Generative AI comprises computational models that produce new content such as text, images, audio, or code from learned patterns.

Generative modeling uses learned patterns to produce new content. A model can generate text, images, video, or sound rather than only classify an input. Chatbots and image generators are familiar examples. section 20.1.1 section 1.8

A common route from training data to generated output is:

  • Train on a reconstruction task, such as predicting the next word or restoring a sharp image from a noisy one. The target comes from the input itself, so manual labels are not required. section 1.8
  • Learn the statistical structure of the training content. The resulting representations can support sampling new outputs with characteristics similar to what the model has seen. section 16.0 section 20.1.1
  • Steer a foundation model with a prompt instead of programming a separate solution for every request. section 1.8

From prompt to image

Midjourney generated an image from a prompt requesting a hand-drawn science-fiction landscape with residents in a building shaped like a red letter K. The prompt specifies the desired content; the generated image is a new output. section 16.0

Figure 16.1 An image generated with the generative image software Midjourney. The prompt was “A hand-drawn, sci-fi landscape of residents living in a building shaped like a red letter K.”
figure

Compare the generated image with its prompt to see how a content request can steer image generation. section 16.0

Generation can augment creative work without replacing the artist’s judgment. Sampling learned patterns is a mathematical operation; people give the result meaning and can steer it toward a purpose. Likewise, impressive applications do not establish claims of imminent human-level intelligence or sweeping short-term economic change. section 16.0 section 1.10

How Deep Learning with R, Third Edition covers it

How deep it goes
Explains reconstruction, sampling, and prompting conceptually; sketches miniature GPT and Transformer chatbot projects without detailing their implementations.
Examples
Uses next-word prediction, image denoising, ChatGPT, and a Midjourney image generated from a descriptive prompt.
What you can do after
Evaluate/understand generated content as sampled from learned structure and steerable by people, rather than as independent artistic intent.
How it connects
Connects deep learning, self-supervised learning, foundation models, latent spaces, and prompting.

Also explained in

Compare how 29 books explain generative modeling →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Deep Learning with R, Third Edition. The section links point to the parts of the book it draws on.