�Advanced Machine Learning Lab�Project Presentation
Using Language and Image generative models to make English language exercises.
1
By: László Kovács, Márton Juhász
2025.12.17.
Project overview
The main goal of the project was creating English language exercises based on CEFR difficulty using natural language models and image generative techniques.
Main Goals:
2
The CEFR levels
3
Image is from The German Language Levels – SmarterGerman
Text generation
4
Text data acquisition
(CEFR-SP/CEFR-SP at main · yukiar/CEFR-SP)
5
Text data pre-processing
6
Text generation overview
Goal: Try out different architectures for generating texts/sentences based on CEFR difficulty level.
Architectures:
Question: Can low amount or low-quality data be counterbalanced by complex architecture?
7
Long Short-Term Memory RNN
8
LSTM RNN
9
Image is from What is LSTM - Long Short Term Memory? - GeeksforGeeks
Our LSTM RNN model
10
Difficulties during the LSTM RNN
11
val
Word Embedding LSTM RNN Results
12
Output Example:
Level A:
Level B:
Level C
GloVe Embedding LSTM RNN Results
13
Output Example:
Level A:
Level B:
Level C
Conditional Variational AutoEncoder
14
Conditional Variational AutoEncoder
15
Image is from(Variational AutoEncoders – GeeksforGeeks)
Our CVAE model
16
Difficulties of CVAE
17
Posterior Collapse: ��The model ignores important structural features of the input data and fails to learn meaningful representations in the latent space
Results of CVAE
18
Decoder only Transformer
19
Decoder only transformer
20
Our Transformer model
21
Transformer results
22
Transformer output examples
Small model
23
Large model
Level A (Basic):
Level B (Intermediate):
Level C (Advanced):
Level A (Basic):
Level B (Intermediate):
Level C (Advanced):
Fine-tuning GTP-2
24
Fine-tuning a GTP-2 model
25
GTP-2 model output example
26
Level A (Basic):
Level B (Intermediate):
Level C (Advanced):
Generating exercise based on texts.
27
Generating exercises from texts
28
Example fill in the blanks excersise
29
Example for text comprehension
It was a stupid mistake. Before I tell you about my mistake, I have to tell you about my father. My father Joseph Thomas was a big name in the music business. He managed a lot of different rock bands in the '60s. By the end of his career, he had saved up some money and decided to buy himself a cabin in a little town in Oregon. He didn't want to live in Los Angeles, New York City, Chicago, or any other big cities. He wanted to escape the big city life. My father died in that cabin three years ago. I found out about his life in the cabin a week after he died. He never really liked to answer his cell phone. It would always be on low battery, or off. He never bothered to charge it. He simply liked listening to his records and drinking whiskey. During his time in the music industry, my father had collected various objects. He had different items from different artists. He had one of Jimi Hendrix's guitars, and a medallion that Janis Joplin had given him. Did I know this? No, I didn't. My dad always kept to himself. He was out on the road a lot, and he never really cared about keeping in touch with his kids. So, when he died, I figured all of his stuff at the cabin would be garbage. I told the town's Sheriff to throw everything out. I also told him to send me the paperwork for the cabin. I read about the discovery they made in my father's cabin. I couldn't believe it! Hendrix's guitar sold for over a million dollars, and so did the medallion. As I had already asked the Shariff to throw out everything as garbage, I wasn't entitled to anything, which probably made my father happy.
Question:
Whose guitar sold for over a million dollars?
a) Hendrix
b) David Gilmour
c) Bowie
d) Frank Zappa
Who gave my father a medallion?
a) Graham
b) Boykin
c) Latimer
d) Janis
30
Generating images and questions.
31
Image and question generation overview
Goal: Explore different architectures for image generation, then use the generated images to create questions.
32
UNet Architecture – Overview
33
Noise image + timestep
Predicted noise
UNet
Lightweight UNet Architecture
34
Improved UNet Architecture
35
A. Vaswani et al., Attention is all you need (2017)
https://medium.com/@hirok4/understanding-transformer-sinusoidal-position-embedding-7cbaaf3b9f6a
Results
36
ResBlock Architecture
37
Extra new features:
He et al., Deep Residual Learning for Image Recognition (2015)
Results of Pixel-Space Diffusion
38
Model improvement
Latent Diffusion Model - Workflow
39
Train VAE → freeze it → train LDM
Training VAE
40
Reconstructing images - VAE
41
Tried:
No major improvement
L1 helped a bit
Results
42
Cats
Dogs
Wildlife
Question generator for images
BLIP-2:
43
arXiv:2301.12597
BLIP-2 without fine-tuning
44
Prompt: Generate three different questions someone could ask about this image.
Result: Generate three different questions someone could ask about this image.
Fine-tuning with LoRa (low-rank adaption)
45
https://towardsdatascience.com/are-you-still-using-lora-to-fine-tune-your-llm/
Visual Question Answering (VQG):
dataset containing open-ended questions about images
Generated questions
46
ignoring padding tokens when computing loss
Generating exercise based on images.
47
Project conclusions
48