Generative AI for Beginners: Part 3— Basics of Deep Learning

Raja Gupta
6 min readFeb 20, 2024

Introduction

This blog is part of the series Generative AI for Beginners, where we are learning basics of Generative AI, one simple step at a time.

To make it easy to grasp, I have divided the entire series in small parts. Each blog requires maximum 15–20 minutes to learn. After finishing the series, you will get a clear idea on fundamentals of Generative AI and its various aspects.

Part 1 — Introduction to AI

Part 2 — Understanding Machine Learning

Part 3 — Deep Learning: The Fundamental Pillar of Generative AI Advancement [current blog]

Part 4 — Introduction to Generative AI

Part 5 — What is Large Language Model (LLM)?

Part 6 — Prompt Engineering: The Art of Communicating with AI

Part 7 — Ethical Considerations in Generative AI

Part 8 — Challenges and Limitations in Generative AI

This is the 3rd blog in this series where we will explore deep learning.

Side Note: You may subscribe me to get an email when I publish the next blog in this series.

What is Deep Learning?

Can the machine learn the way we human (human brain) learn things? — This was the idea behind innovation of Deep Learning.

Deep learning is a subset of Machine Learning (ML is again a subset of AI). At its core, deep learning is based on Artificial Neural Network (ANN), which is a computational models inspired by the structure and functioning of the human brain.

Sounds a bit confusing? Let’s simplify it in layman’s terms!

First, let’s understand few important concepts.

Biological Neural Network in Human Brain

A neuron is the human brain’s most fundamental cell. A human brain has many billions of neurons, which interact and communicate with one another, forming a neural network.

These neurons take in many inputs, from what we see and hear to how we feel to everything in-between, and then send messages to other neurons, which react in turn. Working neural networks are what enable humans to think, and more importantly, learn.

Artificial Neural Network (ANN)

Artificial neural network is a computational network designed based on biological neural networks in human brain.

Human brain has neurons interconnected to each other. Similarly, artificial neural networks also have neurons that are linked to each other. These neurons are known as nodes.

Let’s try to simplify ANN!

Picture making a big, 3D structure with pipes of different shapes and sizes. Each pipe can connect to lots of other pipes and has a switch that can be opened or closed. This gives you so many ways to connect the pipes, making it seem a bit tricky, right?

Now, let’s attach this pipe thing to a water tap. The pipes, which are of different-size, let the water move at different speeds. If we close the switches, the water won’t move.

The water represents data going through the brain, and the pipes represent the brain’s parts called neurons.

Architecture of an artificial neural network

Artificial Neural Network primarily consists of three layers — Input Layer, Output Layer and Hidden Layers.

Imagine an Artificial Neural Network similar to a sandwich with three layers.

The first layer, called the Input Layer, represent the bottom slice of bread. It takes in information.

The second layer, called the Hidden Layers, represent the yummy filling in the middle. It thinks and figures things out.

The third layer, called the Output Layer, represent the top slice of bread. It gives us the final result.

In a nutshell:

Input Layer

  • This is where information goes into the artificial neural network.
  • It’s the starting point, where the network receives the data it needs to work on.

Output Layer

  • This is where the network gives the final result or answer.
  • It’s the endpoint, where the network tells us what it has learned or decided.

Hidden Layers

  • These layers are in between the input and output layers.
  • Neurons in these layers process information and help the network learn patterns and make decisions.

How does Artificial Neural Network Work?

Imagine a group of kids trying to recognize a panda by sharing their observations.

  • Each kid focuses on specific features such as black-and-white fur, round face, and distinct eyes.
  • Individually, they might not fully understand what a panda looks like,
  • But by combining their insights, they create a collective understanding.

In the world of artificial neural networks, these kids represent neurons.

  • In artificial neural network, individual “neurons” (similar to kids in our example) specialize in recognizing specific aspects.
  • When combined, they contribute to recognizing the overall concept (panda).
  • The network refines its understanding through repeated exposure, similar to kids refining their panda recognition skills over time.

Input Layer (Observation):

Each kid observes one aspect, such as fur colour or face shape, forming the input layer of our network.

Hidden Layers (Processing):

The kids pass their observations to each other, mimicking the hidden layers of a neural network. As they share information, they collectively build a more comprehensive understanding of the panda’s features.

Output Layer (Recognition):

Finally, they reach a conclusion by combining all the details. If the majority agrees that the observed characteristics match those of a panda, they output “panda.” This output layer corresponds to the network’s final decision.

Scoring Approach:

To refine their recognition skills, the kids keep track of their accuracy.

  • If they correctly identify a panda, they gain points;
  • otherwise, they learn from their mistakes.
  • Similarly, in neural networks, a scoring approach helps adjust the network’s parameters to enhance accuracy over time.

This teamwork illustrates how artificial neural networks process information layer by layer, learning from various features and refining their understanding through a scoring mechanism.

Deep Neural Networks

A deep neural network (DNN) is an artificial neural network (ANN) with multiple layers between the input and output layers.

Here “Deep” means it has multiple layers between the input and output, making it capable of learning complex patterns.

Important Points about Deep Learning

Now, let’s summarize some important points on Deep Learning!

Subset of ML

Deep learning is the subset of machine learning, which is in turn subset of AI.

Inspired by the Brain

Deep learning is based on artificial neural networks which is inspired by how our brains work.

Artificial Neural Networks (ANN)

ANN is a computational network which mimics biological neural networks in human brain.

Deep Neural Networks

The adjective “deep” refers to the use of multiple layers in the network. It uses deep neural networks with more than one hidden layer.

These layers process information, allowing the system to learn complex patterns.

Learning from Data

The system learns by being shown lots of examples and adjusting connections between neurons based on the differences between predictions and correct answers.

Handling Complex Problems

Deep learning is particularly effective for solving complex problems where traditional approaches may struggle.

Machine Learning Vs Deep Learning

Let’s break down the major differences between machine learning and deep learning:

Summary

In this blog, we’ve understood what deep learning is and how it works. Deep learning, aptly named for its multi-layered neural networks, which is similar to a human brain neural network with multiple layers of thinking, each level contributing to a deeper understanding of the information it processes.

From recognizing images and understanding speech to powering voice assistants and autonomous vehicles, deep learning has been beneficial to solve many complex tasks.

If you still have any query, please let me know in comment or get in touch with me in LinkedIn!

Next Blog

Generative AI for Beginners: Part 4 — Introduction to Generative AI

Enjoyed Reading? Follow me for more such insights on AI and beyond!

--

--

Raja Gupta

Author ◆ Blogger ◆ Solution Architect at SAP ◆ Demystifying Tech & Sharing Knowledge to Empower People