
Machine Learning as a New Programming Paradigm
Explore COMP 642 course details including machine learning applications, grading criteria, project deadlines, and the difference between AI and ML. Understand the evolution of machine learning, modern realizations, and the impact of data on learning techniques.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Machine Learning as a new paradigm for programming. COMP 642.
Course and Logistics Instructor: Anshumali Shrivastava (anshumali AT rice.edu) Class Timings: Tuesday and Thursday 1pm - 2:15pm Location: SEW 307 Teaching Assistants: TBA Office Hours: TBA Course Information: https://www.cs.rice.edu/~as143/COMP642_Spring25/index.html
Grading Term Project: 25% (Can be done in a group of 2 or 3) Build an ML application using datasets from Kaggle, Hugging Face, or any other repository. Use or combine all datasets for the task you can use. Every member in the group should describe one different usage scenario and associated deployment level challenges (e.g. low memory and/or low power hardware, sparse data, distributed computing, limited compute resources, heterogeneous hardware, limited inference latency, privacy, etc.). Propose a solution. Demonstrate with experiments how your solution is expected to perform in practice. Important Dates: Form a group and finalize the application, submit 1 page abstract by: Feb 6th. Mid Project report: March 13th: Final Report: April 21st 4 (bi-weekly) Assignments: 35% 2 Quizzes: 30% Ideally no preparation needed. Just follow the class. True/false short answer questions. All materials needed will be provided in the quiz. Lecture Scribing: 10% Sign up for one lecture to scribe. Attend a lecture. Use any resources to create an extended summary of the class will more details and discussions. Work in group of 4. You will have a week to finish the scribe. Can require few rounds of back and forth before finalizing. https://docs.google.com/spreadsheets/d/1YpwJvZ6SavwG1c5hppc-utnLw3uwDDnPTpDEWoaaHTY/edit?usp=sharing
What is the difference between AI and ML? AI aims to create smart systems that can simulate human intelligence. Reasoning, Logic, Machine Learning (Learning from Data), Knowledge Base, etc. Focus on brain like capabilities based on our perceived notions of brain. We are still very very far from understanding brain. Assuming human brain can understand itself. (May not be true) ML is a subfield of AI, which enables machines to learn from past data or experiences without being explicitly programmed. The science of learning to solve problems from data. May or may not be like brain (could be even better!). We can build systems that can surpass best human in numerous strategic tasks: chess, poker, alpha go and many other tasks.
Machine Learning is rapidly evolving ML in 2000s and earlier All about a Variety of models, SVMs, Kernels, Convexity, Loss Functions, Optimizations, Convergence, etc. Generalization, regularization. Small labelled data and the whole world around beyond supervised learning. ML in last decade: Modern Realizations. If you have enough data, you don't really need to worry about most of the above. We got over obsessed with convexity because of its nice mathematical properties. However, deep learning, the form of learning that made all the wonders, are non-convex. If you have less supervised data, you still need more or less a twist on supervised learning. All modern unsupervised or semi-supervised learning is supervised learning on auxiliary information. Everything that we argued about generalization in 90s and 2000s are probably wrong. Tentative Topics : Schedule at: https://www.cs.rice.edu/~as143/COMP642_Spring25/index.html
What is new? ML as a new paradigm for programming - Example Problem: Sort an array of numbers - Solve the problem in programmers mind first. - Get convinced with a sequence of steps that will solve the problem. (Pseudo code or algorithms) - Then code the solution in desired programming language. Works great if the out can be defined mathematically, like in textbooks. Our training of given X show Y only works when X and Y are well defined. - - What if the expected output cannot be well defined? Our training fails! - Write code that can drive a car! - Or maybe detect a cat in an image. - Or play poker or a game of chess. We don t really know the mathematics of driving, or of a winning strategy in chess, or how our brain identifies cat. They cannot be defined. We just have a feel for them.
Problem Solving from Demonstration What if I want a program that is specified as follows: Instance 1 Output 1 Instance 2 Output 2 . . . . . . . . . Instance N Output N Specifications becomes easy. BUT there is something wrong here.
Defining functions - There are two ways to define a function - 1. Writing its form and/or specify mathematical properties: f(x) = x^2. Or maybe dy/dx = 2x - 2. As a memory map of input outputs: f(1) = 1, f(2) = 4, f(3) = 9, f(4) = 16 . - Requires infinite description. - The bigger the description the more useful it is. (Just like our data) - Much more expressive! - - Turns out that we cannot define most functions using 1. Fun Fact: In the space of all functions, I pick a function uniformly. What is a probability that we can define it with some properties - ZERO. Almost all of them won't be even continuous.
Memorization and Generalization What is the goal! To predict outcomes on unseen input. Notions of generalization are studies for more than two decades and based on expectation and i.i.d data distribution. Far from what is observed in practice. Read: Zhang et. al. Understanding deep learning requires rethinking generalization (Best Paper Award at ICLR) Infinite memorization is perfect generalization! For very large datasets memorization is not bad!
Old Vs Modern Question Answering Systems OLD Training: Data KnowledgeBase (Use, logic, deductions, reasoning, etc.) Inference: query KnowledgeBase Answer Use, logic, deductions, reasoning, etc. NEW and Much Better Approach (Past Decade) Create Dataset of Question Answer Pairs: Create a neural network maps questions to answer (just like curve fitting or any of function approximation). Given a new question, the network predicts the answer. The network can score any sentence with the likelihood of being an answer to a question. (Kind of Dumb)
Supervised Learning: Notion of Data, Model, Training and Inference. Example: Housing Price Data. The intelligence is already in the data. You can distill it into a model with ML! That is why any reasonable way of distilling work on large datasets. Small datasets need creative ideas but may not always work New Tradeoff in Practice: Should we get more data or spend more time with creativity of ideas? What is the best gain for a given effort? Not really clear.
Notion of Data, Model, Training, and Inference. That is all. Assuming it all works How to make it work is the question we will explore for the rest of the semester. We have a new way of solving problems:
How Machine Learning is Changing Our Thinking? Case of Learned Sorting!
Two more case studies Predict Malicious URL Malware detection. All after observing something which is completely irrelevant to how we define something as malicious. You would not have solved it in this way. But ML can give a magical boost! Changing the economics of how we solve the problems.
Learning from past decade A lot of hopeless things can be predicted reasonably well: Predict moves of chess, Go, Poker and many more without knowing anything about the game! Can you predict:
Key question in any pipeline or application - What can be predicted reasonably well that can change the economics of the application? Easy Guess - Malicious objects, frauds anomaly, objects, etc. Endless possibilities. A lot of things can be predicted, but which one will change the economics! - Predicting the position of an element in sorted array - Predicting the structure of protein - Next best move in a game (or go or chess)