fgt2009: Frank, Goodman & Tenenbaum (2009) intentional Bayesian...

View source: R/model-fgt2009.R

fgt2009R Documentation

Frank, Goodman & Tenenbaum (2009) intentional Bayesian word-learning model

Description

A joint Bayesian model that infers a lexicon – a set of word-object edges – from the whole corpus at once, marginalizing over the speaker's latent referential intention on each trial. Words are generated either referentially (probability gamma, naming an object in the intention) or non-referentially (1 - gamma, with in-lexicon words down-weighted by kappa); a geometric prior ⁠P(L) proportional to exp(-alpha |L|)⁠ favors small lexicons. Inference is MCMC (blocked per-object Gibbs plus MI-biased single-edge Metropolis moves), and xslFit$matrix holds the resulting posterior edge marginals ⁠P(word names object | corpus)⁠.

Usage

fgt2009(
  alpha,
  gamma = 1,
  kappa = 0.5,
  n_chains = 4L,
  n_warmup = 120L,
  n_samples = 300L,
  gibbs_per = 1L,
  edge_per = 1L,
  top_k = 6L,
  seed = 1L
)

Arguments

alpha

Geometric lexicon-size prior: P(L) proportional to ⁠exp(-alpha |L|)⁠. Must be tuned to corpus size.

gamma

Probability that a word is used referentially. 1 (the default) is appropriate when every word heard is a label, as in controlled XSL experiments.

kappa

Down-weight applied to an in-lexicon word used non-referentially (only relevant when gamma < 1).

n_chains, n_warmup, n_samples, gibbs_per, edge_per, top_k, seed

Sampler controls. Defaults are tuned for the small, dense corpora of XSL experiments; raise n_chains/n_samples to reduce Monte Carlo noise.

Details

This is a batch model, unlike the incremental associative models in this package: it has no trial-by-trial learning trajectory, and control$reps is ignored. Ported from the Python package wordlearn (github.com/mcfrank/wurwur); see also fgt2009_rsa() for the pragmatic extension.

alpha scales with corpus size (larger corpora want a larger alpha) and the fit-vs-alpha curve is single-peaked, so alpha is best chosen with a sweep (see fgt2009_sweep_alpha()) rather than a general-purpose optimizer. gamma and kappa default to the values used for the analogous cross-situational simulation in the source package (gamma = 1: every word in a controlled XSL experiment is a referential label, so there is no non-referential channel; kappa = 0.5). The naturalistic-speech values are gamma = 0.1, kappa = 0.05.

Value

An object of class xslMod

Examples

mod <- fgt2009(alpha = 1)
xsl_run(mod, get_example_ambiguous_condition())

XSLmodels documentation built on Oct. 18, 2026, 5:08 p.m.