
Artificial Intelligence (AI)
This lecture introduces Artificial Intelligence (AI)—the study and engineering of systems that perform tasks requiring human-like intelligence. We cover AI definitions, core subfields (reasoning, search, knowledge representation, perception), and a practical overview of Machine Learning (ML) and Deep Learning, along with applications, tools, and ethics.
1) What Is Artificial Intelligence?
Artificial Intelligence is the capability of machines to perform tasks that typically require human intelligence—such as perception, language understanding, reasoning, learning, and decision-making.
- Narrow (Weak) AI: Specialized systems (e.g., spam filters, recommendation engines).
- General (Strong) AI: Hypothetical systems with human-level intelligence across tasks.
- Autonomous Agents: Systems that perceive, reason, and act to achieve goals in an environment.
2) Core Subfields of AI
- Search & Planning: Finding sequences of actions to achieve goals (BFS/DFS, A*, heuristic search, STRIPS planning).
- Knowledge Representation & Reasoning (KR): Logic, ontologies, and rules to infer new facts from known facts.
- Probabilistic Reasoning: Managing uncertainty (Bayesian networks, Markov models).
- Machine Learning: Algorithms that learn patterns from data.
- Perception: Computer vision (images/video) and speech processing (audio).
- Natural Language Processing (NLP): Understanding and generating human language.
- Robotics: Integrating perception, control, and planning to act in the physical world.
3) Problem Solving via Search
- State Space: A representation of all possible configurations of a problem.
- Uninformed Search: BFS, DFS—no domain knowledge; may be inefficient.
- Informed Search: A* uses g(n) (cost so far) + h(n) (heuristic estimate to goal).
- Admissible Heuristics: Never overestimate the cost to the goal → A* is optimal.
4) Knowledge Representation & Reasoning
- Propositional / First-Order Logic: Formal languages for expressing facts and rules.
- Ontologies: Structured vocabularies (concepts, relationships) enabling shared understanding.
- Rule-Based Systems: IF-THEN rules; forward and backward chaining.
- Probabilistic Models: Bayesian networks, Hidden Markov Models (HMMs) for uncertainty.
5) Machine Learning Overview
ML enables systems to learn from data. Major paradigms:
- Supervised Learning: Learn from labeled data. Tasks: classification (spam/not spam), regression (price prediction).
- Unsupervised Learning: Discover structure in unlabeled data (clustering, dimensionality reduction).
- Semi-Supervised / Self-Supervised: Use limited labels with abundant unlabeled data.
- Reinforcement Learning (RL): Learn a policy to maximize cumulative reward via trial and error.
5.1 Model Families
- Linear Models: Linear/Logistic regression (fast, interpretable baseline).
- Tree-Based: Decision trees, Random Forests, Gradient Boosted Trees (robust tabular performance).
- Support Vector Machines: Effective for high-dimensional, margin-based classification.
- Neural Networks: Universal function approximators; basis of Deep Learning.
5.2 Model Development Workflow
- Define problem & metrics (accuracy, F1, ROC-AUC, RMSE).
- Collect & prepare data (cleaning, feature engineering, train/validation/test split).
- Select models & train (hyperparameter tuning, cross-validation).
- Evaluate & iterate (bias/variance trade-offs, learning curves).
- Deploy & monitor (drift detection, retraining, MLOps).
6) Deep Learning Essentials
- Neural Networks: Layers of neurons with nonlinear activations (ReLU, sigmoid, tanh).
- Training: Define loss (e.g., cross-entropy), optimize with gradient descent (SGD, Adam), backpropagation.
- CNNs: Convolutional Neural Networks for images (filters, pooling, feature hierarchies).
- Sequence Models: RNNs/LSTMs/GRUs for time series and language.
- Transformers: Attention-based models excelling in NLP and beyond.
- Regularization: Dropout, weight decay, data augmentation to reduce overfitting.
7) Natural Language Processing (NLP)
- Text Preprocessing: Tokenization, normalization, stop-word removal, stemming/lemmatization.
- Representations: Bag-of-Words, TF-IDF, embeddings (word2vec, GloVe), contextual embeddings.
- Tasks: Sentiment analysis, NER, machine translation, question answering, summarization.
8) Computer Vision & Speech
- Vision: Classification, detection, segmentation, tracking.
- Speech: ASR (automatic speech recognition), TTS (text-to-speech), speaker identification.
9) Reinforcement Learning (RL) Basics
- MDP Framework: States, actions, rewards, transitions, discount factor.
- Value-Based: Q-learning, Deep Q-Networks (DQN).
- Policy-Based: Policy gradients, actor-critic methods.
- Exploration vs Exploitation: ε-greedy, entropy regularization.
10) Evaluation Metrics & Pitfalls
- Classification: Accuracy, precision, recall, F1, ROC-AUC, PR-AUC.
- Regression: MAE, MSE, RMSE, R².
- Pitfalls: Data leakage, overfitting/underfitting, class imbalance, covariate shift.
- Mitigations: Proper splits, cross-validation, regularization, calibration, resampling.
11) Tools & Ecosystem
- Languages: Python, R.
- Libraries: NumPy, pandas, scikit-learn, TensorFlow, PyTorch.
- Data & MLOps: Notebooks, experiment tracking, model registries, CI/CD, monitoring.
12) Ethics, Safety & Responsible AI
- Fairness: Detect and mitigate bias; evaluate across subgroups.
- Privacy: Minimize data collection, anonymize, consider federated learning.
- Transparency: Document datasets/models (datasheets, model cards), enable explainability.
- Security: Protect against model theft, poisoning, adversarial examples.
- Accountability: Human oversight, auditing, compliance with regulations.
13) Applications of AI
- Healthcare: Diagnostics, triage, drug discovery, personalized medicine.
- Finance: Fraud detection, credit scoring, algorithmic trading.
- Transportation: Driver assistance, route optimization, logistics.
- Manufacturing: Predictive maintenance, quality control, robotics.
- Retail & Marketing: Recommendations, demand forecasting, dynamic pricing.
- Agriculture: Yield prediction, precision farming, pest detection.
- Education: Adaptive learning, grading assistance, tutoring systems.
“AI turns data into decisions. The craft is not only in the models we train, but in the problems we choose, the data we curate, and the responsibility with which we deploy.”
14) Summary
- AI spans search, reasoning, perception, NLP, ML, and robotics.
- ML/Deep Learning power modern AI with supervised, unsupervised, and reinforcement paradigms.
- Sound evaluation, robust pipelines, and MLOps are essential for production AI.
- Ethical, fair, and secure deployment is a core requirement—not an afterthought.
📝 Lecture 9 Quiz: Artificial Intelligence
Answer the following questions to test your understanding:
- What is the main difference between Narrow AI and General AI?
- Give two examples of real-world applications of Machine Learning.
- Explain the difference between Supervised Learning and Unsupervised Learning.
- What role do heuristics play in AI search algorithms like A*?
- Why are ethics and fairness important considerations in AI development?
📘 Assignment Prompt
Prepare a short essay (500–700 words) on the topic:
“The Impact of Artificial Intelligence on Society: Opportunities and Challenges”
In your essay, address the following points:
- Two positive ways AI is transforming industries (e.g., healthcare, finance, transportation).
- Two major risks or ethical concerns raised by AI adoption.
- Your personal perspective: Should there be stricter global regulations on AI? Why or why not?
📌 Submit your responses to your EMI student portal or email as directed by your course instructor.
Final Bonus Lecture: Cyber Security