AI Fundamentals: The Hierarchy Explained
A breakdown of AI's nested structure—from machine learning to deep learning to generative models—with practical distinctions between supervised/unsupervised learning, discriminative/generative models, and how large language models are pre-trained then fine-tuned for specific tasks.
The AI Landscape: A Nested Hierarchy
AI is a field; machine learning is a subfield
Artificial intelligence is the broadest discipline, similar to physics. Machine learning is a subfield of AI, just as thermodynamics is a subfield of physics. Deep learning is a subset of machine learning, and large language models sit at the intersection of deep learning and generative models.
Machine Learning Fundamentals
What machine learning does
Machine learning is a program that uses input data to train a model. That trained model can then make predictions based on data it has never seen before. For example, a model trained on Nike sales data can predict how well a new Adidas shoe would sell based on Adidas sales data.
Supervised vs. unsupervised learning
Supervised learning models use labeled data (e.g., blue dot = pickup, yellow dot = delivery) to make predictions. Unsupervised learning models use unlabeled raw data and look for natural groupings or patterns. After supervised models make predictions, they compare results to training data and try to close gaps; unsupervised models do not.
Deep Learning and Neural Networks
Deep learning uses artificial neural networks
Deep learning is a type of machine learning that uses artificial neural networks inspired by the human brain. These networks consist of layers of nodes and neurons; more layers mean a more powerful model. Deep learning enables semi-supervised learning, where a model trains on a small amount of labeled data and a large amount of unlabeled data.
Semi-supervised learning in practice
A bank detecting fraud might label only 5% of transactions as fraudulent or legitimate, leaving 95% unlabeled due to resource constraints. The deep learning model learns concepts from the 5% labeled data, then applies those learnings to the 95% unlabeled data, creating a more robust dataset for future predictions.
Discriminative vs. Generative Models
Discriminative models classify; generative models create
Discriminative models learn the relationship between data labels and classify new data points (e.g., fraud/not fraud, cat/dog). Generative models learn patterns in training data and generate something entirely new based on those patterns. A simple test: if output is a number, classification, or probability, it is not generative AI; if output is text, speech, image, or audio, it is generative AI.
Generative AI Model Types
Five main generative AI model types
Text-to-text models (ChatGPT, Google Bard) generate language. Text-to-image models (Midjourney, DALL-E, Stable Diffusion) generate and edit images. Text-to-video models (Google Imagen Video, CogVideo, Make a Video) generate and edit video. Text-to-3D models (OpenAI's Shap-E) create game assets. Text-to-task models (Gmail summarize feature in Bard) perform specific tasks like summarizing unread emails.
Large Language Models: Pre-training and Fine-tuning
LLMs are pre-trained then fine-tuned
Large language models are first pre-trained on massive datasets to solve common language problems like text classification, question answering, document summarization, and text generation. They are then fine-tuned using smaller, industry-specific datasets for specialized purposes in retail, finance, healthcare, entertainment, and other fields.
Real-world example: hospital medical diagnostics
A hospital uses a pre-trained large language model from a major tech company and fine-tunes it with its own first-party medical data to improve diagnostic accuracy from X-rays and other medical tests. This is a win-win: large companies develop general-purpose LLMs at scale, while smaller institutions like hospitals leverage those models with their domain-specific data without building from scratch.
LLMs and generative AI are related but distinct
Although there is overlap, large language models and generative AI are not the same thing. LLMs are a subset of deep learning and are pre-trained on large datasets then fine-tuned for specific purposes. Generative AI is a broader category that includes any model generating new content (text, image, video, audio, 3D).
Notable quotes
AI is an entire field of study like physics and machine learning is a subfield of AI — Jeff Su
If the output is a number, a classification, or a probability, it is not generative AI — Jeff Su
Large language models are generally pre-trained with a very large set of data and then fine-tuned for specific purposes — Jeff Su