File size: 163,078 Bytes
6fa4bc9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
{
    "paper_id": "D09-1005",
    "header": {
        "generated_with": "S2ORC 1.0.0",
        "date_generated": "2023-01-19T16:39:49.854876Z"
    },
    "title": "First-and Second-Order Expectation Semirings with Applications to Minimum-Risk Training on Translation Forests *",
    "authors": [
        {
            "first": "Zhifei",
            "middle": [],
            "last": "Li",
            "suffix": "",
            "affiliation": {
                "laboratory": "",
                "institution": "Johns Hopkins University",
                "location": {
                    "postCode": "21218",
                    "settlement": "Baltimore",
                    "region": "MD",
                    "country": "USA"
                }
            },
            "email": ""
        },
        {
            "first": "Jason",
            "middle": [],
            "last": "Eisner",
            "suffix": "",
            "affiliation": {
                "laboratory": "",
                "institution": "Johns Hopkins University",
                "location": {
                    "postCode": "21218",
                    "settlement": "Baltimore",
                    "region": "MD",
                    "country": "USA"
                }
            },
            "email": ""
        }
    ],
    "year": "",
    "venue": null,
    "identifiers": {},
    "abstract": "Many statistical translation models can be regarded as weighted logical deduction. Under this paradigm, we use weights from the expectation semiring (Eisner, 2002), to compute first-order statistics (e.g., the expected hypothesis length or feature counts) over packed forests of translations (lattices or hypergraphs). We then introduce a novel second-order expectation semiring, which computes second-order statistics (e.g., the variance of the hypothesis length or the gradient of entropy). This second-order semiring is essential for many interesting training paradigms such as minimum risk, deterministic annealing, active learning, and semi-supervised learning, where gradient descent optimization requires computing the gradient of entropy or risk. We use these semirings in an open-source machine translation toolkit, Joshua, enabling minimum-risk training for a benefit of up to 1.0 BLEU point.",
    "pdf_parse": {
        "paper_id": "D09-1005",
        "_pdf_hash": "",
        "abstract": [
            {
                "text": "Many statistical translation models can be regarded as weighted logical deduction. Under this paradigm, we use weights from the expectation semiring (Eisner, 2002), to compute first-order statistics (e.g., the expected hypothesis length or feature counts) over packed forests of translations (lattices or hypergraphs). We then introduce a novel second-order expectation semiring, which computes second-order statistics (e.g., the variance of the hypothesis length or the gradient of entropy). This second-order semiring is essential for many interesting training paradigms such as minimum risk, deterministic annealing, active learning, and semi-supervised learning, where gradient descent optimization requires computing the gradient of entropy or risk. We use these semirings in an open-source machine translation toolkit, Joshua, enabling minimum-risk training for a benefit of up to 1.0 BLEU point.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Abstract",
                "sec_num": null
            }
        ],
        "body_text": [
            {
                "text": "A hypergraph or \"packed forest\" (Gallo et al., 1993; Klein and Manning, 2004; Huang and Chiang, 2005 ) is a compact data structure that uses structure-sharing to represent exponentially many trees in polynomial space. A weighted hypergraph also defines a probability or other weight for each tree, and can be used to represent the hypothesis space considered (for a given input) by a monolingual parser or a tree-based translation system, e.g., tree to string (Quirk et al., 2005; Liu et al., 2006) , string to tree (Galley et al., 2006) , tree to tree (Eisner, 2003) , or string to string with latent tree structures (Chiang, 2007) .",
                "cite_spans": [
                    {
                        "start": 32,
                        "end": 52,
                        "text": "(Gallo et al., 1993;",
                        "ref_id": "BIBREF9"
                    },
                    {
                        "start": 53,
                        "end": 77,
                        "text": "Klein and Manning, 2004;",
                        "ref_id": "BIBREF16"
                    },
                    {
                        "start": 78,
                        "end": 100,
                        "text": "Huang and Chiang, 2005",
                        "ref_id": "BIBREF13"
                    },
                    {
                        "start": 460,
                        "end": 480,
                        "text": "(Quirk et al., 2005;",
                        "ref_id": "BIBREF29"
                    },
                    {
                        "start": 481,
                        "end": 498,
                        "text": "Liu et al., 2006)",
                        "ref_id": "BIBREF22"
                    },
                    {
                        "start": 516,
                        "end": 537,
                        "text": "(Galley et al., 2006)",
                        "ref_id": "BIBREF8"
                    },
                    {
                        "start": 553,
                        "end": 567,
                        "text": "(Eisner, 2003)",
                        "ref_id": "BIBREF7"
                    },
                    {
                        "start": 618,
                        "end": 632,
                        "text": "(Chiang, 2007)",
                        "ref_id": "BIBREF2"
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Introduction",
                "sec_num": "1"
            },
            {
                "text": "Given a hypergraph, we are often interested in computing some quantities over it using dynamic programming algorithms. For example, we may want to run the Viterbi algorithm to find the most probable derivation tree in the hypergraph, or the k most probable trees. Semiring-weighted logic programming is a general framework to specify these algorithms (Pereira and Warren, 1983; Shieber et al., 1994; Goodman, 1999; Eisner et al., 2005; Lopez, 2009) . Goodman (1999) describes many useful semirings (e.g., Viterbi, inside, and Viterbin-best). While most of these semirings are used in \"testing\" (i.e., decoding), we are mainly interested in the semirings that are useful for \"training\" (i.e., parameter estimation). The expectation semiring (Eisner, 2002) , originally proposed for finite-state machines, is one such \"training\" semiring, and can be used to compute feature expectations for the Estep of the EM algorithm, or gradients of the likelihood function for gradient descent.",
                "cite_spans": [
                    {
                        "start": 351,
                        "end": 377,
                        "text": "(Pereira and Warren, 1983;",
                        "ref_id": "BIBREF28"
                    },
                    {
                        "start": 378,
                        "end": 399,
                        "text": "Shieber et al., 1994;",
                        "ref_id": "BIBREF31"
                    },
                    {
                        "start": 400,
                        "end": 414,
                        "text": "Goodman, 1999;",
                        "ref_id": "BIBREF11"
                    },
                    {
                        "start": 415,
                        "end": 435,
                        "text": "Eisner et al., 2005;",
                        "ref_id": "BIBREF5"
                    },
                    {
                        "start": 436,
                        "end": 448,
                        "text": "Lopez, 2009)",
                        "ref_id": "BIBREF23"
                    },
                    {
                        "start": 451,
                        "end": 465,
                        "text": "Goodman (1999)",
                        "ref_id": "BIBREF11"
                    },
                    {
                        "start": 740,
                        "end": 754,
                        "text": "(Eisner, 2002)",
                        "ref_id": "BIBREF6"
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Introduction",
                "sec_num": "1"
            },
            {
                "text": "In this paper, we apply the expectation semiring (Eisner, 2002) to a hypergraph (or packed forest) rather than just a lattice. We then propose a novel second-order expectation semiring, nicknamed the \"variance semiring.\"",
                "cite_spans": [
                    {
                        "start": 49,
                        "end": 63,
                        "text": "(Eisner, 2002)",
                        "ref_id": "BIBREF6"
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Introduction",
                "sec_num": "1"
            },
            {
                "text": "The original first-order expectation semiring allows us to efficiently compute a vector of firstorder statistics (expectations; first derivatives) on the set of paths in a lattice or the set of trees in a hypergraph. The second-order expectation semiring additionally computes a matrix of secondorder statistics (expectations of products; second derivatives (Hessian); derivatives of expectations).",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Introduction",
                "sec_num": "1"
            },
            {
                "text": "We present details on how to compute many interesting quantities over the hypergraph using the expectation and variance semirings. These quantities include expected hypothesis length, feature expectation, entropy, cross-entropy, Kullback-Leibler divergence, Bayes risk, variance of hypothesis length, gradient of entropy and Bayes risk, covariance and Hessian matrix, and so on. The variance semiring is essential for many interesting training paradigms such as deterministic annealing (Rose, 1998) , minimum risk (Smith and Eisner, 2006) , active and semi-supervised learning (Grandvalet and Bengio, 2004; Jiao et al., 2006) . In these settings, we must compute the gradient of entropy or risk. The semirings can also be used for second-order gradient optimization algorithms.",
                "cite_spans": [
                    {
                        "start": 486,
                        "end": 498,
                        "text": "(Rose, 1998)",
                        "ref_id": "BIBREF30"
                    },
                    {
                        "start": 514,
                        "end": 538,
                        "text": "(Smith and Eisner, 2006)",
                        "ref_id": "BIBREF32"
                    },
                    {
                        "start": 577,
                        "end": 606,
                        "text": "(Grandvalet and Bengio, 2004;",
                        "ref_id": "BIBREF12"
                    },
                    {
                        "start": 607,
                        "end": 625,
                        "text": "Jiao et al., 2006)",
                        "ref_id": "BIBREF15"
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Introduction",
                "sec_num": "1"
            },
            {
                "text": "We implement the expectation and variance semirings in Joshua (Li et al., 2009a) , and demonstrate their practical benefit by using minimumrisk training to improve Hiero (Chiang, 2007) .",
                "cite_spans": [
                    {
                        "start": 62,
                        "end": 80,
                        "text": "(Li et al., 2009a)",
                        "ref_id": "BIBREF20"
                    },
                    {
                        "start": 170,
                        "end": 184,
                        "text": "(Chiang, 2007)",
                        "ref_id": "BIBREF2"
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Introduction",
                "sec_num": "1"
            },
            {
                "text": "We use a specific tree-based system called Hiero (Chiang, 2007) as an example, although the discussion is general for any systems that use a hypergraph to represent the hypothesis space.",
                "cite_spans": [
                    {
                        "start": 49,
                        "end": 63,
                        "text": "(Chiang, 2007)",
                        "ref_id": "BIBREF2"
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Semiring Parsing on Hypergraphs",
                "sec_num": "2"
            },
            {
                "text": "In Hiero, a synchronous context-free grammar (SCFG) is extracted from automatically wordaligned corpora. An illustrative grammar rule for Chinese-to-English translation is",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Hierarchical Machine Translation",
                "sec_num": "2.1"
            },
            {
                "text": "X \u2192 X 0 X 1 , X 1 of X 0 ,",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Hierarchical Machine Translation",
                "sec_num": "2.1"
            },
            {
                "text": "where the Chinese word means of, and the alignment, encoded via subscripts on the nonterminals, causes the two phrases around to be reordered around of in the translation. Given a source sentence, Hiero uses a CKY parser to generate a hypergraph, encoding many derivation trees along with the translation strings.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Hierarchical Machine Translation",
                "sec_num": "2.1"
            },
            {
                "text": "Formally, a hypergraph is a pair V, E , where V is a set of nodes (vertices) and E is a set of hyperedges, with each hyperedge connecting a set of antecedent nodes to a single consequent node. 1 In parsing parlance, a node corresponds to an item in the chart (which specifies aligned spans of input and output together with a nonterminal label). The root node corresponds to the goal item. A hyperedge represents an SCFG rule that has been \"instantiated\" at a particular position, so that the nonterminals on the right and left sides have been replaced by particular antecedent and consequent items; this corresponds to storage of backpointers in the chart.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Hypergraphs",
                "sec_num": "2.2"
            },
            {
                "text": "We write T (e) to denote the set of antecedent nodes of a hyperedge e. We write I(v) for the 1 Strictly speaking, making each hyperedge designate a single consequent defines a B-hypergraph (Gallo et al., 1993) . X 0,2 the mat NA X 3,4 a cat NA X 0,4 a cat the mat X 0,4 the mat a cat goal item",
                "cite_spans": [
                    {
                        "start": 189,
                        "end": 209,
                        "text": "(Gallo et al., 1993)",
                        "ref_id": "BIBREF9"
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Hypergraphs",
                "sec_num": "2.2"
            },
            {
                "text": "!\"0 #1 $2 %3",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Hypergraphs",
                "sec_num": "2.2"
            },
            {
                "text": "on the mat of a cat",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Hypergraphs",
                "sec_num": "2.2"
            },
            {
                "text": "X\u2192 X 0 \u7684 X 1 , X 1 on X 0 X\u2192 X 0 \u7684 X 1 , X 1 of X 0 X\u2192 X 0 \u7684 X 1 , X 0 's X 1 X\u2192 X 0 \u7684 X 1 , X 0 X 1 X\u2192 \u57ab\u5b50 \u4e0a, the mat S\u2192 X 0 , X 0 S\u2192 X 0 , X 0 X\u2192 \u732b, a cat",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Hypergraphs",
                "sec_num": "2.2"
            },
            {
                "text": "Figure 1: A toy hypergraph in Hiero. When generating the hypergraph, a trigram language model is integrated. Rectangles represent items, where each item is identified by the non-terminal symbol, source span, and left-and right-side language model states. An item has one or more incoming hyperedges. A hyperedge consists of a rule, and a pointer to an antecedent item for each non-terminal symbol in the rule.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Hypergraphs",
                "sec_num": "2.2"
            },
            {
                "text": "set of incoming hyperedges of node v (i.e., hyperedges of which v is the consequent), which represent different ways of deriving v. Figure 1 shows a simple Hiero-style hypergraph. The hypergraph encodes four different derivation trees that share some of the same items. By exploiting this sharing, a hypergraph can compactly represent exponentially many trees. We observe that any finite-state automaton can also be encoded as a hypergraph (in which every hyperedge is an ordinary edge that connects a single antecedent to a consequent). Thus, the methods of this paper apply directly to the simpler case of hypothesis lattices as well.",
                "cite_spans": [],
                "ref_spans": [
                    {
                        "start": 132,
                        "end": 140,
                        "text": "Figure 1",
                        "ref_id": null
                    }
                ],
                "eq_spans": [],
                "section": "Hypergraphs",
                "sec_num": "2.2"
            },
            {
                "text": "We assume a hypergraph HG, which compactly encodes many derivation trees d \u2208 D. Given HG, we wish to extract the best derivations-or other aggregate properties of the forest of derivations. Semiring parsing (Goodman, 1999 ) is a general framework to describe such algorithms. To define a particular algorithm, we choose a semiring K and specify a \"weight\" k e \u2208 K for each hyperedge e. The desired aggregate result then emerges as the total weight of all derivations in the hypergraph. For example, to simply count derivations, one can assign every hyperedge weight 1 in the semiring of ordinary integers; then each derivation also has weight 1, and their total weight is the number of derivations.",
                "cite_spans": [
                    {
                        "start": 207,
                        "end": 221,
                        "text": "(Goodman, 1999",
                        "ref_id": "BIBREF11"
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Semiring Parsing",
                "sec_num": "2.3"
            },
            {
                "text": "We write K = K, \u2295, \u2297, 0, 1 for a semiring with elements K, additive operation \u2295, multi-plicative operation \u2297, additive identity 0, and multiplicative identity 1. The \u2297 operation is used to obtain the weight of each derivation d by multiplying the weights of its component hyperedges e, that is, k d = e\u2208d k e . The \u2295 operation is used to sum over all derivations d in the hypergraph to obtain the total weight of the hypergraph HG, which is d\u2208D e\u2208d k e . 2 Figure 2 shows how to compute the total weight of an acyclic hypergraph HG. 3 In general, the total weight is a sum over exponentially many derivations d. But Figure 2 sums over these derivations in time only linear on the size of the hypergraph. Its correctness relies on axiomatic properties of the semiring: namely, \u2295 is associative and commutative with identity 0, \u2297 is associative with two-sided identity 1, and \u2297 distributes over \u2295 from both sides. The distributive property is what makes Figure 2 work. The other properties are necessary to ensure that d\u2208D e\u2208d k e is well-defined. 4 The algorithm in Figure 2 is general and can be applied with any semiring (e.g., Viterbi). Below, we present our novel semirings.",
                "cite_spans": [
                    {
                        "start": 533,
                        "end": 534,
                        "text": "3",
                        "ref_id": null
                    },
                    {
                        "start": 1046,
                        "end": 1047,
                        "text": "4",
                        "ref_id": null
                    }
                ],
                "ref_spans": [
                    {
                        "start": 457,
                        "end": 465,
                        "text": "Figure 2",
                        "ref_id": null
                    },
                    {
                        "start": 616,
                        "end": 624,
                        "text": "Figure 2",
                        "ref_id": null
                    },
                    {
                        "start": 952,
                        "end": 960,
                        "text": "Figure 2",
                        "ref_id": null
                    },
                    {
                        "start": 1065,
                        "end": 1073,
                        "text": "Figure 2",
                        "ref_id": null
                    }
                ],
                "eq_spans": [],
                "section": "Semiring Parsing",
                "sec_num": "2.3"
            },
            {
                "text": "We now introduce the computational problems of this paper and the semirings we use to solve them.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Finding Expectations on Hypergraphs",
                "sec_num": "3"
            },
            {
                "text": "We are given a function p :",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Problem Definitions",
                "sec_num": "3.1"
            },
            {
                "text": "D \u2192 R \u22650 , which decomposes multiplicatively over component hy- peredges e of a derivation d \u2208 D: that is, p(d) def =",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Problem Definitions",
                "sec_num": "3.1"
            },
            {
                "text": "e\u2208d p e . In practice, p(d) will specify a probability distribution over the derivations in the hyper-2 Eisner (2002) uses closed semirings that are also equipped with a Kleene closure operator * . For example, in the real semiring R, +, \u00d7, 0, 1 , we define p * = (1 \u2212 p) \u22121 (= 1 + p + p 2 + . . .) for |p| < 1 and is undefined otherwise. The closure operator enables exact summation over the infinitely many paths in a cyclic FSM, or trees in a hypergraph with non-branching cycles, without the need to iterate around cycles to numerical convergence. For completeness, we specify the closure operator for our semirings, satisfying the axioms k * = 1 \u2295 k \u2297 k * = 1 \u2295 k * \u2297 k, but we do not use it in our experiments since our hypergraphs are acyclic. 3 We assume that HG has already been built by deductive inference (Shieber et al., 1994) . But in practice, the nodes' inside weights \u03b2(v) are usually accumulated as the hypergraph is being built, so that pruning heuristics can consult them. 4 Actually, the notation e\u2208d ke assumes that \u2297 is commutative as well, as does the notation \"for u \u2208 T (e)\" in our algorithms; neither specifies a loop order. One could however use a non-commutative semiring by ordering each hyperedge's antecedents and specifying that a derivation's weight is the product of the weights of its hyperedges when visited in prefix order. Tables 1-2 will not assume any commutativity.",
                "cite_spans": [
                    {
                        "start": 104,
                        "end": 117,
                        "text": "Eisner (2002)",
                        "ref_id": "BIBREF6"
                    },
                    {
                        "start": 751,
                        "end": 752,
                        "text": "3",
                        "ref_id": null
                    },
                    {
                        "start": 817,
                        "end": 839,
                        "text": "(Shieber et al., 1994)",
                        "ref_id": "BIBREF31"
                    },
                    {
                        "start": 993,
                        "end": 994,
                        "text": "4",
                        "ref_id": null
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Problem Definitions",
                "sec_num": "3.1"
            },
            {
                "text": "1 for v in topological order on HG \u00a3 each node 2",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "INSIDE(HG, K)",
                "sec_num": null
            },
            {
                "text": "\u00a3 find \u03b2(v) \u2190 e\u2208I(v) (ke \u2297 ( u\u2208T (e) \u03b2(u))) 3 \u03b2(v) \u2190 0 4",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "INSIDE(HG, K)",
                "sec_num": null
            },
            {
                "text": "for e \u2208 I(v) \u00a3 each incoming hyperedge 5 k \u2190 k e \u00a3 hyperedge weight 6 for u \u2208 T (e) \u00a3 each antecedent node 7",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "INSIDE(HG, K)",
                "sec_num": null
            },
            {
                "text": "k \u2190 k \u2297 \u03b2(u) 8 \u03b2(v) \u2190 \u03b2(v) \u2295 k 9 return \u03b2(root)",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "INSIDE(HG, K)",
                "sec_num": null
            },
            {
                "text": "Figure 2: Inside algorithm for an acyclic hypergraph HG, which provides hyperedge weights ke \u2208 K. This computes all \"inside weights\" \u03b2(v) \u2208 K, and returns \u03b2(root), which is total weight of the hypergraph, i.e., d\u2208D e\u2208d ke.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "INSIDE(HG, K)",
                "sec_num": null
            },
            {
                "text": "OUTSIDE(HG, K) 1 for v in HG 2 \u03b1(v) \u2190 0 3 \u03b1(root) \u2190 1 4 for v in reverse topological order on HG 5",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "INSIDE(HG, K)",
                "sec_num": null
            },
            {
                "text": "for e \u2208 I(v) \u00a3 each incoming hyperedge 6",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "INSIDE(HG, K)",
                "sec_num": null
            },
            {
                "text": "for u \u2208 T (e) \u00a3 each antecedent node 7",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "INSIDE(HG, K)",
                "sec_num": null
            },
            {
                "text": "\u03b1(u) \u2190 \u03b1(u) \u2295 (\u03b1(v) \u2297 k e \u2297 8",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "INSIDE(HG, K)",
                "sec_num": null
            },
            {
                "text": "w\u2208T (e),w =u \u03b2(w)) graph. It is often convenient to permit this probability distribution to be unnormalized, i.e., one may have to divide it through by some Z to get a proper distribution that sums to 1. We are also given two functions of interest r, s : D \u2192 R, each of which decomposes additively over its component hyperedges e: that is, r(d) def = e\u2208d r e , and s(d) def = e\u2208d s e . We are now interested in computing the following quantities on the hypergraph HG:",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "INSIDE(HG, K)",
                "sec_num": null
            },
            {
                "text": "EQUATION",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [
                    {
                        "start": 0,
                        "end": 8,
                        "text": "EQUATION",
                        "ref_id": "EQREF",
                        "raw_str": "Z def = d\u2208D p(d)",
                        "eq_num": "(1)"
                    }
                ],
                "section": "INSIDE(HG, K)",
                "sec_num": null
            },
            {
                "text": "EQUATION",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [
                    {
                        "start": 0,
                        "end": 8,
                        "text": "EQUATION",
                        "ref_id": "EQREF",
                        "raw_str": "r def = d\u2208D p(d)r(d)",
                        "eq_num": "(2)"
                    }
                ],
                "section": "INSIDE(HG, K)",
                "sec_num": null
            },
            {
                "text": "EQUATION",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [
                    {
                        "start": 0,
                        "end": 8,
                        "text": "EQUATION",
                        "ref_id": "EQREF",
                        "raw_str": "s def = d\u2208D p(d)s(d) (3) t def = d\u2208D p(d)r(d)s(d)",
                        "eq_num": "(4)"
                    }
                ],
                "section": "INSIDE(HG, K)",
                "sec_num": null
            },
            {
                "text": "Note that r/Z, s/Z, and t/Z are expectations under p of r(d), s(d), and r(d)s(d), respectively. More formally, the probabilistic interpretation is that D is a discrete sample space (consisting INSIDE-OUTSIDE(HG, K, X ) 1 \u00a3 Run inside and outside on HG with only ke weights 2k \u2190 INSIDE(HG, K) \u00a3 see Figure 2 3 OUTSIDE(HG, K) \u00a3 see Figure 3 4 \u00a3 Do a single linear combination to getx 5x \u2190 0 6 for v in HG \u00a3 each node 7",
                "cite_spans": [],
                "ref_spans": [
                    {
                        "start": 298,
                        "end": 306,
                        "text": "Figure 2",
                        "ref_id": null
                    },
                    {
                        "start": 330,
                        "end": 338,
                        "text": "Figure 3",
                        "ref_id": "FIGREF0"
                    }
                ],
                "eq_spans": [],
                "section": "INSIDE(HG, K)",
                "sec_num": null
            },
            {
                "text": "for e \u2208 I(v) \u00a3 each incoming hyperedge 8 k e \u2190 \u03b1(v) 9 for u \u2208 T (e) \u00a3 each antecedent node 10 k e \u2190 k e \u03b2(u) 11x \u2190x + (k e x e ) 12 return k ,x Figure 4 : If every hyperedge specifies a weight ke, xe in some expectation semiring EK,X , then this inside-outside algorithm is a more efficient alternative to Figure 2 for computing the total weight k ,x of the hypergraph, especially if the xe are vectors. First, at lines 2-3, the inside and outside algorithms are run using only the ke weights, obtaining onlyk (withoutx) but also obtaining all inside and outside weights \u03b2, \u03b1 \u2208 K as a side effect. Then the second componentx of the total weight is accumulated in lines 5-11 as a linear combination of all the xe values, namelyx = e kexe, where ke is computed at lines 8-10 using \u03b1 and \u03b2 weights. The linear coefficient ke is the \"exclusive weight\" for hyperedge e, meaning that the product keke is the total weight in K of all derivations d \u2208 D that include e. of all derivations in the hypergraph), p is a measure over this space, and r, s : D \u2192 R are random variables. Then r/Z and s/Z give the expectations of these random variables, and t/Z gives the expectation of their product t = rs, so that t/Z \u2212 (r/Z)(s/Z) gives their covariance.",
                "cite_spans": [],
                "ref_spans": [
                    {
                        "start": 144,
                        "end": 152,
                        "text": "Figure 4",
                        "ref_id": null
                    },
                    {
                        "start": 306,
                        "end": 314,
                        "text": "Figure 2",
                        "ref_id": null
                    }
                ],
                "eq_spans": [],
                "section": "INSIDE(HG, K)",
                "sec_num": null
            },
            {
                "text": "Example 1: r(d) is the length of the translation corresponding to derivation d (arranged by setting r e to the number of target-side terminal words in the SCFG rule associated with e). Then r/Z is the expected hypothesis length. Example 2: r(d) evaluates the loss of d compared to a reference translation, using some additively decomposable loss function. Then r/Z is the risk (expected loss), which is useful in minimum-risk training. Example 3: r(d) is the number of times that a certain feature fires on d. Then r/Z is the expected feature count, which is useful in maximum-likelihood training. We will generalize later in Section 4 to allow r(d) to be a vector of features. Example 4: Suppose r(d) and s(d) are identical and both compute hypothesis length. Then the second-order statistic t/Z is the second moment of the length distribution, so the variance of hypothesis length can be found as t/Z \u2212 (r/Z) 2 .",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "INSIDE(HG, K)",
                "sec_num": null
            },
            {
                "text": "We will use the semiring parsing framework to compute the quantities (1)-(4). Although each is a sum over exponentially many derivations, we will compute it in O(|HG|) time using Figure 2 .",
                "cite_spans": [],
                "ref_spans": [
                    {
                        "start": 179,
                        "end": 187,
                        "text": "Figure 2",
                        "ref_id": null
                    }
                ],
                "eq_spans": [],
                "section": "Computing the Quantities",
                "sec_num": "3.2"
            },
            {
                "text": "In the simplest case, let K = R, +, \u00d7, 0, 1 , and define k e = p e for each hyperedge e. Then the algorithm of Figure 2 reduces to the classical inside algorithm (Baker, 1979) and computes Z.",
                "cite_spans": [
                    {
                        "start": 162,
                        "end": 175,
                        "text": "(Baker, 1979)",
                        "ref_id": "BIBREF0"
                    }
                ],
                "ref_spans": [
                    {
                        "start": 111,
                        "end": 119,
                        "text": "Figure 2",
                        "ref_id": null
                    }
                ],
                "eq_spans": [],
                "section": "Computing the Quantities",
                "sec_num": "3.2"
            },
            {
                "text": "Next suppose K is the expectation semiring (Eisner, 2002) , shown in Table 1 . Define k e = p e , p e r e . Then Figure 2 will return Z, r .",
                "cite_spans": [
                    {
                        "start": 43,
                        "end": 57,
                        "text": "(Eisner, 2002)",
                        "ref_id": "BIBREF6"
                    }
                ],
                "ref_spans": [
                    {
                        "start": 69,
                        "end": 76,
                        "text": "Table 1",
                        "ref_id": "TABREF0"
                    },
                    {
                        "start": 113,
                        "end": 121,
                        "text": "Figure 2",
                        "ref_id": null
                    }
                ],
                "eq_spans": [],
                "section": "Computing the Quantities",
                "sec_num": "3.2"
            },
            {
                "text": "Finally, suppose K is our novel second-order expectation semiring, which we introduce in Table 2. Define k e = p e , p e r e , p e s e , p e r e s e . Then the algorithm of Figure 2 returns Z, r, s, t . Note that, to compute t, one cannot simply construct a first-order expectation semiring by defining",
                "cite_spans": [],
                "ref_spans": [
                    {
                        "start": 173,
                        "end": 181,
                        "text": "Figure 2",
                        "ref_id": null
                    }
                ],
                "eq_spans": [],
                "section": "Computing the Quantities",
                "sec_num": "3.2"
            },
            {
                "text": "t(d) def = r(d)s(d) because t(d), unlike r(d) and s(d),",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Computing the Quantities",
                "sec_num": "3.2"
            },
            {
                "text": "is not additively decomposable over the hyperedges in d. 5 Also, when r(d) and s(d) are identical, the second-order expectation semiring allows us to compute variance as t/Z \u2212 (r/Z) 2 , which is why we may call our second-order expectation semiring the variance semiring.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Computing the Quantities",
                "sec_num": "3.2"
            },
            {
                "text": "To prove our claim about the first-order expectation semiring, we first observe that the definitions in Table 1 satisfy the semiring axioms. The reader can easily check these axioms (as well as the closure axioms in footnote 2). With a valid semiring, we then simply observe that The main intuition is that \u2297 can be used to Each element in the semiring is a pair p, r . The second and third rows define the operations between two elements p1, r1 and p2, r2 , and the last two rows define the identities. Note that the multiplicative identity 1 has an r component of 0. ",
                "cite_spans": [],
                "ref_spans": [
                    {
                        "start": 104,
                        "end": 111,
                        "text": "Table 1",
                        "ref_id": "TABREF0"
                    }
                ],
                "eq_spans": [],
                "section": "Correctness of the Algorithms",
                "sec_num": "3.3"
            },
            {
                "text": "build up p(d), p(d)r(d) inductively from the k e : if d decomposes into two disjoint sub- derivations d 1 , d 2 , then p(d), p(d)r(d) = p(d 1 )p(d 2 ), p(d 1 )p(d 2 )(r(d 1 ) + r(d 2 )) = p(d 1 ), p(d 1 )r(d 1 ) \u2297 p(d 2 ), p(d 2 )r(d 2 ) .",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Correctness of the Algorithms",
                "sec_num": "3.3"
            },
            {
                "text": "p, r p 1 , r 1 \u2297 p 2 , r 2 p 1 p 2 , p 1 r 2 + p 2 r 1 p 1 , r 1 \u2295 p 2 , r 2 p 1 + p 2 , r 1 + r 2 p, r * p * , p * p * r 0 0, 0 1 1, 0",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Correctness of the Algorithms",
                "sec_num": "3.3"
            },
            {
                "text": "s a s b a + b a \u2022 b s a+b a+b s a\u2022b a\u2022b + + + a + log(1 + e b \u2212 a ) + a + b + - + a + log(1 \u2212 e b \u2212 a ) - a + b -+ - a + log(1 \u2212 e b \u2212 a ) - a + b -- - a + log(1 + e b \u2212 a ) + a + b",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Correctness of the Algorithms",
                "sec_num": "3.3"
            },
            {
                "text": "p(d), p(d)r(d) = 1. It follows by induction that p(d), p(d)r(d) = e\u2208d k e .",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Correctness of the Algorithms",
                "sec_num": "3.3"
            },
            {
                "text": "The proof for the second-order expectation semiring is similar.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Correctness of the Algorithms",
                "sec_num": "3.3"
            },
            {
                "text": "In particular, one mainly needs to show that",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Correctness of the Algorithms",
                "sec_num": "3.3"
            },
            {
                "text": "e\u2208d k e = p(d), p(d)r(d), p(d)s(d), p(d)r(d)s(d) .",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Correctness of the Algorithms",
                "sec_num": "3.3"
            },
            {
                "text": "In Tables 1-2, we do not discuss how to store p, r, s, and t. If p is a probability, it often suffers from the underflow problem. r, s, and t may suffer from both underflow and overflow problems, depending on their scales.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Preventing Underflow/Overflow",
                "sec_num": "3.4"
            },
            {
                "text": "To address these, we could represent p in the log domain as usual. However, r, s, and t can be positive or negative, and we cannot directly take the log of a negative number. Therefore, we represent real numbers as ordered pairs. Specifically, to represent a = s a e a , we store s a , a , where the s a \u2208 {+, \u2212} is the sign bit of a and the floatingpoint number a is the natural logarithm of |a|. 6 Table 3 shows the \"\u2022\" and \"+\"operations. 6 An alternative that avoids log and exp is to store a = fa2 ea as fa, ea , where fa is a floating-point number and ea is a sufficiently wide integer. E.g., combining a 32-bit fa with a 32-bit ea will in effect extend fa's 8-bit internal exponent to 32 bits by adding ea to it. This gives much more dynamic range than the 11-bit exponent of a 64-bit doubleprecision floating-point number, if vastly less than in Table 3 .",
                "cite_spans": [
                    {
                        "start": 441,
                        "end": 442,
                        "text": "6",
                        "ref_id": null
                    }
                ],
                "ref_spans": [
                    {
                        "start": 400,
                        "end": 407,
                        "text": "Table 3",
                        "ref_id": "TABREF1"
                    },
                    {
                        "start": 853,
                        "end": 860,
                        "text": "Table 3",
                        "ref_id": "TABREF1"
                    }
                ],
                "eq_spans": [],
                "section": "Preventing Underflow/Overflow",
                "sec_num": "3.4"
            },
            {
                "text": "In this section, we generalize beyond the above case where p, r, s are R-valued. In general, p may be an element of some other semiring, and r and s may be vectors or other algebraic objects.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Generalizations and Speedups",
                "sec_num": "4"
            },
            {
                "text": "When r and s are vectors, especially highdimensional vectors, the basic \"inside algorithm\" of Figure 2 will be slow. We will show how to speed it up with an \"inside-outside algorithm.\"",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Generalizations and Speedups",
                "sec_num": "4"
            },
            {
                "text": "In general, for P, R, S, T , we can define the first-order expectation semiring E P,R = P \u00d7 R, \u2295, \u2297, 0, 1 and the second-order expectation semiring E P,R,S,T = P \u00d7 R \u00d7 S \u00d7 T, \u2295, \u2297, 0, 1 , using the definitions from Tables 1-2. But do those definitions remain meaningful, and do they continue to satisfy the semiring axioms?",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Allowing Feature Vectors and More",
                "sec_num": "4.1"
            },
            {
                "text": "Indeed they do when P = R, R = R n , S = R m , T = R n\u00d7m , with rs defined as the outer product rs T (a matrix) where s T is the transpose of s. In this way, the second-order semiring E P,R,S,T lets us take expectations of vectors and outer products of vectors. So we can find means and covariances of any number of linearly decomposable quantities (e.g., feature counts) defined on the hypergraph.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Allowing Feature Vectors and More",
                "sec_num": "4.1"
            },
            {
                "text": "We will consider some other choices in Sections 4.3-4.4 below. Thus, for generality, we conclude this section by stating the precise technical conditions needed to construct E P,R and E P,R,S,T :",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Allowing Feature Vectors and More",
                "sec_num": "4.1"
            },
            {
                "text": "\u2022 P is a semiring \u2022 R is a P -module (e.g, a vector space), meaning that it comes equipped with an associative and commutative addition operation with an identity element 0, and also a multiplication operation",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Allowing Feature Vectors and More",
                "sec_num": "4.1"
            },
            {
                "text": "P \u00d7R \u2192 R, such that p(r 1 +r 2 ) = pr 1 +pr 2 , (p 1 +p 2 )r = p 1 r +p 2 r, p 1 (p 2 r) = (p 1 p 2 )r \u2022 S and T are also P -modules \u2022 there is a multiplication operation R \u00d7 S \u2192 T that is bilinear, i.e., (r 1 + r 2 )s = r 1 s + r 2 s, r(s 1 + s 2 ) = rs 1 + rs 2 , (pr)s = p(rs), r(ps) = p(rs)",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Allowing Feature Vectors and More",
                "sec_num": "4.1"
            },
            {
                "text": "As a matter of notation, note that above and in Tables 1-2, we overload \"+\" to denote any of the addition operations within P, R, S, T ; overload \"0\" to denote their respective additive identities; and overload concatenation to denote any of the multiplication operations within or between The second and third rows define the operations between two elements p1, r1, s1, t1 and p2, r2, s2, t2 , while the last two rows define the identities. Note that the multiplicative identity 1 has r,s and t components of 0.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Allowing Feature Vectors and More",
                "sec_num": "4.1"
            },
            {
                "text": "Element p, r, s, t p 1 , r 1 , s 1 , t 1 \u2297 p 2 , r 2 , s 2 , t 2 p 1 p 2 , p 1 r 2 + p 2 r 1 , p 1 s 2 + p 2 s 1 , p 1 t 2 + p 2 t 1 + r 1 s 2 + r 2 s 1 p 1 , r 1 , s 1 , t 1 \u2295 p 2 , r 2 , s 2 , t 2 p 1 + p 2 , r 1 + r 2 , s 1 + s 2 , t 1 + t 2 p, r, s, t * p * , p * p * r, p * p * s, p * p * (p * rs + p * rs + t) 0 0, 0, 0, 0 1 1, 0, 0, 0",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Allowing Feature Vectors and More",
                "sec_num": "4.1"
            },
            {
                "text": "P, R, S, T . \"1\" refers to the multiplicative identity of P . We continue to use distinguished symbols \u2295, \u2297, 0, 1 for the operations and identities in our \"main semiring of interest,\" E P,R or E P,R,S,T .",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Allowing Feature Vectors and More",
                "sec_num": "4.1"
            },
            {
                "text": "To compute equations (1)-(4) in this more general setting, we must still require multiplicative or additive decomposability, defining",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Allowing Feature Vectors and More",
                "sec_num": "4.1"
            },
            {
                "text": "p(d) def = e\u2208d p e , r(d) def = e\u2208d r e , s(d) def =",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Allowing Feature Vectors and More",
                "sec_num": "4.1"
            },
            {
                "text": "e\u2208d s e as before. But the and operators here now denote appropriate operations within P , R, and S respectively (rather than the usual operations within R).",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Allowing Feature Vectors and More",
                "sec_num": "4.1"
            },
            {
                "text": "Under the first-order expectation semiring E R,R n , the inside algorithm of Figure 2 will return Z, r where r is a vector of n feature expectations. However, Eisner (2002, section 5) observes that this is inefficient when n is large. Why? The inside algorithm takes the trouble to compute an inside weight \u03b2(v) \u2208 R \u00d7 R n for each node v in the hypergraph (or lattice). The second component of \u03b2(v) is a presumably dense vector of all features that fire in all subderivations rooted at node v. Moreover, as \u03b2(v) is computed in lines 3-8, that vector is built up (via the \u2297 and \u2295 operations of Table 1 ) as a linear combination of other dense vectors (the second components of the various \u03b2(u)). These vector operations can be slow.",
                "cite_spans": [
                    {
                        "start": 159,
                        "end": 183,
                        "text": "Eisner (2002, section 5)",
                        "ref_id": null
                    }
                ],
                "ref_spans": [
                    {
                        "start": 77,
                        "end": 85,
                        "text": "Figure 2",
                        "ref_id": null
                    },
                    {
                        "start": 593,
                        "end": 600,
                        "text": "Table 1",
                        "ref_id": "TABREF0"
                    }
                ],
                "eq_spans": [],
                "section": "Inside-Outside Speedup for First-Order Expectation Semirings",
                "sec_num": "4.2"
            },
            {
                "text": "A much more efficient approach (usually) is the traditional inside-outside algorithm (Baker, 1979) . 7 Figure 4 generalizes the inside-outside algorithm to work with any expectation semiring E K,X . 8 We are given a hypergraph HG whose edges have weights k e , x e in this semiring (so now k e \u2208 K denotes only part of the edge weight, not all of it). INSIDE-OUTSIDE(HG, K, X) finds d\u2208D e\u2208d k e , x e , which has the form k ,x . But, INSIDE(HG, E K,X ) could accomplish the same thing. So what makes the inside-outside algorithm more efficient? It turns out thatx can be found quickly as a single linear combination e k e x e of just the feature vectors x e that appear on individual hyperedges-typically a sum of very sparse vectors! And the linear coefficients k e , as well ask, are computed entirely within the cheap semiring K. They are based on \u03b2 and \u03b1 values obtained by first running INSIDE(HG, K) and OUTSIDE(HG, K), which use only the k e part of the weights and ignore the more expensive x e .",
                "cite_spans": [
                    {
                        "start": 85,
                        "end": 98,
                        "text": "(Baker, 1979)",
                        "ref_id": "BIBREF0"
                    },
                    {
                        "start": 199,
                        "end": 200,
                        "text": "8",
                        "ref_id": null
                    }
                ],
                "ref_spans": [
                    {
                        "start": 103,
                        "end": 111,
                        "text": "Figure 4",
                        "ref_id": null
                    }
                ],
                "eq_spans": [],
                "section": "Inside-Outside Speedup for First-Order Expectation Semirings",
                "sec_num": "4.2"
            },
            {
                "text": "It is noteworthy that the expectation semiring is not used at all by Figure 4 . Although the return value k ,x is in the expectation semiring, it is built up not by \u2295 and \u2297 but rather by computin\u011d k andx separately. One might therefore wonder why the expectation semiring and its operations are still needed. One reason is that the input to Figure 4 consists of hyperedge weights k e , x e in the expectation semiring-and these weights may well have been constructed using \u2297 and \u2295. For example, Eisner (2002) uses finite-state operations such as composition, which do combine weights entirely within the expectation semiring before their result is passed to the forward-backward algorithm. A second reason is that when we work with a second-order expectation semiring in Section 4.4 below, thek, \u03b2, and \u03b1 values in Figure 4 will turn out to be elements of a first-order expectation semiring, and they must still be constructed by first-order \u2297 and \u2295, via calls to Figures 2-3 .",
                "cite_spans": [
                    {
                        "start": 495,
                        "end": 508,
                        "text": "Eisner (2002)",
                        "ref_id": "BIBREF6"
                    }
                ],
                "ref_spans": [
                    {
                        "start": 69,
                        "end": 77,
                        "text": "Figure 4",
                        "ref_id": null
                    },
                    {
                        "start": 341,
                        "end": 349,
                        "text": "Figure 4",
                        "ref_id": null
                    },
                    {
                        "start": 815,
                        "end": 823,
                        "text": "Figure 4",
                        "ref_id": null
                    },
                    {
                        "start": 964,
                        "end": 975,
                        "text": "Figures 2-3",
                        "ref_id": "FIGREF0"
                    }
                ],
                "eq_spans": [],
                "section": "Inside-Outside Speedup for First-Order Expectation Semirings",
                "sec_num": "4.2"
            },
            {
                "text": "Why does inside-outside work? Whereas the inside algorithm computes d\u2208D e\u2208d in any semiring, the inside-outside algorithm exploits the special structure of an expectation semiring. By that semiring's definitions of \u2295 and \u2297 (Table 1) , d\u2208D e\u2208d k e , x e can be found as d\u2208D e\u2208d k e , d\u2208D e\u2208d ( e \u2208d,e =e k e )x e . The first component (givingk) is found by calling the inside algorithm on just the k e part of the weights.",
                "cite_spans": [],
                "ref_spans": [
                    {
                        "start": 223,
                        "end": 232,
                        "text": "(Table 1)",
                        "ref_id": "TABREF0"
                    }
                ],
                "eq_spans": [],
                "section": "Inside-Outside Speedup for First-Order Expectation Semirings",
                "sec_num": "4.2"
            },
            {
                "text": "The second component (givingx) can be rearranged into e d: e\u2208d ( e \u2208d,e =e k e )x e = e k e x e , where k e def = d: e\u2208d ( e \u2208d,e =e k e ) is found from \u03b2, \u03b1. The application described at the start of this subsection is the classical inside-outside algorithm. Here k e , x e def = p e , p e r e , and the algorithm returns k ,x = Z, r . In fact, that x = r can be seen directly: ",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Inside-Outside Speedup for First-Order Expectation Semirings",
                "sec_num": "4.2"
            },
            {
                "text": "r = d p(d)r(d) = d p(d)( e\u2208d r e ) =",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Inside-Outside Speedup for First-Order Expectation Semirings",
                "sec_num": "4.2"
            },
            {
                "text": "We now observe that the second-order expectation semiring E P,R,S,T can be obtained indirectly by nesting one first-order expectation semiring inside another! First \"lift\" P to obtain the first-order expectation semiring K def = E P,R . Then lift this a second time to obtain the \"nested\" first-order expectation semiring E K,X = E (E P,R ),(S\u00d7T ) , where we",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Lifting Trick for Second-Order Semirings",
                "sec_num": "4.3"
            },
            {
                "text": "equip X def = S \u00d7 T with the operations s 1 , t 1 + s 2 , t 2 def = s 1 + s 2 , t 1 + t 2 and p, r s, t def =",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Lifting Trick for Second-Order Semirings",
                "sec_num": "4.3"
            },
            {
                "text": "ps, pt + rs . The resulting first-order expectation semiring has elements of the form p, r , s, t . Table 4 shows that it is indeed isomorphic to E P,R,S,T , with corresponding elements p, r, s, t .",
                "cite_spans": [],
                "ref_spans": [
                    {
                        "start": 100,
                        "end": 107,
                        "text": "Table 4",
                        "ref_id": "TABREF3"
                    }
                ],
                "eq_spans": [],
                "section": "Lifting Trick for Second-Order Semirings",
                "sec_num": "4.3"
            },
            {
                "text": "This construction of the second-order semiring as a first-order semiring is a useful bit of abstract algebra, because it means that known properties of first-order semirings will also apply to secondorder ones. First of all, we are immediately guaranteed that the second-order semiring satisfies the semiring axioms. Second, we can directly apply the inside-outside algorithm there, as we now see.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Lifting Trick for Second-Order Semirings",
                "sec_num": "4.3"
            },
            {
                "text": "Given a hypergraph weighted by a second-order expectation semiring E P,R,S,T . By recasting this as the first-order expectation semiring E K,X where K = E P,R and X = (S \u00d7 T ), we can again apply INSIDE-OUTSIDE(HG, K, X) to find the total weight of all derivations. For example, to speed up Section 3.2, we may define k e , x e = p e , p e r e , p e s e , p e r e s e for each hyperedge e. Then the inside-outside algorithm of Figure 4 will compute k ,x = Z, r , s, t , more quickly than the inside algorithm of Figure 2 computed Z, r, s, t . Figure 4 in this case will run the inside and outside algorithms in the semiring E P,R , so that k e ,k, \u03b1, \u03b2, and k e will now be elements of P \u00d7 R (not just elements of P as in the first-order case). Finally it findsx = e k e x e , where x e \u2208 S \u00d7 T . 9 This is a particularly effective speedup over the inside algorithm when R consists of scalars (or small vectors) whereas S, T are sparse highdimensional vectors. We will see exactly this case in our experiments, where our weights p, r, s, t denote (probability, risk, gradient of probability, gradient of risk), or (probability, entropy, gradient of probability, gradient of entropy). It turns out that these semirings can also compute first-and second-order partial derivatives of all the above results, with respect to a parameter vector \u03b8 \u2208 R m . That is, we ask how they are affected when \u03b8 changes slightly from its current value. The elementary values p e , r e , s e are now assumed to implicitly be functions of \u03b8.",
                "cite_spans": [
                    {
                        "start": 797,
                        "end": 798,
                        "text": "9",
                        "ref_id": null
                    }
                ],
                "ref_spans": [
                    {
                        "start": 427,
                        "end": 435,
                        "text": "Figure 4",
                        "ref_id": null
                    },
                    {
                        "start": 512,
                        "end": 520,
                        "text": "Figure 2",
                        "ref_id": null
                    },
                    {
                        "start": 543,
                        "end": 551,
                        "text": "Figure 4",
                        "ref_id": null
                    }
                ],
                "eq_spans": [],
                "section": "Inside-Outside Speedup for Second-Order Expectation Semirings",
                "sec_num": "4.4"
            },
            {
                "text": "Case 1:",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Finding Gradients on Hypergraphs",
                "sec_num": "5"
            },
            {
                "text": "Recall that Z def = d p(d)",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Finding Gradients on Hypergraphs",
                "sec_num": "5"
            },
            {
                "text": "is computed by INSIDE(HG, R) if each hyperedge e has weight p e . \"Lift\" this weight to p e , \u2207p e , where \u2207p e \u2208 R m is a gradient vector. Now Z, \u2207Z will be returned by INSIDE(HG, E R,R m )-or, more efficiently, by INSIDE-OUTSIDE(HG, R, R m ).",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Finding Gradients on Hypergraphs",
                "sec_num": "5"
            },
            {
                "text": "Case 2:",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Finding Gradients on Hypergraphs",
                "sec_num": "5"
            },
            {
                "text": "To differentiate a second time, \"lift\" the above weights again to obtain p e , \u2207p e , \u2207 p e , \u2207p e = p e , \u2207p e , \u2207p e , \u2207 2 p e , where \u2207 2 p e \u2208 R m\u00d7m is the Hessian matrix of second-order mixed partial derivatives.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Finding Gradients on Hypergraphs",
                "sec_num": "5"
            },
            {
                "text": "These weights are in a second-order expectation semiring. 10 Now 9 Figure 4 was already proved generally correct in Section 4.2. To understand more specifically how s, t gets computed, observe in analogy to the end of Section 4.2 that s, t",
                "cite_spans": [],
                "ref_spans": [
                    {
                        "start": 67,
                        "end": 75,
                        "text": "Figure 4",
                        "ref_id": null
                    }
                ],
                "eq_spans": [],
                "section": "Finding Gradients on Hypergraphs",
                "sec_num": "5"
            },
            {
                "text": "EQUATION",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [
                    {
                        "start": 0,
                        "end": 8,
                        "text": "EQUATION",
                        "ref_id": "EQREF",
                        "raw_str": "= d p(d)s(d), p(d)r(d)s(d) = d p(d), p(d)r(d) s(d), 0 = d p(d), p(d)r(d) e\u2208d se, 0 = e d: e\u2208d p(d), p(d)r(d) se, 0 = e",
                        "eq_num": "("
                    }
                ],
                "section": "Finding Gradients on Hypergraphs",
                "sec_num": "5"
            },
            {
                "text": "keke) se, 0 = e ke pe, pere se, 0 = e ke pese, perese = e kexe =x. 10 Modulo the trivial isomorphism from p, r , s, t to p, r, s, t (see Section 4.3), the intended semiring both here and in Case 3 is the one that was defined at the start of Section 4.1, in which r, s are vectors and their product is defined ",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Finding Gradients on Hypergraphs",
                "sec_num": "5"
            },
            {
                "text": "p 1 , r 1 , s 1 , t 1 \u2295 p 2 , r 2 , s 2 , t 2 = p 1 , r 1 + p 2 , r 2 , s 1 , t 1 + s 2 , t 2 = p 1 + p 2 , r 1 + r 2 , s 1 + s 2 , t 1 + t 2 p 1 , r 1 , s 1 , t 1 \u2297 p 2 , r 2 , s 2 , t 2 = p 1 , r 1 p 2 , r 2 , p 1 , r 1 s 2 , t 2 + p 2 , r 2 s 1 , t 1 = p 1 p 2 , p 1 r 2 + p 2 r 1 , p 1 s 2 + p 2 s 1 , p 1 t 2 + p 2 t 1 + r 1 s 2 + r 2 s 1",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Finding Gradients on Hypergraphs",
                "sec_num": "5"
            },
            {
                "text": ", E R,R m , R m \u00d7 R m\u00d7m ).",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Finding Gradients on Hypergraphs",
                "sec_num": "5"
            },
            {
                "text": "Case 3: Our experiments will need to find expectations and their partial derivatives. Recall that Z, r is computed by INSIDE(HG, E R,R n ) when the edge weights are p e , p e r e with r e \u2208 R n . Lift these weights to p e , p e r e , \u2207 p e , p e r e = p e , p e r e , \u2207p e , (\u2207p e )r e + p e (\u2207r e ) . Now Z, r, \u2207Z, \u2207r will be returned by",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Finding Gradients on Hypergraphs",
                "sec_num": "5"
            },
            {
                "text": "INSIDE(HG, E R,R n ,R m ,R n\u00d7m ) or by INSIDE-OUTSIDE(HG, E R,R n , R m \u00d7 R n\u00d7m ). 11",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Finding Gradients on Hypergraphs",
                "sec_num": "5"
            },
            {
                "text": "In Case 1, we claimed that the same algorithm will compute either gradients Z, \u2207Z or expectations Z, r , if the hyperedge weights are set to p e , \u2207p e or p e , p e r e respectively. 12 This may seem wonderful and mysterious. We now show in two distinct ways why this follows from our setup of Section 3.1. At the end, we derive as a special case the well-known relationship between gradients and expectations in log-linear models.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "What Connects Gradients to Expectations?",
                "sec_num": "5.1"
            },
            {
                "text": "From Expectations to Gradients One perspective is that our semiring fundamentally finds expectations. Thus, we must be finding \u2207Z by formulating it as a certain expectation r. Specifically,",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "What Connects Gradients to Expectations?",
                "sec_num": "5.1"
            },
            {
                "text": "\u2207Z = \u2207 d p(d) = d \u2207p(d) =",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "What Connects Gradients to Expectations?",
                "sec_num": "5.1"
            },
            {
                "text": "to be rs T , a matrix. However, when using this semiring to compute second derivatives (Case 2) or covariances, one may exploit the invariant that r = s, e.g., to avoid storing s and to compute r1s2 + s1r2 in multiplication simply as 2 \u2022 r1r2.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "What Connects Gradients to Expectations?",
                "sec_num": "5.1"
            },
            {
                "text": "11 Or, if n > m, it is faster to instead use INSIDE-OUTSIDE(HG, E R,R m , R n \u00d7 R m\u00d7n ), swapping the second and third components of the 4-tuple and transposing the matrix in the fourth component.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "What Connects Gradients to Expectations?",
                "sec_num": "5.1"
            },
            {
                "text": "Algebraically, this changes nothing because E R,R n ,R m \u00d7R n\u00d7m and E R,R m ,R n \u00d7R m\u00d7n are isomorphic, thanks to symmetries in Table 2. This method computes the expectation of the gradient rather than the gradient of the expectation-they are equal.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "What Connects Gradients to Expectations?",
                "sec_num": "5.1"
            },
            {
                "text": "12 Cases 2-3 relied on the fact that this relationship still holds even when the scalars Z, pe \u2208 R are replaced by more complex objects that we wish to differentiate. Our discussion below sticks to the scalar case for simplicity, but would generalize fairly straightforwardly. Pearlmutter and Siskind (2007) give the relevant generalizations of dual numbers.",
                "cite_spans": [
                    {
                        "start": 277,
                        "end": 307,
                        "text": "Pearlmutter and Siskind (2007)",
                        "ref_id": "BIBREF27"
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "What Connects Gradients to Expectations?",
                "sec_num": "5.1"
            },
            {
                "text": "d p(d)r(d) = r, provided that r(d) = (\u2207p(d))/p(d).",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "What Connects Gradients to Expectations?",
                "sec_num": "5.1"
            },
            {
                "text": "That can be arranged by defining r e def = (\u2207p e )/p e . 13 So that is why the input weights p e , p e r e take the form p e , \u2207p e . From Gradients to Expectations An alternative perspective is that our semiring fundamentally finds gradients. Indeed, pairs like p, \u2207p have long been used for this purpose (Clifford, 1873) under the name \"dual numbers.\" Operations on dual numbers, including those in Table 1, compute a result in R along with its gradient. For example, our \u2297 multiplies dual numbers, since",
                "cite_spans": [
                    {
                        "start": 306,
                        "end": 322,
                        "text": "(Clifford, 1873)",
                        "ref_id": "BIBREF3"
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "What Connects Gradients to Expectations?",
                "sec_num": "5.1"
            },
            {
                "text": "p 1 , \u2207p 1 \u2297 p 2 , \u2207p 2 = p 1 p 2 , p 1 (\u2207p 2 ) + (\u2207p 1 )p 2 = p 1 p 2 , \u2207(p 1 p 2 )",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "What Connects Gradients to Expectations?",
                "sec_num": "5.1"
            },
            {
                "text": ". The inside algorithm thus computes both Z and \u2207Z in a single \"forward\" or \"inside\" pass-known as automatic differentiation in the forward mode. The insideoutside algorithm instead uses the reverse mode (a.k.a. back-propagation), where a separate \"backward\" or \"outside\" pass is used to compute \u2207Z.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "What Connects Gradients to Expectations?",
                "sec_num": "5.1"
            },
            {
                "text": "How can we modify this machinery to produce expectationsr given some arbitrary r e of interest?",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "What Connects Gradients to Expectations?",
                "sec_num": "5.1"
            },
            {
                "text": "Automatic differentiation may be used on any function (e.g., a neural net), but for our simple sum-of-products function Z, it happens that \u2207Z = \u2207( d e p e ) = d e\u2208d ( e \u2208d,e =e p e )\u2207p e . Our trick is to surreptitiously replace the \u2207p e in the input weights p e , \u2207p e with p e r e . Then the output changes similarly: the algorithms will instead find d e\u2208d ( e \u2208d,e =e p e )p e r e , which reduces to",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "What Connects Gradients to Expectations?",
                "sec_num": "5.1"
            },
            {
                "text": "d e\u2208d p(d)r e = d p(d) e\u2208d r e = d p(d)r(d) =r.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "What Connects Gradients to Expectations?",
                "sec_num": "5.1"
            },
            {
                "text": "Log-linear Models as a Special Case Replacing \u2207p e with p e r e is unnecessary if \u2207p e already equals p e r e . That is the case in log-linear models, where p e def = exp(r e \u2022 \u03b8) for some feature vector r e associated with e. So there, \u2207Z already equals r-yielding a key useful property of log-linear models, that \u2207 log Z = (\u2207Z)/Z =r/Z, the vector of feature expectations (Lau et al., 1993) .",
                "cite_spans": [
                    {
                        "start": 373,
                        "end": 391,
                        "text": "(Lau et al., 1993)",
                        "ref_id": "BIBREF17"
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "What Connects Gradients to Expectations?",
                "sec_num": "5.1"
            },
            {
                "text": "Given a hypergraph HG whose hyperedges e are annotated with values p e . Recall from Section 3.1 that this defines a probability distribution over all derivations d in the hypergraph, namely",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Practical Applications",
                "sec_num": "6"
            },
            {
                "text": "p(d)/Z where p(d) def = e\u2208d p e .",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Practical Applications",
                "sec_num": "6"
            },
            {
                "text": "In Section 3, we show how to compute the expected hypothesis length or expected feature counts, using the algorithm of Figure 2 with a first-order expectation semiring E R,R . In general, given hyperedge weights p e , p e r e , the algorithm computes Z, r and thus r/Z, the expectation of r(d) def = e\u2208d r e . We now show how to compute a few other quantities by choosing r e appropriately.",
                "cite_spans": [],
                "ref_spans": [
                    {
                        "start": 119,
                        "end": 127,
                        "text": "Figure 2",
                        "ref_id": null
                    }
                ],
                "eq_spans": [],
                "section": "First-Order Expectation Semiring E R,R",
                "sec_num": "6.1"
            },
            {
                "text": "Entropy on a Hypergraph The entropy of the distribution of derivations in a hypergraph 14 is",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "First-Order Expectation Semiring E R,R",
                "sec_num": "6.1"
            },
            {
                "text": "H(p) = \u2212 d\u2208D (p(d)/Z) log(p(d)/Z) (5) = log Z \u2212 1 Z d\u2208D p(d) log p(d) = log Z \u2212 1 Z d\u2208D p(d)r(d) = log Z \u2212 r Z",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "First-Order Expectation Semiring E R,R",
                "sec_num": "6.1"
            },
            {
                "text": "provided that we define r e def = log p e (so that r(d) = e\u2208d r e = log p(d)). Of course, we can compute Z, r as explained in Section 3.2.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "First-Order Expectation Semiring E R,R",
                "sec_num": "6.1"
            },
            {
                "text": "Cross-Entropy and KL Divergence We may be interested in computing the cross-entropy or KL divergence between two distributions p and q. For example, in variational decoding for machine translation (Li et al., 2009b) , p is a distribution represented by a hypergraph, while q, represented by a finite state automaton, is an approximation to p. The cross entropy between p and q is defined as",
                "cite_spans": [
                    {
                        "start": 197,
                        "end": 215,
                        "text": "(Li et al., 2009b)",
                        "ref_id": "BIBREF21"
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "First-Order Expectation Semiring E R,R",
                "sec_num": "6.1"
            },
            {
                "text": "H(p, q) = \u2212 d\u2208D (p(d)/Z p ) log(q(d)/Z q ) (6) = log Z q \u2212 1 Z p d\u2208D p(d) log q(d) = log Z q \u2212 1 Z p d\u2208D p(d)r(d) = log Z q \u2212 r Z p",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "First-Order Expectation Semiring E R,R",
                "sec_num": "6.1"
            },
            {
                "text": "where the first term Z q can be computed using the inside algorithm with hyperedge weights q e , and the numerator and denominator of the second term using an expectation semiring with hyperedge weights p e , p e r e with r e def = log q e . The KL divergence to p from q can be computed as KL(p q) = H(p, q) \u2212 H(p).",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "First-Order Expectation Semiring E R,R",
                "sec_num": "6.1"
            },
            {
                "text": "Expected Loss (Risk) Given a reference sentence y * , the expected loss (i.e., Bayes risk) of the hypotheses in the hypergraph is defined as,",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "First-Order Expectation Semiring E R,R",
                "sec_num": "6.1"
            },
            {
                "text": "EQUATION",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [
                    {
                        "start": 0,
                        "end": 8,
                        "text": "EQUATION",
                        "ref_id": "EQREF",
                        "raw_str": "R(p) = d\u2208D (p(d)/Z)L(Y(d), y * )",
                        "eq_num": "(7)"
                    }
                ],
                "section": "First-Order Expectation Semiring E R,R",
                "sec_num": "6.1"
            },
            {
                "text": "where Y(d) is the target yield of d and L(y, y * ) is the loss of the hypothesis y with respect to the reference y * . The popular machine translation metric, BLEU (Papineni et al., 2001) , is not additively decomposable, and thus we are not able to compute the expected loss for it. Tromble et al. (2008) develop the following loss function, of which a linear approximation to BLEU is a special case,",
                "cite_spans": [
                    {
                        "start": 164,
                        "end": 187,
                        "text": "(Papineni et al., 2001)",
                        "ref_id": "BIBREF25"
                    },
                    {
                        "start": 284,
                        "end": 305,
                        "text": "Tromble et al. (2008)",
                        "ref_id": "BIBREF34"
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "First-Order Expectation Semiring E R,R",
                "sec_num": "6.1"
            },
            {
                "text": "L(y, y * ) = \u2212(\u03b8 0 |y| + w\u2208N \u03b8 w # w (y)\u03b4 w (y * )) (8)",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "First-Order Expectation Semiring E R,R",
                "sec_num": "6.1"
            },
            {
                "text": "where w is an n-gram type, N is a set of n-gram types with n \u2208 [1, 4], # w (y) is the number of occurrence of the n-gram w in y, \u03b4 w (y * ) is an indicator to check if y * contains at least one occurrence of w, and \u03b8 n is the weight indicating the relative importance of an n-gram match. If the hypergraph is already annotated with n-gram (n \u2265 4) language model states, this loss function is additively decomposable. Using r e def = L e where L e is the loss for a hyperedge e, we compute the expected loss,",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "First-Order Expectation Semiring E R,R",
                "sec_num": "6.1"
            },
            {
                "text": "EQUATION",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [
                    {
                        "start": 0,
                        "end": 8,
                        "text": "EQUATION",
                        "ref_id": "EQREF",
                        "raw_str": "R(p) = d\u2208D p(d)L(Y(d), y * ) Z = r Z",
                        "eq_num": "(9)"
                    }
                ],
                "section": "First-Order Expectation Semiring E R,R",
                "sec_num": "6.1"
            },
            {
                "text": "6.2 Second-Order Expectation Semirings",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "First-Order Expectation Semiring E R,R",
                "sec_num": "6.1"
            },
            {
                "text": "With second-order expectation semirings, we can compute from a hypergraph the expectation and variance of hypothesis length; the feature expectation vector and covariance matrix; the Hessian (matrix of second derivatives) of Z; and the gradients of entropy and expected loss. The computations should be clear from earlier discussion. Below we compute gradient of entropy or Bayes risk.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "First-Order Expectation Semiring E R,R",
                "sec_num": "6.1"
            },
            {
                "text": "It is easy to see that the gradient of entropy (5) is",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Gradient of Entropy or Risk",
                "sec_num": null
            },
            {
                "text": "EQUATION",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [
                    {
                        "start": 0,
                        "end": 8,
                        "text": "EQUATION",
                        "ref_id": "EQREF",
                        "raw_str": "\u2207H(p) = \u2207Z Z \u2212 Z\u2207r \u2212 r\u2207Z Z 2",
                        "eq_num": "(10)"
                    }
                ],
                "section": "Gradient of Entropy or Risk",
                "sec_num": null
            },
            {
                "text": "We may compute Z, r, \u2207Z, \u2207r as explained in Case 3 of Section 5 by using k e def = p e , p e r e , \u2207p e , (\u2207p e )r e + p e \u2207r e def = p e , p e log p e , \u2207p e , (1 + log p e )\u2207p e , where \u2207p e depends on the particular parameterization of the model (see Section 7.1 for an example).",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Gradient of Entropy or Risk",
                "sec_num": null
            },
            {
                "text": "Similarly, the gradient of risk of (9) is",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Gradient of Entropy or Risk",
                "sec_num": null
            },
            {
                "text": "EQUATION",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [
                    {
                        "start": 0,
                        "end": 8,
                        "text": "EQUATION",
                        "ref_id": "EQREF",
                        "raw_str": "\u2207R(p) = Z\u2207r \u2212 r\u2207Z Z 2",
                        "eq_num": "(11)"
                    }
                ],
                "section": "Gradient of Entropy or Risk",
                "sec_num": null
            },
            {
                "text": "We may compute Z, r, \u2207Z, \u2207r using k e def = p e , p e L e , \u2207p e , L e \u2207p e .",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Gradient of Entropy or Risk",
                "sec_num": null
            },
            {
                "text": "We now show how we improve the training of a Hiero MT model by optimizing an objective function that includes entropy and risk. Our objective function could be computed with a first-order expectation semiring, but computing it along with its gradient requires a second-order one.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Minimum-Risk Training for MT",
                "sec_num": "7"
            },
            {
                "text": "We assume a globally normalized linear model for its simplicity. Each derivation d is scored by",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "The Model p",
                "sec_num": "7.1"
            },
            {
                "text": "score(d) def = \u03a6(d) \u2022 \u03b8 = i \u03a6 i (d) \u03b8 i (12)",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "The Model p",
                "sec_num": "7.1"
            },
            {
                "text": "where \u03a6(d) \u2208 R m is a vector of features of d. We then define the unnormalized distribution p(d) as",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "The Model p",
                "sec_num": "7.1"
            },
            {
                "text": "EQUATION",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [
                    {
                        "start": 0,
                        "end": 8,
                        "text": "EQUATION",
                        "ref_id": "EQREF",
                        "raw_str": "p(d) = exp(\u03b3 \u2022 score(d))",
                        "eq_num": "(13)"
                    }
                ],
                "section": "The Model p",
                "sec_num": "7.1"
            },
            {
                "text": "where the scale factor \u03b3 adjusts how sharply the distribution favors the highest-scoring hypotheses.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "The Model p",
                "sec_num": "7.1"
            },
            {
                "text": "Adjusting \u03b8 or \u03b3 changes the distribution p. Minimum error rate training (MERT) (Och, 2003) tries to tune \u03b8 to minimize the BLEU loss of a decoder that chooses the most probable output according to p. (\u03b3 has no effect.) MERT's specialized linesearch addresses the problem that this objective function is piecewise constant, but it does not scale to a large number of parameters. Smith and Eisner (2006) instead propose a differentiable objective that can be optimized by gradient descent: the Bayes risk R(p) of (7). This is the expected loss if one were (hypothetically) to use a randomized decoder, which chooses a hypothesis d in proportion to its probability p(d). If entropy H(p) is large (e.g., small \u03b3), the Bayes risk is smooth and has few local minima. Thus, Smith and Eisner (2006) try to avoid local minima by starting with large H(p) and decreasing it gradually during optimization. This is called deterministic annealing (Rose, 1998) . As H(p) \u2192 0 (e.g., large \u03b3), the Bayes risk does approach the MERT objective (i.e. minimizing 1-best error).The objective is minimize",
                "cite_spans": [
                    {
                        "start": 80,
                        "end": 91,
                        "text": "(Och, 2003)",
                        "ref_id": "BIBREF24"
                    },
                    {
                        "start": 379,
                        "end": 402,
                        "text": "Smith and Eisner (2006)",
                        "ref_id": "BIBREF32"
                    },
                    {
                        "start": 768,
                        "end": 791,
                        "text": "Smith and Eisner (2006)",
                        "ref_id": "BIBREF32"
                    },
                    {
                        "start": 934,
                        "end": 946,
                        "text": "(Rose, 1998)",
                        "ref_id": "BIBREF30"
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Minimum-Risk Training",
                "sec_num": "7.2"
            },
            {
                "text": "EQUATION",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [
                    {
                        "start": 0,
                        "end": 8,
                        "text": "EQUATION",
                        "ref_id": "EQREF",
                        "raw_str": "R(p) \u2212 T \u2022 H(p)",
                        "eq_num": "(14)"
                    }
                ],
                "section": "Minimum-Risk Training",
                "sec_num": "7.2"
            },
            {
                "text": "where the \"temperature\" T starts high and is explicitly decreased as optimization proceeds.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Minimum-Risk Training",
                "sec_num": "7.2"
            },
            {
                "text": "Solving (14) for a given T requires computing the entropy H(p) and risk R(p) and their gradients with respect to \u03b8 and \u03b3. Smith and Eisner (2006) followed MERT in constraining their decoder to only an n-best list, so for them, computing these quantities did not involve dynamic programming. We compare those methods to training on a hypergraph containing exponentially many hypotheses. In this condition, we need our new secondorder semiring methods and must also approximate BLEU (during training only) by an additively decomposable loss (Tromble et al., 2008) . 15 Our algorithms require that p(d) of (13) is multiplicatively decomposable. It suffices to define",
                "cite_spans": [
                    {
                        "start": 122,
                        "end": 145,
                        "text": "Smith and Eisner (2006)",
                        "ref_id": "BIBREF32"
                    },
                    {
                        "start": 539,
                        "end": 561,
                        "text": "(Tromble et al., 2008)",
                        "ref_id": "BIBREF34"
                    },
                    {
                        "start": 564,
                        "end": 566,
                        "text": "15",
                        "ref_id": null
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Gradient Descent Optimization",
                "sec_num": "7.3"
            },
            {
                "text": "\u03a6(d) def =",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Gradient Descent Optimization",
                "sec_num": "7.3"
            },
            {
                "text": "e\u2208d \u03a6 e , so that all features are local to individual hyperedges; the vector \u03a6 e indicates which features fire on hyperedge e. Then score(d) of (12) is additively decomposable:",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Gradient Descent Optimization",
                "sec_num": "7.3"
            },
            {
                "text": "EQUATION",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [
                    {
                        "start": 0,
                        "end": 8,
                        "text": "EQUATION",
                        "ref_id": "EQREF",
                        "raw_str": "score(d) = e\u2208d score e = e\u2208d \u03a6 e \u2022 \u03b8",
                        "eq_num": "(15)"
                    }
                ],
                "section": "Gradient Descent Optimization",
                "sec_num": "7.3"
            },
            {
                "text": "We can then set p e = exp(\u03b3 \u2022 score e ), and \u2207p e = \u03b3p e \u03a6(e), and use the algorithms described in Section 6 to compute H(p) and R(p) and their gradients with respect to \u03b8 and \u03b3. 16",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Gradient Descent Optimization",
                "sec_num": "7.3"
            },
            {
                "text": "15 Pauls et al. (2009) concurrently developed a method to maximize the expected n-gram counts on a hypergraph using gradient descent. Their objective is similar to the minimum risk objective (though without annealing), and their gradient descent optimization involves in algorithms in computing expected feature/n-gram counts as well as expected products of features and n-gram counts, which can be viewed as instances of our general algorithms with first-and second-order semirings. They focused on tuning only a small number (i.e. nine) of features as in a regular MERT setting, while our experiments involve both a small and a large number of features.",
                "cite_spans": [
                    {
                        "start": 3,
                        "end": 22,
                        "text": "Pauls et al. (2009)",
                        "ref_id": "BIBREF26"
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Gradient Descent Optimization",
                "sec_num": "7.3"
            },
            {
                "text": "16 It is easy to verify that the gradient of a function f (e.g. entropy or risk) with respect to \u03b3 can be written as a weighted sum of gradients with respect to the feature weights \u03b8i, i.e.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Gradient Descent Optimization",
                "sec_num": "7.3"
            },
            {
                "text": "\u2202 f \u2202\u03b3 = 1 \u03b3 i \u03b8i \u00d7 \u2202 f \u2202 \u03b8 i (16)",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Gradient Descent Optimization",
                "sec_num": "7.3"
            },
            {
                "text": "7.4 Experimental Results",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Gradient Descent Optimization",
                "sec_num": "7.3"
            },
            {
                "text": "We built a translation model on a corpus for IWSLT 2005 Chinese-to-English translation task (Eck and Hori, 2005) , which consists of 40k pairs of sentences. We used a 5-gram language model with modified Kneser-Ney smoothing, trained on the bitext's English using SRILM (Stolcke, 2002) .",
                "cite_spans": [
                    {
                        "start": 92,
                        "end": 112,
                        "text": "(Eck and Hori, 2005)",
                        "ref_id": "BIBREF4"
                    },
                    {
                        "start": 269,
                        "end": 284,
                        "text": "(Stolcke, 2002)",
                        "ref_id": "BIBREF33"
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Experimental Setup",
                "sec_num": "7.4.1"
            },
            {
                "text": "We first investigate how minimum-risk training (MR), with and without deterministic annealing (DA), performs compared to regular MERT. MR without DA just fixes T = 0 and \u03b3 = 1 in (14). All MR or MR+DA uses an approximated BLEU (Tromble et al., 2008 ) (for training only), while MERT uses the exact corpus BLEU in training. The first five rows in Table 5 present the results by tuning the weights of five features (\u03b8 \u2208 R 5 ). We observe that MR or MR+DA performs worse than MERT on the dev set. This may be mainly because MR or MR+DA uses an approximated BLEU while MERT doesn't. On the test set, MR or MR+DA on an n-best list is comparable to MERT. But our new approach, MR or MR+DA on a hypergraph, does consistently better (statistically significant) than MERT, despite approximating BLEU. 17 Did DA help? For both n-best and hypergraph, MR+DA did obtain a better BLEU score than plain MR on the dev set. 18 This shows that DA helps with the local minimum problem, as hoped. However, DA's improvement on the dev set did not transfer to the test set.",
                "cite_spans": [
                    {
                        "start": 227,
                        "end": 248,
                        "text": "(Tromble et al., 2008",
                        "ref_id": "BIBREF34"
                    },
                    {
                        "start": 792,
                        "end": 794,
                        "text": "17",
                        "ref_id": null
                    },
                    {
                        "start": 907,
                        "end": 909,
                        "text": "18",
                        "ref_id": null
                    }
                ],
                "ref_spans": [
                    {
                        "start": 346,
                        "end": 353,
                        "text": "Table 5",
                        "ref_id": null
                    }
                ],
                "eq_spans": [],
                "section": "Tuning a Small Number of Features",
                "sec_num": "7.4.2"
            },
            {
                "text": "MR (with or without DA) is scalable to tune a large number of features, while MERT is not. To achieve competitive performance, we adopt a forest reranking approach (Li and Khudanpur, 2009; Huang, 2008) . Specifically, our training has two stages. In the first stage, we train a baseline system as usual. We also find the optimal feature weights for the five features mentioned before, using the method of MR+DA operating on a hypergraph. In the second stage, we generate a hypergraph for each sentence in the training data (which consists of about 40k sentence pairs), using the baseline 17 Pauls et al. (2009) concurrently observed a similar pattern (i.e., MR performs worse than MERT on the dev set, but performs better on a test set). 18 We also verified that MR+DA found a better objective value (i.e., expected loss on the dev set) than MR.",
                "cite_spans": [
                    {
                        "start": 164,
                        "end": 188,
                        "text": "(Li and Khudanpur, 2009;",
                        "ref_id": "BIBREF19"
                    },
                    {
                        "start": 189,
                        "end": 201,
                        "text": "Huang, 2008)",
                        "ref_id": "BIBREF14"
                    },
                    {
                        "start": 588,
                        "end": 590,
                        "text": "17",
                        "ref_id": null
                    },
                    {
                        "start": 591,
                        "end": 610,
                        "text": "Pauls et al. (2009)",
                        "ref_id": "BIBREF26"
                    },
                    {
                        "start": 738,
                        "end": 740,
                        "text": "18",
                        "ref_id": null
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Tuning a Large Number of Features",
                "sec_num": "7.4.3"
            },
            {
                "text": "Training scheme dev test MERT (Nbest, small) 42.6 47.7 MR (Nbest, small) 40.8 47.7 MR+DA (Nbest, small) 41.6 47.8 NEW! MR (hypergraph, small) 41.3 48.4 NEW! MR+DA (hypergraph, small) 41.9 48.3 NEW! MR (hypergraph, large) 42.3 48.7 Table 5 : BLEU scores on the Dev and test sets under different training scenarios. In the \"small\" model, five features (i.e., one for the language model, three for the translation model, and one for word penalty) are tuned. In the \"large\" model, 21k additional unigram and bigram features are used.",
                "cite_spans": [
                    {
                        "start": 30,
                        "end": 44,
                        "text": "(Nbest, small)",
                        "ref_id": null
                    },
                    {
                        "start": 58,
                        "end": 72,
                        "text": "(Nbest, small)",
                        "ref_id": null
                    },
                    {
                        "start": 89,
                        "end": 103,
                        "text": "(Nbest, small)",
                        "ref_id": null
                    }
                ],
                "ref_spans": [
                    {
                        "start": 231,
                        "end": 238,
                        "text": "Table 5",
                        "ref_id": null
                    }
                ],
                "eq_spans": [],
                "section": "Tuning a Large Number of Features",
                "sec_num": "7.4.3"
            },
            {
                "text": "system. In this stage, we add 21k additional unigram and bigram target-side language model features (cf. Li and Khudanpur (2008) ). For example, a specific bigram \"the cat\" can be a feature. Note that the total score by the baseline system is also a feature in the second-stage model. With these features and the 40k hypergraphs, we run the MR training to obtain the optimal weights. During test time, a similar procedure is followed. For a given test sentence, the baseline system first generates a hypergraph, and then the hypergraph is reranked by the second-stage model. The last row in Table 5 reports the BLEU scores. Clearly, adding more features improves (statistically significant) the case with only five features. We plan to incorporate more informative features described by Chiang et al. (2009) . 19",
                "cite_spans": [
                    {
                        "start": 105,
                        "end": 128,
                        "text": "Li and Khudanpur (2008)",
                        "ref_id": "BIBREF18"
                    },
                    {
                        "start": 787,
                        "end": 807,
                        "text": "Chiang et al. (2009)",
                        "ref_id": "BIBREF1"
                    }
                ],
                "ref_spans": [
                    {
                        "start": 591,
                        "end": 598,
                        "text": "Table 5",
                        "ref_id": null
                    }
                ],
                "eq_spans": [],
                "section": "Tuning a Large Number of Features",
                "sec_num": "7.4.3"
            },
            {
                "text": "We presented first-order expectation semirings and inside-outside computation in more detail than (Eisner, 2002) , and developed extensions to higher-order expectation semirings. This enables efficient computation of many interesting quantities over the exponentially many derivations encoded in a hypergraph: second derivatives (Hessians), expectations of products (covariances), and expectations such as risk and entropy along with their derivatives. To our knowledge, algorithms for these problems have not been presented before.",
                "cite_spans": [
                    {
                        "start": 98,
                        "end": 112,
                        "text": "(Eisner, 2002)",
                        "ref_id": "BIBREF6"
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Conclusions",
                "sec_num": "8"
            },
            {
                "text": "Our approach is theoretically elegant, like other work in this vein (Goodman, 1999; Lopez, 2009; Gimpel and Smith, 2009) . We used it practically to enable a new form of minimum-risk training that improved Chinese-English MT by 1.0 BLEU point. Our implementation will be released within the open-source MT toolkit Joshua (Li et al., 2009a) .",
                "cite_spans": [
                    {
                        "start": 68,
                        "end": 83,
                        "text": "(Goodman, 1999;",
                        "ref_id": "BIBREF11"
                    },
                    {
                        "start": 84,
                        "end": 96,
                        "text": "Lopez, 2009;",
                        "ref_id": "BIBREF23"
                    },
                    {
                        "start": 97,
                        "end": 120,
                        "text": "Gimpel and Smith, 2009)",
                        "ref_id": "BIBREF10"
                    },
                    {
                        "start": 321,
                        "end": 339,
                        "text": "(Li et al., 2009a)",
                        "ref_id": "BIBREF20"
                    }
                ],
                "ref_spans": [],
                "eq_spans": [],
                "section": "Conclusions",
                "sec_num": "8"
            },
            {
                "text": "However, in a more tricky way, the second-order expectation semiring can be constructed using the first-order expectation semiring, as will be seen in Section 4.3.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "",
                "sec_num": null
            },
            {
                "text": "Note, however, that the expectation semiring requires only the forward/inside pass to compute expectations, and thus it is more efficient than the traditional inside-outside algorithm (which requires two passes) if we are interested in computing only a small number of quantities.8 This followsEisner (2002), who similarly generalized the forward-backward algorithm.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "",
                "sec_num": null
            },
            {
                "text": "Proof: r(d) = e\u2208d re = e\u2208d (\u2207pe)/pe = e\u2208d \u2207 log pe = \u2207 e\u2208d log pe = \u2207 log e\u2208d pe = \u2207 log p(d) = (\u2207p(d))/p(d).",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "",
                "sec_num": null
            },
            {
                "text": "Unfortunately, it is intractable to compute the entropy of the distribution over strings (each string's probability is a sum over several derivations). ButLi et al. (2009b, section 5.4) do estimate the gap between derivational and string entropies.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "",
                "sec_num": null
            },
            {
                "text": "Their MIRA training tries to favor a specific oracle translation-indeed a specific tree-from the (pruned) hypergraph. MR does not commit to such an arbitrary choice.",
                "cite_spans": [],
                "ref_spans": [],
                "eq_spans": [],
                "section": "",
                "sec_num": null
            }
        ],
        "back_matter": [],
        "bib_entries": {
            "BIBREF0": {
                "ref_id": "b0",
                "title": "Trainable grammars for speech recognition",
                "authors": [
                    {
                        "first": "J",
                        "middle": [
                            "K"
                        ],
                        "last": "Baker",
                        "suffix": ""
                    }
                ],
                "year": 1979,
                "venue": "Speech Communication Papers Presented at the 97th Meeting of the Acoustical Society of",
                "volume": "",
                "issue": "",
                "pages": "",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "J. K. Baker. 1979. Trainable grammars for speech recognition. In Jared J. Wolf and Dennis H. Klatt, editors, Speech Communication Papers Presented at the 97th Meeting of the Acoustical Society of Amer- ica, MIT, Cambridge, MA, June.",
                "links": null
            },
            "BIBREF1": {
                "ref_id": "b1",
                "title": "11,001 new features for statistical machine translation",
                "authors": [
                    {
                        "first": "David",
                        "middle": [],
                        "last": "Chiang",
                        "suffix": ""
                    },
                    {
                        "first": "Kevin",
                        "middle": [],
                        "last": "Knight",
                        "suffix": ""
                    },
                    {
                        "first": "Wei",
                        "middle": [],
                        "last": "Wang",
                        "suffix": ""
                    }
                ],
                "year": 2009,
                "venue": "NAACL",
                "volume": "",
                "issue": "",
                "pages": "218--226",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "David Chiang, Kevin Knight, and Wei Wang. 2009. 11,001 new features for statistical machine transla- tion. In NAACL, pages 218-226.",
                "links": null
            },
            "BIBREF2": {
                "ref_id": "b2",
                "title": "Hierarchical phrase-based translation",
                "authors": [
                    {
                        "first": "David",
                        "middle": [],
                        "last": "Chiang",
                        "suffix": ""
                    }
                ],
                "year": 2007,
                "venue": "Computational Linguistics",
                "volume": "33",
                "issue": "2",
                "pages": "201--228",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "David Chiang. 2007. Hierarchical phrase-based trans- lation. Computational Linguistics, 33(2):201-228.",
                "links": null
            },
            "BIBREF3": {
                "ref_id": "b3",
                "title": "Preliminary sketch of biquaternions",
                "authors": [
                    {
                        "first": "W",
                        "middle": [
                            "K"
                        ],
                        "last": "Clifford",
                        "suffix": ""
                    }
                ],
                "year": null,
                "venue": "Proceedings of the London Mathematical Society",
                "volume": "4",
                "issue": "",
                "pages": "381--395",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "W. K. Clifford. 1873. Preliminary sketch of bi- quaternions. Proceedings of the London Mathemat- ical Society, 4:381-395.",
                "links": null
            },
            "BIBREF4": {
                "ref_id": "b4",
                "title": "Overview of the iwslt 2005 evaluation campaign",
                "authors": [
                    {
                        "first": "Matthias",
                        "middle": [],
                        "last": "Eck",
                        "suffix": ""
                    },
                    {
                        "first": "Chiori",
                        "middle": [],
                        "last": "Hori",
                        "suffix": ""
                    }
                ],
                "year": 2005,
                "venue": "Proc. of the International Workshop on Spoken Language Translation",
                "volume": "",
                "issue": "",
                "pages": "",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Matthias Eck and Chiori Hori. 2005. Overview of the iwslt 2005 evaluation campaign. In In Proc. of the International Workshop on Spoken Language Trans- lation.",
                "links": null
            },
            "BIBREF5": {
                "ref_id": "b5",
                "title": "Compiling comp ling: practical weighted dynamic programming and the dyna language",
                "authors": [
                    {
                        "first": "Jason",
                        "middle": [],
                        "last": "Eisner",
                        "suffix": ""
                    },
                    {
                        "first": "Eric",
                        "middle": [],
                        "last": "Goldlust",
                        "suffix": ""
                    },
                    {
                        "first": "Noah",
                        "middle": [
                            "A"
                        ],
                        "last": "Smith",
                        "suffix": ""
                    }
                ],
                "year": 2005,
                "venue": "HLT/EMNLP",
                "volume": "",
                "issue": "",
                "pages": "281--290",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Jason Eisner, Eric Goldlust, and Noah A. Smith. 2005. Compiling comp ling: practical weighted dynamic programming and the dyna language. In HLT/EMNLP, pages 281-290.",
                "links": null
            },
            "BIBREF6": {
                "ref_id": "b6",
                "title": "Parameter estimation for probabilistic finite-state transducers",
                "authors": [
                    {
                        "first": "Jason",
                        "middle": [],
                        "last": "Eisner",
                        "suffix": ""
                    }
                ],
                "year": 2002,
                "venue": "ACL",
                "volume": "",
                "issue": "",
                "pages": "1--8",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Jason Eisner. 2002. Parameter estimation for proba- bilistic finite-state transducers. In ACL, pages 1-8.",
                "links": null
            },
            "BIBREF7": {
                "ref_id": "b7",
                "title": "Learning non-isomorphic tree mappings for machine translation",
                "authors": [
                    {
                        "first": "Jason",
                        "middle": [],
                        "last": "Eisner",
                        "suffix": ""
                    }
                ],
                "year": 2003,
                "venue": "ACL",
                "volume": "",
                "issue": "",
                "pages": "205--208",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Jason Eisner. 2003. Learning non-isomorphic tree mappings for machine translation. In ACL, pages 205-208.",
                "links": null
            },
            "BIBREF8": {
                "ref_id": "b8",
                "title": "Scalable inference and training of context-rich syntactic translation models",
                "authors": [
                    {
                        "first": "Michel",
                        "middle": [],
                        "last": "Galley",
                        "suffix": ""
                    },
                    {
                        "first": "Jonathan",
                        "middle": [],
                        "last": "Graehl",
                        "suffix": ""
                    },
                    {
                        "first": "Kevin",
                        "middle": [],
                        "last": "Knight",
                        "suffix": ""
                    },
                    {
                        "first": "Daniel",
                        "middle": [],
                        "last": "Marcu",
                        "suffix": ""
                    },
                    {
                        "first": "Steve",
                        "middle": [],
                        "last": "Deneefe",
                        "suffix": ""
                    },
                    {
                        "first": "Wei",
                        "middle": [],
                        "last": "Wang",
                        "suffix": ""
                    },
                    {
                        "first": "Ignacio",
                        "middle": [],
                        "last": "Thayer",
                        "suffix": ""
                    }
                ],
                "year": 2006,
                "venue": "ACL",
                "volume": "",
                "issue": "",
                "pages": "961--968",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Michel Galley, Jonathan Graehl, Kevin Knight, Daniel Marcu, Steve DeNeefe, Wei Wang, and Ignacio Thayer. 2006. Scalable inference and training of context-rich syntactic translation models. In ACL, pages 961-968.",
                "links": null
            },
            "BIBREF9": {
                "ref_id": "b9",
                "title": "Directed hypergraphs and applications",
                "authors": [
                    {
                        "first": "Giorgio",
                        "middle": [],
                        "last": "Gallo",
                        "suffix": ""
                    },
                    {
                        "first": "Giustino",
                        "middle": [],
                        "last": "Longo",
                        "suffix": ""
                    },
                    {
                        "first": "Stefano",
                        "middle": [],
                        "last": "Pallottino",
                        "suffix": ""
                    },
                    {
                        "first": "Sang",
                        "middle": [],
                        "last": "Nguyen",
                        "suffix": ""
                    }
                ],
                "year": 1993,
                "venue": "Discrete Appl. Math",
                "volume": "42",
                "issue": "2-3",
                "pages": "177--201",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Giorgio Gallo, Giustino Longo, Stefano Pallottino, and Sang Nguyen. 1993. Directed hypergraphs and ap- plications. Discrete Appl. Math., 42(2-3):177-201.",
                "links": null
            },
            "BIBREF10": {
                "ref_id": "b10",
                "title": "Cube summing, approximate inference with non-local features, and dynamic programming without semirings",
                "authors": [
                    {
                        "first": "Kevin",
                        "middle": [],
                        "last": "Gimpel",
                        "suffix": ""
                    },
                    {
                        "first": "Noah",
                        "middle": [
                            "A"
                        ],
                        "last": "Smith",
                        "suffix": ""
                    }
                ],
                "year": 2009,
                "venue": "EACL",
                "volume": "",
                "issue": "",
                "pages": "318--326",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Kevin Gimpel and Noah A. Smith. 2009. Cube summing, approximate inference with non-local fea- tures, and dynamic programming without semirings. In EACL, pages 318-326.",
                "links": null
            },
            "BIBREF11": {
                "ref_id": "b11",
                "title": "Semiring parsing",
                "authors": [
                    {
                        "first": "Joshua",
                        "middle": [],
                        "last": "Goodman",
                        "suffix": ""
                    }
                ],
                "year": 1999,
                "venue": "Computational Linguistics",
                "volume": "25",
                "issue": "4",
                "pages": "573--605",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Joshua Goodman. 1999. Semiring parsing. Computa- tional Linguistics, 25(4):573-605.",
                "links": null
            },
            "BIBREF12": {
                "ref_id": "b12",
                "title": "Semi-supervised learning by entropy minimization",
                "authors": [
                    {
                        "first": "Y",
                        "middle": [],
                        "last": "Grandvalet",
                        "suffix": ""
                    },
                    {
                        "first": "Y",
                        "middle": [],
                        "last": "Bengio",
                        "suffix": ""
                    }
                ],
                "year": 2004,
                "venue": "NIPS",
                "volume": "",
                "issue": "",
                "pages": "529--536",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Y Grandvalet and Y Bengio. 2004. Semi-supervised learning by entropy minimization. In NIPS, pages 529-536.",
                "links": null
            },
            "BIBREF13": {
                "ref_id": "b13",
                "title": "Better k-best parsing",
                "authors": [
                    {
                        "first": "Liang",
                        "middle": [],
                        "last": "Huang",
                        "suffix": ""
                    },
                    {
                        "first": "David",
                        "middle": [],
                        "last": "Chiang",
                        "suffix": ""
                    }
                ],
                "year": 2005,
                "venue": "IWPT",
                "volume": "",
                "issue": "",
                "pages": "53--64",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Liang Huang and David Chiang. 2005. Better k-best parsing. In IWPT, pages 53-64.",
                "links": null
            },
            "BIBREF14": {
                "ref_id": "b14",
                "title": "Forest reranking: Discriminative parsing with non-local features",
                "authors": [
                    {
                        "first": "Liang",
                        "middle": [],
                        "last": "Huang",
                        "suffix": ""
                    }
                ],
                "year": 2008,
                "venue": "ACL",
                "volume": "",
                "issue": "",
                "pages": "586--594",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Liang Huang. 2008. Forest reranking: Discriminative parsing with non-local features. In ACL, pages 586- 594.",
                "links": null
            },
            "BIBREF15": {
                "ref_id": "b15",
                "title": "Semisupervised conditional random fields for improved sequence segmentation and labeling",
                "authors": [
                    {
                        "first": "Feng",
                        "middle": [],
                        "last": "Jiao",
                        "suffix": ""
                    },
                    {
                        "first": "Shaojun",
                        "middle": [],
                        "last": "Wang",
                        "suffix": ""
                    },
                    {
                        "first": "Chi-Hoon",
                        "middle": [],
                        "last": "Lee",
                        "suffix": ""
                    },
                    {
                        "first": "Russell",
                        "middle": [],
                        "last": "Greiner",
                        "suffix": ""
                    },
                    {
                        "first": "Dale",
                        "middle": [],
                        "last": "Schuurmans",
                        "suffix": ""
                    }
                ],
                "year": 2006,
                "venue": "ACL",
                "volume": "",
                "issue": "",
                "pages": "209--216",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Feng Jiao, Shaojun Wang, Chi-Hoon Lee, Russell Greiner, and Dale Schuurmans. 2006. Semi- supervised conditional random fields for improved sequence segmentation and labeling. In ACL, pages 209-216.",
                "links": null
            },
            "BIBREF16": {
                "ref_id": "b16",
                "title": "Parsing and hypergraphs. New developments in parsing technology",
                "authors": [
                    {
                        "first": "Dan",
                        "middle": [],
                        "last": "Klein",
                        "suffix": ""
                    },
                    {
                        "first": "Christopher",
                        "middle": [
                            "D"
                        ],
                        "last": "Manning",
                        "suffix": ""
                    }
                ],
                "year": 2004,
                "venue": "",
                "volume": "",
                "issue": "",
                "pages": "351--372",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Dan Klein and Christopher D. Manning. 2004. Pars- ing and hypergraphs. New developments in parsing technology, pages 351-372.",
                "links": null
            },
            "BIBREF17": {
                "ref_id": "b17",
                "title": "Adaptive language modelling using the maximum entropy principle",
                "authors": [
                    {
                        "first": "Raymond",
                        "middle": [],
                        "last": "Lau",
                        "suffix": ""
                    },
                    {
                        "first": "Ronald",
                        "middle": [],
                        "last": "Rosenfeld",
                        "suffix": ""
                    },
                    {
                        "first": "Salim",
                        "middle": [],
                        "last": "Roukos",
                        "suffix": ""
                    }
                ],
                "year": 1993,
                "venue": "Proc. ARPA Human Language Technologies Workshop",
                "volume": "",
                "issue": "",
                "pages": "81--86",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Raymond Lau, Ronald Rosenfeld, and Salim Roukos. 1993. Adaptive language modelling using the maxi- mum entropy principle. In Proc. ARPA Human Lan- guage Technologies Workshop, pages 81-86.",
                "links": null
            },
            "BIBREF18": {
                "ref_id": "b18",
                "title": "Large-scale discriminative n-gram language models for statistical machine translation",
                "authors": [
                    {
                        "first": "Zhifei",
                        "middle": [],
                        "last": "Li",
                        "suffix": ""
                    },
                    {
                        "first": "Sanjeev",
                        "middle": [],
                        "last": "Khudanpur",
                        "suffix": ""
                    }
                ],
                "year": 2008,
                "venue": "AMTA",
                "volume": "",
                "issue": "",
                "pages": "133--142",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Zhifei Li and Sanjeev Khudanpur. 2008. Large-scale discriminative n-gram language models for statisti- cal machine translation. In AMTA, pages 133-142.",
                "links": null
            },
            "BIBREF19": {
                "ref_id": "b19",
                "title": "Forest reranking for machine translation with the perceptron algorithm",
                "authors": [
                    {
                        "first": "Zhifei",
                        "middle": [],
                        "last": "Li",
                        "suffix": ""
                    },
                    {
                        "first": "Sanjeev",
                        "middle": [],
                        "last": "Khudanpur",
                        "suffix": ""
                    }
                ],
                "year": 2009,
                "venue": "GALE book chapter on \"MT From Text",
                "volume": "",
                "issue": "",
                "pages": "",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Zhifei Li and Sanjeev Khudanpur. 2009. Forest reranking for machine translation with the percep- tron algorithm. In GALE book chapter on \"MT From Text\".",
                "links": null
            },
            "BIBREF20": {
                "ref_id": "b20",
                "title": "Joshua: An open source toolkit for parsingbased machine translation",
                "authors": [
                    {
                        "first": "Zhifei",
                        "middle": [],
                        "last": "Li",
                        "suffix": ""
                    },
                    {
                        "first": "Chris",
                        "middle": [],
                        "last": "Callison-Burch",
                        "suffix": ""
                    },
                    {
                        "first": "Chris",
                        "middle": [],
                        "last": "Dyer",
                        "suffix": ""
                    },
                    {
                        "first": "Juri",
                        "middle": [],
                        "last": "Ganitkevitch",
                        "suffix": ""
                    },
                    {
                        "first": "Sanjeev",
                        "middle": [],
                        "last": "Khudanpur",
                        "suffix": ""
                    },
                    {
                        "first": "Lane",
                        "middle": [],
                        "last": "Schwartz",
                        "suffix": ""
                    },
                    {
                        "first": "Wren",
                        "middle": [],
                        "last": "Thornton",
                        "suffix": ""
                    },
                    {
                        "first": "Jonathan",
                        "middle": [],
                        "last": "Weese",
                        "suffix": ""
                    },
                    {
                        "first": "Omar",
                        "middle": [],
                        "last": "Zaidan",
                        "suffix": ""
                    }
                ],
                "year": 2009,
                "venue": "",
                "volume": "09",
                "issue": "",
                "pages": "26--30",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Zhifei Li, Chris Callison-Burch, Chris Dyer, Juri Ganitkevitch, Sanjeev Khudanpur, Lane Schwartz, Wren Thornton, Jonathan Weese, and Omar. Zaidan. 2009a. Joshua: An open source toolkit for parsing- based machine translation. In WMT09, pages 26-30.",
                "links": null
            },
            "BIBREF21": {
                "ref_id": "b21",
                "title": "Variational decoding for statistical machine translation",
                "authors": [
                    {
                        "first": "Zhifei",
                        "middle": [],
                        "last": "Li",
                        "suffix": ""
                    },
                    {
                        "first": "Jason",
                        "middle": [],
                        "last": "Eisner",
                        "suffix": ""
                    },
                    {
                        "first": "Sanjeev",
                        "middle": [],
                        "last": "Khudanpur",
                        "suffix": ""
                    }
                ],
                "year": 2009,
                "venue": "ACL",
                "volume": "",
                "issue": "",
                "pages": "",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Zhifei Li, Jason Eisner, and Sanjeev Khudanpur. 2009b. Variational decoding for statistical machine translation. In ACL.",
                "links": null
            },
            "BIBREF22": {
                "ref_id": "b22",
                "title": "Treeto-string alignment template for statistical machine translation",
                "authors": [
                    {
                        "first": "Yang",
                        "middle": [],
                        "last": "Liu",
                        "suffix": ""
                    },
                    {
                        "first": "Qun",
                        "middle": [],
                        "last": "Liu",
                        "suffix": ""
                    },
                    {
                        "first": "Shouxun",
                        "middle": [],
                        "last": "Lin",
                        "suffix": ""
                    }
                ],
                "year": 2006,
                "venue": "ACL",
                "volume": "",
                "issue": "",
                "pages": "609--616",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Yang Liu, Qun Liu, and Shouxun Lin. 2006. Tree- to-string alignment template for statistical machine translation. In ACL, pages 609-616.",
                "links": null
            },
            "BIBREF23": {
                "ref_id": "b23",
                "title": "Translation as weighted deduction",
                "authors": [
                    {
                        "first": "Adam",
                        "middle": [],
                        "last": "Lopez",
                        "suffix": ""
                    }
                ],
                "year": 2009,
                "venue": "EACL",
                "volume": "",
                "issue": "",
                "pages": "532--540",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Adam Lopez. 2009. Translation as weighted deduc- tion. In EACL, pages 532-540.",
                "links": null
            },
            "BIBREF24": {
                "ref_id": "b24",
                "title": "Minimum error rate training in statistical machine translation",
                "authors": [
                    {
                        "first": "Franz Josef",
                        "middle": [],
                        "last": "Och",
                        "suffix": ""
                    }
                ],
                "year": 2003,
                "venue": "ACL",
                "volume": "",
                "issue": "",
                "pages": "160--167",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Franz Josef Och. 2003. Minimum error rate training in statistical machine translation. In ACL, pages 160- 167.",
                "links": null
            },
            "BIBREF25": {
                "ref_id": "b25",
                "title": "BLEU: A method for automatic evaluation of machine translation",
                "authors": [
                    {
                        "first": "Kishore",
                        "middle": [],
                        "last": "Papineni",
                        "suffix": ""
                    },
                    {
                        "first": "Salim",
                        "middle": [],
                        "last": "Roukos",
                        "suffix": ""
                    },
                    {
                        "first": "Todd",
                        "middle": [],
                        "last": "Ward",
                        "suffix": ""
                    },
                    {
                        "first": "Wei-Jing",
                        "middle": [],
                        "last": "Zhu",
                        "suffix": ""
                    }
                ],
                "year": 2001,
                "venue": "ACL",
                "volume": "",
                "issue": "",
                "pages": "311--318",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Kishore Papineni, Salim Roukos, Todd Ward, and Wei- Jing Zhu. 2001. BLEU: A method for automatic evaluation of machine translation. In ACL, pages 311-318.",
                "links": null
            },
            "BIBREF26": {
                "ref_id": "b26",
                "title": "Consensus training for consensus decoding in machine translation",
                "authors": [
                    {
                        "first": "Adam",
                        "middle": [],
                        "last": "Pauls",
                        "suffix": ""
                    },
                    {
                        "first": "John",
                        "middle": [],
                        "last": "Denero",
                        "suffix": ""
                    },
                    {
                        "first": "Dan",
                        "middle": [],
                        "last": "Klein",
                        "suffix": ""
                    }
                ],
                "year": 2009,
                "venue": "EMNLP",
                "volume": "",
                "issue": "",
                "pages": "",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Adam Pauls, John DeNero, and Dan Klein. 2009. Con- sensus training for consensus decoding in machine translation. In EMNLP.",
                "links": null
            },
            "BIBREF27": {
                "ref_id": "b27",
                "title": "Lazy multivariate higher-order forward-mode ad",
                "authors": [
                    {
                        "first": "B",
                        "middle": [
                            "A"
                        ],
                        "last": "Pearlmutter",
                        "suffix": ""
                    },
                    {
                        "first": "J",
                        "middle": [
                            "M"
                        ],
                        "last": "Siskind",
                        "suffix": ""
                    }
                ],
                "year": 2007,
                "venue": "Proceedings of the 34th Annual Symposium on Principles of Programming Languages (POPL)",
                "volume": "",
                "issue": "",
                "pages": "155--160",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "B. A. Pearlmutter and J. M. Siskind. 2007. Lazy mul- tivariate higher-order forward-mode ad. In Proceed- ings of the 34th Annual Symposium on Principles of Programming Languages (POPL), pages 155-160.",
                "links": null
            },
            "BIBREF28": {
                "ref_id": "b28",
                "title": "Parsing as deduction",
                "authors": [
                    {
                        "first": "C",
                        "middle": [
                            "N"
                        ],
                        "last": "Fernando",
                        "suffix": ""
                    },
                    {
                        "first": "",
                        "middle": [],
                        "last": "Pereira",
                        "suffix": ""
                    },
                    {
                        "first": "H",
                        "middle": [
                            "D"
                        ],
                        "last": "David",
                        "suffix": ""
                    },
                    {
                        "first": "",
                        "middle": [],
                        "last": "Warren",
                        "suffix": ""
                    }
                ],
                "year": 1983,
                "venue": "ACL",
                "volume": "",
                "issue": "",
                "pages": "137--144",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Fernando C. N. Pereira and David H. D. Warren. 1983. Parsing as deduction. In ACL, pages 137-144.",
                "links": null
            },
            "BIBREF29": {
                "ref_id": "b29",
                "title": "Dependency treelet translation: syntactically informed phrasal smt",
                "authors": [
                    {
                        "first": "Chris",
                        "middle": [],
                        "last": "Quirk",
                        "suffix": ""
                    },
                    {
                        "first": "Arul",
                        "middle": [],
                        "last": "Menezes",
                        "suffix": ""
                    },
                    {
                        "first": "Colin",
                        "middle": [],
                        "last": "Cherry",
                        "suffix": ""
                    }
                ],
                "year": 2005,
                "venue": "ACL",
                "volume": "",
                "issue": "",
                "pages": "271--279",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Chris Quirk, Arul Menezes, and Colin Cherry. 2005. Dependency treelet translation: syntactically in- formed phrasal smt. In ACL, pages 271-279.",
                "links": null
            },
            "BIBREF30": {
                "ref_id": "b30",
                "title": "Deterministic annealing for clustering, compression, classification, regression, and related optimization problems",
                "authors": [
                    {
                        "first": "Kenneth",
                        "middle": [],
                        "last": "Rose",
                        "suffix": ""
                    }
                ],
                "year": 1998,
                "venue": "Proceedings of the IEEE",
                "volume": "",
                "issue": "",
                "pages": "2210--2239",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Kenneth Rose. 1998. Deterministic annealing for clus- tering, compression, classification, regression, and related optimization problems. In Proceedings of the IEEE, pages 2210-2239.",
                "links": null
            },
            "BIBREF31": {
                "ref_id": "b31",
                "title": "Principles and implementation of deductive parsing",
                "authors": [
                    {
                        "first": "M",
                        "middle": [],
                        "last": "Stuart",
                        "suffix": ""
                    },
                    {
                        "first": "Yves",
                        "middle": [],
                        "last": "Shieber",
                        "suffix": ""
                    },
                    {
                        "first": "Fernando",
                        "middle": [
                            "C N"
                        ],
                        "last": "Schabes",
                        "suffix": ""
                    },
                    {
                        "first": "",
                        "middle": [],
                        "last": "Pereira",
                        "suffix": ""
                    }
                ],
                "year": 1994,
                "venue": "Journal of Logic Programming",
                "volume": "24",
                "issue": "",
                "pages": "3--36",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Stuart M. Shieber, Yves Schabes, and Fernando C. N. Pereira. 1994. Principles and implementation of deductive parsing. Journal of Logic Programming, 24:3-36.",
                "links": null
            },
            "BIBREF32": {
                "ref_id": "b32",
                "title": "Minimum risk annealing for training log-linear models",
                "authors": [
                    {
                        "first": "David",
                        "middle": [
                            "A"
                        ],
                        "last": "Smith",
                        "suffix": ""
                    },
                    {
                        "first": "Jason",
                        "middle": [],
                        "last": "Eisner",
                        "suffix": ""
                    }
                ],
                "year": 2006,
                "venue": "ACL",
                "volume": "",
                "issue": "",
                "pages": "787--794",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "David A. Smith and Jason Eisner. 2006. Minimum risk annealing for training log-linear models. In ACL, pages 787-794.",
                "links": null
            },
            "BIBREF33": {
                "ref_id": "b33",
                "title": "SRILM-an extensible language modeling toolkit",
                "authors": [
                    {
                        "first": "Andreas",
                        "middle": [],
                        "last": "Stolcke",
                        "suffix": ""
                    }
                ],
                "year": 2002,
                "venue": "Proceedings of the International Conference on Spoken Language Processing",
                "volume": "",
                "issue": "",
                "pages": "901--904",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Andreas Stolcke. 2002. SRILM-an extensible lan- guage modeling toolkit. In Proceedings of the Inter- national Conference on Spoken Language Process- ing, pages 901-904.",
                "links": null
            },
            "BIBREF34": {
                "ref_id": "b34",
                "title": "Lattice minimum-Bayesrisk decoding for statistical machine translation",
                "authors": [
                    {
                        "first": "Roy",
                        "middle": [],
                        "last": "Tromble",
                        "suffix": ""
                    },
                    {
                        "first": "Shankar",
                        "middle": [],
                        "last": "Kumar",
                        "suffix": ""
                    },
                    {
                        "first": "Franz",
                        "middle": [],
                        "last": "Och",
                        "suffix": ""
                    },
                    {
                        "first": "Wolfgang",
                        "middle": [],
                        "last": "Macherey",
                        "suffix": ""
                    }
                ],
                "year": 2008,
                "venue": "EMNLP",
                "volume": "",
                "issue": "",
                "pages": "620--629",
                "other_ids": {},
                "num": null,
                "urls": [],
                "raw_text": "Roy Tromble, Shankar Kumar, Franz Och, and Wolf- gang Macherey. 2008. Lattice minimum-Bayes- risk decoding for statistical machine translation. In EMNLP, pages 620-629.",
                "links": null
            }
        },
        "ref_entries": {
            "FIGREF0": {
                "text": "Computes the \"outside weights\" \u03b1(v). Can only be run after INSIDE(HG) ofFigure 2has already computed the inside weights \u03b2(v).",
                "uris": null,
                "type_str": "figure",
                "num": null
            },
            "FIGREF1": {
                "text": "Figure 2 returns the total weight d\u2208D e\u2208d k e = d\u2208D p(d), p(d)r(d) = Z, r . It is easy to verify the second equality from the definitions of \u2295, Z, and r. The first equality requires proving that e\u2208d k e = p(d), p(d)r(d) from the definitions of \u2297, k e , p(d), and r(d).",
                "uris": null,
                "type_str": "figure",
                "num": null
            },
            "FIGREF2": {
                "text": "The base cases are where d is a single hyperedge e, in which case p(d), p(d)r(d) = k e (thanks to our choice of k e ), and where d is empty, in which case Element",
                "uris": null,
                "type_str": "figure",
                "num": null
            },
            "FIGREF3": {
                "text": "p(d)r e = e (k e k e )r e = e k e x e =x. This uses the fact that k e k e = d: e\u2208d p(d).",
                "uris": null,
                "type_str": "figure",
                "num": null
            },
            "FIGREF4": {
                "text": "Sections 3.2 and 4.1, we saw how our semirings helped find the sum Z of all p(d), and compute expectations r, s, t of r(d), s(d), and r(d)s(d).",
                "uris": null,
                "type_str": "figure",
                "num": null
            },
            "TABREF0": {
                "text": "Expectation semiring:",
                "type_str": "table",
                "content": "<table/>",
                "num": null,
                "html": null
            },
            "TABREF1": {
                "text": "Storing signed values in log domain: each value a (= sae a ) is stored as a pair sa, a where sa and a are the sign bit of a and natural logarithm of |a|, respectively. This table shows the operations between two values a = sa2 a and b = s b 2 b , assuming a \u2265 b . Note: log(1 + x) (where |x| < 1) should be computed by the Mercator series x \u2212 x 2 /2+x 3 /3\u2212\u2022 \u2022 \u2022 , e.g., using the math library function log1p.",
                "type_str": "table",
                "content": "<table/>",
                "num": null,
                "html": null
            },
            "TABREF2": {
                "text": "Second-order expectation semiring (variance semiring): Each element in the semiring is a 4-tuple p, r, s, t .",
                "type_str": "table",
                "content": "<table/>",
                "num": null,
                "html": null
            },
            "TABREF3": {
                "text": "Constructing second-order expectation semiring as first-order. Here we show that the operations in EK,X are isomorphic toTable 2's operationsin EP,R,S,T , provided that K def = EP,R and X def = S \u00d7 T is a K-module, in which addition is defined by s1, t1 + s2, t2 def = s1 + s2, t1 + t2 , and left-multiplication by K is defined by p, r s, t def = ps, pt + rs .Z, \u2207Z, \u2207Z, \u2207 2 Z will be returned by INSIDE(HG, E R,R m ,R m ,R m\u00d7m ), or more efficiently by INSIDE-OUTSIDE(HG",
                "type_str": "table",
                "content": "<table/>",
                "num": null,
                "html": null
            }
        }
    }
}