This is the first lecture of the AI course offered by me at PES University, Bangalore. In this presentation we discuss the different definitions of AI, the notion of Intelligent Agents, distinguish an AI program from a complex program such as those that solve complex calculus problems (see the integration example) and look at the role of Machine Learning and Deep Learning in the context of AI. We also go over the course scope and logistics.
2. What is this course about?
• Ultimate AI dream: Build a machine that is
indistinguishable from humans.
• Google’s CEO Sundar Pichai: “AI First”
• This course will cover Applied AI using
modern techniques
• After taking this course you can:
• Develop a formal understanding of AI techniques
• Build products that require cutting edge
techniques that include and not limited to deep
learning techniques
Copyright 2016 JNResearch, All Rights Reserved
3. Human Cognitive tasks and AI applications
Humans Can: Typical AI Applications
See Image classification, Face Recognition
Speak Text to speech
Understand speech Speech Recognition : Speech to text
Write Handwriting generation, Draw
Understand written text Handwriting Recognition, Digit
Recognition
Drive Self Driving cars
Physical tasks: Walk, Run, … Robotics
6. AI : Working Definition for our course (Ref: Russel and Norvig)
7. Four schools of thought (Ref: Russel and Norvig)
• Think humanly
• Understand how humans think and model this process
• Cognitive Science
• Act humanly
• Turing Test
• Knowledge, Reasoning, Language, Understanding, learning
• Think rationally
• Rational implies thinking or doing the right thing
• Use logic to encode the right thing and process inputs with
this framework
• Act rationally
• Define the right thing as: “Maximizing the goal
achievement”
• A rational agent achieves the best or optimal outcome
8. So, what is an agent?
Agent
EnvironmentSensors
Actuators
Internal StateInternal State
• Agent perceives the environment (Percepts) and acts upon the environment in order to
maximize achievement of the required goal (Actions)
• Looked at from this perspective, an agent is a function that maps the percepts to actions
9. Intelligent Agents
• Intelligent agents interact with the Environment
• Interactions through:
• Sensors
• Actuators
• The function f(.) that maps the sensor to actuators is the control policy
• Determines how the agent makes the decisions
• Those decisions take place many many times in a loop: Perception-Action cycle
• The concept of intelligent agents is abstract. One can cast any real world problem
using this model – for instance, it is possible to apply this model to search engine
design.
Fig Credit: Sebastian Thrun, Udacity
10. Modelling real world problems
Can we model the following examples? Identify what the sensors are, what are the
actuators and how would you describe the agent?
• Home Security Systems: Suppose we have a system that can take pictures or
record video on a continuous basis and we are interested in detecting an intruder.
• The speech recognizer: Receive the speech input and transcribe
• Receive the inputs from location sensors and turn the steering wheel
• Look at the last 4 hours data on stock trend of a set of companies and buy the
stock of the most promising company
11. What distinguishes AI programs?
• Algorithms that perform complex mathematical
operations do these much faster than a human
• If a student is perceived more “intelligent” if he
solves these problems faster, then why not these
programs be termed “intelligent”?
• In short, when do we call a program a AI
program?
12. Terminology
• Fully versus Partial Observability
• Deterministic versus Stochastic
• Discrete versus continuous
• Benign versus Adversarial
13. Observability
• Fully versus Partially Observable
• If what the agent senses momentarily at any time
from the environment is completely sufficient to
make the decisions it is fully observable
• Examples: Chess game, Tennis service,
• Environment has an internal state
• The agent may be able to fully observe the
state or partial
• The agent needs internal memory when
dealing with partially observable situations
• Markov models help us to structure such a
memory
Fig Credit: Sebastian Thrun, Udacity
14. Deterministic versus Stochastic
• Deterministic: chess moves – outcome is pre
determined
• Stochastic: Moving the dice – the outcome is not
pre determined
15. Discrete versus Continuous
• Examples of actions modelled as a continuous
variable
• Throwing a dart : infinitely many ways to angle the dart
• Turning the steering by an angle (0 to 360 deg, real
valued)
• Magnitude of acceleration to apply
• Actions that are Discrete Variables
• Choosing a gear (1, 2, 3, 4, Top, Reverse) in a car with
manual transmission system
• Deciding (buy, sell, wait) on stocks of a finite, small set
of companies and acting
• Deciding which elective course to sign up based on the
data available and aptitude
16. Benign versus Adversarial
• A benign system is not attempting to defeat the
agent
• Weather may affect the actions of a self driving car –
e.g: reduced visibility and hence increased
uncertainty of actions. But it is not an adversary
• An adversarial system attempts to score over
the agent. It tries to win over and not allow the
agent to succeed.
• A Generative Adversarial Network (GAN) is
modelled as an adversarial game.
17. AI as uncertainty management
• What to do when you don’t know what to do?
• Reasons for uncertainty
• Sensor faults, limitations
• Adversaries : we don’t know what it will do
• Stochastic Environments
• Ignorance
19. Exercise
Analyze wrt Observability, Stochasticity, Discrete/Continuous, Benign/Adversarial,
Stationary/Dynamic environment
• A “teacher agent” that decides the action to take (Go deeper, Give a break, Ask questions,
Repeat the concept) based on its observation of the environment (classroom).
• Game of chess
• Self Driving car
• Face recognition
21. Modelling AI Problems
Different types of problems may require different types of approaches
• Some problems can be easily represented using state spaces
• E.g. Robot navigation through the maze
• Problems that can be solved using Machine Learning techniques
• E.g. Face recognition
• Probabilistic Graphical Models such as Bayes Networks, HMMs
• E.g Speech Recognition
• Problems that can be well addressed using deductive logic
• Given certain propositions and input, perform logical inference – e.g. imagine a chatbot that
encodes some knowledge and can reason with the user
22. Example#1 : Modelling as a Graph Search
• Real World Problem
• Suppose you are to reach the Bangalore Airport from PESIT (your current location). You prefer
the route that leads you to the destination fastest. You are given the map of Bangalore and
are provided with information on the traffic congestion along each route and distance.
(Assume this doesn’t change till you reach the destination)
• Model
• Represent the landmarks as nodes (states) of a graph, the goal state being the Airport. Edges
represent the connection between the landmarks. Edges are annotated with the time cost of
moving from one landmark to the next.
• Algorithm
• Graph search algorithms such as BFS, DFS, Uniform Cost Search, A* Search etc
23. Example#2 – Modelling as a ML Problem
• Real World Problem
• Suppose you are to perform handwriting recognition, where the input is a English text written by
hand.
• Model
• Two possibilities: If the handwriting is recorded using a sensor that captures the strokes, we can
model the problem as a time series analysis problem and choose a suitable ML Classifier (HMM,
RNN, …)
• If the input is an image, we can model the problem as a text recognition in an image, where the
input is a tensor and choose a convolutional neural network
• Algorithm
• Training: Supervised learning using stochastic gradient descent for the type of classifier chosen
24. Artificial Intelligence, Machine Learning and Deep Learning
• The goal of AI is to build human-like intelligence on machines
• ML is a core approach to achieve this goal.
• Key idea behind ML: Learning from data
• ML is narrower in scope relative to AI
• DL is a suite of techniques that form a sub set of a broad suite
of ML techniques
• ML includes a broad variety of techniques like Probabilistic
Graphical Models, Decision Trees, Neural Networks etc. The
models can be shallow or deep.
• Deep learning uses a large number of computing layers stacked
vertically (output of one feeds in to the input of the next).
• The depth can be spatial or temporal
Copyright 2016 JNResearch, All Rights Reserved
AI
ML DL
25. Machine Learning
• During the first edition of DARPA self driving cars challenge (2004), none of the
participants succeeded
• In the next edition (2005), 5 cars succeeded, with Stanford Stanley bagging the
first position
• Machine Learning made all the difference
Copyright 2016 JNResearch, All Rights Reserved
26. When to apply Machine Learning?
• Data
• No data, no machine learning!
• Patterns that exist in the data
• If the data doesn’t contain definitive patterns, there is nothing to learn from
• No satisfactory algorithm exists
• If a satisfactory algorithm exists, no need to do statistical learning
Copyright 2016 JNResearch, All Rights Reserved
30. ML – Some taxonomy
Copyright 2016 JNResearch, All Rights Reserved
Learning Taxonomy
What is “learnt”? Parameters, Structure, Hidden Concepts
Technique Supervised, Unsupervised, Reinforcement
What for? Prediction, Diagnostics, Summarization
How? Passive, Active, Online, Offline
Outputs Classification, Regression
Model Paradigm Generative, Discriminative
31. Can we learn better?
• Can we achieve a human-like performance at least for some narrowly defined tasks?
• If I happen to have lots of data, can my learning scale with data size?
• If the problem solved by a machine learning classifier is narrowly scoped, how to use
a ML approach to solve large, complex problems?
• How much of domain expertise we need to have in order to apply ML to our
problem? E.g. Should I be an expert in signal processing in order to design a speech
recognition system? Should I be a linguist knowledgeable on Kannada in order to
develop an English to Kannada machine translator?
Copyright 2016 JNResearch, All Rights Reserved
32. Deep Learning
• Large number of layers forming a deep network
• The depth can be spatial or temporal
• More complex models but less dependency on
human experts crafting the best features
• Due to the model’s higher capacity, can leverage
the data better – more the data you give, better
can be the learning
Copyright 2016 JNResearch, All Rights Reserved
33. Feature Learning (fig from Y Bengio)
• Representation Learning
• Automatically learn the “right”
features at each hidden layer
• Learn multiple levels of
representations increasing in
abstraction
• Allow effective sharing of the
learned parameters across
different tasks: Multitask learning
34. Three reasons to use deep learning
• Performance
• The difference between 93% to 96% can make all the difference
• Make cool technologies usable for a common man.
• Broad Applicability (Domain independence)
• Not limited to a narrow set of problems
• Minimize the need for domain specialized feature engineering
• New class of applications
• Applications that require higher level semantics as opposed to routine classification
• Multimodal fusion
• Generative models
Copyright 2016 JNResearch, All Rights Reserved
35. ML Everywhere!: Text, Speech, Image, Video
Copyright 2016 JNResearch, All Rights Reserved
36. Reflex Agents
• Actions of a reflex agent depends only on the current inputs
• The current percept determines the action
• Example:
• Imagine driving fast on a road in Bangalore. You suddenly notice a speed hump that is not
painted, nor there was any sign board on the road to caution you. The moment you notice
the hump that springs up unexpected, you just apply the brakes!
37. State Space Models
• Real world problems are modelled as a graph
• Example: Finding the low cost path between 2 cities when there are many
paths that are possible
• Solutions are represented as paths through the graph.
• Our goal is to find the optimal path
38. Examples
• Chinese words are written without spaces
• Arabic written without vowels
• English:rtfclntllgnc
41. Course Plan
• We will use the broad framework used by
Stanford AI course
• We also draw heavily on the Sebastian
Thrun’s courses on Self Driving Cars
• We differ in the following aspects:
• Deeper deep learning as a tool to build
intelligent agents
• Hands on: Projects based on TensorFlow
• Emphasis on Applied AI : Core computer vision
problems, Core NLP problems and discussions
on self driving cars
Fig Credit: Percy Liang, Stanford
42. Course Contents
• Unit 1: Classical AI techniques
• Unit 2: Machine Learning and Deep Learning
• Unit 3: Applied AI: Computer Vision
• Unit 4: Applied AI: Natural Language Processing
• Unit 5: Applied AI: Robotics and Self Driving Cars
43. Why should I take this course?
• AI is a hot topic in the industry
• Every major technology company (Google, Apple, Facebook, Microsoft, Adobe, …) has made
huge bets on AI
• Large number of start ups working in this space and well funded
• AI courses and degree programs are highly sought after in the academia
• This course with focus on both sound theoretical principles as well as hands on
development helps you master the basics
45. What are the pre-requisites?
• Technical
• Probability theory
• Calculus
• Linear Algebra
• Python Programming
• Aptitude
• Aptitude for AI, Machine Learning and willingness to experiment and a strong commitment to
class policy.
46. How will be the course experience?
• Is this an introductory course or a rigorous one?
• Rigorous – the course is going to cover both classical AI as well as modern applied AI.
• What way it will be rigorous?
• Contemporary Research topics will be covered in addition to traditional approaches
• Lab work will be intensive
• Total effort you will put in during the lab/evaluations/final exam will be sizable.
• Will it burn me out?
• If you have the right aptitude, it will not. On the contrary you will find the course thrilling.
(The best way is to find out if this is worth it is by consulting your seniors who have taken NLP
or AML in the recent times!)
47. Course Timings
• We will have 2 classes per week, each lasting 2 hours. One of the two classes will
be on Saturday.
• As I work in the industry, there may be a few rescheduling of the classes on some
occasions. We will keep such disruptions to a minimum.