DEV Community

Cover image for AI vs ML vs DL vs DS: A Practical Map for Beginners
Ali Raza
Ali Raza

Posted on

AI vs ML vs DL vs DS: A Practical Map for Beginners

I studied this exact topic about 8 months ago, working through a deep learning course and filling a notebook with diagrams. Coming back to it now to write this up properly, two things stood out: most of it had genuinely stuck, but a couple of definitions had blurred together in my memory — including one mix-up (more on that below) that would've cost me points in an interview if I hadn't caught it while writing this.

That's actually the real reason I'm writing this: revisiting old notes and re-explaining them from scratch is one of the fastest ways to find out what you actually understood versus what you just remembered hearing. If you're starting out in the field, one of the first walls you hit is terminology soup — AI, ML, DL, DS, all thrown around like they're interchangeable. They're not. And getting this taxonomy straight in your head early saves you from a lot of confused interview answers later.

This is the guide I wish someone had handed me when I started.

The four terms, one picture

  • AI is the whole universe. It includes rule-based systems too — a chess engine with hardcoded logic is AI, even if it never "learns" anything.
  • ML is a subset of AI. Instead of hardcoded rules, it learns patterns directly from data.
  • DL is a subset of ML. It uses layers of artificial neurons to mimic how the brain processes information, and it's what makes unstructured data (images, audio, text) tractable.
  • Data Science isn't a subset of any of these — it's a horizontal discipline. A data scientist touches all three, from collecting raw data to deploying a model in production.

Types of Machine Learning

The first branch point in ML is how much labeled data you have.


Supervised learning works with labeled data — every row has a known input and a known output.

  • If the output is a continuous number (house price, temperature), it's regression.
  • If the output is a category (spam/not spam, movie genre), it's classification. Two classes → binary classification. Three or more mutually exclusive classes → multiclass. And if a single item can belong to more than one class at once — like a movie tagged both "Action" and "Thriller" — that's multilabel classification, a distinct problem from plain multiclass.

Unsupervised learning has no labels at all. The model has to find structure on its own — the classic example is customer segmentation, where you cluster people by salary and spending score into groups like "high income, high spend" or "low income, low spend," without ever telling the model what those groups should be.

Semi-supervised learning sits in between — some data is labeled, most isn't. Recommendation systems are the textbook example: you have some explicit signals (ratings, purchases) but mostly implicit, unlabeled behavior.

A common mix-up worth clearing up

You'll sometimes see semi-supervised learning described as basically the same thing as reinforcement learning. It isn't. Reinforcement learning is a fundamentally different paradigm — there's no labeled or unlabeled dataset sitting around. Instead, an agent interacts with an environment and learns through trial and error, guided by rewards and penalties. Game-playing agents and robotics are the classic use cases. If you're prepping for interviews, keep this distinction sharp — conflating the two is an easy way to lose points on an otherwise strong answer.

Reinforcement Learning — the fourth type nobody puts in the same list

Most beginner resources cover supervised, unsupervised, and semi-supervised learning together and then leave reinforcement learning (RL) for a separate day. That's actually the right instinct — RL doesn't belong in the same mental bucket, because it isn't about learning from a fixed dataset at all.

In RL, there's an agent that takes actions inside an environment, and after every action it gets back a reward (or penalty) plus the new state of the environment. The agent's whole job is to learn a policy — a strategy for which action to take in which state — that maximizes cumulative reward over time. There's no dataset of "correct answers" sitting around beforehand; the agent generates its own training signal by acting and observing the consequences.

A few things that make RL genuinely different from the other three types:

  • No labels, but not the same as unsupervised. Unsupervised learning finds structure in static data. RL generates its own data through interaction, and that data changes depending on what the agent has already learned — the training distribution isn't fixed.
  • Delayed feedback. A reward often doesn't arrive until several steps after the action that caused it (think: a chess move that only pays off ten moves later). This is called the credit assignment problem, and it's one of the core hard problems in RL.
  • Exploration vs. exploitation. The agent has to balance trying new actions to discover better strategies (exploration) against sticking with actions already known to work (exploitation). Neither supervised nor unsupervised learning has anything like this trade-off.

Classic use cases: game-playing agents (this is how systems learned to play Atari games and Go at superhuman level), robotics and control systems, and increasingly, fine-tuning large language models with human feedback (RLHF) — where the "reward" comes from a model trained to predict human preferences rather than a game score.

This is also why the "semi-supervised is basically reinforcement learning" mix-up mentioned earlier is worth catching. Semi-supervised learning is still fundamentally about a dataset — just a partially labeled one. RL doesn't have a dataset in that sense at all; it has an agent, an environment, and a reward signal. Different problem, different math, different tools.

Deep Learning architectures, by data type

Once you're in DL territory, the architecture you reach for depends almost entirely on the shape of your data.

ANN (Artificial Neural Network) is the baseline architecture, best suited to structured, tabular data — the kind you'd normally put in a spreadsheet.

CNN (Convolutional Neural Network) is built for images and video. Two common tasks:

  • Image classification — "what's in this image" — often now handled with transfer learning rather than training from scratch.
  • Object detection — "what's in this image, and where" — has an evolution worth knowing by name, roughly in order of appearance: R-CNN → Fast R-CNN → Faster R-CNN → SSD → YOLO → DETR. Each step traded off accuracy against speed differently; YOLO in particular became popular for real-time detection, and DETR brought transformer-based detection into the mix. Face recognition is a specialized application of this same object-detection idea — instead of detecting generic classes like "dog" or "cat," it detects and matches specific faces.

RNN (Recurrent Neural Network) and its descendants handle sequential data — text, time series, anything where order matters. The lineage matters here too:

  • Plain RNNs struggle with long sequences (vanishing gradients).
  • LSTM fixes that with gated memory cells.
  • Bidirectional LSTM reads the sequence both forward and backward for better context.
  • Encoder-decoder architectures split the task into "understand the input" and "generate the output" — useful for translation and summarization.
  • Transformers replaced RNNs as the dominant architecture for most NLP tasks, because self-attention handles long-range dependencies better and — critically — can be parallelized during training, unlike RNNs which process tokens one at a time. GPT-1, GPT-2, and GPT-3 are all transformer-based language models built on this foundation.

Where NLP fits

A quick note that trips people up: NLP isn't cleanly "ML" or "DL" — it's both, depending on the technique.

  • Bag of Words (BoW) and TF-IDF are classical, statistical techniques — firmly on the ML side. They represent text as sparse word-frequency vectors with no notion of meaning or context.
  • Word2Vec and transformer-based embeddings are learned, dense vector representations — DL territory. These capture semantic relationships (e.g. "king" and "queen" ending up close together in vector space).

So when someone asks "is NLP part of ML or DL," the honest answer is: it depends which technique you're looking at. Both live under the NLP umbrella.

Why this taxonomy actually matters

It's tempting to treat this as trivia, but it shows up in real decisions:

  • Picking regression vs. classification wrong at the start of a project wastes a training cycle.
  • Confusing semi-supervised with reinforcement learning in an interview signals you memorized definitions without understanding them.
  • Reaching for a CNN when your data is actually tabular (or vice versa) is a common beginner mistake that costs real compute and time.

Get the map right first. Everything else — the math, the frameworks, the tuning — sits on top of it.

The original Note Book Pics:




Top comments (0)