Image Captioning for a Low-Resource Language
An independent research project establishing a Mongolian image-captioning benchmark through Flickr30K_MN, transfer learning, and attention-based encoder-decoder models.
This independent research project asks whether an image-captioning system can generate useful Mongolian descriptions when both annotated data and language technology are limited. The work was completed at the Tokyo Institute of Technology under the supervision of Prof. Kayoko Nohara in February 2024.
The project makes three contributions: a Mongolian extension of Flickr30K, the first initial benchmark for Mongolian image captioning in this study, and an attention-based model that improves over simpler encoder-decoder baselines.
Read the full Independent Research Project
Why Establish a Baseline?
Low-resource languages face more than a shortage of training examples. They also have fewer pretrained language models, fewer mature tokenization tools, and less evaluation infrastructure. A baseline makes these constraints measurable. It gives later work a reproducible point of comparison, while the dataset and annotation workflow can become infrastructure for other multimodal tasks.
For Mongolian, the baseline helps separate model limitations from language-resource limitations. The study therefore compares model depth, attention, and machine-translated captions instead of presenting a single score without context.
Design Space
The thesis distinguishes two common strategies for low-resource image captioning. Translation-based systems first use English resources and translate their output into the target language. Alignment-based systems learn a direct relationship between images and text in the original language, preserving more of the target language's cultural and linguistic context. This project takes the direct route by training on Mongolian captions, while recognizing that translation and alignment could be combined in a stronger future system.
Research Questions
The study is organized around four practical questions:
- What makes image captioning difficult when the target language has limited annotated data?
- Which linguistic properties of Mongolian are hardest for an encoder-decoder model to capture?
- Can transfer learning and visual attention establish a useful baseline without a large Mongolian corpus?
- Where does the model fail, especially on culturally specific scenes and objects?
Mongolian is a particularly revealing test case because its agglutinative morphology can attach grammatical information to word stems, while word order, omitted verbs, and context-dependent detail do not always align with the assumptions behind English-oriented evaluation metrics.
Flickr30K_MN Dataset
Flickr30K contains 31,783 images with five human-written captions per image. To create a Mongolian version, the captions were first translated through the Google Translate API and then post-edited by native Mongolian translators who were also fluent in English.
The annotation tool was built with Streamlit and Firebase Firestore, allowing authenticated translators to work concurrently while tracking edits in real time. The resulting Flickr30K_MN data keeps five captions per image and stores both tokenized and raw Mongolian sentences.
The dataset was divided into 29,783 training images, 1,000 validation images, and 1,000 test images. Images were resized to , captions were padded or truncated to a fixed length, and encoded captions were stored alongside the image data in HDF5 and JSON files.
Word-frequency counting creates a vocabulary map with integer indices for ordinary tokens and the special <unknown>, <start>, <end>, and <padding> tokens. This preprocessing step is especially important for Mongolian, where a naive tokenization strategy can hide useful grammatical information inside inflected forms.
Encoder-Decoder Architecture
The visual encoder uses ImageNet-pretrained ResNet-50, ResNet-101, or ResNet-152 backbones. For the strongest model, the classification and pooling layers are removed and the remaining ResNet-152 produces a spatial feature map of . Adaptive average pooling makes the representation stable for variable-sized inputs.
An LSTM decoder generates the caption one token at a time. At each step, the decoder receives the previous word and a weighted visual context vector. The attention network projects both the spatial image features and the decoder hidden state into a shared attention space, combines them with a ReLU, and applies softmax to produce pixel-level weights.
Beam search with width keeps the three strongest partial sequences at every decoding step instead of committing to the locally most probable next word.
The training objective is maximum likelihood over the target sentence :
The image is encoded once into a spatial representation, while the LSTM conditions each next token on the preceding generated sequence and the attended visual context.
Visual-Linguistic Alignment
At decoding step , the attention module combines the spatial encoder output with the decoder hidden state :
The final softmax produces attention weights over the spatial grid. The decoder then uses the weighted image representation together with the previous token to predict the next word. This makes the intermediate attention map inspectable: it shows which visual regions contributed to each generated token.
Training
The model uses 512-dimensional word embeddings, attention layers, and decoder states, with dropout set to 0.5 and a batch size of 80. Training runs for up to 120 epochs with cross-entropy loss and doubly stochastic attention regularization. The decoder is trained first; once BLEU-4 plateaus, the ResNet encoder can be fine-tuned with a learning rate of .
The regularization term discourages the decoder from repeatedly attending to the same locations. If is the attention assigned to pixel location at timestep , the penalty is:
The total objective combines token-level cross-entropy with this coverage term. In practice, the decoder is allowed to learn the language-generation problem first, then the visual encoder is fine-tuned after the BLEU-4 score reaches a plateau.
The experiments ran on two NVIDIA RTX 3090 GPUs with 24 GB of memory each. The best attention-based ResNet-152 model reached its peak around epoch 30, after which the dataset became the limiting factor and overfitting appeared.
Quantitative Results
The attention mechanism consistently outperformed the corresponding baseline models. The strongest result was produced by attention-based ResNet-152:
| Model | BLEU-1 | BLEU-2 | BLEU-3 | BLEU-4 | METEOR | CIDEr |
|---|---|---|---|---|---|---|
| Baseline ResNet-50 | 0.50 | 0.31 | 0.19 | 0.11 | 0.17 | 0.35 |
| Baseline ResNet-101 | 0.52 | 0.33 | 0.21 | 0.13 | 0.18 | 0.40 |
| Baseline ResNet-152 | 0.54 | 0.35 | 0.23 | 0.15 | 0.19 | 0.44 |
| Attention ResNet-50 | 0.59 | 0.42 | 0.28 | 0.19 | 0.20 | 0.40 |
| Attention ResNet-101 | 0.61 | 0.43 | 0.30 | 0.20 | 0.20 | 0.40 |
| Attention ResNet-152 | 0.62 | 0.44 | 0.31 | 0.21 | 0.32 | 0.46 |
BLEU, METEOR, and CIDEr were useful for establishing a baseline, but their English-centric design makes them an imperfect measure for Mongolian. Agglutinative morphology, flexible structure, omitted verbs, and differences in descriptive detail can produce a low exact-match score even when a caption is understandable. For comparison, the thesis notes a BLEU-4 score of 20.1 for the best Mongolian model versus 30.1 reported for a strong English Flickr30K result; that gap should not be read as a direct measure of human-perceived quality.
Reading the Metrics
BLEU measures n-gram precision and applies a brevity penalty, but it does not distinguish an important content word from a small function word and does not capture long-range grammatical correctness. METEOR adds unigram alignment, stemming, synonym matching, and a fragmentation penalty. CIDEr is more specific to image captioning: it compares a candidate against multiple human references using TF-IDF-weighted n-grams and consensus.
Using all three gives a broader signal than BLEU alone, but none fully resolves the multilingual problem. A Mongolian caption can be semantically strong while differing in word order, morphology, or descriptive granularity from every reference sentence.
Qualitative Findings
In a manual review of 50 generated captions, six were judged insufficient because of poor image-word alignment, irrelevant visual focus, or grammatical and contextual errors. Stronger examples described the scene accurately and attended to relevant regions. Compared with English captioning, the Mongolian model often described more of the surrounding context instead of focusing only on the central subject.
The model struggled with reflections, overlapping objects, complex scenes, and culturally specific content. It could often describe what was happening in Mongolian contexts such as wrestling, greetings, and games, but lacked the vocabulary and cultural knowledge needed to name those situations precisely.
This distinction matters: the model can sometimes recognize the structure of a scene without possessing the lexical or cultural knowledge needed to name it. The thesis therefore treats culturally specific examples as a dataset and language-coverage problem, not simply as evidence that a deeper CNN is required.
Experiment Results
The panels below show the decoder generating a caption one word at a time. The bright regions represent higher attention weights over the image while each token is produced. Early steps establish the scene, then the model shifts focus as it adds subjects, actions, colors, and spatial context in Mongolian.





Contributions
- Created
Flickr30K_MN, a Mongolian image-caption dataset derived from Flickr30K and refined through native-speaker post-editing. - Built a collaborative annotation workflow with Streamlit, Firestore, authentication, and real-time tracking.
- Established initial quantitative and qualitative benchmarks across baseline and attention-based CNN-LSTM models.
- Showed that attention improves captioning quality over the corresponding non-attention baselines.
- Documented failure modes involving complex visual structure, reflections, overlapping objects, and culturally specific vocabulary.
What Comes Next
The results suggest that the main bottleneck is not only model depth but the coverage and quality of the training data. The thesis proposes several next steps:
- Replace the CNN encoder with a Vision Transformer and investigate a Transformer decoder.
- Combine translation-based and alignment-based methods to borrow English resources without discarding Mongolian context.
- Add Mongolian-specific images covering traditional games, ceremonies, clothing, and objects.
- Explore unsupervised learning or reinforcement learning from human feedback when annotation is expensive.
- Develop evaluation measures that account for morphology, flexible structure, semantic equivalence, and cultural context.
- Release model weights and dataset tooling so that researchers can fine-tune the baseline for related languages.
A practical deployment could connect the model to a camera and voice assistant for visually impaired users. Another use would be indexing large, unstructured image collections with searchable Mongolian descriptions.