Learning a Distribution of Transformer Models from Underspecified Data

Master Thesis (2026)
Author(s)

A. Garg (TU Delft - Electrical Engineering, Mathematics and Computer Science)

Contributor(s)

J.W. Böhmer – Mentor (TU Delft - Electrical Engineering, Mathematics and Computer Science)

Caroline Horsch – Mentor (TU Delft - Electrical Engineering, Mathematics and Computer Science)

T.J. Viering – Graduation committee member (TU Delft - Electrical Engineering, Mathematics and Computer Science)

Faculty
Electrical Engineering, Mathematics and Computer Science
More Info
expand_more
Publication Year
2026
Language
English
Graduation Date
30-11-2026
Awarding Institution
Delft University of Technology
Programme
Computer Science, Data Science and Artificial Intelligence Technology
Faculty
Electrical Engineering, Mathematics and Computer Science
Page Views
2
Reuse Rights

Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.

Abstract

Underspecified data often induces a set of possible models, each of which reaches near-optimal performance in-distribution but may behave differently when deployed in out-of-distribution (OOD) settings. In such cases, sparse models may be able to outperform their non-sparse counterparts in OOD settings.

We explore this notion by using a sparsity-regularized transformer, SPARTAN, in a controlled underspecified setting and find that it does not lead to meaningful improvements over non-sparse transformers. With enough data, all models learn sparse solutions. At smaller dataset sizes, where we expected sparse transformers to excel, we find no benefit.

We further hypothesize that, instead of a single transformer, we should learn a distribution over functionally diverse transformers that capture the different solutions allowed by underspecification. We propose hypernetwork-based transformers that generate the attention weights Wq, Wk, and Wv and are trained with a diversity loss for functional diversity.

Our experiments show that our methods approach the performance of ensembles as data grows but do not match it. An analysis of their mechanics reveals the failure modes of our methods and how they occur.

Files

License info not available