My research mission is to understand intelligent behaviour in language models.
This encompasses unravelling the covariates of its emergence, e.g.,
in properties of their training data
or their training objectives, but also the
caveats and
limitations of our evaluations.
One entry point to these questions is mathematical reasoning, where my work studies how language models
acquire,
represent, and
use abstract numeric structure.
My previous work, presented at highly selective *ACL conferences, also delivers better models for
low-resource applications,
reasoning models able to rapidly adapt,
or instructional models that are robust to prediction shortcuts.
My research was recognised by several awards including an Informatics Europe Award for my dissertation thesis.
I am a proud founder and leader of TransformersClub™, a platform for supporting students
in pursuing their own research ideas, with our members awarded international prizes and presenting at top-tier NLP/AI conferences.
Over the last six years, I have also led the delivery of many industrial
applications of language technologies in Gauss Algorithmic,
with successful customer stories in language
generation or
entity
recognition,
all the way from the research ideas to the scalable deployments, today serving
the fascinating NLP technologies to thousands of users.
Do not hesitate to connect or reach out if our research interests align!
Research
Below you can find references to my most recent publications.
An overview of my research can now also be found in my dissertation 📄
2026
AIMO Interpretability Challenge
Michal Štefánik, Philipp Mondorf, Andreas Waldis, Qianying Liu,
Chuan Yang, Michal Spiegel, Josef Kuchař, Marek Kadlčík, Adam Vawda-Oomerjee, Chaoran Liu,
Simon Frieder, Barbara Plank, Fazl Barez, Pontus Stenetorp
Standard benchmarks tell us whether a model solves olympiad-level maths problems, but not whether
it does so through stable reasoning mechanisms or brittle reasoning shortcuts. This competition
asks participants to tell these two apart by looking inside the models.
Building on the resources of the Fields Model Initiative, we provide participants with
newly-published problems, their symbolic versions allowing to generate perturbed variants,
access to frontier reasoning models, and robustness evaluations. The resulting methods for
identifying robust problem-solving will be released as an open-source tools to interpretability
and generalisation communities.
Language Models Learn Universal Representations of Numbers and Here's Why You Should Care
Michal Štefánik*, Timothee Mickus*, Marek Kadlčík*, Bertram Højer, Michal Spiegel, Raúl Vázquez, Aman Sinha, Josef Kuchař, Philipp Mondorf
(*core)
By analyzing how LLMs decode numbers, we develop better tools for extracting ordinal information
from language models. We show that diverse models represent ordinal information in a universal,
systematic, and remarkably accurate way across input contexts. We also provide practical guidelines
for studying numerical reasoning in LLMs; showing that universal interpretability tools such as TunedLens can be
highly inaccurate for numeric tokens, and interpretability methods for numbers should be trained
and evaluated on natural-language inputs rather than synthetic contexts to achieve practical applicability.
2025
Pre-trained Language Models Learn Remarkably Accurate Representations of Numbers
Marek Kadlčík*, Michal Štefánik*, Timothee Mickus*, Michal Spiegel, Josef Kuchař (*core)
Language models are known to make mistakes in operations involving numbers.
This raises an assumption that their distributionally-learnt representations of numbers may be
highly inaccurate with respect to actual numeric values.
In this work, we first find that learned input embeddings of language models follow a systematic,
distinct sinusoidal pattern. Subsequently, we develop a new probing method that is better suited
for this pattern than commonly-used linear probes and contrary to previous work, we show that
the numeric representations created in pre-training are surprisingly accurate -- reaching up to
100% of accuracy (Llama 3.1 8B) in distinguishing different integer values.
Can Out-of-Distribution Evaluations Uncover Reliance on Prediction Shortcuts? A Case Study in Question Answering
Michal Štefánik, Timothee Mickus, Marek Kadlčík, Michal Spiegel, Josef Kuchař
Out-of-distribution (OOD) evaluations are a go-to standard for evaluating models' generalization.
In this work, we look at a specific case of Question Answering, where previous work documents
a representative sample of prediction shortcuts, presenting an alternative way of assessing
models' generalization.
In the case of Question Answering, we find that the (i) OOD performance and (ii) the reliance on shortcuts, both
assessing models' generalization, are vastly uncorrelated. This is due to the fact
that different OOD datasets share the same shortcuts, underlining blind spots of OODs'
generalization assessments.
Nevertheless, we also show that the relationship of datasets and shortcuts is more complex:
even datasets good for training shortcut-free models can provide biased evaluation
(and vice versa).
Attend or Perish: Benchmarking Attention in Algorithmic Reasoning
Michal Spiegel,
Michal Štefánik, Marek Kadlčík, Josef Kuchař
To what extent can Language Models comprehend and apply an *algorithm* underlying the training data?
We construct an interpretability benchmark with annotated reference attention maps, based on which,
we assess to what extent can different Transformers follow the robust, reference attention patterns in out-of-distribution settings.
Via interventional experiment, we show that their Attention mechanism presents a key bottleneck in models' generalization capabilities.
BenCzechMark: A Czech-centric Multitask and Multimetric Benchmark
for Large Language Models with Duel Scoring Mechanism
Martin Fajcik, Martin Docekal, Jan Dolezal, Karel Ondrej, Karel Beneš, Jan Kapsa, Pavel Smrz, Alexander Polok, Michal Hradis, Zuzana Neverilova, Ales Horak, Radoslav Sabol,
Michal Štefánik, Adam Jirkovsky, David Adamczyk, Petr Hyner, Jan Hula, Hynek Kydlicek (alphabetical+institution ordering)
To foster research in lower-resource languages, we present BenCzechMark, the first comprehensive
Czech language benchmark encompassing 50 challenging, culturally-dependent tasks from 8 categories.
In addition, inspired by social preference theory, we propose and implement a new duel scoring system for language models that can provide more reliable assessment of models ranking.
2024
Self-Training Language Models in Arithmetic Reasoning
Language models achieve impressive results in tasks involving complex multistep reasoning,
but scaling these capabilities further traditionally requires expensive collection of more
annotated data. In this work, we explore the potential of improving the capabilities of
language models using automated feedback based on the validity of their predictions in
arithmetic reasoning (self-training).
We find that models can substantially improve in both single-round (offline) and online
self-training. In the offline setting, supervised methods are able to deliver gains
comparable to preference optimization, but in online self-training, preference optimization
shows to largely outperform supervised training thanks to superior stability and robustness
on unseen types of problems.
Concept-aware Data Construction Improves In-context Learning of Language
Models
Previous work curating in-context learning models assumes that ICL emerges from vast
over-parametrization or
the scale of multitask training. However, theoretical work
attributes ICL emergence to specific properties of training data and creates functional
in-context learners in small-scale, synthetic settings.
Inspired by previous theories, we propose a method to construct training data requiring analogical reasoning.
We show the surprising efficiency of training on such data, with resulting models significantly outperforming
classic instruction tuning in 41 and 45 out of 60 tasks, while performing on par with
models trained on over 1600 tasks while using only two (2) QA tasks.
Our analyses attribute these improvements to enhanced robustness of our models towards shortcuts
of previous ICL models and improved ability to benefit from informative demonstrations.
Think Twice: Measuring the Efficiency of Eliminating Prediction Shortcuts of
Question Answering Models
Lukáš Mikula*, Michal Štefánik*,
Marek Petrovič, Petr Sojka (*equal)
In this paper, we challenge the commonly-used evaluation of robustness of language models through
the lens of their out-of-distribution performance. We propose a metric to measure the reliance
of
model's performance on a specific feature and measure the reliance on a set of features
identified as
prediction shortcuts.
We find that the same prediction shortcuts are exposed in all assessed QA datasets,
whereas some shortcuts identified in SQuAD are even more impactful in other datasets.
This means that counterintuitively, a model relying on shortcut more might reach better OOD
performance.
Finally, we survey three existing debiasing methods and find that indeed, the OOD gains of these
methods
come in hand with increased, rather than decreased reliance on prediction shortcuts.
Language models are notoriously
inclined to make factual errors in tasks requiring arithmetic reasoning.
To enable language models to circumvent this deficiency and offload a critical computation to a
symbolic system, we create a collection of Calc-X datasets that demonstrate the appropriate use
of a calculator in reasoning chains.
We survey and unify several existing chain-of-thought datasets into a proposed novel format,
resulting in a standard collection of over 300,000 samples requiring arithmetic reasoning.
Finally, we use the new collection to train open-source calculator-assisted language models and
show that models trained on Calc-X almost double the accuracy of generating correct results
compared to baselines, and can outperform larger models of previous work, such as Toolformer, or
Llama 2.
We make all Calc-X datasets
and models
publicly available.
Recent work analysing the functioning of in-context learners show that instead of learning new
associations from the input,
models largely rely on their pre-trained knowledge, such as the sentiment of the labels.
We argue that evaluations using a randomly-chosen demonstrations can not disentangle models'
reliance on pre-trained knowledge
from the ability to learn new functional relations, as most of such demonstrations can provide
only limited information.
Hence, we propose to evaluate in-context learners with demonstrations sharing a specific,
informative reasoning concept with predicted sample.
We find that most of the recent in-context learners can not consistently benefit from the
demonstrated concepts, irrespective of the model size.
However, some models are more sensitive to concepts than others, such as T0 models, which can
benefit from concepts in 7 of 8 evaluation scenarios.
Soft Alignment Objectives for Robust Adaptation of Language Generation
Fine-tuning of pre-trained generative language models weakens their ability to
generalize, making the open-ended deployment of these models prone to errors like hallucinations
or degradations of output text quality.
In this work, we show that adapting the models with modeling the ambiguity of prediction
can largely avoid over 95% of the loss caused by traditional fine-tuning.
In this work, we collect the infrastructure necessary for training and evaluation of ICL
in a selection of Slavic languages: Czech, Polish, and Russian. We link a diverse set of
datasets and cast these into a unified instructional format through a set of transformations
and newly-crafted templates written purely in target languages.Using the newly-curated dataset,
we evaluate a set of the most recent in-context learners and compare their results to the
supervised baselines. Finally, we train, evaluate and publish a set of in-context learning
models.
We find that the massive multitask training can be outperformed by single-task training in the
target language, uncovering the potential for specializing in-context learners to the
language(s) of their application.
2022
Applications of deep language models for reflective writings
Social sciences exhibit many cognitively complex and highly qualified
problems, whose resolution relies on often subjective expert judgements.
One of such problems that we study in this work is a
reflection analysis in the writings of student teachers.
We perform a variety of experiments on how to efficiently address data collection for applications
exhibiting a great level of annotators' subjectivity.
Additionally, we demonstrate a great potential in a cross-lingual transfer of multilingual language
models
in the analysis of reflective writing.
We make our resulting datasets and models freely available.
Methods for Estimating and Improving Robustness of Language Models
Despite their outstanding performance, large language models (LLMs) suffer notorious flaws
related to their preference for simple, surface-level textual relations over full semantic
complexity of the problem. This proposal investigates a common denominator of this problem in
their weak ability to generalise outside the training domain.
We survey diverse research
directions providing estimations of model generalisation ability and find that incorporating
some of these measures in the training objectives leads to enhanced distributional robustness of
neural models. Based on these findings, we present future research directions towards enhancing
the robustness of LLMs.
This paper introduces Adaptor library, transposing the traditional model-centric approach
composed of pre-training + fine-tuning steps to objective-centric approach, composing the
training from applications of selected objectives. We survey research directions that can
benefit from enhanced objective-centric experimentation in multitask training, custom objectives
development, dynamic training curricula, or domain adaptation and demonstrate the practical
applicability of Adaptor in selected unsupervised domain adaptation scenarios.
We propose a constrained positional model, which adapts the sparse attention mechanism from
neural machine translation to improve the speed of the positional model. Our constrained model
outperforms the positional model on language modelling and trains twice as fast.
2021
RegEMT: Regressive Ensemble for Machine Translation Quality Evaluation
This work introduces a simple regressive ensemble for evaluating machine translation quality
based on a set of novel and established metrics. We evaluate the ensemble using a correlation to
expert-based MQM scores of the WMT 2021 Metrics workshop.
In both monolingual and zero-shot
cross-lingual settings, we show a significant performance improvement over single metrics. In
the cross-lingual settings, we also demonstrate that an ensemble approach is well-applicable to
unseen languages. Furthermore, we identify a strong reference-free baseline that consistently
outperforms the commonly-used BLEU and METEOR measures and significantly improves our ensemble’s
performance.
Ensembling Ten Math Information Retrieval Systems: MIRMU and MSM @ ARQMath
2021
Vít Novotný,
Michal Štefánik, Dávid Lupták, Martin Geletka, Petr Sojka
ARQMath Community Question Answering (CQA) competition challenges open-domain QA systems to find
answers to a set of
yet non-answered questions on Math Stack Exchange, potentially
providing users with responses to all new but answerable questions.
In our submission, we create an ensemble of ten “weak” individual systems
that we let vote to provide answers to unseen questions. Our submission, a best-performing among
all the automated systems, shows that such ensemble approach can be more robust
on unseen questions than single-model neural systems.
Awards
Aug 2026🎖Selected for a Runner-Up Award of the Informatics
Europe Best Dissertation Award.
Oct 2025🏆Received a Prorector's Award for Outstanding PhD Research.
May 2025🏆Received a Dean's PhD Award for the defended dissertation
thesis (~5% of defended).
Feb 2025🏅Honoured with the Summa Cum Laude for the defended dissertation
thesis (2–5% of defended).
Nov 2024🎖Named Outstanding Reviewer Award at EMNLP 2024.
Apr 2024🎖Named Outstanding PhD Researcher by the Research Board of the
Faculty of Informatics, Masaryk University.
Jul 2023🥇First author of the Best paper at ACL 2023 NLRSE workshop
(among 12 accepted).
May 2023🥇First author of the Best paper at EACL 2023 SlavicNLP workshop
(among 26 accepted).
Jul 2022🥇First co-author of the winning submission in the NAACL DADC:
Better Training Data challenge.
Nov 2021🥇First author of the best-performing metric at the WMT 2021
Metrics shared task (among 18 submissions).
Experience
NLP Scientist - Team Lead
Gauss Algorithmic
Delivering the most recent NLP technologies from whiteboards to real-world users.
• Research and productisation of language technologies for diverse specialized applications, involving language generation, classification, entity recognition, search or recommendation.
• On-premise deployments of generative language models: compute optimisation, scalability, high availability assurance.
• Coordinating a diverse team of tenure NLP scientists, software developers, operations engineers, business developers, and copywriters.
• Communication with clients of diverse cultural backgrounds, public talks, and hands-on workshops at tech conferences and companies.
Case Studies
• We developed a paraphraser that can transcribe technical documentation to a more familiar language,
enabling easier comprehension and searchability by visitors.
Our solution enabled our customer to attract 12% more visitors to their websites.
• We delivered machine translation models specialized for chat conversations across languages of
Southeast Asia. Our on-premise deployment enables our customer to save 10k+ USD per month while
delivering translation quality comparable to Google Translate.
See our blogs, NLP case
studies, HuggingFace models or open-source projects.
March 2021 - February 2025
Technical lead
Grant Project: Intelligent Back Office
Coordination of the research team of 5-6 researchers within a larger, multi-organization
grant project focused on improving
document processing quality for specialised domain(s).
Within this project, we (1) enhanced the quality of domain-specific OCR text extraction
utilising semi-supervised language modelling and (2) improved the methods to utilise
positional information of document segments for a more accurate identification of the named
entities.
September 2021 - Feb 2025
Deep Learning Engineer
Gauss Algorithmic
Creating the prototypes of NLP applications for specific use-cases,
in multilingual classification, named entity recognition, or language generation.
• Development of custom architectures and data pipelines.
• Streamlining the experimentation, setting up practices in model and data versioning, reproducibility, integration.
• Implementation of the essential infrastructure around Transformer-based models (classification, generation)
in the early Transformers era.
Implementations in Tensorflow and later PyTorch, deployments using CI, Docker & Kubernetes in AWS and
Google Cloud.
June 2018 - March 2021
Software Developer & NLP/AI Scientist
Red Hat Software
Enhancing the company search engines with semantic text representations and classification,
within the Searchisko & other
open-source projects.
Application of pivotal semantic representation technologies such as Word2Vec, and FastText. Implementations in Python &
Java, deployments in OpenShift.
March 2015 - June 2018
Stream Processing Developer
CSIRT: Cyber Security Incident Response Team of Masaryk Univerity
Research & development of intrusion detection methods in scalable, streaming paradigms.
Implementations of unsupervised and semi-supervised Machine Learning methods in Apache Spark &
Python.
Most of our research is open-sourced in Stream4Flow
project.
March 2016 - September 2017
Talks
Plasticity over Scale
BOLD AI LAB, Oxford, UK, October 2026
Ideas for more versatile AI models and a lab fully embracing open-endedness in research Presentation
slides with links
How do LMs Reason and Why Should We Care
R&D Centre for Large Language Models, National Institute of Informatics, Japan
Introductory talk at LLC NII motivating our efforts towards better mathematical reasoners Presentation
slides with links
Robust Language Models One Step at a Time
Kempelen Institute of Information Technologies, June 2025
Invited talk covering recent findings and potential future directions towards more robust Language Models Presentation
slides with links
Why we Should Care about Uncertainty when Training Language Models
Speech Seminar, Brno University of Technology Invited talk showing new connections of uncertainty in training and qualities of resulting language models
Community talk: DataMesh Brno, September 2024 (Offline)
Informal talk sharing our experience with deployments of custom models, including applications of
autonomous decision agents. Presentation
slides (in Slovak)
Training for Single Correct Prediction Makes Your Model More Fragile
ELLIS Robust LLMs Workshop in Oxford, UK, July 2024
HumanAligned.ai Summer school in Prague, July 2024
Think Twice: Measuring the Efficiency of Eliminating Prediction Shortcuts
of QA Models
EACL 2024 Main conference talk in Malta, March 2024
A 12 min overview of our work exploring the limits of evaluating robustness of language models in
Question answering.
Robustness of Language Models and Perspectives of Modularization
Language Technology seminar, University of Helsinki, March 2024
A presentation of my talk covering recent methods for improving robustness of language models and the
role of modularization. Presentation
slides with links to the literature.
Soft Alignment Objectives for Robust Adaptation of Language
Generation
ACL 2023 conference in Toronto, Canada, July 2023
A 6 min exposition of our ACL paper proposing more robust training objectives for language
generation.
Learning to Learn: Hands-on Tutorial in Using and Improving Few-shot Language Models
Workshop on Machine Learning Prague conference, in Prague, Czechia, June 2023
Organisation of the workshop covering most recent topics with hands-on tutorials in in-context
learning. Workshop github &
Presentation
slides with links to the literature.
Resources and Few-shot Learners for In-context Learning in Slavic Languages
EACL 2023: Slavic NLP workshop in Dubrovnik, Croatia, May 2023 · 🥇 Best paper award
A 10 min overview of our work in building and evaluating in-context learning in Slavic languages.
Learning to Learn: Training Language Models to Understand Tasks from Few Examples
Community talk: Machine Learning MeetUp Brno, October 2022 (Offline)
Mitigating Biases of QA Models by Simple Resampling Methods
2022 Annual Conference of the NAACL: DADC Workshop, July 2022
Results announcement and recording of Supersamplers' team presentation, live on NAACL 2022
DADC workshop in Seattle.
Methods for Estimating and Improving Robustness of Language Models
NAACL 2022: SRW workshop, July 2022
A 5min talk covering my thesis proposal presented on NAACL 2022 SRW in Seattle.
Adaptor: Objective-Centric Adaptation Library for Language Models
60th Annual Meeting of the ACL, May 2022
Blitz 2min introduction video of Adaptor library presented on ACL 2022 in Dublin.
Other Activities
Supervisor
Transformers Club & others
I have supervised numerous bachelor's and master's theses on topics closely related
to the robustness of language models. For the more ambitious students, I organize the weekly
meetings of TransformersClub™, a shared platform for pursuing creative
ideas, peer reviewing and organizing teams to address unsolved research challenges. Many of these
initiatives end up as a research paper in major ML/NLP venues.
The work that emerged from the Club and/or I have supervised:
Frederic Sadrieh (2025-): Creating Prompt-agnostic Language Models.
Over the five years, I have given practicals for 100+ MSc students on the essentials of
text representations, transformers and machine learning applied in indexing and search.
I have also proposed and led the redesign of the course to a Kaggle-like
competition
based on a newly-created, easy-to-use
benchmark framework.
End-of-semester surveys found that after this redesign, 31.5% of
more
students agree with that the course has an enriching value for them.
The results of the competition also allow us to easily reach out
to the best students with further research opportunities.
Springs 2019 - 2025
Area Chair & Reviewer
*ACL Conferences, ACL Rolling Review & other
I give back to the community by volunteering for reviewing, proofreading and providing feedback
to other researchers whenever it can help. Feel free to get in touch if you're interested!
Away From Keyboard
Research can be fun, but there's a lot of other good stuff to do.
Whenever I can, I take my shoes 🥾, a bike 🚲 or skis ⛷ and head towards mountains ⛰☀️.
I love spending time breathing fresh air with unlimited open space ☁ above my head.
These (and any other) activities feel best when combined with a taste of a filtered brew ☕.
Please get in touch if your coffee is undrinkably sour for you. I'll be interested to know your
source.