COS 484: Natural Language Processing
[Information]   [Schedule]   [Coursework]   [FAQ]   [COS 584]

Links

What is this course about?

Recent advances have ushered in exciting developments in natural language processing (NLP), resulting in systems that can translate text, answer questions and even hold spoken conversations with us. This course will introduce students to the basics of NLP, covering standard frameworks for dealing with natural language as well as algorithms and techniques to solve various NLP problems, including recent deep learning approaches. Topics covered include language modeling, representation learning, text classification, sequence tagging, syntactic parsing, machine translation, question answering and others.

This year, COS484 will be taught jointly with the graduate course COS584 "Advanced Natural Language Processing" while 584 provides an additional weekly precept on advanced concepts and has different requirements on assignments and projects. Please see the COS584 page for more details.
Information

Course staff:

Time/location:

(All the times are in EST.)

Grading

Prerequisites:

Reading:

There is no required textbook for this class, and you should be able to learn everything from the lectures and assignments. However, if you would like to pursue more advanced topics or get another perspective on the same material, here are some books (all of them can be read free online):

Previous offerings:

Schedule

Lectures are tentative and subject to change. All assignments are due 1:30pm EST before the Monday class.

Week Date Topics Readings Assignments
1 Mon (2/1) Introduction to NLP Advances in natural language processing A0 out
Wed (2/3) Language modeling: n-grams, smoothing J & M 3.1-3.4
2 Mon (2/8) Text classification J & M 4.1-4.8 A0 due, A1 out
Wed (2/10) Logistic regression, regularization J & M 5.1-5.6
3 Mon (2/15) Word embeddings J & M 6.2-6.4, 6.6
Don’t count, predict! A systematic comparison of context-counting vs. context-predicting semantic vectors
Wed (2/17) Word embeddings (2) J & M 6.8, 6.10-6.12
Efficient Estimation of Word Representations in Vector Space (original word2vec paper)
Distributed representations of words and phrases and their compositionality (negative sampling)
4 Mon (2/22) Feedforward neural networks J & M 7.1-7.3
A Neural Probabilistic Language Model
A1 due, A2 out
Wed (2/24) Sequence modeling - HMMs, Viterbi J&M 8.1-8.4
Notes from Michael Collins
5 Mon (3/1) Sequence modeling - MEMMs, EM Notes from Michael Collins [1] [2]
Wed (3/3) Expectation Maximization Notes from Michael Collins and (optional) Andrew Ng
6 Mon (3/8) Recurrent Neural Networks J&M 9.1-9.2
The Unreasonable Effectiveness of Recurrent Neural Networks
Wed (3/10) Midterm
7 Mon (3/15) Spring Recess (no class)
Wed (3/17) LSTMs/GRUs J&M 9.3
Understanding LSTM Networks
An Empirical Exploration of Recurrent Network Architectures
Neural Architectures for Named Entity Recognition
A2 due, A3 out
8 Mon (3/22) Constituency parsing Notes from Michael Collins: PCFGs, Lexicalized PCFGs
J&M 12.1-12.2, 12.4
J&M 13.1-13.2
Wed (3/24) Dependency parsing J&M 14.1-14.2, 14.4
Fri (3/26) Project proposal due
9 Mon (3/29) Statistical machine translation Eisenstein 18.1,18.2
Wed (3/31) Neural machine translation - 1 Eisenstein 18.3, 18.4
Koehn, 2017
A3 due, A4 out
10 Mon (4/5) Neural machine translation - 2 Eisenstein 18.3, 18.4
Koehn, 2017
Wed (4/7) Self-attention and Transformers J&M 9.4
Attention Is All You Need
The Annotated Transformer
The Illustrated Transformer
11 Mon (4/12) Contextualized embeddings and pre-training Deep contextualized word representations
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
The Illustrated BERT, ELMo, and co. (How NLP Cracked Transfer Learning)
Wed (4/14) Language grounding (optional) Experience grounds language
12 Mon (4/19) Question answering SQuAD: 100,000+ Questions for Machine Comprehension of Text
Reading Wikipedia to Answer Open-Domain Questions
(optional) Dense Passage Retrieval for Open-Domain Question Answering
A4 due
Wed (4/21) Fairness in NLP (Guest Lecture): Mark Yatskar (UPenn)
13 Mon (4/26) Interpretability in NLP (Guest Lecture): Yonatan Belinkov (Technion) Vig et al.(2020)
Dean’s date Wed (5/5) Final project report due
Coursework

Assignments

All assignments are due at 1:30pm on the due date before the class. There are 96 free late hours (~4 days) in total over all assignments. Once you have used up all your free late hours, late submissions incur a penalty of 10% for each day, up to a maximum of 3 days beyond which submissions will not be accepted. The only exception to this rule is if you have a note from your Dean of Studies. In this case, you must notify the instructors via email. For students with a dean’s note, the weight of their missed/penalized assignment will be added to the midterm and your midterm score will be scaled accordingly (for homeworks 0, 1 and 2) (e.g. if you are penalized 2 points overall, your midterm will be worth 27 and your score will be multiplied by 27/25). Missing homework 3 and 4 after the midterm can only be compensated by arranging an oral exam on the pertinent material.
Writeups: Homeworks should be written up clearly and succinctly; you may lose points if your answers are unclear or unnecessarily complicated. Using LaTeX is recommended (here's a template), but not a requirement. If you've never used LaTeX before, refer to this introductory guide on Working with LaTeX to get started. Hand-written assignments must be scanned and uploaded as a pdf.
Programming: For each assignment, we provide a Google Colab file with the programming questions included. You’ll need to make a copy of this file, fill in necessary parts, run results, and upload the code and results as a PDF file. If you've never used Google Colab before, refer to this introductory guide on Working with Google Colab to get started.
Collaboration policy and honor code: You are free to form study groups and discuss homeworks and projects. However, you must write up homeworks and code from scratch independently, and you must acknowledge in your submission all the students you discussed with. The following are considered to be honor code violations (in addition to the Princeton honor code):
  • Looking at the writeup or code of another student.
  • Showing your writeup or code to another student.
  • Discussing homework problems in such detail that your solution (writeup or code) is almost identical to another student's answer.
  • Uploading your writeup or code to a public repository (e.g. github, bitbucket, pastebin) so that it can be accessed by other students.
When debugging code together, you are only allowed to look at the input-output behavior of each other's programs (so you should write good test cases!). It is important to remember that even if you didn't copy but just gave another student your solution, you are still violating the honor code, so please be careful. If you feel like you made a mistake (it can happen, especially under time pressure!), please reach out to Danqi/Karthik; the consequences will be much less severe than if we approach you.

Final Project

The final project offers you the chance to apply your newly acquired skills towards an in-depth NLP application. Students are required to complete the final project in teams of 3 students.

There are two options this year for the final project: (a) reproducing an ACL/EMNLP 2020 paper (encouraged); (b) complete a research project (for this option, you need to discuss your proposal with the instructors/TAs). All the final projects will be completed in teams of 3 students (Find your teammates early!). More instructions TBA.
Deliverables: The final project is worth 35% of your course grade. The deliverables include:
Policy and honor code:
  • The final projects are required to implement in Python. You can use any deep learning framework such as PyTorch and Tensorflow.
  • You are free to discuss ideas and implementation details with other teams. However, under no circumstances may you look at another team's code, or incorporate their code into your project.
  • Do not share your code publicly (e.g. in a public GitHub repo) until after after the class has finished.

Submission

Electronic Submission: Assignments and project proposal/paper are to be submitted as pdf files through Gradescope. If you need to sign up for a Gradescope account, please use your @princeton.edu email address. You can submit as many times as you'd like until the deadline: we will only grade the last submission. Submit early to make sure your submission uploads/runs properly on the Gradescope servers. If anything goes wrong, please ask a question on Ed or contact a TA. Do not email us your submission. Partial work is better than not submitting any work. For more detailed information on submitting your assignment solutions, see this guide on assignment submission logistics.

For assignments with a programming component, we may automatically sanity check your code with some basic test cases, but we will grade your code on additional test cases. Important: just because you pass the basic test cases, you are by no means guaranteed to get full credit on the other, hidden test cases, so you should test the program more thoroughly yourself!

Regrades: If you believe that the course staff made an objective error in grading, then you may submit a regrade request. Remember that even if the grading seems harsh to you, the same rubric was used for everyone for fairness, so this is not sufficient justification for a regrade. It is also helpful to cross-check your answer against the released solutions. If you still choose to submit a regrade request, click the corresponding question on Gradescope, then click the "Request Regrade" button at the bottom. Any requests submitted over email or in person will be ignored. Regrade requests for a particular assignment are due one week after the grades are returned. Note that we may regrade your entire submission, so depending on your submission you may actually lose more points than you gain.

FAQ