Prev: L27, Next: L28

Zoom: Link, TopHat: Link, GoogleForm: Link, Piazza: Link, Feedback: Link.
Tools
📗 You can expand all TopHat Quizzes and Discussions: , and print the notes: , or download all text areas as text file: .
📗 For visibility, you can resize all diagrams on page to have a maximum height that is percent of the screen height: .
📗 Calculator:
📗 Canvas:


Slide:




# Final Exam Information

📗 Part 1 from 1:00 to 2:15 on August 7.
📗 Part 2 from 1:00 to 2:15 on August 8.
📗 Both parts covers materials from L15 to L27 (including L27).
📗 Open book, LLMs allowed during the exam.
📗 15 questions in Part 1 and 15 questions in Part 2.
📗 8 new questions, 18 questions from the past exams (list to be updated on Piazza).
📗 2 of the new game theory questions will be posted before the exam based on course evaluation completion rate achieving 75 percent and 90 percent.
📗 1-2 of the new questions will be based on Irene's guest lecture.
TopHat Game
📗 We will post questions that are very similar to the questions on the exam based on your choices in this TopHat coordination game.
➩ A: We will post 0 questions.
➩ B: We will post 1 questions if more than 50 percent of you choose B.
➩ C: We will post 2 questions if more than 75 percent of you choose C.
➩ D: We will post 3 questions if more than 90 percent of you choose D.
➩ E: We will post 0 questions.



# Coordination Game

📗 91 percent voted for D, so three new questions will be posted here before Monday.

ID:

➩ The only deep reinforcement learning questions on the exam will be

📗 Question 1 (on Part 1)
📗 [4 points] For a reinforcement learning problem, there are states and actions. Each state can be represented by features. Deep Q Networks are used to represent the Q function: there is only one hidden layer with \(n\) hidden units, the input units represent the features of the states, and output units represent the Q value for each action. What is the smallest value of \(n\) so that the number of weights plus biases of the network is strictly larger than the number of Q values in the original Q table?
📗 Answer:

📗 Question 2 (on Part 1)
📗 [4 points] (NEW) Consider the problem of driving a car on a by grid, where the car can move up, down, left, right, or stay in the same position. The states are encoded by two features, the x and y coordinates of the position of the car, a policy neural network is trained using the policy gradient algorithm REINFORCE. Suppose the policy network has two ReLU hidden layers with and hidden units and a softmax output layer. How many weights (excluding biases) are updated in each iteration of REINFORCE?
📗 Answer:


➩ The only large language model question on the exam will be

📗 Question 3 (on Part 2)
📗 [4 points] (NEW) In an attention unit in a not-so-large language model, given a sentence "", the value units \(V = a^{\left(v\right)} = w^{\left(v\right)} \cdot x\) = , the key units \(K = a^{\left(k\right)} = w^{\left(k\right)} \cdot x\) = , and the query unit for the word "" \(q = a^{\left(q\right)} = w^{\left(q\right)} x\) = . What is the vector of attention weights (also called soft weights) for the word ""? Use the scaled dot product attention \(\text{softmax} \left(\dfrac{q K^\top}{\sqrt{d}}\right)\).
📗 Answer (comma separated vector, with values sum up to 1):


📗 Question 4 (on Part 2)
📗 [4 points] (NEW) Suppose an auto-encoder neural network (fully connected) with one hidden layer with hidden units is used to perform non-linear dimensionality reduction for the bag-of-words features with a vocabulary size of so that the documents can be visualized as 3D points. When training the network (both encoder and decoder), how many weights (excluding biases) are updated?
📗 Answer:



📗 Notes and code adapted from the course taught by Professors Jerry Zhu, Yudong Chen, Yingyu Liang, and Charles Dyer.
📗 Content from note blocks marked "optional" and content from Wikipedia and other demo links are helpful for understanding the materials, but will not be explicitly tested on the exams.
📗 Please use Ctrl+F5 or Shift+F5 or Shift+Command+R or Incognito mode or Private Browsing to refresh the cached JavaScript.
📗 You can expand all TopHat Quizzes and Discussions: , and print the notes: , or download all text areas as text file: .
📗 If there is an issue with TopHat during the lectures, please submit your answers on paper (include your Wisc ID and answers) or this Google form Link at the end of the lecture.
📗 Anonymous feedback can be submitted to: Form. Non-anonymous feedback and questions can be posted on Piazza: Link

Prev: L27, Next: L28





Last Updated: August 22, 2025 at 10:06 AM