{'fraction_non_alphanumeric': 0.019175455417066157, 'fraction_numerical': 0.0, 'mean_word_length': 5.404907975460123, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Human inference in changing environments

In past decades, the Bayesian paradigm has gained traction as a principled account of human behavior in inference tasks. Yet this success is tainted by the ubiquity of behavioral suboptimality and variability. We explore these discrepancies using an online inference task, in which we modulate the temporal statistics of hidden change points. We show that humans adapt their inference process to the implicit temporal statistics of stimuli, thereby behaving in an approximate Bayesian fashion. However, they exhibit biases and variability, and these depend on the history of stimuli. A systematic study of a broad family of optimal and sub-optimal models indicates that noise arises ‘internally’—in the inference process itself—rather than at the behavioral output. Specifically, we argue that humans mimic Bayesian inference by approximating the posterior with a modest number of samples. Our results contribute to a growing literature on sample-based cognition and compression by stochastic pruning.