Assignment 1: Exploring Word Embeddings

Train your own Word2Vec embeddings, look inside them, and put them to work. Everything happens in one Colab notebook; you fill in the parts marked [task] and submit the notebook.

📅 out Sep. 18 · due Oct. 23, 2026, 11:59 pm ⚖ 10% of the course grade 📚 Companion to Lecture 2 and Tutorial 1 💻 Colab, free T4 GPU 👤 individual
▶ Open the Colab notebook 📄 Assignment PDF Tutorial 1: PyTorch & word embeddings Lecture 2 video

1Introduction

Assignment 1 is structured into three main tasks, aimed at deepening your practical understanding of word embeddings. In Task 1 you implement and train Word2Vec models to generate word embeddings; Tasks 2 and 3 guide you on how to use word embeddings effectively.

Teaching team: Juhao Liang, Minghao Wu, Shunian Chen, Ke Ji, Benyou Wang (instructor). Questions: office hours (see the course homepage), the WeChat group, or Blackboard.

2The three tasks

TaskPointsWhat you do
Task 1: Train word embeddings with Word2Vec50Hands-on implementation and training of a Word2Vec model (the Skip-gram model from Tutorial 1) to generate word embeddings. The notebook leaves the key pieces for you to complete.
Task 2: Explore word embeddings30Inspect what the vectors learned: nearest neighbours, similarity, analogies and visualisation, and compare with the pre-trained vectors introduced in Tutorial 1.
Task 3: Utilize word embeddings20Use the embeddings in a downstream task so that the quality of the vectors becomes a measurable number.

The exact sub-questions, data and scoring cells are inside the notebook; the table summarises the PDF. Pay special attention to every cell marked [task]: these sections are critical for scoring.

3Requirements

This assignment requires the Google Colab notebook at this link. You are required to:

  1. Make a copy of the provided Colab file. Open the link, then File → Save a copy in Drive, so the notebook lives in your own Google Drive.
  2. Execute the notebook to generate results. Click Connect to GPU to request a free T4 GPU, then run the cells with the play button.
  3. Complete the necessary parts. Some sections of the code are incomplete and require your input, especially the parts marked [task].

For more detailed instructions, refer to Working with Google Colab.

4Submission

  1. Export the notebook: File → Download .ipynb.
  2. Upload your file: log in to the Blackboard system and upload the .ipynb file under Assignment 1.
Before you upload Run the whole notebook once more from the top (Runtime → Restart and run all) so that every output cell is present, and check that the file you download is the copy you edited, not the original shared notebook.

5Deadline and policy

The assignment must be submitted by 11:59 pm, October 23, 2026 (Shenzhen time). Late submissions may be subject to penalties; see the late policy on the course homepage. Assignment 1 counts for 10% of the course grade. Work individually; you may discuss ideas with classmates, but the code and results you submit must be your own, and any use of generative AI should be stated in the notebook.

6Tips

  • Do Tutorial 1 first: notebook 2 builds Skip-gram Word2Vec from scratch and compares it with GloVe and FastText, which is exactly the toolkit Tasks 1–3 need.
  • Keep the training small enough to finish on a T4 in minutes; a correct small model beats an unfinished large one.
  • When you explore the vectors, write down what you expected before you look: analogies and nearest neighbours are more informative when the expectation is explicit.
  • Save a copy of the notebook to Drive early; Colab sessions time out.

Back to: coursework overview · schedule · Assignment 2

Assignment 1 · CSC5051/CSC6052/MDS5110 Natural Language Processing · School of Data Science, CUHK-Shenzhen · Fall 2026. ← Back to the course homepage