PT - JOURNAL ARTICLE AU - Ronald van den Berg AU - Wei Ji Ma TI - A rational theory of set size effects in working memory and attention AID - 10.1101/151365 DP - 2017 Jan 01 TA - bioRxiv PG - 151365 4099 - http://biorxiv.org/content/early/2017/08/09/151365.short 4100 - http://biorxiv.org/content/early/2017/08/09/151365.full AB - The precision with which items are encoded in working memory and attention decreases with the number of encoded items. Current theories typically account for this “set size effect” by postulating a hard constraint on the allocated amount of some kind of encoding resource, such as samples, spikes, slots, or bits. While these theories have produced models that are descriptively successful, they offer no principled explanation for the very existence of set size effects: given their detrimental consequences for behavioral performance, why have these effects not been weeded out by evolutionary pressure, for example by allocating resources proportionally to the number of encoded items? Here, we propose a theory that is based on an ecological notion of rationality: set size effects are the result of an optimal trade-off between behavioral performance and the neural costs associated with stimulus encoding. We derive models for four visual working memory and attention tasks and show that they account well for data from eleven previously published experiments. Our results suggest that set size effects have a rational basis and that ecological costs should be considered in models of human behavior.