CS 370 - Spring 2025. 3/26/2025


[Home]

Welcome to CS 370!

Video of the Day

Jim Gaffigan Lying

The Future Isn’t Scary | Self-Driving Car QQQ ad lying car.

I hereby solicit suggestions for the video of the day. Please email me your ideas with explanations. Selected entries will win 5 homework points. If your video is played at the beginning of class, you must also briefly explain something about the video and something about yourself - in person.

Canvas Quiz of the Day (need daily password)

Most days, there will be a simple canvas quiz related to the lecture. You need a password to activate the quiz, which I will provide in class. These quizzes will count toward your class participation grade. The quiz is available only during class. You get full credit for class participation by completing half of the quizzes.

Click for today's quiz.

Lecture 17: Learning

Announcements

  • The 2025 Terry Forum: The Question Concerning AI Friday, March 28, 2025, 4pm. Kline.

  • Information Society Project Yale Law School. Weekly Events

  • CS Internship Workshop & Panel Sponsored by Yale Computer Society & OCS Sunday, March 30th, 5pm, Tsai City Atrium.
    Tune in for a presentation from the Yale Office of Career Strategy. This talk will review a number of tips and advice on the internship search process for CS jobs. There will also be a panel of students who have obtained internships at Microsoft, Netflix and Amazon to speak about their experiences and offer advice. Open to all students!

  • CS Colloquium - Vivek Srikumar, University of Utah Thursday, March 27th @ 10:30 a.m. DL 220
    Title: Robust NLP: Can We Do Better Than Bigger?

    Abstract: The robust text understanding and generation capabilities of today’s NLP has been driven by the assumption that larger models and larger datasets improve predictive performance. However, this approach may not be sufficient to address real-world challenges, particularly in low-resource languages and domains.

    In this talk, I will argue that robust NLP requires us to move beyond accuracy and perplexity as evaluation metrics. Towards this goal, I will present the idea of learning from knowledge rather than data, which exploits input and label meaning, in the presence of invariant domain knowledge. This approach generalizes traditional machine learning and has shown promise across multiple NLP problems. I will connect back to the theme of low-resource domains by presenting a text-based crisis counseling application. I will conclude by outlining future research directions around the theme of making inferences about text across domains despite limited data and compute resources.

    Bio: Vivek Srikumar is an associate professor in the Kahlert School of Computing at the University of Utah. His research lies in the areas of artificial intelligence, natural language processing and machine learning, and has been primarily driven by questions arising from the need to efficiently reason about textual data with limited supervision. His research has been published at various AI, NLP and ML venues, and has been recognized by a paper award at EMNLP 2014, and honorable mentions from CoNLL 2019 and the IEEE Micro magazine. His work has been supported by research grants from NSF, US-Israel BSF, NIH, and awards from Google, Intel, Nvidia and Verisk. He has served as associate program chair of AAAI 2022 and the program co-chair of CoNLL 2022 and ACL 2024. Furthermore, he has organized several workshops hosted at the primary ML and NLP conferences around the theme of how learning and structured knowledge intersect. He was a post-doctoral scholar at Stanford University before moving to Utah, and prior to that, in 2013, he obtained his PhD from the University of Illinois at Urbana-Champaign.

    Website: https://svivek.com

  • Call for Proposals - Envisioning Artificial Intelligence at Yale: An Interdisciplinary Symposium - deadline to submit a presentation is March 31.
    An Interdisciplinary Symposium based on previous work you have done in this area. We aspire to make this a truly interdisciplinary event by offering a variety of formats including panels, lightning talks, posters, art works, performances, and demonstrations (robots welcome).

    o Event Date and Location: May 9, 2025, Kline Tower

    o Submit Proposals

    o Visit the Symposium Website

    o Deadline: Submit a 150- to 250-word proposal abstract by March 31, 2025.

    Administrivia

  • I have office hours Wednesdays from 4-6 p.m. via Zoom, meeting ID 459 434 2854.

  • The TF's office hours are posted on Ed Discussion.

  • I am available for lunch on Mondays at 1 pm in Morse.

  • Homework assignments: [Assignments]. hw6 is now available. I have also updated the paper topic to connect with VOTE. Also, see following section.

    Truth or Consequences

    We observe that Senators and Supreme Court justices often give explanations or opinions that hide or obscure their real reasons. That is, they lie. Should a computer lie? or more realistically, When should a computer lie? We call your attention to HAL from 2001: A Space Odyssey.

    Are These 10 Lies Justified? from The New York Times, December 14, 2015. See comments as well.

    Using polleverywhere, list (by number) which of the ten lies from the NYT article you believe are justified. https://pollev.com/slade

    Results:

    all except 1, 2
    1, 4, 5, 6, 7, 8, 9, 10
    1, 5
    1,2,5,6,7,8,9
    9,10
    1, 5, 7, 9, 10
    All but 6, 10
    1, 5, 8, 9
    1, 2, 9
    1, 5, 7, 8, 9, 10
    5
    1,3,4
    1,2,3,4,5,7,8,9,10
    1
    
    >>> x = [1,2, 1, 4, 5, 6, 7, 8, 9, 10, 1, 5, 1,2,5,6,7,8,9, 9,10, 1, 5, 7, 9,
    10, 1,2,3,4,5,7,8,9, 1, 5, 8, 9, 1, 2, 9, 1, 5, 7, 8, 9, 10, 5, 1,3,4,
    1,2,3,4,5,7,8,9,10, 1]
    >>> len(x)
    61
    >>> count = {}
    >>> for i in range(10):
    ...  count[i+1] = 0
    >>> for i in x:
    ...   count[i] += 1
    >>> count
    {1: 12, 2: 5, 3: 3, 4: 4, 5: 9, 6: 2, 7: 6, 8: 6, 9: 9, 10: 5}
    >>> for x in count:
    ...   print (x, count[x])
    1 12  # surprise party
    2 5   # plane crash
    3 3   # father with dementia
    4 4   # husband drowned in car accident
    5 9   # real estate testers
    6 2   # Cuban missile crisis
    7 6   # family planning hiring question
    8 6   # placebo surgery
    9 9   # used car salesperson
    10 5  # praising children
    

    Asides from previous lectures

    AI in the news

  • Access to the Atlantic
  • Access to Economist (Economist.com)
  • Access to Financial Times
  • Access to Wall Street Journal from Yale.
  • Q and AI Bloomberg.
  • Access to Bloomberg.com from Yale.

    Lecture: Goal-based Decision Making

  • An Intentional Arithmetic for Qualitative Decision Making

    Lecture: Learning

    The big picture.

    In traditional programming, we write rules that work on data to produce answers. The rules are the program and the data may be images or search terms or the web pages populating the internet. The results are answers: a set of links to relevant web pages.

      Traditional programming paradigm:
      
      Input: rules + data
      Output: answers
    

    With machine learning, we alter that paradigm. The input to machine learning, at least for supervised learning, is data and answers. The output is the rules for prediction.

      Machine Learning paradigm:
      
      Input: data + answers
      Output: rules (prediction function)
    

    Consider the hw6 dataset of Titanic passengers. The data is the training set of passengers with their various features. The answers are the target values, 0 or 1 to designate perished or survived. We process that data and answers through some learning algorithm, and get a prediction function which is a set or rules.

    We are trying to get the machine to figure out the rules, based on the data. That is machine learning.

    By and large, we do not make any cognitive claims for machine learning. ML does not provide models for human cognitive processes. Even neural networks, which are inspire by the architecture and behavior of neurons in the brain, should not be construed as cognitive models.

    ML is a pure engineering or statistics endeavor. We are interested in the input/output behavior of the machine. We are not trying to understand how people learn.

    Having said that, there are cognitive models of human learning. The reality is that they do not scale very well. They work on small domains, but cannot handle boatloads of data that are the wheelhouse of ML.

  • Readings: chapters 19-21
  • 2019 Scassellati Slides:
  • AIMA Slides:

  • 0324.ipynb 0324.html
  • neural_nets.ipynb neural_nets.html
  • learning_apps.ipynb learning_apps.html
  • sklcompare.py compare various sci kit learn algorithms.
  • learning.ipynb learning.html

    Future topics: NLP and LLMs

  • Hands-on large language models : language understanding and generation Jay Alammar, O'Reilly, 2024. (Yale library online book).
  • NLP Progress Repository to track the progress in Natural Language Processing (NLP), including the datasets and the current state-of-the-art for the most common NLP tasks.
  • C4 (Colossal Clean Crawled Corpus)
  • Efficient Estimation of Word Representations in Vector Space the word2vec paper, by Jeff Dean and the Google guys. 2011.
    [Home]