SOS! An algorithm and software for the stochastic optimization of stimuli
Paper · 2012 · Blair C. Armstrong, Christine E. Watson and David C. Plaut
Summary
A study of word frequency can be hard to interpret if its common and uncommon words also differ in how easily readers can picture their meanings. Choosing words by hand can reduce this problem, but every replacement can improve one comparison while making another worse. Armstrong, Watson, and Plaut introduce SOS, a method and software package for choosing experimental items from a pool of candidates. The researcher specifies which differences the stimuli should exhibit, which differences they should suppress, and which items can enter each condition. SOS turns those requirements into a cost and searches for lists with lower cost.
The search starts with a simple operation: propose exchanging an item in a list for another eligible item. A greedy search accepts exchanges that improve the lists as a whole. A stochastic search can also accept an exchange that temporarily makes the lists worse, opening routes to better combinations that greedy search might miss. The authors show how to use a greedy run to calibrate this second search. The software also checks whether the lists have met user-defined statistical criteria and can compare the items selected in independent runs. Finding several suitable lists with little overlap gives a researcher more options for repeating an experiment with fresh materials.
In a case study from psycholinguistics, the authors revisit a published comparison of high- and low-frequency words. The stochastic SOS lists yielded a paired frequency effect size of 3.3, compared with 1.7 for the hand-picked lists, even though the hand-picked words had a larger average frequency gap. The SOS lists had more consistent differences within pairs and were better matched on age of acquisition and imageability. In a separate design using frequency and age of acquisition as continuous predictors, the weighted greedy search met all selection criteria in 8/10 runs. The stochastic version met them in 10/10 runs, although the successful lists shared 42% of their items by the paper’s overlap measure.
Further examples cover factorial designs, matching new items to a fixed list, and choosing lists around specified target values. The results show what the search can accomplish with measured item properties and a suitable candidate pool. They also show how those choices bound the experiment. A list can satisfy demanding comparisons among the items it contains while relying on a narrow part of the population from which those items were drawn.
Deep dive: SOS! An algorithm and software for the stochastic optimization of stimuli
How SOS uses stochastic search to select experimental stimuli, balance competing design goals, and test how widely suitable items can be found. · about 38 minutes to read
The problem and its context
A word list is part of the experimental design
To study how word frequency affects a response, an experimenter might compare performance on common and uncommon words. Frequency then has to differ enough between conditions to give the comparison a chance to detect an effect. At the same time, a difference in the length or imageability of the words could supply another explanation for a difference in performance. Imageability is how readily a person can form a mental image of a word’s meaning. The selection problem is to make the planned frequency comparison informative while keeping alternative explanations in check.
That is the paper’s concern with internal validity. In the frequency experiment, the question is whether an observed difference can be attributed to frequency under the design. External validity raises a further question about the range of words to which an observed effect might apply. A list could be well suited to a frequency comparison and still consist of unusual words. For example, if only a narrow class of uncommon words can be paired with common ones on the chosen properties, the comparison may speak most directly about that class. The match between conditions and the connection between each condition and its source population require different evidence.
These considerations affect statistical power as well as interpretation. The paper describes cases in which weak stimuli make it difficult to detect the target effect with a practical experiment. A large spread in the differences among item pairs can leave the comparison dependent on a few exceptional items. Adding participants can consume time and resources while leaving the materials themselves as they were. The choice of stimuli determines part of the evidential value of the experiment before any responses are collected.
The authors contrast the attention paid to various stages of research on visual word recognition. Earlier work had identified relevant word properties, assembled databases with measurements for many words, improved stimulus timing, and developed methods that accounted for variability over participants and items. Researchers nevertheless commonly assembled lists manually with help from spreadsheet sorting. The database enlarged the set of choices and made relevant properties visible. The researcher still had to work out which changes to a list would help the design overall.
What manual selection accomplishes
The manual practice has a logic worth preserving. A researcher begins with the conditions needed to test a hypothesis, works out which properties should differ, and identifies other properties to hold roughly constant. The researcher then fills the conditions from an eligible pool, inspects the lists, and tries replacing a word with a better candidate. After a promising exchange, the researcher checks the comparisons again. This can produce suitable lists, especially when many words satisfy the same requirements.
The difficulty is keeping track of changes across requirements. Replacing a long, uncommon word with a shorter one might improve the length match and worsen the match on age of acquisition, the age at which a word is learned. Moving to a more imageable replacement might repair one comparison while introducing a different imbalance. Looking at a single column makes it easy to find candidates with a desired property. It takes more work to see whether each of those candidates is an improvement once all the comparisons are considered together.
The authors also connect the cost of manual work to the reuse of stimuli. Once a list has taken considerable effort to construct, subsequent studies can save time by using it again. Reuse lets results accumulate for those particular items. A later discovery about the list can then affect the interpretation of several studies at once. The paper describes work in which ambiguous words were reused and subsequent analysis identified additional variables that the lists had left uncontrolled. It also discusses a case in which concerns about a standard picture collection had implications for studies that had used it. Replication with different items addresses a question that reuse leaves open: whether the effect survives a change of materials.
The manual procedure could include a check on how well the selected items represent their source population. The authors argue that researchers frequently omit this step. A list can meet the comparisons that first motivated it without giving any indication of how many alternative words could have done the same job. The restriction can be especially consequential in a factorial design that crosses correlated properties. A cell combining a high value on one property with an atypical value on another may draw from a very small part of the pool. An analysis that incorporates item variability still needs a defensible account of the items to which it generalizes.
Why search locally
The authors consider two direct ways to automate selection. An exhaustive search would score every eligible combination and could establish which combination had lowest cost under the specified objective. The number of possible lists makes this impractical for the cases at issue. Random search would examine only some combinations, but each draw could discard everything that made a previous list promising. The ability to score many lists helps only if enough of those lists have a reasonable chance of meeting the requirements together.
SOS keeps the aspect of manual selection that makes progress cumulative. It works with a current collection of lists and proposes small changes. A single replacement can carry forward the rest of a good list while improving its fit to the design. Software can perform those comparisons repeatedly and calculate the consequences for each constraint in a consistent way. The authors also cite earlier automated matching work by van Casteren and Davis and draw on stochastic relaxation as a way to move beyond the limits of strictly improving exchanges. The resulting procedure makes the local decisions explicit enough to inspect and provides a way to continue if the useful exchanges become difficult to find.
Why the design may need to change
Some selection problems reflect the form of the experiment itself. The paper describes the appeal of separating a continuous property into low and high groups. Extreme groups can create a clear contrast and make the design easy to explain. Such a contrast leaves the intermediate range unobserved. A claim about how responses vary through that range would then rely on an assumption about the shape of the relationship. The paper cites earlier work reporting that the effect of log frequency can be nonlinear among high-frequency words.
Grouping also discards distinctions among items within a condition. A word near the lower end of the high-frequency group and one far above it receive the same condition label. If the exact frequencies explain some of the variation in responses, a categorical comparison can lose information that a continuous analysis could use. The authors discuss earlier work that favored sampling across the range and retaining the continuous predictor in a regression analysis.
The regression design has its own selection problem. Drawing a simple sample from a skewed pool can leave some ranges with very few observations. Drawing items to cover the full range of several properties can preserve correlations among them, making their separate contributions harder to estimate. The paper treats coverage of the range and associations among predictors as targets that can be specified while assembling the materials. This gives the experimenter a way to evaluate a design before collecting behavioral data, including checking whether the available words can support the desired comparisons at all.
The method, step by step
Define the pool, the lists, and their intended use
SOS begins with recorded measurements on candidate items. In the word examples, a data row identifies a word and its columns give measurements such as frequency, number of letters, age of acquisition, and imageability. The software reads tab-delimited files for the populations. A population is the pool from which a list can draw, and a sample is the list being constructed for use in the experiment. The user sets each list’s size and associates it with a population. Several lists can share a population, or each can have its own.
The paper’s frequency example shows why that choice matters. To make a comparison with the original hand-selected stimuli, the authors use separate high- and low-frequency pools based on eligibility rules from the earlier experiment. For a design in which the boundaries are open, lists can instead start from a common pool. An ordered contrast on frequency can then steer the lists apart while the other constraints determine which words can be spared or exchanged. In either case, the available candidates and their measured properties are fixed before the search begins. The procedure does not estimate new word properties from behavioral responses.
Initial lists are usually filled at random. The software also supports specifying items in advance, including keeping an existing list fixed when the goal is to find another list that resembles it on selected measures. This matters when the materials for one condition are already committed or when an earlier study supplies the starting point. An item can thus have a role in calculating cost without being available for replacement.
How SOS selects and checks experimental stimuli
The steps in order.
Distinguish eligibility, cost, and stopping
A hard constraint sets eligibility. A maximum or minimum value on a column can exclude an item from a condition regardless of how helpful it would be for the other comparisons. A fixed frequency boundary supplied by the design is an example. Hard bounds can also exclude clear outliers while leaving the optimizer room to discover the eventual separation between conditions. When a user forces initial items into a sample and they violate a hard requirement, the software accumulates a penalty of 1 for each violation. It tracks these penalties separately and gives them priority over soft costs.
A soft constraint expresses a preference by degree. An imbalance in average word length can be small or large, and a cost term assigns it an accordingly small or large penalty. A preferred separation, such as higher frequency in one condition, can lower the cost as it grows in the desired direction. The complete objective combines the cost terms. An exchange that improves one property can be rejected if its effects on the other properties make the combined result worse.
A stopping criterion specifies when the lists are suitable enough for the planned experiment. The authors use tests for differences that should be large, for matches that should be close, for correlations that should approach a target, and for distributions intended to be roughly uniform. These checks need not track cost exactly. A pairwise cost may continue falling as individual pairs grow closer even after a test of the mean difference has passed. In another case, a list with low cost can still fail one of the user’s statistical criteria. The search can also end after cost has stopped improving for a specified interval, the freeze point, or after reaching an iteration limit. The reason for stopping is part of what a run establishes.
Put distances between lists on a common footing
The simplest example in the paper aims to make two condition means agree. Its cost is the squared gap between them.
O_MIN(x_c₁, x_c₂) = (x̄_c₂ − x̄_c₁)²
Here O_MIN is the minimization cost. c₁ and c₂ identify the conditions, and x_c₁ and x_c₂ are the values of the same item property in those conditions. A bar over x denotes the mean. The subtraction gives the signed gap, and the square makes the penalty independent of its direction. If one group of words is longer on average, exchanging which group is longer while keeping the gap the same gives the same cost.
The general groupwise form lets the statistic vary and gives the experimenter control over the shape and priority of the penalty.
O_MIN(x_c₁, x_c₂, b, n) = b |f(x_c₂) − f(x_c₁)|ⁿ
O_MIN, c₁, c₂, and the x terms retain their meanings. f is the statistic applied to a set of values. The formal description specifies the mean or the standard deviation, the latter allowing a match on how much the values vary. The vertical bars take the absolute value of the gap. b is a weight with default 1.0, and n is an exponent with default 2.0. The paper describes computing these costs on normalized values so properties measured on different scales can make comparable contributions.
Changing the weight scales the penalty for a given discrepancy. An exponent changes how sharply the penalty responds as the discrepancy grows or shrinks. The authors describe weight changes as a way to express relatively fine priorities and exponent changes as having a stronger effect on the shape of the cost. They compare weights to the role of coefficients in a regression, with the qualification that nonlinearities in the cost and swap rule prevent a direct identification. The criterion for a good stimulus list can thus reflect substantive judgments about which differences matter most.
When the experiment requires a large difference in a particular direction, SOS uses an ordered maximization term.
O_orderMAX(x_c₁, x_c₂, b, n) = −s(f(x_c₁), f(x_c₂)) O_MIN(x_c₁, x_c₂, b, n)
O_orderMAX is the cost of the ordered contrast. s is 1 when the statistic f for condition c₁ is below its value for condition c₂, and −1 otherwise. O_MIN supplies the magnitude of the weighted distance, using the same data vectors, statistic, weight b, and exponent n as before. The leading minus sign makes an increasingly large gap in the desired direction increasingly favorable to a search that minimizes total cost. A gap in the opposite direction produces a penalty.
This term orders the groups through their statistics. A hard cutoff, by comparison, applies to each word individually. In a shared pool, some individual items can have values near those in the other condition if the lists still express the requested ordering. The paper uses this flexibility in examples where selecting where to divide the range is part of the task.
Decide whether to compare groups or individual pairs
Groupwise matching compares a statistic calculated separately for each condition. Equal mean length is compatible with very different arrangements of short and long words within the lists. Pairwise matching asks for close values within corresponding positions. It requires equal numbers of items in the compared lists, and the pairing itself matters. The paper emphasizes this distinction for experiments that will analyze paired differences and for designs that will include the matched property as a covariate.
O_pairMIN(x_c₁, x_c₂, b, n) = (b/k) (Σᵢ₌₁ᵏ |f(x_c₂,ᵢ − x_c₁,ᵢ)|)ⁿ
O_pairMIN is the pairwise minimization cost, k is the number of pairs, and i indexes a pair from 1 through k. x_c₂,ᵢ and x_c₁,ᵢ are the item values in that pair for the respective conditions. The values are differenced before the operation denoted by f. The vertical bars take the magnitude of each contribution, Σ sums those contributions, n sets the exponent, and b/k scales the result using the weight b and pair count k. The authors describe the corresponding extension of ordered maximization in terms of the same move from group statistics to pairwise comparisons.
Using magnitudes gives large discrepancies a cost even when their signs cancel across the list. A paired test of the mean difference can give a high p-value when some pairs differ substantially in one direction and others differ substantially in the opposite direction. A cost on the individual discrepancies gives an experimenter a means to discourage those pairs. The price is a more restrictive selection task. A word with the right effect on a condition mean may have few or no suitable partners in the other condition.
There are also cases in which the desired comparison is to a preset measurement. The same framework can locate a list with a specified mean or favor a desired amount of spread.
O_valueMIN(v, x_c₂, b, n) = b |f(x_c₂) − v|ⁿ
O_valueMIN is the cost for missing the target v. x_c₂ denotes the values of the property in the list being optimized, and f is the statistic calculated from those values. The vertical bars give the magnitude of the deviation. b is the weight and n the exponent. The paper gives the example of targeting a standard deviation of zero when a condition is meant to contain items with the same value on a particular property. A fixed statistic can therefore express a design requirement even when there is no comparison list.
Encourage coverage of a continuous predictor
For a continuous design, the authors want to control where observations fall along a range, including whether parts of the range are left empty. They use a histogram to convert this idea into a cost. The range is divided into bins, and the fraction of selected items in each bin describes how the list covers the range. The user can define the histogram over the population range to encourage broader coverage, or over the range of the current sample to assess how evenly the chosen items are distributed within that interval.
The derivation starts with an entropy measure. Here entropy expresses how evenly the items are distributed among histogram bins.
S_simple(p) = −Σᵢ₌₁ⁿ pᵢ ln(pᵢ)
S_simple is the initial entropy measure and p is the vector of bin proportions. pᵢ is the proportion in bin i. Σ sums the contributions from bin 1 through bin n, and ln is the natural logarithm. n in this derivation is the number of bins. Equal proportions give the greatest entropy. The paper discusses the measure at the scale of histogram bins, so an even result describes the counts per bin.
The authors modify the expression to give empty bins a defined contribution and introduce a division by the number of items. Their derivation uses the default in which the number of bins equals the number of items.
S′_simple(p) = −(Σᵢ₌₁ⁿ pᵢ ln(pᵢ + 1))/n
S′_simple is the modified measure. p, pᵢ, i, Σ, and ln have the same meanings as before, and n serves as both the item count and the bin count under the default used in the derivation. The added 1 makes the logarithm well defined when pᵢ is zero. The corresponding bin term is then zero. The modified measure takes negative values, with values closer to zero indicating greater uniformity.
The authors next use the entropy of a completely concentrated histogram and that of an evenly filled histogram to put the quantity on a common scale.
S(p) = −(−ln(1/n + 1) + Σᵢ₌₁ⁿ pᵢ ln(pᵢ + 1))/(ln(2) − ln(1/n + 1))
S is the normalized entropy measure. p holds the bin proportions, pᵢ is the proportion for bin i, Σ adds the terms across the n bins, and ln is the natural logarithm. The logarithms involving 1/n + 1 use the proportion represented by an evenly occupied bin under the default. The 2 in ln(2) comes from adding 1 to the proportion in a single bin containing the entire sample. The transformation puts maximum concentration at −1 and the evenly filled histogram at 0.
O_entMAX(p, b, n) = b |S(p)|ⁿ
O_entMAX is the penalty associated with the histogram, p is the vector of bin proportions, and S is the normalized entropy just defined. The bars give its magnitude. Here n again denotes the cost exponent, while b is the weight. A more even histogram moves entropy towards zero and lowers the penalty. This cost can favor a spread of scores across the observed scale. The number of eligible items at each end of that scale still determines how even a histogram the search can achieve.
Control associations among measured properties
In a regression design, frequency and age of acquisition can cover their respective ranges and still move together. If words with one frequency profile tend to share a particular acquisition profile, the data give less leverage for attributing an effect to each property by itself. SOS therefore lets the user ask for a specified correlation. The paper’s continuous-design example targets zero, and the method also allows a non-zero correlation if the design calls for one.
O_matchCorrel(x_c₁, x_c₂, b, n, v) =
b |r(x_c₁, x_c₂) − v|ⁿ if σ(x_c₁) > 0 and σ(x_c₂) > 0
1 if σ(x_c₁) = 0 and σ(x_c₂) = 0
0 if σ(x_c₁) = 0 xor σ(x_c₂) = 0
O_matchCorrel is the correlation-matching cost. x_c₁ and x_c₂ are the two aligned vectors of measurements, which may come from within a sample or from different samples. r denotes their correlation and v the target correlation. b and n again set the weight and exponent on the absolute discrepancy. σ denotes standard deviation, and xor means that exactly one of the stated conditions holds. The constant costs are the paper’s rules for boundary cases in which the ordinary correlation is undefined. When both vectors vary, the cost increases with distance from the target.
Spread and correlation give the search different tasks. A frequency histogram shows which frequencies are present. It cannot show whether high-frequency words sit at one end of the acquisition scale. A correlation cost sees that relationship but can be satisfied by items drawn from a narrow stretch of each predictor’s range. Putting both costs in the objective lets the researcher express both goals, and their behavior during the search can reveal tension between them.
Specify how competing goals should interact
Adding cost terms can favor an unintended compromise. Suppose a study needs low-, medium-, and high-frequency conditions that are approximately equally spaced. The squared reward for creating a large difference can favor putting the supposed middle group near an extreme. One adjacent gap then becomes very large and the other very small. SOS provides a cost-matching term that penalizes the unevenness of the two underlying costs.
O_MATCH(O₁, O₂, b, n, d) = 100b |dO₂ − O₁|ⁿ
O_MATCH is the extra cost imposed on a discrepancy between the component costs O₁ and O₂. d scales O₂ and defaults to 1.0, so the target under that default is equal component costs. The bars take the absolute gap, n is its exponent, and b is the weight. The fixed multiplier 100 gives the term a strong influence at the scale at which the other costs operate. With comparably specified separation terms for the two adjacent gaps, this cost encourages the middle condition to stay between the extremes.
Equalizing two costs is different from asking the search to prioritize a match over a contrast. Consider a study that aims to maximize an imageability difference after obtaining a close frequency match. The authors introduce a conditional term so that a large gain in the contrast carries an extra penalty while the matching cost remains high. The pressure releases gradually as the match improves.
O_condMATCH(O_MIN, O_MAX, b, n, d) =
100b (√(|dO_MAX − O_MIN| O_MIN))ⁿ if O_MAX < 0
0 if O_MAX ≥ 0
O_condMATCH is the conditional cost. O_MIN is the cost of the discrepancy the experimenter wants to minimize. O_MAX is the ordered maximization cost, which is negative when the contrast runs in its desired direction. d is the scaling parameter, b the weight, and n the exponent. The absolute discrepancy between the scaled O_MAX and O_MIN is multiplied by O_MIN inside the square root. The factor 100 provides the strong scaling used in cost matching. The zero branch applies when there is no negative maximization cost to restrain. The authors include it to avoid a pressure that would favor separation in the wrong direction.
In the revisit of the frequency experiment, each nuisance match has a conditional relationship with the frequency separation. The design therefore tells SOS how to value a larger gap in frequency when there is still a discrepancy in length, acquisition age, or imageability. Since the term remains a soft cost, the exact compromise also depends on the other terms and the available words.
Propose a change and update its cost
At each iteration SOS proposes a swap. It randomly chooses an item from a list and a candidate from the associated population. The configuration can also allow an exchange with a list that shares that population. The algorithm evaluates the change in the combined costs. An accepted proposal becomes the state from which the next proposal is made. After a rejection, the existing lists remain in place.
A local update saves work when only the values for the exchanged items have changed. To obtain a new mean, for instance, the software can remove the outgoing contribution from the existing calculation and add the incoming one. The point of the update is to get the cost difference of a proposed exchange without calculating every statistic from scratch on unchanged data. Repeating such exchanges gives the search the chance to make progress incrementally even when combinations of whole lists are too numerous to enumerate.
A greedy run accepts a swap only if cost falls. This makes it a sensible first pass and useful for finding lists that meet practical stopping criteria. It also gives the run a characteristic failure mode. If the layout of the current lists is such that each available single swap increases cost, greedy search has no acceptable next step. A better list elsewhere in the search space may be reachable by first making an exchange that looks worse and then making one that more than repays the cost. A long interval without improvement suggests this possibility. Its force as evidence depends on how many proposals have been sampled and on the nature of the eligible pool.
Make occasional uphill moves
The stochastic version expresses the choice as a probability. Using the convention in which the proposed cost minus the current cost is positive for a worsening move, the probability is as follows.
p_swap(Δcost, T) = 1/(1 + e^(Δcost/T))
p_swap is the probability of accepting the proposed exchange. Δcost is the change in total cost just defined, T is the temperature controlling the amount of randomness, and e is the base of the natural exponential. At positive T, a negative change raises the chance of acceptance, and a positive change lowers it. The 1 terms give the sigmoid its probability scale. With temperature very high relative to typical changes in cost, choices approach a probability of .5 in either direction. At zero temperature the software uses the greedy rule.
The authors use an annealing schedule, meaning that temperature is reduced over the course of the search. Early on, the run explores more freely. Later, cost has greater influence on which exchanges occur. The tutorial calibrates the initial temperature with a trial block of effectively random exchanges. Its suggested estimate uses the difference between the 97.5th and 2.5th percentiles of the changes in that block. This uses a broad span of typical changes and reduces sensitivity to the most extreme observed proposals.
For the low end of the schedule, the paper suggests the 10th percentile of changes from the final block of the greedy search. The idea is to retain a chance of accepting some uphill swaps near the point at which a greedy run would freeze. SOS uses a parameter called pDecrease to set the next temperature as a fraction of the current one. The tutorial suggests at least 10 temperature decreases for calibration and gives 3 as a lower limit for having a meaningful progression through temperatures.
The schedule also controls how long the search stays at a temperature. In the procedure described, the software examines the mean costs of successive blocks and their variability before lowering the temperature. The authors treat relative stability across blocks as an approximation to thermal equilibrium. It gives the search time to explore at its current level of randomness. The paper describes the comparison of successive blocks and leaves the full implementation details to the manual.
Check the resulting lists
SOS periodically applies the statistical tests chosen for the design. A run can stop as soon as all the criteria are met, even if later swaps could improve the objective. The authors distinguish the search for a list sufficient to run an experiment from the search for the lowest achievable cost. A particularly severe optimization target can reduce the number of lists that qualify. If generalization across items matters, additional improvements in cost can come with a narrower range of usable words.
For an indication of that range, the authors propose running the same optimization several times and comparing list membership. The comparison is made within the corresponding condition across successful runs. Low overlap indicates that the search has found different items capable of satisfying the same requirements. High overlap shows repeated reliance on some of the same candidates and motivates a closer look at what is restricting the choice. The overlap is a property of the resulting lists under a given pool, objective, and search procedure. It can be measured without carrying out the behavioral experiment.
Experiments and results
Reconstructing the hand-selected frequency comparison
Morrison and Ellis used separate experiments to ask whether word frequency and age of acquisition could each account for an effect when the other property was held steady. Armstrong and colleagues focus first on Experiment 2, the frequency comparison. The original study chose 24 high- and low-frequency pairs and sought matches on acquisition age, length in letters, and imageability. The SOS authors reconstructed the candidate pool from words in the MRC Psycholinguistic Database with the relevant age-of-acquisition and imageability ratings and Kučera and Francis frequency counts. In the main case description, the high-frequency pool uses counts greater than 110 per million and the low-frequency pool uses 10 per million or less.
The hand-selected lists are the baseline. The paper reports a frequency comparison of p = 2.5 × 10⁻⁸ and a length comparison of p = 1.0. The age-of-acquisition comparison gave p = .20. The imageability comparison gave p = .01, which indicated a difference on a property the experiment had intended to match. For the SOS reconstruction, the authors retained the paired structure and specified a frequency separation along with close matches on the other properties. The tutorial describes the matching criterion as a paired-test p-value of at least .5. Each matching cost also contributes to the conditional pressure on frequency separation.
The reported stochastic SOS result gave a paired frequency statistic of t(23) = 16.13 with p = 4.92 × 10⁻¹⁴. The paired checks for the other properties gave p = .51 for age of acquisition, p = .75 for length, and p = .70 for imageability. These are statistics on the selected word measurements. They show the contrast and matching properties of the lists that would go into a behavioral study.
Hand selection and SOS in the Morrison and Ellis frequency design, paired frequency effect size
SOS produced a larger standardized frequency separation between paired words.
The numbers
| System or setting | frequency effect size |
|---|---|
| Hand-selected lists | 1.7 |
| Stochastic SOS lists (this paper) | 3.3 |
The larger standardized effect accompanied a smaller raw gap. In the paper’s table of descriptive statistics, the mean high-minus-low frequency difference was 218 for the baseline and 148 for the SOS lists. The corresponding standard deviations of the paired differences were 130 and 45. The manually selected words had a greater average frequency separation, with greater variation in how much separation individual pairs supplied. The SOS lists distribute the contrast more consistently across pairs. The authors expect that property to reduce reliance on especially extreme words in a subsequent experiment.
They also examine the variance inflation factor for frequency, a measure relevant to how much uncertainty in a coefficient comes from its relationship to other predictors. The paper reports that the factor was 16% higher for the hand-selected lists than for the SOS lists. The result concerns a potential analysis that includes the matched variables as covariates. It provides a different view of the selected items from the separate paired comparisons, which each look at a single measurement.
Prioritizing the length match
The original hand-selected list achieved an exact length match, so the authors tested whether SOS could retain that feature while improving the balance of the other properties. They assigned the length cost a weight of 100, required a length comparison of p = 1.0, and made the frequency stopping criterion as demanding as the result for the manually chosen items, p = 2.5 × 10⁻⁸. This last change kept a list from ending the run merely by passing the more permissive frequency criterion while the authors were pursuing a stricter combination of properties.
The resulting lists achieved p = 1.0 for length, p = .81 for acquisition age, and p = .82 for imageability. Their frequency comparison yielded p = 3.2 × 10⁻¹⁴. The paper’s descriptive statistics give a high-minus-low mean difference in length of 0.00 and a standard deviation of paired length differences of 0.00 for this version. These figures supplement the p-value by describing the actual length differences in the pairs.
The authors then checked how much the lists changed across repeated successful searches. For the original SOS settings, the mean overlap across the high-frequency lists was 13%, with a reported SD of 0.09. For the low-frequency lists, it was 8%, with an SD of 0.06. The stricter length version gave overlaps of 25% for the high-frequency lists and 8% for the low-frequency lists in the analogous comparison. The overlap results show that compatible alternatives existed in each condition. They also show that a requirement can restrict the available alternatives more in one condition than in another.
Designing a study with continuous predictors
The authors next ask whether frequency and age of acquisition can be studied together with a single list spanning the ranges of both predictors. The separate Morrison and Ellis experiments addressed each predictor with different conditions. Combining their original hard boundaries into a 2 × 2 design would leave too few eligible items in the cells to obtain lists of the original sizes. That lack of candidates appears before any finer matching on nuisance variables. The authors instead choose a continuous design with 100 words and retain each word’s measured predictor values for analysis.
The search uses entropy terms for the distributions of frequency and age of acquisition, and correlation terms to separate the two predictors from each other and from length and imageability. A preliminary search for uniform frequency coverage over the full pool failed even with that goal on its own. The paper attributes the failure to the strongly right-skewed frequency distribution and the shortage of words at the high end. The authors removed the top 5% by frequency before using the restricted pool for the reported continuous design.
With both sets of constraints present, early runs met the correlation criteria but froze while the distributions remained uneven. Frequency could still be concentrated at the low end with relatively few common words in the list. A run focused on the distributions met the corresponding criteria and retained significant correlations among the measured properties. The two partial results identify different ways the same pool can support the planned design.
To obtain a compromise, the authors placed a weight of 100 on each of the two distribution terms. This brought their initial costs to the scale of the correlation terms or above it. Successful runs had to meet a p > .5 criterion for the correlations targeted at zero and a p > .001 criterion for the checks against uniform distributions. The weighted greedy optimizer succeeded in 8/10 runs. The authors then used a randomly chosen failed greedy run to configure the stochastic version of the same search, which succeeded in 10/10 runs.
The paper illustrates the distribution changes with histograms. The reported age-of-acquisition range in that example is 125-694 and the frequency range is 1-214. The age-of-acquisition entropy went from −0.012 before optimization to −0.0095 afterward. Frequency entropy went from −0.071 to −0.0061. Both final distributions passed the uniformity criteria. Across successful stochastic runs, the reported overlap was 42%. The study thus found multiple usable lists from the restricted pool, with repeated selection of a considerable fraction of their items.
Letting the search find the division between groups
The additional examples primarily draw on MRC word data with frequency and counts of letters, phonemes, and syllables. They use p > .5 as the usual statistical criterion for a match and p < .05 for differences intended to be significant. The paper reports how frequently SOS returned lists satisfying the criteria across repeated searches. Those run counts describe stimulus construction, rather than results from participants performing the experiments.
In a one-way example, the authors created two samples of 100 words each, maximizing their frequency difference while matching their lengths, phoneme counts, and syllable counts. Both samples drew from a common pool and the optimizer chose the separation. Groupwise matching succeeded in 10/10 runs. A pairwise version also succeeded in 10/10 runs with a practical tolerance for mean discrepancies. This tolerance allowed a match to pass if the means were within 0.5 of one another on the property being checked.
The paper gives an example of why that tolerance matters. The words in the high-frequency list had a mean phoneme count of 5.08 with SE = 0.17. In the low-frequency list the mean was 5.02 with SE = 0.18. The paper reports a gap of 0.06 phonemes and a paired comparison of t(99) = 1.23 with p = .22. That p-value failed the default matching criterion despite the small measured difference. A direct tolerance lets a researcher state what difference would be small enough to accept in the original units of the measurement.
The authors also created low-, medium-, and high-frequency groups, matching them on the same nuisance properties while encouraging the intermediate group to sit approximately midway between the others. The optimizer determined where each level fell. The groupwise version yielded acceptable lists in 10/10 runs, as did the pairwise version with a tolerance of 0.1. The successful lists had distinct frequency levels and an approximately balanced spacing. In this design, ordering and spacing are separate aspects of the desired outcome.
Crossing factors and matching a fixed list
A further factorial example crossed frequency with word length in a 2 × 2 design and sought to minimize imageability differences among the cells. The authors drew words from a common MRC pool with the required measurements and excluded frequencies above 1,000. The assignment to high and low levels on each property was left to the search. SOS met the requirements in 10/10 runs with groupwise constraints and in 10/10 runs with pairwise constraints. The pairwise implementation used practical tolerance settings. This example shows the procedure operating when each item has to contribute to a combination of contrasts and matches that involves several lists.
For an example with existing materials, the authors held 100 verbs fixed and searched for 100 nouns with comparable frequency, length, syllable counts, and phoneme counts. The groupwise match succeeded in 10/10 runs, and the pairwise match succeeded in 10/10 runs using a tolerance of 0.1. The fixed list remained the point of reference throughout the search. The costs measured how well the changing noun list matched those verbs.
Finally, the authors tested a design in which the desired mean frequencies were supplied in advance while the lists still had to match on length and on numbers of syllables and phonemes. Both the groupwise and pairwise procedures met the criteria in 10/10 runs. The fixed targets give frequency a different role from the examples where the optimizer is rewarded for pushing the lists farther apart. In each case the reported success rate is tied to the pool, the form of the constraint, and the criteria used to accept the lists.
What the ablations show
The paper presents no formal ablation series that removes each component in turn, but it does report controlled changes to search behavior and design constraints, together with diagnostics that help explain the resulting lists.
What stochastic search adds
The tutorial follows a deliberately limited greedy run and a stochastic run on the same frequency-matching problem, starting with the same initial words. Holding the starting lists fixed makes it easier to relate the changes in the traces to the subsequent search. The greedy run improves cost quickly and then ends after 100 iterations without a change in cost. That freeze interval is deliberately short so the tutorial can demonstrate how to configure an annealing schedule from a run that appears to have stalled.
The limited greedy run returned a frequency comparison of p = 1.01 × 10⁻¹³. Its acquisition-age, length, and imageability comparisons returned p = .69, p = .15, and p = .25, respectively. Thus a short run could create a strong frequency comparison and improve some of the matches relative to hand selection. It ended while some matching tests still failed the chosen acceptance criterion. The demonstration gives a reason to try a stochastic continuation of the search strategy when a practical greedy run has stopped making progress.
The stochastic trace shows the shift from exploration to selection by cost. Early on, the swap probability is about .5 and the measured differences between proposed and current costs vary widely in sign. As temperature falls, the run spends more of its time accepting moves that lower cost. The run stopped at 210,000 iterations after the statistical criteria passed. Individual changes near the end still moved the test p-values. Although the schedule had reached a low acceptance rate, the samples were small enough for a late change in membership to have visible effects on the statistics.
These traces explain the operation of the two approaches under the example settings. The greedy stopping rule and the larger iteration allowance for the stochastic run both matter to the comparison. The repeated runs for the continuous design supply another comparison under a shared set of objectives. There, changing the search from greedy to stochastic after calibration on a failed run increased the observed frequency of successful runs. Together, the analyses illustrate why the paper casts greedy search as the first attempt and uses its observed cost changes to inform further exploration.
What reweighting reveals about the objective
The stricter length optimization is a change in what counts as a successful list. The original setting gave length a role alongside the other nuisance variables. The revised setting made its initial contribution dominant, demanded an exact length match, and tightened the criterion for frequency separation. The result shows that the weaker length match from the first optimization was avoidable for this pool. The optimizer could reach the match under the stronger specification while also retaining a substantial frequency contrast and improving the other paired matching tests. Because the authors changed both cost and stopping criteria, the result belongs to that combined configuration.
The overlap comparison adds information about the cost of the stricter goal. High-frequency lists shared more items across runs under the stronger length requirement, while the reported overlap of low-frequency lists was the same in the two settings. An optimization can keep its desirable statistical properties and still change how broadly it can draw from the eligible words. Examining only the final p-values would hide that change.
The continuous-design experiments show a related point about objectives that apply to the same words in different ways. Emphasizing correlations can reduce associations among predictors and leave parts of their ranges sparsely covered. Emphasizing the distributions can fill those ranges while leaving the predictors associated. The distribution-only and combined trials reveal which part of the design was hard to obtain under the initial settings. The later weighted configuration demonstrates one feasible compromise after trimming the pool. It leaves open how many alternative compromises the same population could support.
What the statistical checks add to the cost
Pairwise matching can make differences unusually consistent. The phoneme example shows how a small average gap can still fail the desired p-value threshold. The p-value reflects the size of the gap relative to the variability relevant to the paired test. A practical tolerance expresses a separate judgment about the size of a discrepancy that is acceptable for the experiment. The study shows that changing the acceptance rule can make such a list usable without changing the scientific interpretation of a large imbalance.
The same distinction works in the other direction. A large matching p-value can occur because signed discrepancies average out. The pairwise cost penalizes those discrepancies even if the test of the mean gives little reason to reject equality. Inspection of pairwise differences, sample statistics, and the statistical test therefore answers more about the design than any one of them alone. The paper’s comparison of frequency effect sizes illustrates this directly. A larger average gap and a larger standardized gap favor different sets when the variation across pairs differs.
Limitations
Limits the authors identify
The available pool can make a set of constraints infeasible. The paper’s continuous example ran into a shortage of words at the high end of the frequency distribution even when frequency coverage was the only goal. Trimming the population made the optimization more tractable and changed the range over which the resulting lists give evidence. Likewise, the hard categories of the original frequency and age-of-acquisition experiments leave too few words for the proposed factorial crossing. These are limits on the supply of eligible stimuli. Search can reveal such a problem and test a revised design.
The authors also point out that a list can pass attractive design criteria while drawing from an atypical subset. Repeated runs give one way to see whether suitable words are interchangeable. The amount of overlap depends on the requirements. The authors suggest reconsidering stringent criteria when broad generalization is more important than a particular degree of matching. They also note that even a single randomly obtained list can be unusual by chance. Behavioral replication with fresh lists that meet the same constraints would give stronger evidence that the effect generalizes.
The shape of the search space matters. The authors expect greedy search to face more local minima as samples get larger, pools get smaller, or constraints increase in number and complexity. Annealing gives the search a way to leave a local minimum. For finite runs, the reported stopping conditions can be met before there is evidence about every possible list. The paper describes the prospect of finding an optimum in a sufficiently long stochastic search, and its experiments document what particular searches achieved under practical termination rules.
Some of the checks and constraints are deliberately approximate. Histogram entropy evaluates bin occupancy. As the authors note, it does not attempt to spread values evenly within a bin. A distribution can qualify at one histogram resolution while leaving local gaps inside that resolution. Matching p-value cutoffs are also user choices. The paper gives several alternatives in its tutorial and uses tolerances where small differences could otherwise fail the check. The right tolerance depends on the variable and on the substantive scale at which differences would matter.
The reported implementation requires input files without missing values. This can further restrict a usable population when different word measurements are available for different items. The feasibility of the intended design then depends on the set of words for which all necessary columns can be supplied.
Limits visible in the evaluation
The principal experiments measure properties of selected stimuli. They establish results about word-list statistics, constraint satisfaction, coverage, and the proportion of search runs that succeed. The expected gains in behavioral power and ease of interpretation follow from those properties. The main comparison does not report an experiment in which participants were tested with the hand-selected lists and the SOS lists under the same procedure. Its effect sizes quantify differences in word frequency, and its variance inflation comparison concerns the structure of the item predictors.
The baseline is a concrete, published example of manual selection. It shows that the method can improve on those lists using the reconstructed pool and the stated objectives. There is no timed comparison of researchers manually solving the same problem, or extensive head-to-head benchmark against alternative optimizers. Greedy and stochastic SOS are compared in greater detail, but the tutorial deliberately shortens the greedy run and allows more iterations for the stochastic one. The run counts from the continuous design give an indication of repeatability under its calibration, pool, and criteria. They leave the relative performance of the methods on other optimization settings open.
The statistical checks are also being used as selection targets. When the algorithm searches for lists with high matching p-values, those values describe the properties of the lists it has selected. A high p-value alone gives limited information about the magnitude of a discrepancy and cannot establish that a matched property could have no effect on responses. The most informative examples in the paper therefore include magnitudes, paired variability, and tolerances alongside the test outcomes. The criterion chosen for an experiment still depends on what would make a difference to its interpretation.
Low overlap gives evidence of multiple solutions and supports using new lists in a replication. By itself it gives little information about how often candidates from different parts of the pool can be selected. Many distinct lists could share a bias toward one region of a larger population while using different words from that region. High overlap can likewise reflect the combination of imposed constraints, available candidates, and search behavior. Measuring overlap, inspecting the selected distributions, and defining the target population address different parts of the generalization question.
The paper’s examples all depend on properties that have been measured and chosen for inclusion in the optimization. A list that is balanced on the recorded columns can still differ in a property absent from those columns or in a property measured in a context unlike the one used in the experiment. The paper’s discussion of new imageability and familiarity measurements illustrates how the set of relevant comparisons can change after an experiment has been planned. The algorithm makes the stated requirements easier to pursue and inspect. Which requirements are adequate for the theoretical question remains a scientific judgment.
What came after
The documented applications extend to work discussed by the authors around the time of publication. In a study of verbs with strong and weak associations to specific motor actions, Watson selected items using published imageability ratings. Ratings subsequently collected in a grammatical context did not correlate with the original ratings. SOS was used to select a subset of the existing items for reanalysis under the revised imageability measure. The existing stimulus list became the candidate pool, and the new ratings changed the matching problem.
The paper describes a similar use in work by Armstrong and Plaut. Familiarity measures revealed a confound in existing items, associated with population or dialect differences. The researchers used SOS to address the selection problem and to assemble a larger set of items for follow-up work. The case illustrates how decisions about which measurements apply to a particular population can carry through to the material chosen for a replication or extension.
Watson and Chatterjee used behavioral pilot data to choose items for a study of visuospatial analogical reasoning with functional magnetic resonance imaging. Their aim was to equate conditions on task difficulty before collecting the imaging data. SOS selected items from the pilot pool using the recorded performance measures. This application moves the same selection decision to a different stage of research. The exercise starts with pilot responses and ends with materials prepared for an experiment whose neural comparisons could otherwise be influenced by difficulty differences.
The authors also propose matching healthy controls to individual patients in neurological case series. Age, education, and baseline test performance would supply the measured dimensions for the match. The paper presents this as a possible application. It gives no case-series outcome or subsequent evaluation of that proposal. The reported applications establish how the method was already being used to prepare or revisit experimental materials, while its later uptake remains undocumented here.
Cite
Cite as Blair C. Armstrong, Christine E. Watson and David C. Plaut. 2012. SOS! An algorithm and software for the stochastic optimization of stimuli. Behavior Research Methods.
@inproceedings{armstrong2012sos,
title = {{SOS! An algorithm and software for the stochastic optimization of stimuli}},
author = {Blair C. Armstrong, Christine E. Watson and David C. Plaut},
booktitle = {Behavior Research Methods},
year = {2012},
doi = {10.3758/s13428-011-0182-9},
url = {https://doi.org/10.3758/s13428-011-0182-9}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/armstrong-2012-sos-algorithm-software-stochastic-optimization/