CS 4364 Lab 9

  • Lab 9, Due Wednesday, 04/15/2026, by midnight (23:59, EST)

Announcements

Goals

The main goal of this lab is to give you hands-on practice with a transformer model and to compare it with two familiar baseline methods: Random Forest and XGBoost.

Because this is a two-student, two-week lab, the emphasis should be on programming progress and code understanding, not on a major paper rewrite.

By the end of this lab, you should:

  • gain a basic practical understanding of transformers,

  • implement or examine a transformer-based approach relevant to your project,

  • compare it with Random Forest and XGBoost,

  • make clear progress in your codebase, and

  • complete an individual in-class code demo.

1. Learn the Basic Idea of Transformers

Spend some time learning the main ideas behind transformer models. You do not need a deep theoretical treatment here. The goal is to understand the model well enough to explain what it is doing and why it may be useful for your project.

In ML_Algorithms.PDF, include a short note in your own words that explains:

  • your basic understanding of transformers,

  • why a transformer may or may not fit your project, and

  • any questions or limitations you ran into.

Keep this short. About one page is enough.

2. Work with the Three-Model Theme

For this lab, everyone should use the same three-model theme:

  • Transformer

  • Random Forest

  • XGBoost

If you are doing an experiment paper, your main task is to implement or test these models in a way that makes sense for your project. This does not need to be a perfect final system. The goal is to get something working, compare the models in a reasonable way, and understand what you are seeing.

Please include at least:

  • a transformer model,

  • Random Forest,

  • XGBoost,

  • a basic comparison using accuracy and F1, and

  • a short note about runtime, efficiency, or implementation difficulty.

If you are doing a review paper, use the same three-model theme, but treat it as a code and repository exploration task rather than a full experiment. In that case, compare how Transformer, Random Forest, and XGBoost are used in work related to your topic, and identify a few useful repositories or implementations that help you understand the differences.

3. Focus on Programming Progress

This lab is mainly about building and testing code.

Your submission should show that you made practical programming progress. For example, that may include:

  • running all three models,

  • cleaning up your code structure,

  • producing a simple comparison table,

  • improving preprocessing, or

  • documenting how your pipeline works.

I am not expecting a polished final product yet. I am expecting clear technical progress.

4. Minimal Paper Update

For this lab, the paper update should be minimal.

Just make a small update to your current paper draft so that it reflects what you worked on in this lab. This may be as simple as adding:

  • a short paragraph about the transformer model,

  • a brief note about comparison with Random Forest and XGBoost, or

  • a small results table if you already have one.

Do not spend too much time polishing the paper for this lab. Your time is better spent on the programming and the code demo.

5. Prepare Your Materials for Double-Blind Review

As before, your paper and code should be reasonably prepared in a double-blind format.

For code, remove names and identifying comments where appropriate.

For the paper, remove names, affiliations, and other identifying details.

This does not need to be overworked, but it should be clean enough for peer review use later.

6. Complete the Required Individual Code Demo

This is one of the most important parts of the lab.

Even though the project is completed as a team, each student must complete an individual in-class code demo.

Each student should sign up for one time slot during one of the next two class meetings after the lab due date. Each demo should be about 7 minutes.

During the demo, each student should:

  • explain their own contribution,

  • show the transformer-related part of the work,

  • show at least one baseline comparison, and

  • answer one or two short questions.

A live demo is preferred. If the full code is not fully runnable, a code walkthrough is acceptable, but you should still be able to explain the work clearly.

Because this is a two-person team, I do want each student to be able to speak clearly about the code and not rely entirely on their teammate.

7. What to Submit

Each team should submit one zip file on behalf of the group to Blackboard.

Ensure all team members' names are included in a file named authors.txt on the submission.

Name the file as follows: lab_9_lastname1_lastname2.zip

Your submission should include:

  1. Your_midterm_submission_order_Lab_9.pdf, your updated paper draft with a small lab-related update.

  2. ML_Algorithms.PDF, a short transformer reflection.

  3. Your code folder, including the transformer work and baseline models.

  4. A short results summary or comparison table covering Transformer, Random Forest, and XGBoost.

  5. A README file explaining what is included and how to run the code.

Please do not include dataset files, large raw data files, or identifying information in the paper or code.

8. Final Reminder

This lab is meant to be manageable.

Please keep your focus on:

  • getting the code working,

  • making a reasonable model comparison, and

  • being ready for the individual code demo.

The paper update for this lab should be light.

9. Notes

  • Submit your zip file for the lab to BlackBoard.

  • Lab assignments will typically be released on Thursday and will be due by midnight on the following Wednesday.

  • Lab 9, Due Wednesday, 04/15/2026, by midnight (23:59, EST)