<?xml version="1.0"?><!DOCTYPE article SYSTEM "/project/take/software/searchbench_offline_processing/paperxml_generator/aclextractor/src/python/../resource/dtd/paperxml.dtd"><article><header><firstpageheader><page local="1" global="10"/><title>A Particle Filter algorithm for Bayesian Wordsegmentation</title><author surname="Börschinger" givenname="Benjamin"><org  name="Mie University" country="Japan" city="Mie"/></author><author surname="Johnson" givenname="Mark"><org  name="Mie University" country="Japan" city="Mie"/></author></firstpageheader><frontmatter><p><b>A Particle Filter algorithm for Bayesian Wordsegmentation</b></p><p><b>Benjamin Borschinger Mark Johnson</b></p><p>Department of Computing Department of Computing</p><p>Macquarie University Macquarie University</p><p>Sydney Sydney</p><p>benjamin.borschinger@mq.edu.au mark.johnson@mq.edu.au</p></frontmatter><abstract>Bayesian models are usually learned using batch algorithms that have to iterate multiple times over the full dataset. This is both com­putationally expensive and, from a cognitive point of view, highly implausible. We present a novel online algorithm for the word segmen­tation models of Goldwater et al. (2009) which is, to our knowledge, the first published ver­sion of a Particle Filter for this kind of model. Also, in contrast to other proposed algorithms, it comes with a theoretical guarantee of opti-mality if the number of particles goes to infin­ity. While this is, of course, a theoretical point, a first experimental evaluation of our algo­rithm shows that, as predicted, its performance improves with the use of more particles, and that it performs competitively with other on­line learners proposed in Pearl et al. (2011).<footnote anchor="1"/> </abstract></header><body><section number="1" title="Introduction"><p>Bayesian models have recently become quite pop­ular in Computational Linguistics. One undesir­able property of many such models is, however, that the inference algorithms usually applied to them, in particular popular Markov Chain Monte Carlo Methods such as Gibbs Sampling, require multi­ple iterations over the data — this is both compu­tationally expensive and, from a cognitive point of view, implausible. Online learning algorithms di­rectly address this problem by requiring only a sin­gle pass over the data, thus providing a first step</p><footnote label="1">The source code for our implementation is available for download from http://web.science.mq.edu.au/</footnote><p>-bborschi/</p><p>from 'ideal learner' analyses towards more realistic learning scenarios (Pearl et al., 2011). In this paper, we present a Particle Filter algorithm for the word segmentation models of Goldwater et al. (2009), to our knowledge showing for the first time how a Par­ticle Filter can be applied to models of this kind. Notably, Particle Filters are mathematically well-motivated algorithms to produce a finite approxima­tion to the true posterior of a model, the quality of which increases with larger numbers of particles and recovering the true posterior if the number of par­ticles goes to infinity. This sets them qualitatively apart from most previously proposed online learners that usually are based on heuristic ideas.</p><p>The structure of the rest of the paper is as fol­lows. First, we give a high-level description of the Bayesian word segmentation model our algorithm applies to and make explicit our notion of an online learner. Then, we give a quick overview of previous work and go on to describe the word segmentation model in more detail, introducing the relevant nota­tion and formulae. Finally, we give a description of the algorithm and present experimental results, com­paring the algorithm with other proposed learning algorithms for the model and its performance across different numbers of particles.</p></section><section number="2" title="The Goldwater model for word segmentation"><p>The model<footnote anchor="2"/> assumes that a segmented text is cre­ated by a random process that generates a sequence</p><footnote label="2">We only provide a high-level idea of the Bayesian Unigram model for word segmentation of Goldwater et al. (2009). For more details and a description of the Bigram model, we refer the reader to the original paper.</footnote><p>Benjamin Borschinger and Mark Johnson. 2011. A Particle Filter algorithm for Bayesian Wordsegmentation. In <i>Proceedings of Australasian Language Technology Association Workshop, </i>pages 10—18<page local="2" global="11"/></p><p>of words <i>a = w1:n </i>which can be interpreted as a segmentation of the unsegmented text T that is the result of concatenating these words.<footnote anchor="3"/></p><p>The first word is generated by a distribution over possible words, the so-called base distribution P0that, in principle, can generate words of unbounded length. We'll come back to the details of the base distribution in section 4.1. Each further word is either generated by 'reusing' one of the previously generated words, or by making a new draw from the base distribution. This generative process, also known as the (labelled) Chinese Restaurant Process, is formally described as:</p><doubt alpha="42.1" length="19" tooSmall="False" monospace="0.0">P(Wi=w |a)=Po(w)(1)</doubt><doubt alpha="56.2" length="48" tooSmall="False" monospace="0.0">nntrIjrr,Cw(Wi:i)+aPo(w)P(Wi+i=w|Wi:i,a)=—---t-—</doubt><doubt alpha="0.0" length="3" tooSmall="False" monospace="0.0">(2)</doubt><p>where Po is the base distribution over words and <i>cw (W1 </i>:i) is the number of times the word w has been observed in the sequence W1 :i. <i>a </i>is the hyperparam­eter for the process, also known as the concentration parameter, and controls the probability of generat­ing previously unseen words by making a new draw from <i>P</i>o.</p><p>This process can be understood in terms of a restaurant metaphor: each generated word corre­sponds to the order of a customer in a restaurant, and each customer who enters the restaurant either sits at an already occupied table with probability propor­tional to the number of people already sitting there, ordering the exact same dish they are already eat­ing (the label of the table), or sits at a new table with probability proportional to <i>a </i>and orders a new dish which corresponds to making a draw from the base distribution.<footnote anchor="4"/> In principle, there is an infinite number of tables in the restaurant but we only are interested in those that are actually occupied, allow­ing us to actually represent the state of this process with finite means. We will be using the metaphor of customers and tables in the following, for ease of presentation and lack of a better terminology.</p><footnote label="3">We take an expression of the form x 1:n  to refer to the se­quence ,X n .</footnote><footnote label="4">Note that the same word may label several different tables, as the base distribution may generate the same word multiple times.</footnote><p>The conditional distributions defined by eq. 1 and eq. 2 is exchangeable, i.e. every permutation of the same sequence of words is assigned the same proba­bility. This allows us to completely capture the state of the generative process after having generated <i>i </i>words by a description of the seating for the <i>i </i>cus­tomers.</p><subsection number="2.1" title="Inference for the model"><p>While this description has focused on the genera­tive side of the model, probabilistic models like this are usually not used to <i>generate </i>random sequences of words but to do <i>inference. </i>In this case, we are interested in the posterior distribution over segmen­tations <i>a</i><i> </i>for a specific text T, P <i>(a</i><i> </i>| T ).</p><p>While it is easy to calculate the probability of any given segmentation using eq. 1 and eq. 2, determin­ing the posterior distribution or even just finding the most probable segmentation is computationally in­tractable. Instead, an approximation to the posterior can be calculated using, for example, Markov Chain Monte Carlo algorithms such as Gibbs Sampling. Going into the details of Gibbs Sampling is beyond the scope of the paper, and in fact we propose an al­ternative algorithm here. We refer the reader to the original Goldwater et al. (2009) paper for a detailed description of their Gibbs Sampling algorithm and to Bishop (2006) for a general introduction.</p></subsection><subsection number="2.2" title="Motivation for Online Algorithms"><p>Gibbs Sampling is a batch method that requires mul­tiple iterations over the whole data — in practice, it is not uncommon to have 20,000 iterations on the amount of data we are working with here. This is both computationally expensive and, from a cogni­tive point of view, highly implausible. Having on­line learning algorithms is therefore a desirable goal, and their failure to obtain an optimal solution can be seen as telling us how a constrained learner might make use of certain models; in this sense, they pro­vide a first step from ideal learner analyses to more realistic settings (Pearl et al., 2011).</p><p><b>Constraints on Online Algorithms </b>In our opin­ion, a plausible constraint on an online learner is that it (a) sees each example only once<footnote anchor="5"/> and (b) has to make a learning decision on the basis of one exam­ple at a time immediately after having seen it, using a finite amount of computation.<page local="3" global="12"/> While this is cer­tainly a very strict view, we think it is a plausible first approximation to the constraints human learn­ers are subject to, and it is certainly interesting in and of itself to see how well a learner constrained in this manner can perform. It will be an interest­ing question for future research to see how relaxing these constraints to a certain extent effects the per­formance of the learner.</p><footnote label="5">Note that this applies to example tokens. There may well be multiple tokens of the same example type.</footnote><doubt alpha="0.0" length="2" tooSmall="False" monospace="0.0">11</doubt><p>Note that our constraints on online learners ex­clude certain algorithms that have been labelled 'on­line' in the literature. For example, the Online EM algorithms in Liang and Klein (2009) make local up­dates but iterate over the whole data multiple times, thus violating (a). Pearl et al.'s (2011) DMCMC al­gorithm, discussed in the next section, is able to re­visit earlier examples in the light of new evidence, violating thus both (a) and (b).</p></subsection></section><section number="3" title="Previous work"><p>Online learning algorithms for Bayesian models are discussed within both Statistics and Computational Linguistics but have, to our knowledge, not yet been widely applied to the specific problem of word segmentation. Both Brent (1999) and Venkatara-man (2001) propose heuristic online learning algo­rithms employing Dynamic Programming that have, however, been shown to not actually maximize the objective defined by the model (Goldwater, 2007). Brent's algorithm has recently been reconsidered as an online learning algorithm in Pearl et al. (2011).</p><p>It is an instance of the familiar Viterbi algorithm that efficiently finds the optimal solution to many problems; not, however, for the word segmentation models under discussion. The algorithm is "greedy" in that it determines the locally optimal segmenta­tion for an utterance given its current knowledge us­ing Dynamic Programming, adding the words of this segmentation to its knowledge and proceeding to the next utterance. Both this Dynamic Programming Maximization (DPM) algorithm and a slight variant called Dynamic Programming Sampling (DPS) are described in detail in Pearl et al., the main difference between the two algorithms being that the latter does not pick the most probable segmentation but rather samples a segmentation according to its probability. Note that DPS is, in effect, a Particle Filter with just one particle.</p><p>Pearl et al. also present a Decayed Markov Chain Monte Carlo algorithm (Marthi et al., 2002) that is basically an 'online' version of Gibbs Sampling. For each observed utterance, the learner is allowed to reconsider any possible boundary position it has en­countered so far in light of its current knowledge, but the probability of reconsidering any specific bound­ary position decreases with its distance from the cur­rent utterance. In effect, boundaries in recent utter­ances are more likely to be reconsidered than bound­aries in earlier ones. While this property is nice in that it can be interpreted as some kind of memory decay, the algorithm breaks our constraints on online learners, as has already been mentioned above: the DMCMC learner explicitly remembers each train­ing example, effectively giving it the ability to learn from and see each example multiple times. It has, in a sense, "knowledge of 'future' utterances when it samples boundaries further back in the corpus than the current utterance", as Pearl et al. point out them­selves.</p><p>As for non-online algorithms, the state of the art for this word segmentation problem is the adaptor grammar MCMC sampler of Johnson and Goldwa­ter (2009), which achieves 87% word token f-score on the same test corpus as used here. The adaptor grammar model learns both syllable structure and inter-word dependencies, and performs Bayesian in­ference for the optimal hyperparameters and word segmentation.</p></section><section number="4" title="Model Details"><p>Our models are basically the unigram and bigram models described in Goldwater et al. (2009) and quickly introduced above. There is, however, an im­portant difference with respect to the choice of the base distribution that we describe in what follows. Also, our assumption about what constitutes a hy­pothesis is different from Goldwater et al., which is why we describe it in some detail.<footnote anchor="6"/> The mathemati­cal details are given in figure 1 while in the text, we focus on a high-level explanation of the ideas.</p><footnote label="6">Again, we focus on the Unigram model.</footnote><doubt alpha="0.0" length="2" tooSmall="False" monospace="0.0">12</doubt><page local="4" global="13"/><doubt alpha="29.4" length="17" tooSmall="False" monospace="0.0">Pc(C =k | s,4&gt;) =</doubt><doubt alpha="55.6" length="9" tooSmall="False" monospace="0.0">CCa,k+&lt;f&gt;</doubt><doubt alpha="52.6" length="19" tooSmall="False" monospace="0.0">cc.s,j+ |cliars|&lt;/&gt;</doubt><p><i>(j</i><i> </i>g chars)</p><doubt alpha="39.5" length="43" tooSmall="False" monospace="0.0">Po(W =ki:n|S,&lt;/&gt;)=mPc(ki|s,&lt;/&gt;)xPc(#|s,&lt;/&gt;)</doubt><doubt alpha="0.0" length="7" tooSmall="False" monospace="0.0">(3) (4)</doubt><doubt alpha="33.3" length="3" tooSmall="False" monospace="0.0">r(0</doubt><doubt alpha="0.0" length="3" tooSmall="False" monospace="0.0">*(0</doubt><doubt alpha="66.7" length="3" tooSmall="False" monospace="0.0">■Qo</doubt><doubt alpha="0.0" length="3" tooSmall="False" monospace="0.0">„(0</doubt><doubt alpha="0.0" length="3" tooSmall="False" monospace="0.0">(0\</doubt><doubt alpha="66.7" length="9" tooSmall="False" monospace="0.0">siVi+i,a)</doubt><doubt alpha="0.0" length="3" tooSmall="False" monospace="0.0">( )</doubt><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">u</doubt><doubt alpha="41.7" length="36" tooSmall="False" monospace="0.0">,(0P (Oi+i | si+i,a)P (s(i)i |sj&gt;,a)</doubt><doubt alpha="50.0" length="6" tooSmall="False" monospace="0.0">P (Oi-</doubt><doubt alpha="22.2" length="9" tooSmall="False" monospace="0.0">| s(1),a)</doubt><doubt alpha="36.4" length="22" tooSmall="False" monospace="0.0">Q(s(++i | s(,),Oi+i,a)</doubt><doubt alpha="54.5" length="11" tooSmall="False" monospace="0.0">Qo|,Oi+i,a)</doubt><doubt alpha="100.0" length="2" tooSmall="False" monospace="0.0">Po</doubt><doubt alpha="50.0" length="2" tooSmall="False" monospace="0.0">a)</doubt><doubt alpha="100.0" length="2" tooSmall="False" monospace="0.0">Qo</doubt><doubt alpha="66.7" length="3" tooSmall="False" monospace="0.0">i+i</doubt><doubt alpha="100.0" length="4" tooSmall="False" monospace="0.0">ESSi</doubt><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">E</doubt><doubt alpha="33.3" length="3" tooSmall="True" monospace="0.0">(j)</doubt><doubt alpha="0.0" length="7" tooSmall="False" monospace="0.0">(8) (9)</doubt><doubt alpha="0.0" length="4" tooSmall="False" monospace="0.0">(10)</doubt><doubt alpha="0.0" length="4" tooSmall="False" monospace="0.0">(11)</doubt><doubt alpha="0.0" length="4" tooSmall="False" monospace="0.0">(12)</doubt><p>Figure 1: The mathematical details needed for implementing the algorithm. ccs_k is the number of times character k has been observed in the words in labels(s) which, in turn, refers to the words labeling (unigram) tables in model state s. chars is the set of different characters in the language, including the word-boundary symbol #. ctijt refers to the number of customers at table t in model state s, and cts&gt;. refers to the total number of customers in s. A segmentation <b><i>a </i></b>is a sequence of word-table pairs (wo, t) that indicates both which words make up the segmentation and at which table each word customer is seated. s U &lt;O<b>j</b><b> </b>refers to the model state that results from adding the ith word-table pair of <b><i>a </i></b>to hypothesis s, and the probability of adding this pair is given by <i>Padd</i><i> </i>in eq. 5. s (J <b><i>a </i></b>refers to adding all word-table pairs in <b><i>a </i></b>to s. QCT is the proposal distribution from which we can efficiently sample segmentations, given an observation o, i.e. an unsegmented utterance, and a model state s. PCT is the true distribution over segmentations according to which we can efficiently score proposals to calculate (the unnormalized) weights w* using eq. 10. Eq. 8 and eq. 10 can be calculated because <i>Qa</i><i> </i><b><i>(a</i></b><b><i> </i></b>| <i>s,a,o) = </i><b>^Q^i^ </b>= <b>^O</b>f<b>i^Of</b>, the denominator of which can be efficiently calculated using the forward-algorithm.</p><doubt alpha="100.0" length="1" tooSmall="False" monospace="0.0">w</doubt><doubt alpha="100.0" length="1" tooSmall="True" monospace="0.0">i</doubt><doubt alpha="100.0" length="1" tooSmall="True" monospace="0.0">N</doubt><doubt alpha="0.0" length="1" tooSmall="False" monospace="0.0">1</doubt><subsection number="4.1" title="The Lexical-Model"><p>Even though Goldwater et al. found the choice of the lexical model to make virtually no difference for the performance of an unconstrained learner, this does not hold for online learners, an observation al­ready made by Venkataraman (2001). In the orig­inal model, each character is assumed to have the same probability <i>60 </i><i>= y-r</i>—<i>—.</i>—r of being generated, and words are generated by a zero-order (Un­igram) markov process with a fixed stopping prob­ability. In contrast, we assume that there is a sym­metric Dirichlet prior with parameter jj on the probability distribution over characters:</p><doubt alpha="60.0" length="20" tooSmall="False" monospace="0.0">r j0\characters\ ° °</doubt><doubt alpha="40.0" length="10" tooSmall="False" monospace="0.0">6-Dir((j))</doubt><doubt alpha="62.5" length="8" tooSmall="False" monospace="0.0">Pc(k)=ek</doubt><p>By integrating out 6, we get a 'learned' condi­tional distribution over characters, and consequently words, given the learner's lexicon up to that point (eq. 3 and eq. 4).</p><p>In addition, we do not fix the probability for the word-boundary symbol, treating it as a further spe­cial character # that may only occur at the end of a word.<footnote anchor="7"/><page local="5" global="14"/></p><footnote label="7">While this makes possible in principle the generation of empty words, we are confident that this does not pose a prac-</footnote><doubt alpha="0.0" length="2" tooSmall="False" monospace="0.0">13</doubt><table class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><i>P</i><i>add</i><i>((wo,t) </i>| s,a)</p></td><td class="cell"><p><i>( cts,t</i></p><p>1  <b>aP</b>o <i>(wo </i><b>| labels(s) ,&lt;^&gt;)</b></p></td><td class="cell"><p>if t g s and wo is the label of t if t is a new table.</p></td><td class="cell"><p>(5)</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Pct(ct | <i>s,a)</i></p></td><td class="cell"><p>= P<b>add(^i </b>| <i>s,a) </i>x • • •</p></td><td class="cell"><p>x P<b>add </b>(ffn | s u C<b>T</b><b>l </b>u • • • u <b>(T</b><b>„-i </b>)</p></td><td class="cell"><p>(6)</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p><i>Q</i><i>a</i><i>(cr </i>| s,a)</p></td><td class="cell"><p>= Il P<b>add(ffi </b>| <i>s,a)</i></p><p><i>i=1</i></p></td><td class="cell"><p></p></td><td class="cell"><p>(7)</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table></subsection><subsection number="4.2" title="Probability of a segmentation"><p>Since we are interested in the posterior distribution over hypotheses given unsegmented utterances, it is important to be clear about what constitues a hypoth­esis. At a high level, a hypothesis s can be thought of as a lexicon that arises from the segmentation de­cisions made for the observations up to this point. For example, if the learner previously assumed the segmentations "a dog" and "a woman", its lexicon contains two occurences of "a" and one occurence of "dog" and "woman", respectively.</p><p>More precisely, a hypothesis is a model state and a model state is an assignment of observed (or rather, previously predicted) word 'customers' to tables (see section 2).<footnote anchor="8"/> At time k, the model state sk is the seating arrangement after having segmented the cur­rent observation ok given the previous model state sfe_i, where each observation is an unsegmented string. As our incremental learner can only make additive changes to the 'restaurant' — no customers ever leave the table they are assigned to — the hy­pothesis at time k + 1 is uniquely determined by the seating arrangement at time k and the proposed seg­mentation for observation ok+1, as a segmentation not only indicates the actual words, e.g. "a" and "dog", but also the table at which each word should be seated (which may be a new table). Thus, going from one model state to the next corresponds to sam­pling a segmentation for the new observation (eq. 8) and adding this segmentation to the current model state (eq. 9). The formulae that assign probabilities to segmentations are given in eq. 5 to eq. 7.</p></subsection></section><section number="5" title="The Particle Filter algorithm"><p>Our algorithm is an instance of a Particle Filter, or more precisely, of the Sequential Importance Re­sampling (SIR) algorithm (Doucet et al., 2000). The idea is to sequentially approximate a target poste­rior distribution P by N weighted point samples or particles, updating each particle and its weight in light of each succeeding observation. Hypotheses</p><p>tical problem as we only use the model for inference, not for generation.</p><footnote label="8">The reason our description involves an explicit record of table assignments is that this is needed for the Bigram model. While actually not needed for the Unigram case, our formula­tion can be extended to the Bigram model in a straight-forward way, given the description in Goldwater et al. (2009).</footnote><p>that do conform to the data gain weight, mimicking a kind of a "survival of the fittest" dynamic. No­tably, the accuracy of the approximation increases with the number of particles, a result borne out by our experiments.</p><p>At a very high-level, a Particle Filter is very sim­ilar to a stochastic beam-search in that a number of possibilities is explored in parallel, and the choice of possibilities that are further explored is biased to­wards locally good, i.e. high-probable ones.</p><p>At any given stage, the weighted particles give a finite approximation to the target posterior distribu­tion up to that point, the weight of each particle rep­resenting its probability under the approximation. Therefore, we can use it to approximate any expec­tation of the posterior, e.g. some measure of its word segmentation accuracy, as a weighted sum.</p><subsection number="5.1" title="Description of the Algorithm"><p>A formal description of the algorithm is given in Fig­ure 2 which we explain in more detail here. The al­gorithm starts at time i = 0 with N identical model states (particles) s0 , in our case empty lexicons, or rather empty restaurants.<footnote anchor="9"/> At each time step i + 1, it propagates each particle by sampling a segmentation <i>af+1 </i>for the next observation oi+1 according to the the current model state s(1) (eq. 8) and adding this segmentation to it, yielding the updated particle s(1)1(eq. 9). Intuitively, at each step the learner predicts a segmentation for the current observation in light of what it has learned so far. Adding a segmentation to a model state corresponds to adding the word cus­tomers in the segmentation to the corresponding ta­bles. As there are multiple particles, in principle the algorithm can explore alternative hypotheses, remi­niscent of a beam-search.</p><doubt alpha="33.3" length="3" tooSmall="False" monospace="0.0">(n)</doubt><p>Not all hypotheses, however, fit the observations equally well, and as new data becomes available at each time step, the relative merit of different hy­potheses may change. This is captured in a particle filter by assigning weights to each particle that are iteratively updated, using eq. 10 and eq. 11. This update takes both into account how well the particle fit previously seen data in the form of the old weight, and how well it fits the last observation in the form of the probability of the proposed segmentation un­der the current model.<page local="6" global="15"/></p><footnote label="9">The superscript indexes the individual particles, the sub­script indicates the time.</footnote><doubt alpha="0.0" length="2" tooSmall="False" monospace="0.0">14</doubt><p>Also, the formula we use for calculating the par­ticle weights, taken from Doucet et al. (2000), over­comes a fundamental problem in applying Particle Filters to this kind of model: we are usually not able to efficiently sample directly from P, because <i>P </i>does not decompose in the way required for Dy­namic Programming (Johnson et al., 2007; Mochi-hashi et al., 2009). The SIR algorithm, however, al­lows us to use an arbitrary proposal distribution Q for the samples. All that is needed is that we can cal­culate the true probability of each sample according to P, which is easily done using eq. 6. Our proposal distribution <i>Q </i>ignores the dependencies between the words within an utterance, as in eq. 7. This can be thought of as 'freezing' the model in order to de­termine a segmentation, just as in the PCFG pro­posal distribution of Johnson et al. (2007). Thus, the proposal segmentations and other quantities re­quired to calculate the weights and propagate the particles are efficiently computable using the formu­lae in Figure 1 and the efficient algorithms described in detail in Johnson et al. (2007) and Mochihashi et al. (2009). Interestingly, even though the proposal distribution is only an approximation to the true pos­terior, Doucet et. al point out that as the number of particles goes to infinity, the approximation still con­verges to the target (Doucet et al., 2000).</p><p><b>Resampling </b>A well known problem with Parti­cle Filters is that after a number of observations most particles will be assigned very low weights which means that they contribute virtually nothing to the approximation of the target distribution. This is di­rectly addressed by resampling steps in the SIR al­gorithm: whenever a quantity known as Effective Sample Size (ESS), approximated by eq. 12, falls below a certain threshold, say, y, the current set of particles is resampled by sampling with replacement from the current distribution over particles defined by the current weights. This results in high weight particles having multiple 'descendants', and in low weight particles being 'weeded out'. We experiment with two thresholds, N and y.</p></subsection></section><section number="6" title="Experiments"><p>We evaluate our algorithm along the lines of experi­ments discussed in Pearl et al. (2011), using Brent's</p><p>create N empty models s0x) to s0N)set initial weights      to N <b>for </b>example i =1 — K <b>do for </b>particle l =1 — N <b>do </b>sample      ~ QCT (</p><doubt alpha="50.0" length="2" tooSmall="False" monospace="0.0">=U</doubt><p>calculate the unnormalized particle weight <i>wj </i><b>end for</b> calculate the normalized particle weights w(1) and calculate <i>ESS</i></p><p><b>if </b><i>ESS </i>&lt; <i>THRESHOLD </i><b>then</b></p><p>resample all particles according to w(1)set all weights to N</p><p><b>end if end for</b></p><p>Figure 2: Our Particle Filter algorithm. <i>N </i>is the number of particles, <i>K </i>is the number of examples. The formulae needed are given in Figure 1.</p><p>version of the Bernstein corpus (Brent, 1999). Un­like them, however, we see no reason for actually splitting the data into training and test sets, follow­ing in this respect previous work such as Goldwater et al. (2009) by training and evaluating on the full corpus.</p><subsection number="6.1" title="Evaluation"><p>Evaluation is done for each learner by 'freezing' the model state after the learner has processed all examples and then sampling a proposed segmenta­tion for each example o from <i>Qa</i><i>(•</i><i> </i><i>|</i><i> </i><i>s,o,a),</i><i> </i>where s is the final model state. As we have multiple weighted final model states, the scores are calcu­lated by evaluating each model state and then tak­ing a weighted sum of the individual scores. This corresponds to taking an expectation over the poste­rior. Note that under the assumption that at the end of learning the 'lexicon' no longer changes, sam­pling from <i>Q </i>no longer constitutes an approxima­tion as the intra-utterance dependencies <i>Q </i>ignores correspond to making changes to the lexicon.</p><p>As is common, we calculate precision, recall and the harmonic mean of the two, f-measure, for tokens, boundaries and elements in the lexicon. To illus­trate these scores, assume the learner segmented the two utterances "the old woman" and "the old man" into "theold wo man" and "theold man". It has correctly identified 1 of the 6 tokens and predicted a total of 5 tokens, yielding a token recall of 1/6 and a token precision of 1/5.<page local="7" global="16"/> It has also identified 2 of the 4 boundaries, and has predicted a total of 3 bound­aries, yielding a precision of 2/3 and a recall of 1/2. Lastly, it has correctly found only 1 of the 4 word types and predicted a total of 3 word types, giving a precision and a recall of of 1/3 and 1/4, respec­tively. So as to not clutter the table, we only report f-measure.</p><doubt alpha="0.0" length="2" tooSmall="False" monospace="0.0">15</doubt></subsection><subsection number="6.2" title="Experimental Results"><p>There are two questions of interest with respect to the performance of the algorithm. First, we would like to know how faithful the algorithm is to the original model, i.e. whether the 'optimal' solution it finds is close to the 'optimal' solution according to the true model. For this, we compare the log-probability of the <i>training </i>data each algorithm as­signs to it after learning. Second, we would like to know how well each algorithm performs in terms of the segmentation objectives.</p><p>For comparison to our Particle Filter algorithm, we used Pearl et al.'s (2011) implementation of their proposed online learners, the DPM and the DMCMC algorithm, and their implementation of a batch MCMC algorithm, a Metropolis Hastings sampler.<footnote anchor="10"/> We set the threshold for resampling to N and y, <i>4&gt;</i><i> </i>to 0.02 and the remaining model parame­ters to the values reported in Goldwater et al. (2009): <i>a</i><i> </i><i>=</i><i> </i>20.0, p <i>=</i><i> </i>2.0 for the unigram model, and <i>ao = </i>100.0, ai = 3000.0, <i>p$ = </i>0.5 for the bi­gram model.<footnote anchor="11"/> In addition, we decided to not use annealing for either of the algorithms to get an idea of the 'raw' performance of their performance and simply run the unconstrained sampler for 20,000 it­erations. While this does not reflect a 'true' ideal learner performance, it seems to us to be a reason­able method for an initial comparision, in particular</p><footnote label="10">The scores reported in their paper apply only to their training-test split. We weren't able to run the DMCMC algo­rithm for the Unigram setting which is why we omit these scores — the scores reported for the Unigram learner on a five-fold training-test split in Pearl et al. are slightly better than for our best performing particle ilter but not directly comparable, and no log-probability is given.</footnote><p>is the fixed utterance-boundary base-probability, p is the beta-prior on the utterance-boundary probability in the unigram model.</p><p>since we have not yet applied ideas such as anneal­ing or hyper-parameter sampling to the Particle Fil­ter.</p><p>The particle ilter results vary considerably, espe­cially with small numbers of particles, which is why we report an average over multiple runs and report the standard deviation in brackets.<footnote anchor="12"/> The results are given in Table 1.</p></subsection><subsection number="6.3" title="Discussion"><p>As could be expected, faithfulness to the original model increases with larger numbers of particles — the log-probability of the training-data seems to be positively related to N, though obviously non-linearly, and we expect that using even larger num­bers of particles will bring the log-probability even closer to that assigned by the unconstrained learner. Also, the Particle Filters seem to work generally bet­ter for the Unigram model which is not very sur­prising, considering that "when tracking bigrams in­stead of just individual words, the learner's hypothe­sis space is much larger" (Pearl et al., 2011), and that Particle Filters are known to perform rather poorly in high dimensional state spaces.</p><p>In the Unigram setting, the Particle Filter is able to outperform the DPM algorithm in the 1000 particle / y threshold setting, both in terms of log-probability and segmentation scores. With respect to the lat­ter, it also outperforms the unconstrained learner in all but lexical f-measure. This is not very surpris­ing, however, as Goldwater (2007) already found that sub-optimal solutions with respect to the actual model may be better with respect to segmentation, simply because the strong unigram assumption is so blatantly wrong.</p><p>For both the models, using a resampling thresh­old of y instead of N seems to lead to better perfor­mance with respect to both measures, in particular in the Bigram setting. We are not sure how to interpret this result but have the suspicion that this difference may disappear as a larger number of particles is used and that what may be going on is that for 'small' numbers of particles, the diversity of samples drops too fast if resampling is applied after each observa-<page local="8" global="17"/></p><footnote label="12">For 1, 50 and 100 particles, we run 10 trials, for 500 and 1000 particles 2 trials. In principle, the unconstrained learners are also subject to some variance (Goldwater, 2007; Goldwater et al., 2009) but not to the extent of the particle filters.</footnote><doubt alpha="0.0" length="2" tooSmall="False" monospace="0.0">16</doubt><p>Table 1: F-measure and log-probabilities on the Bernstein corpus for Pearl et al.'s (2011) batch MCMC algorithm (MH-MCMC), the online algorithms Dynamic Programming Maximization (DPM) and Delayed Markov Chain Monte Carlo (DMCMC), and our online Particle Filter (PF) with different numbers of particles (1, 50, 100, 500, 1000). TF, BF and LF stand for token, boundary and lexical f-measure, respectively. For the Particle Filter, numbers left of a '/' report scores for a resampling threshold of N, those on the right for y. Numbers in brackets are standard-deviations across multiple runs. Numbers in bold indicate the best overall performance, and the best performance of an online learner (if different from the best overall performance).</p><p>tion.</p><p>In the Bigram setting, even 1000 particles and a threshold of y cannot outperform the conceptually much simpler DPM algorithm, let alone the DM-CMC algorithm that comes pretty close to the un­constrained learner. The increased dimensionality of the state-space may require the use of even more particles, a point we plan to address in the future by optimizing our implementation so as to handle very large numbers of particles.</p><p>Also, there is no clear relation between the num­ber of particles that are used and the variance in the results, in particular in the Unigram setting. While we are not sure about how to interpret this result, again it may have to do with the increased dimen­sionality: a possible explanation is that in the Un­igram setting, 500 and 1000 particles already allow the model to explore very different hypotheses, leading to a larger variance in results, whereas in the Bi­gram setting, this number of particles only suffices to find solutions very close to each other.</p><p>All in all, however, the results suggest that us­ing more particles gradually increases the learner's performance. This is unconditionally true for both settings in our experiments with respect to the log-probability; while this trend is not consistent for all segmentation scores, this simply reflects that the relation between log-probability and segmentation performance is not transparent, even for the Bigram model, as is clearly seen by the difference between the DMCMC and the Unconstrained learner.</p><p>Finally, we'd like to point out again that the DM-CMC learner is, strictly speaking, not an online learner. Its ability to 'resample the past' corresponds closely to he idea of rejuvenation (Canini et al., 2009) in which each individual particle reconsiders past examples for a fixed amount of time at certain intervals and can, in principle, be added to our algo­rithm, something we plan to do in the future.<page local="9" global="18"/> Also, while the performance of the DPM algorithm for the Bigram model is rather impressive, it should be noted that the DPM algorithm embodies a heuristic greedy strategy that may or may not work in certain cases. While it obviously works rather well in this case, there is no mathematical or conceptual motiva­tion for it and we can't be sure that its performance does not depend on accidental properties of the data.</p><doubt alpha="0.0" length="2" tooSmall="False" monospace="0.0">17</doubt><table class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>Learner</p></td><td class="cell"><p>TF</p></td><td class="cell"><p>BF</p></td><td class="cell"><p>LF</p></td><td class="cell"><p>log-prob x 10<footnote anchor="3"/></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>MH-MCMC</p></td><td class="cell"><p>63.11</p></td><td class="cell"><p>80.29</p></td><td class="cell"><p><b>59.68</b></p></td><td class="cell"><p><b>-209.57</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>DPM</p></td><td class="cell"><p>65.65</p></td><td class="cell"><p>80.05</p></td><td class="cell"><p>44.96</p></td><td class="cell"><p>-234.11</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p>1</p></td><td class="cell"><p>56.84 (4.36)</p></td><td class="cell"><p>74.94 (2.92)</p></td><td class="cell"><p>35.34 (3.21)</p></td><td class="cell"><p>-244.28 (5.56)</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Unigram</p></td><td class="cell"><p></p></td><td class="cell"><p>50</p></td><td class="cell"><p>60.33/59.84</p></td><td class="cell"><p>77.08/76.98</p></td><td class="cell"><p>41.61/41.62</p></td><td class="cell"><p>-240.38/-240.58</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>PF</p></td><td class="cell"><p></p></td><td class="cell"><p>(5.82)/(6.00)</p></td><td class="cell"><p>(3.68)/(3.75)</p></td><td class="cell"><p>(3.40)/(3.15)</p></td><td class="cell"><p>(6.43)/(5.18)</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p>100</p></td><td class="cell"><p>62.97/61.02</p></td><td class="cell"><p>79.05/77.87</p></td><td class="cell"><p>43.04/43.61</p></td><td class="cell"><p>-238.73/-238.92</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p>(3.21)/(4.94)</p></td><td class="cell"><p>(2.09)/(3.14)</p></td><td class="cell"><p>(2.29)/(2.90)</p></td><td class="cell"><p>(4.64)/(5.69)</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p>500</p></td><td class="cell"><p>60.81/68.46</p></td><td class="cell"><p>77.50<b>/82.27</b></p></td><td class="cell"><p>45.25/47.52</p></td><td class="cell"><p>-236.55/-231.85</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p>(7.05)/(1.87)</p></td><td class="cell"><p>(4.36)/(1.11)</p></td><td class="cell"><p>(3.67)/(0.23)</p></td><td class="cell"><p>(6.13)/(2.25)</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p>1000</p></td><td class="cell"><p>64.11<b>/66.54</b></p></td><td class="cell"><p>79.70/80.99</p></td><td class="cell"><p>45.82/47.08</p></td><td class="cell"><p>-234.87<b>/-231.93</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p>(4.84)/(5.31)</p></td><td class="cell"><p>(2.74)/(3.24)</p></td><td class="cell"><p>(1.36)/(2.90)</p></td><td class="cell"><p>(3.10)/(3.55)</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>MH-MCMC</p></td><td class="cell"><p>63.71</p></td><td class="cell"><p>79.52</p></td><td class="cell"><p>47.45</p></td><td class="cell"><p><b>-240.79</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>DMCMC</p></td><td class="cell"><p><b>70.78</b></p></td><td class="cell"><p><b>83.97</b></p></td><td class="cell"><p>47.85</p></td><td class="cell"><p><b>-244.85</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>DPM</p></td><td class="cell"><p>66.92</p></td><td class="cell"><p>81.07</p></td><td class="cell"><p><b>52.54</b></p></td><td class="cell"><p>-250.52</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Bigram</p></td><td class="cell"><p></p></td><td class="cell"><p>1</p></td><td class="cell"><p>48.55 (3.04)</p></td><td class="cell"><p>71.22 (1.82)</p></td><td class="cell"><p>35.02 (2.14)</p></td><td class="cell"><p>-266.90 (2.40)</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>50</p></td><td class="cell"><p>55.98/57.85</p></td><td class="cell"><p>75.21/76.49</p></td><td class="cell"><p>43.34/45.21</p></td><td class="cell"><p>-258.42/-256.16</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>PF</p></td><td class="cell"><p></p></td><td class="cell"><p>(2.29)/(3.85)</p></td><td class="cell"><p>(1.42)/(1.93)</p></td><td class="cell"><p>(1.76)/(1.79)</p></td><td class="cell"><p>(2.22)/(4.24)</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p>100</p></td><td class="cell"><p>57.77/61.55</p></td><td class="cell"><p>76.40/78.47</p></td><td class="cell"><p>43.77/45.79</p></td><td class="cell"><p>-257.93/-254.66</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p>(2.77)/(2.06)</p></td><td class="cell"><p>(1.45)/(1.30)</p></td><td class="cell"><p>(1.46)/(1.50)</p></td><td class="cell"><p>(2.03)/(1.47)</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p>500</p></td><td class="cell"><p>57.99/63.58</p></td><td class="cell"><p>76.33/80.05</p></td><td class="cell"><p>44.70/47.82</p></td><td class="cell"><p>-256.44/-252.14</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p>(0.59)/(1.73)</p></td><td class="cell"><p>(0.33)/(0.94)</p></td><td class="cell"><p>(0.16)/(0.82)</p></td><td class="cell"><p>(1.01)/(0.46)</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p>1000</p></td><td class="cell"><p>57.88/61.76</p></td><td class="cell"><p>76.55/78.30</p></td><td class="cell"><p>46.93/49.33</p></td><td class="cell"><p>-254.17/-251.33</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p></p></td><td class="cell"><p>(0.48)/(1.11)</p></td><td class="cell"><p>(0.05)/(1.31)</p></td><td class="cell"><p>(0.41)/(0.88)</p></td><td class="cell"><p>(0.92)/(0.03)</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table></subsection></section><section number="7" title="Conclusion and Outlook"><p>We have presented a Particle Filter algorithm for the Bayesian word segmentation models presented in Goldwater et al. (2009). The algorithm performs competitively with other proposed online algorithms for this kind of model, and as predicted, its perfor­mance increases with larger numbers of particles.</p><p>To our knowledge, it constitutes the first Particle Filter for this kind of model. Our formulation of the Particle Filter should extend to similarly com­plex Bayesian models in Computational Linguistics, e.g. the grammar models proposed in Johnson et al. (2007) and Liang et al. (2010), and may serve as a starting point for applying other Particle Filter al­gorithms to these models, a point we want to address in future research.</p><p>Also, while the strict online nature is desirable from a cognitive point of view, for practical pur­poses variants of Particle Filters that violate these strong assumptions, e.g. using the idea of reju­venation that has previously been applied to Parti­cle Filters for Latent Dirichlet Allocation in Canini et al. (2009), might offer considerable performance gains for practical NLP tasks, and we plan to extend our algorithm in this direction as well.</p></section><section number="8" title="Acknowledgments"><p>We would like to thank the reviewers for their help­ful comments, and Lisa Pearl and Sharon Gold-water for sharing the source code for their learn­ers and their data with us. This work was sup­ported under the Australian Research Councils Dis­covery Projects funding scheme (project number DP110102506).</p></section><references><p>Christopher M. Bishop. 2006. <i>Pattern Recognition and Machine Learning. </i>Springer.</p><p>Michael R. Brent. 1999. An efficient, probabilistically sound algorithm for segmentation andword discovery. <i>Machine Learning - Special issue on natural language learning, </i>34:71 - 105.</p><p>Kevin Canini, Lei Shi, and Thomas Griffiths. 2009. On­line inference of topics with latent dirichlet allocation. In <i>Proceedings of the Twelfth International Confer­ence on Artificial Intelligence and Statistics.</i></p><p>Arnaud Doucet, Simon Godsill, and Christophe Andrieu. 2000. On sequential monte carlo sampling meth­ods for bayesian filtering. <i>Statistics and Computing, </i>10:197-208.</p><p>Sharon Goldwater, Thomas Griffiths, and Mark Johnson. 2009. A bayesian framework for word segmentation: Exploring the effects of context. <i>Cognition, </i>112:21­54.</p><p>SharonGoldwater. 2007. <i>NonparametricBayesianMod-els of Lexical Acquisition. </i>Ph.D. thesis, Brown Uni­versity.</p><p>Mark Johnson and Sharon Goldwater. 2009. Improving nonparameteric bayesian inference: experiments on unsupervised word segmentation with adaptor gram­mars. In <i>Proceedings ofHuman Language Technolo­gies: The 2009 Annual Conference of the North Ameri­can Chapter ofthe Association for Computational Lin­guistics, </i>pages 317-325.</p><p>Mark Johnson, Thomas Griffiths, and Sharon Goldwater. 2007. Bayesian inference for pcfgs via markov chain monte carlo.  In <i>Proceedings of NAACL HLT 2007,</i> pages 139-146.</p><p>Percy Liang and Dan Klein. 2009. Online em for unsu-pervised models. In <i>Proceedings ofNAACL 2009.</i></p><p>P. Liang, M. I. Jordan, and D. Klein. 2010. Probabilis­tic grammars and hierarchical dirichlet processes. In T. O'Hagan and M. West, editors, <i>The Handbook of Applied Bayesian Analysis. </i>Oxford University Press.</p><p>Bhaskara Marthi, Hanna Pasula, Stuart Russell, and Yu-val Peres. 2002. Decayed mcmc filtering. In <i>Pro­ceedings of the Conference on Uncertainty in Artificial</i> <i>Intelligence, 2002 (UAI-02).</i><i></i></p><p>Daichi Mochihashi, Takeshi Yamada, and Naonori Ueda. 2009. Bayesian unsupervised word segmentation with nested pitman-yor language modeling. In <i>Proceedings of the 47th Annual Meeting of the ACL and the 4th</i> <i>IJCNLP ofthe AFNLP, </i>page 100108.</p><p>Lisa Pearl, Sharon Goldwater, and Mark Steyvers. 2011. Online learning mechanisms for bayesian models of word segmentation. <i>Research on Language and Com­putation, </i>Special issue on computational models of language acquisition.</p><p>Anand Venkataraman. 2001. A statistical model for word discovery in transcribed speech. <i>Computational Linguistics, </i>27:351-372.</p><doubt alpha="0.0" length="2" tooSmall="False" monospace="0.0">18</doubt></references></body></article>