fgt2009_rsa: Frank, Goodman & Tenenbaum word-learning model with pragmatic...

View source: R/model-fgt2009.R

fgt2009_rsaR Documentation

Frank, Goodman & Tenenbaum word-learning model with pragmatic (RSA) reasoning

Description

fgt2009() with the literal speaker replaced by a Rational Speech Act pragmatic speaker: a speaker who chooses words to be informative to a listener who reasons about that speaker (Frank & Goodman, 2012; Smith, Goodman & Frank, 2013). The non-referential channel, the kappa penalty, and the marginalization over intentions are unchanged, so the literal fgt2009() model is the rsa_depth = 0 special case. The recursion is what produces strong mutual exclusivity – the speaker could have used a different word – which the literal model underproduces.

Usage

fgt2009_rsa(
  alpha,
  gamma = 1,
  kappa = 0.5,
  rsa_alpha = 3,
  rsa_depth = 1L,
  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).

rsa_alpha

Speaker rationality (softmax temperature) in the RSA recursion.

rsa_depth

Number of pragmatic recursions; 1 gives the usual one-step pragmatic listener/speaker.

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.

Value

An object of class xslMod

Examples

mod <- fgt2009_rsa(alpha = 1, rsa_alpha = 3)
xsl_run(mod, get_example_ambiguous_condition())

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