The Fill-Mask Association Test
Overview
The Fill-Mask Association Test ('FMAT') doi:10.1037/pspa0000396 is an integrative, probability-based social computing method using Masked Language Models to measure conceptual associations (e.g., attitudes, biases, stereotypes, social norms, cultural values) as propositional semantic representations in natural language. Supported language models include 'BERT' doi:10.48550/arXiv.1810.04805 and its variants available at 'Hugging Face' https://huggingface.co/models?pipeline_tag=fill-mask. Methodological references and installation guidance are provided at https://psychbruce.github.io/FMAT/.
This version brings crucial changes and improvements to the add.tokens method of FMAT_run(). Old versions are completely deprecated.
- Deprecated the
add.methodparameter ofFMAT_run(): Now it always computes **average** subword token embeddings, with another new parameterweight.decay(default value = 1, i.e., equally weighted) that can specify the relative importance of multiple subwords. - A smaller decay value would give greater weight to the former subwords than to the latter subwords.
- The *i*-th subword $w_i$ has the raw weight score as $\text{weight}(w_i) = decay^i$.
- See also
weight_decay()for computational details. - Added
special_case()as an explicit function to better specify models requiring special treatment, which was previously just a parameter ofFMAT_run(). - Improved the internal technical treatment for subword token combination when "\\u0120" is the special prefix. This is important for more accurate out-of-vocabulary fill-mask probability estimates of whole words and phrases, mainly relevant to models using the RoBERTa architecture and only influencing results under
add.tokens=TRUE. Note thatFMAT_run()results withadd.tokens=FALSEare not affected by this change. - Improved progress output information of
FMAT_run(). - Improved
ICC_models()to support ICC estimates of both log probability (raw) and log probability ratio (LPR).
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 17 (2 internal)includes a package overview page
- Examples that run
- 23%3 run in a plain check · 2 only when donttest examples are enabled (R CMD check --as-cran) · 7 never run · 1 hold no code
- Exported functions with examples
- 80%
- Documented parameters
- 87%
- Return-value docs
- 93%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- not measured
- Median days to close, 50 most recently updated closed issues
- 103
- Median days to close, 50 most recently updated closed PRs
- not measured
Stars over time
Forks over time
Issues over time
8 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/psychbruce/fmat on 2026-10-18.
The R CMD check workflow runs on Linux
GitHub Pages site last deployed 2026-03-07 · The repository has a site deploy workflow
pkgdown site last built 2026-03-07
Dependencies
Installing FMAT adds 46 packages (28 with compiled code, 34 MB of source tarballs). Heaviest: stringi 11 MB, data.table 5.7 MB, Rcpp 1.8 MB.
Code & Tests
People & History
Maintainer since 2023.8 (2023)
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 2026.1Latest
- 2025.122025-12-15 · diff ↗
- 2025.82025-08-19 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 2025.42025-04-08 · diff ↗ ·
removed 1 export
FMAT_loadadded 3 exports
BERT_remove, fill_mask, fill_mask_check - 2025.3
- 2024.72024-07-29 · diff ↗
- 2024.6
- 2024.5
- 2024.4
- RR 4.4.0 released · 2024-04-24
- 2024.3
- 2023.82023-08-11
- RR 4.3.0 released · 2023-04-21
Package metadata
- First published
- 2023-08-11
- Total releases
- 11 / 3 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 4.0.0
- Download size
- 34 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("FMAT")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.