ZHANGYUXUAN-zR commited on
Commit
3f5bbc3
·
verified ·
1 Parent(s): 51ec0a0

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +214 -0
  2. parse/train/-b5OSCydOMe/-b5OSCydOMe_layout.pdf +3 -0
  3. parse/train/-b5OSCydOMe/-b5OSCydOMe_origin.pdf +3 -0
  4. parse/train/-b5OSCydOMe/-b5OSCydOMe_span.pdf +3 -0
  5. parse/train/0HW7A5YZjq7/0HW7A5YZjq7_layout.pdf +3 -0
  6. parse/train/0HW7A5YZjq7/0HW7A5YZjq7_origin.pdf +3 -0
  7. parse/train/0HW7A5YZjq7/0HW7A5YZjq7_span.pdf +3 -0
  8. parse/train/0lz69oI5iZP/0lz69oI5iZP.md +241 -0
  9. parse/train/0lz69oI5iZP/0lz69oI5iZP_content_list.json +1150 -0
  10. parse/train/0lz69oI5iZP/0lz69oI5iZP_middle.json +0 -0
  11. parse/train/0lz69oI5iZP/0lz69oI5iZP_model.json +0 -0
  12. parse/train/1flmvXGGJaa/1flmvXGGJaa_layout.pdf +3 -0
  13. parse/train/1flmvXGGJaa/1flmvXGGJaa_origin.pdf +3 -0
  14. parse/train/1flmvXGGJaa/1flmvXGGJaa_span.pdf +3 -0
  15. parse/train/3ccoZ40Us0N/3ccoZ40Us0N_layout.pdf +3 -0
  16. parse/train/3ccoZ40Us0N/3ccoZ40Us0N_origin.pdf +3 -0
  17. parse/train/3ccoZ40Us0N/3ccoZ40Us0N_span.pdf +3 -0
  18. parse/train/6YL_BntJrz6/6YL_BntJrz6_layout.pdf +3 -0
  19. parse/train/6YL_BntJrz6/6YL_BntJrz6_origin.pdf +3 -0
  20. parse/train/6YL_BntJrz6/6YL_BntJrz6_span.pdf +3 -0
  21. parse/train/784_F-WCW46/784_F-WCW46_layout.pdf +3 -0
  22. parse/train/784_F-WCW46/784_F-WCW46_origin.pdf +3 -0
  23. parse/train/784_F-WCW46/784_F-WCW46_span.pdf +3 -0
  24. parse/train/9BpjtPMyDQ/9BpjtPMyDQ_layout.pdf +3 -0
  25. parse/train/9BpjtPMyDQ/9BpjtPMyDQ_origin.pdf +3 -0
  26. parse/train/9BpjtPMyDQ/9BpjtPMyDQ_span.pdf +3 -0
  27. parse/train/ALvt7nXa2q/ALvt7nXa2q_layout.pdf +3 -0
  28. parse/train/ALvt7nXa2q/ALvt7nXa2q_origin.pdf +3 -0
  29. parse/train/ALvt7nXa2q/ALvt7nXa2q_span.pdf +3 -0
  30. parse/train/B1IzH7cxl/B1IzH7cxl.md +401 -0
  31. parse/train/B1IzH7cxl/B1IzH7cxl_content_list.json +0 -0
  32. parse/train/B1IzH7cxl/B1IzH7cxl_middle.json +0 -0
  33. parse/train/B1IzH7cxl/B1IzH7cxl_model.json +0 -0
  34. parse/train/BJedHRVtPB/BJedHRVtPB_layout.pdf +3 -0
  35. parse/train/BJedHRVtPB/BJedHRVtPB_origin.pdf +3 -0
  36. parse/train/BJedHRVtPB/BJedHRVtPB_span.pdf +3 -0
  37. parse/train/BJij4yg0Z/BJij4yg0Z_layout.pdf +3 -0
  38. parse/train/BJij4yg0Z/BJij4yg0Z_origin.pdf +3 -0
  39. parse/train/BJij4yg0Z/BJij4yg0Z_span.pdf +3 -0
  40. parse/train/BJlguT4YPr/BJlguT4YPr_layout.pdf +3 -0
  41. parse/train/BJlguT4YPr/BJlguT4YPr_origin.pdf +3 -0
  42. parse/train/BJlguT4YPr/BJlguT4YPr_span.pdf +3 -0
  43. parse/train/BJlo91BYPr/BJlo91BYPr_layout.pdf +3 -0
  44. parse/train/BJlo91BYPr/BJlo91BYPr_origin.pdf +3 -0
  45. parse/train/BJlo91BYPr/BJlo91BYPr_span.pdf +3 -0
  46. parse/train/ByedzkrKvH/ByedzkrKvH_layout.pdf +3 -0
  47. parse/train/ByedzkrKvH/ByedzkrKvH_origin.pdf +3 -0
  48. parse/train/ByedzkrKvH/ByedzkrKvH_span.pdf +3 -0
  49. parse/train/Byl1W1rtvH/Byl1W1rtvH_layout.pdf +3 -0
  50. parse/train/Byl1W1rtvH/Byl1W1rtvH_origin.pdf +3 -0
.gitattributes CHANGED
@@ -6219,3 +6219,217 @@ parse/train/r1f78iAcFm/r1f78iAcFm_span.pdf filter=lfs diff=lfs merge=lfs -text
6219
  parse/train/r1f78iAcFm/r1f78iAcFm_layout.pdf filter=lfs diff=lfs merge=lfs -text
6220
  parse/train/HJMHpjC9Ym/HJMHpjC9Ym_span.pdf filter=lfs diff=lfs merge=lfs -text
6221
  parse/train/HJMHpjC9Ym/HJMHpjC9Ym_layout.pdf filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6219
  parse/train/r1f78iAcFm/r1f78iAcFm_layout.pdf filter=lfs diff=lfs merge=lfs -text
6220
  parse/train/HJMHpjC9Ym/HJMHpjC9Ym_span.pdf filter=lfs diff=lfs merge=lfs -text
6221
  parse/train/HJMHpjC9Ym/HJMHpjC9Ym_layout.pdf filter=lfs diff=lfs merge=lfs -text
6222
+ parse/train/HJMHpjC9Ym/HJMHpjC9Ym_origin.pdf filter=lfs diff=lfs merge=lfs -text
6223
+ parse/train/PbEHqvFtcS/PbEHqvFtcS_layout.pdf filter=lfs diff=lfs merge=lfs -text
6224
+ parse/train/PbEHqvFtcS/PbEHqvFtcS_origin.pdf filter=lfs diff=lfs merge=lfs -text
6225
+ parse/train/PbEHqvFtcS/PbEHqvFtcS_span.pdf filter=lfs diff=lfs merge=lfs -text
6226
+ parse/train/BJij4yg0Z/BJij4yg0Z_origin.pdf filter=lfs diff=lfs merge=lfs -text
6227
+ parse/train/BJij4yg0Z/BJij4yg0Z_layout.pdf filter=lfs diff=lfs merge=lfs -text
6228
+ parse/train/BJij4yg0Z/BJij4yg0Z_span.pdf filter=lfs diff=lfs merge=lfs -text
6229
+ parse/train/SypU81Ole/SypU81Ole_span.pdf filter=lfs diff=lfs merge=lfs -text
6230
+ parse/train/SypU81Ole/SypU81Ole_origin.pdf filter=lfs diff=lfs merge=lfs -text
6231
+ parse/train/SypU81Ole/SypU81Ole_layout.pdf filter=lfs diff=lfs merge=lfs -text
6232
+ parse/train/M_lkFOwVdYc/M_lkFOwVdYc_origin.pdf filter=lfs diff=lfs merge=lfs -text
6233
+ parse/train/M_lkFOwVdYc/M_lkFOwVdYc_span.pdf filter=lfs diff=lfs merge=lfs -text
6234
+ parse/train/M_lkFOwVdYc/M_lkFOwVdYc_layout.pdf filter=lfs diff=lfs merge=lfs -text
6235
+ parse/train/_WnAQKse_uK/_WnAQKse_uK_span.pdf filter=lfs diff=lfs merge=lfs -text
6236
+ parse/train/_WnAQKse_uK/_WnAQKse_uK_layout.pdf filter=lfs diff=lfs merge=lfs -text
6237
+ parse/train/_WnAQKse_uK/_WnAQKse_uK_origin.pdf filter=lfs diff=lfs merge=lfs -text
6238
+ parse/train/S9ZyhWC17wJ/S9ZyhWC17wJ_origin.pdf filter=lfs diff=lfs merge=lfs -text
6239
+ parse/train/S9ZyhWC17wJ/S9ZyhWC17wJ_span.pdf filter=lfs diff=lfs merge=lfs -text
6240
+ parse/train/S9ZyhWC17wJ/S9ZyhWC17wJ_layout.pdf filter=lfs diff=lfs merge=lfs -text
6241
+ parse/train/ALvt7nXa2q/ALvt7nXa2q_span.pdf filter=lfs diff=lfs merge=lfs -text
6242
+ parse/train/ALvt7nXa2q/ALvt7nXa2q_layout.pdf filter=lfs diff=lfs merge=lfs -text
6243
+ parse/train/ALvt7nXa2q/ALvt7nXa2q_origin.pdf filter=lfs diff=lfs merge=lfs -text
6244
+ parse/train/784_F-WCW46/784_F-WCW46_layout.pdf filter=lfs diff=lfs merge=lfs -text
6245
+ parse/train/784_F-WCW46/784_F-WCW46_span.pdf filter=lfs diff=lfs merge=lfs -text
6246
+ parse/train/784_F-WCW46/784_F-WCW46_origin.pdf filter=lfs diff=lfs merge=lfs -text
6247
+ parse/train/Wua2zjxJdYo/Wua2zjxJdYo_origin.pdf filter=lfs diff=lfs merge=lfs -text
6248
+ parse/train/Wua2zjxJdYo/Wua2zjxJdYo_span.pdf filter=lfs diff=lfs merge=lfs -text
6249
+ parse/train/Wua2zjxJdYo/Wua2zjxJdYo_layout.pdf filter=lfs diff=lfs merge=lfs -text
6250
+ parse/train/S1x2PCNKDB/S1x2PCNKDB_layout.pdf filter=lfs diff=lfs merge=lfs -text
6251
+ parse/train/S1x2PCNKDB/S1x2PCNKDB_span.pdf filter=lfs diff=lfs merge=lfs -text
6252
+ parse/train/S1x2PCNKDB/S1x2PCNKDB_origin.pdf filter=lfs diff=lfs merge=lfs -text
6253
+ parse/train/0HW7A5YZjq7/0HW7A5YZjq7_span.pdf filter=lfs diff=lfs merge=lfs -text
6254
+ parse/train/0HW7A5YZjq7/0HW7A5YZjq7_layout.pdf filter=lfs diff=lfs merge=lfs -text
6255
+ parse/train/0HW7A5YZjq7/0HW7A5YZjq7_origin.pdf filter=lfs diff=lfs merge=lfs -text
6256
+ parse/train/9BpjtPMyDQ/9BpjtPMyDQ_origin.pdf filter=lfs diff=lfs merge=lfs -text
6257
+ parse/train/9BpjtPMyDQ/9BpjtPMyDQ_layout.pdf filter=lfs diff=lfs merge=lfs -text
6258
+ parse/train/9BpjtPMyDQ/9BpjtPMyDQ_span.pdf filter=lfs diff=lfs merge=lfs -text
6259
+ parse/train/SkqMSCHxe/SkqMSCHxe_layout.pdf filter=lfs diff=lfs merge=lfs -text
6260
+ parse/train/SkqMSCHxe/SkqMSCHxe_origin.pdf filter=lfs diff=lfs merge=lfs -text
6261
+ parse/train/SkqMSCHxe/SkqMSCHxe_span.pdf filter=lfs diff=lfs merge=lfs -text
6262
+ parse/train/SklXvs0qt7/SklXvs0qt7_layout.pdf filter=lfs diff=lfs merge=lfs -text
6263
+ parse/train/SklXvs0qt7/SklXvs0qt7_span.pdf filter=lfs diff=lfs merge=lfs -text
6264
+ parse/train/SklXvs0qt7/SklXvs0qt7_origin.pdf filter=lfs diff=lfs merge=lfs -text
6265
+ parse/train/jfDaBf8PAE/jfDaBf8PAE_layout.pdf filter=lfs diff=lfs merge=lfs -text
6266
+ parse/train/jfDaBf8PAE/jfDaBf8PAE_origin.pdf filter=lfs diff=lfs merge=lfs -text
6267
+ parse/train/jfDaBf8PAE/jfDaBf8PAE_span.pdf filter=lfs diff=lfs merge=lfs -text
6268
+ parse/train/PmVfnB0nkqr/PmVfnB0nkqr_layout.pdf filter=lfs diff=lfs merge=lfs -text
6269
+ parse/train/PmVfnB0nkqr/PmVfnB0nkqr_origin.pdf filter=lfs diff=lfs merge=lfs -text
6270
+ parse/train/PmVfnB0nkqr/PmVfnB0nkqr_span.pdf filter=lfs diff=lfs merge=lfs -text
6271
+ parse/train/l3YcqzaPlx0/l3YcqzaPlx0_origin.pdf filter=lfs diff=lfs merge=lfs -text
6272
+ parse/train/l3YcqzaPlx0/l3YcqzaPlx0_span.pdf filter=lfs diff=lfs merge=lfs -text
6273
+ parse/train/l3YcqzaPlx0/l3YcqzaPlx0_layout.pdf filter=lfs diff=lfs merge=lfs -text
6274
+ parse/train/lgNx56yZh8a/lgNx56yZh8a_origin.pdf filter=lfs diff=lfs merge=lfs -text
6275
+ parse/train/lgNx56yZh8a/lgNx56yZh8a_layout.pdf filter=lfs diff=lfs merge=lfs -text
6276
+ parse/train/lgNx56yZh8a/lgNx56yZh8a_span.pdf filter=lfs diff=lfs merge=lfs -text
6277
+ parse/train/HJx81ySKwr/HJx81ySKwr_span.pdf filter=lfs diff=lfs merge=lfs -text
6278
+ parse/train/HJx81ySKwr/HJx81ySKwr_origin.pdf filter=lfs diff=lfs merge=lfs -text
6279
+ parse/train/HJx81ySKwr/HJx81ySKwr_layout.pdf filter=lfs diff=lfs merge=lfs -text
6280
+ parse/train/3ccoZ40Us0N/3ccoZ40Us0N_origin.pdf filter=lfs diff=lfs merge=lfs -text
6281
+ parse/train/3ccoZ40Us0N/3ccoZ40Us0N_layout.pdf filter=lfs diff=lfs merge=lfs -text
6282
+ parse/train/3ccoZ40Us0N/3ccoZ40Us0N_span.pdf filter=lfs diff=lfs merge=lfs -text
6283
+ parse/train/Byl1W1rtvH/Byl1W1rtvH_layout.pdf filter=lfs diff=lfs merge=lfs -text
6284
+ parse/train/Byl1W1rtvH/Byl1W1rtvH_span.pdf filter=lfs diff=lfs merge=lfs -text
6285
+ parse/train/Byl1W1rtvH/Byl1W1rtvH_origin.pdf filter=lfs diff=lfs merge=lfs -text
6286
+ parse/train/Byx93sC9tm/Byx93sC9tm_layout.pdf filter=lfs diff=lfs merge=lfs -text
6287
+ parse/train/Byx93sC9tm/Byx93sC9tm_span.pdf filter=lfs diff=lfs merge=lfs -text
6288
+ parse/train/Byx93sC9tm/Byx93sC9tm_origin.pdf filter=lfs diff=lfs merge=lfs -text
6289
+ parse/train/af_hng9tuNj/af_hng9tuNj_origin.pdf filter=lfs diff=lfs merge=lfs -text
6290
+ parse/train/af_hng9tuNj/af_hng9tuNj_span.pdf filter=lfs diff=lfs merge=lfs -text
6291
+ parse/train/af_hng9tuNj/af_hng9tuNj_layout.pdf filter=lfs diff=lfs merge=lfs -text
6292
+ parse/train/S1xtAjR5tX/S1xtAjR5tX_layout.pdf filter=lfs diff=lfs merge=lfs -text
6293
+ parse/train/S1xtAjR5tX/S1xtAjR5tX_origin.pdf filter=lfs diff=lfs merge=lfs -text
6294
+ parse/train/S1xtAjR5tX/S1xtAjR5tX_span.pdf filter=lfs diff=lfs merge=lfs -text
6295
+ parse/train/rJg_NjCqtX/rJg_NjCqtX_layout.pdf filter=lfs diff=lfs merge=lfs -text
6296
+ parse/train/rJg_NjCqtX/rJg_NjCqtX_span.pdf filter=lfs diff=lfs merge=lfs -text
6297
+ parse/train/rJg_NjCqtX/rJg_NjCqtX_origin.pdf filter=lfs diff=lfs merge=lfs -text
6298
+ parse/train/HyxGB2AcY7/HyxGB2AcY7_origin.pdf filter=lfs diff=lfs merge=lfs -text
6299
+ parse/train/HyxGB2AcY7/HyxGB2AcY7_layout.pdf filter=lfs diff=lfs merge=lfs -text
6300
+ parse/train/HyxGB2AcY7/HyxGB2AcY7_span.pdf filter=lfs diff=lfs merge=lfs -text
6301
+ parse/train/rJeIGkBKPS/rJeIGkBKPS_span.pdf filter=lfs diff=lfs merge=lfs -text
6302
+ parse/train/rJeIGkBKPS/rJeIGkBKPS_layout.pdf filter=lfs diff=lfs merge=lfs -text
6303
+ parse/train/rJeIGkBKPS/rJeIGkBKPS_origin.pdf filter=lfs diff=lfs merge=lfs -text
6304
+ parse/train/-b5OSCydOMe/-b5OSCydOMe_span.pdf filter=lfs diff=lfs merge=lfs -text
6305
+ parse/train/-b5OSCydOMe/-b5OSCydOMe_origin.pdf filter=lfs diff=lfs merge=lfs -text
6306
+ parse/train/-b5OSCydOMe/-b5OSCydOMe_layout.pdf filter=lfs diff=lfs merge=lfs -text
6307
+ parse/train/BJedHRVtPB/BJedHRVtPB_span.pdf filter=lfs diff=lfs merge=lfs -text
6308
+ parse/train/BJedHRVtPB/BJedHRVtPB_origin.pdf filter=lfs diff=lfs merge=lfs -text
6309
+ parse/train/BJedHRVtPB/BJedHRVtPB_layout.pdf filter=lfs diff=lfs merge=lfs -text
6310
+ parse/train/HyBbjW-RW/HyBbjW-RW_layout.pdf filter=lfs diff=lfs merge=lfs -text
6311
+ parse/train/HyBbjW-RW/HyBbjW-RW_span.pdf filter=lfs diff=lfs merge=lfs -text
6312
+ parse/train/HyBbjW-RW/HyBbjW-RW_origin.pdf filter=lfs diff=lfs merge=lfs -text
6313
+ parse/train/rC8sJ4i6kaH/rC8sJ4i6kaH_span.pdf filter=lfs diff=lfs merge=lfs -text
6314
+ parse/train/rC8sJ4i6kaH/rC8sJ4i6kaH_layout.pdf filter=lfs diff=lfs merge=lfs -text
6315
+ parse/train/rC8sJ4i6kaH/rC8sJ4i6kaH_origin.pdf filter=lfs diff=lfs merge=lfs -text
6316
+ parse/train/aExAsh1UHZo/aExAsh1UHZo_span.pdf filter=lfs diff=lfs merge=lfs -text
6317
+ parse/train/aExAsh1UHZo/aExAsh1UHZo_layout.pdf filter=lfs diff=lfs merge=lfs -text
6318
+ parse/train/aExAsh1UHZo/aExAsh1UHZo_origin.pdf filter=lfs diff=lfs merge=lfs -text
6319
+ parse/train/rkGG6s0qKQ/rkGG6s0qKQ_layout.pdf filter=lfs diff=lfs merge=lfs -text
6320
+ parse/train/rkGG6s0qKQ/rkGG6s0qKQ_span.pdf filter=lfs diff=lfs merge=lfs -text
6321
+ parse/train/rkGG6s0qKQ/rkGG6s0qKQ_origin.pdf filter=lfs diff=lfs merge=lfs -text
6322
+ parse/train/BJlguT4YPr/BJlguT4YPr_layout.pdf filter=lfs diff=lfs merge=lfs -text
6323
+ parse/train/BJlguT4YPr/BJlguT4YPr_span.pdf filter=lfs diff=lfs merge=lfs -text
6324
+ parse/train/BJlguT4YPr/BJlguT4YPr_origin.pdf filter=lfs diff=lfs merge=lfs -text
6325
+ parse/train/rJgVwTVtvS/rJgVwTVtvS_layout.pdf filter=lfs diff=lfs merge=lfs -text
6326
+ parse/train/rJgVwTVtvS/rJgVwTVtvS_origin.pdf filter=lfs diff=lfs merge=lfs -text
6327
+ parse/train/rJgVwTVtvS/rJgVwTVtvS_span.pdf filter=lfs diff=lfs merge=lfs -text
6328
+ parse/train/hXWPpJedrVP/hXWPpJedrVP_layout.pdf filter=lfs diff=lfs merge=lfs -text
6329
+ parse/train/hXWPpJedrVP/hXWPpJedrVP_origin.pdf filter=lfs diff=lfs merge=lfs -text
6330
+ parse/train/hXWPpJedrVP/hXWPpJedrVP_span.pdf filter=lfs diff=lfs merge=lfs -text
6331
+ parse/train/rkllGyBFPH/rkllGyBFPH_origin.pdf filter=lfs diff=lfs merge=lfs -text
6332
+ parse/train/rkllGyBFPH/rkllGyBFPH_layout.pdf filter=lfs diff=lfs merge=lfs -text
6333
+ parse/train/rkllGyBFPH/rkllGyBFPH_span.pdf filter=lfs diff=lfs merge=lfs -text
6334
+ parse/train/SOVSJZ9PTO7/SOVSJZ9PTO7_layout.pdf filter=lfs diff=lfs merge=lfs -text
6335
+ parse/train/SOVSJZ9PTO7/SOVSJZ9PTO7_origin.pdf filter=lfs diff=lfs merge=lfs -text
6336
+ parse/train/SOVSJZ9PTO7/SOVSJZ9PTO7_span.pdf filter=lfs diff=lfs merge=lfs -text
6337
+ parse/train/S1EHOsC9tX/S1EHOsC9tX_layout.pdf filter=lfs diff=lfs merge=lfs -text
6338
+ parse/train/S1EHOsC9tX/S1EHOsC9tX_origin.pdf filter=lfs diff=lfs merge=lfs -text
6339
+ parse/train/S1EHOsC9tX/S1EHOsC9tX_span.pdf filter=lfs diff=lfs merge=lfs -text
6340
+ parse/train/Syx6bz-Ab/Syx6bz-Ab_layout.pdf filter=lfs diff=lfs merge=lfs -text
6341
+ parse/train/Syx6bz-Ab/Syx6bz-Ab_origin.pdf filter=lfs diff=lfs merge=lfs -text
6342
+ parse/train/Syx6bz-Ab/Syx6bz-Ab_span.pdf filter=lfs diff=lfs merge=lfs -text
6343
+ parse/train/rkgt0REKwS/rkgt0REKwS_origin.pdf filter=lfs diff=lfs merge=lfs -text
6344
+ parse/train/rkgt0REKwS/rkgt0REKwS_layout.pdf filter=lfs diff=lfs merge=lfs -text
6345
+ parse/train/rkgt0REKwS/rkgt0REKwS_span.pdf filter=lfs diff=lfs merge=lfs -text
6346
+ parse/train/BJlo91BYPr/BJlo91BYPr_origin.pdf filter=lfs diff=lfs merge=lfs -text
6347
+ parse/train/BJlo91BYPr/BJlo91BYPr_layout.pdf filter=lfs diff=lfs merge=lfs -text
6348
+ parse/train/BJlo91BYPr/BJlo91BYPr_span.pdf filter=lfs diff=lfs merge=lfs -text
6349
+ parse/train/rylztAEYvr/rylztAEYvr_origin.pdf filter=lfs diff=lfs merge=lfs -text
6350
+ parse/train/rylztAEYvr/rylztAEYvr_layout.pdf filter=lfs diff=lfs merge=lfs -text
6351
+ parse/train/rylztAEYvr/rylztAEYvr_span.pdf filter=lfs diff=lfs merge=lfs -text
6352
+ parse/train/rkeT8iR9Y7/rkeT8iR9Y7_origin.pdf filter=lfs diff=lfs merge=lfs -text
6353
+ parse/train/rkeT8iR9Y7/rkeT8iR9Y7_span.pdf filter=lfs diff=lfs merge=lfs -text
6354
+ parse/train/rkeT8iR9Y7/rkeT8iR9Y7_layout.pdf filter=lfs diff=lfs merge=lfs -text
6355
+ parse/train/EmeWbcWORRg/EmeWbcWORRg_span.pdf filter=lfs diff=lfs merge=lfs -text
6356
+ parse/train/EmeWbcWORRg/EmeWbcWORRg_layout.pdf filter=lfs diff=lfs merge=lfs -text
6357
+ parse/train/EmeWbcWORRg/EmeWbcWORRg_origin.pdf filter=lfs diff=lfs merge=lfs -text
6358
+ parse/train/6YL_BntJrz6/6YL_BntJrz6_layout.pdf filter=lfs diff=lfs merge=lfs -text
6359
+ parse/train/6YL_BntJrz6/6YL_BntJrz6_origin.pdf filter=lfs diff=lfs merge=lfs -text
6360
+ parse/train/6YL_BntJrz6/6YL_BntJrz6_span.pdf filter=lfs diff=lfs merge=lfs -text
6361
+ parse/train/l0BP1lHpPW/l0BP1lHpPW_layout.pdf filter=lfs diff=lfs merge=lfs -text
6362
+ parse/train/l0BP1lHpPW/l0BP1lHpPW_span.pdf filter=lfs diff=lfs merge=lfs -text
6363
+ parse/train/l0BP1lHpPW/l0BP1lHpPW_origin.pdf filter=lfs diff=lfs merge=lfs -text
6364
+ parse/train/HkMCybx0-/HkMCybx0-_span.pdf filter=lfs diff=lfs merge=lfs -text
6365
+ parse/train/HkMCybx0-/HkMCybx0-_layout.pdf filter=lfs diff=lfs merge=lfs -text
6366
+ parse/train/HkMCybx0-/HkMCybx0-_origin.pdf filter=lfs diff=lfs merge=lfs -text
6367
+ parse/train/HyxnZh0ct7/HyxnZh0ct7_origin.pdf filter=lfs diff=lfs merge=lfs -text
6368
+ parse/train/HyxnZh0ct7/HyxnZh0ct7_span.pdf filter=lfs diff=lfs merge=lfs -text
6369
+ parse/train/HyxnZh0ct7/HyxnZh0ct7_layout.pdf filter=lfs diff=lfs merge=lfs -text
6370
+ parse/train/ryup8-WCW/ryup8-WCW_origin.pdf filter=lfs diff=lfs merge=lfs -text
6371
+ parse/train/ryup8-WCW/ryup8-WCW_span.pdf filter=lfs diff=lfs merge=lfs -text
6372
+ parse/train/ryup8-WCW/ryup8-WCW_layout.pdf filter=lfs diff=lfs merge=lfs -text
6373
+ parse/train/ryHM_fbA-/ryHM_fbA-_origin.pdf filter=lfs diff=lfs merge=lfs -text
6374
+ parse/train/ryHM_fbA-/ryHM_fbA-_layout.pdf filter=lfs diff=lfs merge=lfs -text
6375
+ parse/train/ryHM_fbA-/ryHM_fbA-_span.pdf filter=lfs diff=lfs merge=lfs -text
6376
+ parse/train/H1T2hmZAb/H1T2hmZAb_origin.pdf filter=lfs diff=lfs merge=lfs -text
6377
+ parse/train/H1T2hmZAb/H1T2hmZAb_span.pdf filter=lfs diff=lfs merge=lfs -text
6378
+ parse/train/H1T2hmZAb/H1T2hmZAb_layout.pdf filter=lfs diff=lfs merge=lfs -text
6379
+ parse/train/iorEu783qJ5/iorEu783qJ5_span.pdf filter=lfs diff=lfs merge=lfs -text
6380
+ parse/train/iorEu783qJ5/iorEu783qJ5_origin.pdf filter=lfs diff=lfs merge=lfs -text
6381
+ parse/train/iorEu783qJ5/iorEu783qJ5_layout.pdf filter=lfs diff=lfs merge=lfs -text
6382
+ parse/train/TiwPYwg3IRf/TiwPYwg3IRf_layout.pdf filter=lfs diff=lfs merge=lfs -text
6383
+ parse/train/TiwPYwg3IRf/TiwPYwg3IRf_span.pdf filter=lfs diff=lfs merge=lfs -text
6384
+ parse/train/TiwPYwg3IRf/TiwPYwg3IRf_origin.pdf filter=lfs diff=lfs merge=lfs -text
6385
+ parse/train/HkehD3VtvS/HkehD3VtvS_origin.pdf filter=lfs diff=lfs merge=lfs -text
6386
+ parse/train/HkehD3VtvS/HkehD3VtvS_span.pdf filter=lfs diff=lfs merge=lfs -text
6387
+ parse/train/HkehD3VtvS/HkehD3VtvS_layout.pdf filter=lfs diff=lfs merge=lfs -text
6388
+ parse/train/r1gIa0NtDH/r1gIa0NtDH_layout.pdf filter=lfs diff=lfs merge=lfs -text
6389
+ parse/train/r1gIa0NtDH/r1gIa0NtDH_origin.pdf filter=lfs diff=lfs merge=lfs -text
6390
+ parse/train/r1gIa0NtDH/r1gIa0NtDH_span.pdf filter=lfs diff=lfs merge=lfs -text
6391
+ parse/train/ByedzkrKvH/ByedzkrKvH_origin.pdf filter=lfs diff=lfs merge=lfs -text
6392
+ parse/train/ByedzkrKvH/ByedzkrKvH_layout.pdf filter=lfs diff=lfs merge=lfs -text
6393
+ parse/train/ByedzkrKvH/ByedzkrKvH_span.pdf filter=lfs diff=lfs merge=lfs -text
6394
+ parse/train/rkxjnjA5KQ/rkxjnjA5KQ_origin.pdf filter=lfs diff=lfs merge=lfs -text
6395
+ parse/train/rkxjnjA5KQ/rkxjnjA5KQ_layout.pdf filter=lfs diff=lfs merge=lfs -text
6396
+ parse/train/rkxjnjA5KQ/rkxjnjA5KQ_span.pdf filter=lfs diff=lfs merge=lfs -text
6397
+ parse/train/rke3TJrtPS/rke3TJrtPS_span.pdf filter=lfs diff=lfs merge=lfs -text
6398
+ parse/train/rke3TJrtPS/rke3TJrtPS_layout.pdf filter=lfs diff=lfs merge=lfs -text
6399
+ parse/train/rke3TJrtPS/rke3TJrtPS_origin.pdf filter=lfs diff=lfs merge=lfs -text
6400
+ parse/train/S1xNEhR9KX/S1xNEhR9KX_layout.pdf filter=lfs diff=lfs merge=lfs -text
6401
+ parse/train/S1xNEhR9KX/S1xNEhR9KX_origin.pdf filter=lfs diff=lfs merge=lfs -text
6402
+ parse/train/S1xNEhR9KX/S1xNEhR9KX_span.pdf filter=lfs diff=lfs merge=lfs -text
6403
+ parse/train/rJehllrtDS/rJehllrtDS_span.pdf filter=lfs diff=lfs merge=lfs -text
6404
+ parse/train/rJehllrtDS/rJehllrtDS_origin.pdf filter=lfs diff=lfs merge=lfs -text
6405
+ parse/train/rJehllrtDS/rJehllrtDS_layout.pdf filter=lfs diff=lfs merge=lfs -text
6406
+ parse/train/rygvFyrKwH/rygvFyrKwH_origin.pdf filter=lfs diff=lfs merge=lfs -text
6407
+ parse/train/rygvFyrKwH/rygvFyrKwH_layout.pdf filter=lfs diff=lfs merge=lfs -text
6408
+ parse/train/rygvFyrKwH/rygvFyrKwH_span.pdf filter=lfs diff=lfs merge=lfs -text
6409
+ parse/train/eVuMspr9cu5/eVuMspr9cu5_layout.pdf filter=lfs diff=lfs merge=lfs -text
6410
+ parse/train/eVuMspr9cu5/eVuMspr9cu5_span.pdf filter=lfs diff=lfs merge=lfs -text
6411
+ parse/train/eVuMspr9cu5/eVuMspr9cu5_origin.pdf filter=lfs diff=lfs merge=lfs -text
6412
+ parse/train/rJY0-Kcll/rJY0-Kcll_origin.pdf filter=lfs diff=lfs merge=lfs -text
6413
+ parse/train/rJY0-Kcll/rJY0-Kcll_layout.pdf filter=lfs diff=lfs merge=lfs -text
6414
+ parse/train/rJY0-Kcll/rJY0-Kcll_span.pdf filter=lfs diff=lfs merge=lfs -text
6415
+ parse/train/H1x-x309tm/H1x-x309tm_span.pdf filter=lfs diff=lfs merge=lfs -text
6416
+ parse/train/H1x-x309tm/H1x-x309tm_layout.pdf filter=lfs diff=lfs merge=lfs -text
6417
+ parse/train/H1x-x309tm/H1x-x309tm_origin.pdf filter=lfs diff=lfs merge=lfs -text
6418
+ parse/train/rJxbJeHFPS/rJxbJeHFPS_origin.pdf filter=lfs diff=lfs merge=lfs -text
6419
+ parse/train/rJxbJeHFPS/rJxbJeHFPS_layout.pdf filter=lfs diff=lfs merge=lfs -text
6420
+ parse/train/rJxbJeHFPS/rJxbJeHFPS_span.pdf filter=lfs diff=lfs merge=lfs -text
6421
+ parse/train/1flmvXGGJaa/1flmvXGGJaa_origin.pdf filter=lfs diff=lfs merge=lfs -text
6422
+ parse/train/1flmvXGGJaa/1flmvXGGJaa_layout.pdf filter=lfs diff=lfs merge=lfs -text
6423
+ parse/train/1flmvXGGJaa/1flmvXGGJaa_span.pdf filter=lfs diff=lfs merge=lfs -text
6424
+ parse/train/S1evHerYPr/S1evHerYPr_origin.pdf filter=lfs diff=lfs merge=lfs -text
6425
+ parse/train/S1evHerYPr/S1evHerYPr_layout.pdf filter=lfs diff=lfs merge=lfs -text
6426
+ parse/train/S1evHerYPr/S1evHerYPr_span.pdf filter=lfs diff=lfs merge=lfs -text
6427
+ parse/train/SkxgnnNFvH/SkxgnnNFvH_span.pdf filter=lfs diff=lfs merge=lfs -text
6428
+ parse/train/SkxgnnNFvH/SkxgnnNFvH_origin.pdf filter=lfs diff=lfs merge=lfs -text
6429
+ parse/train/SkxgnnNFvH/SkxgnnNFvH_layout.pdf filter=lfs diff=lfs merge=lfs -text
6430
+ parse/train/Tt1s9Oi1kCS/Tt1s9Oi1kCS_origin.pdf filter=lfs diff=lfs merge=lfs -text
6431
+ parse/train/Tt1s9Oi1kCS/Tt1s9Oi1kCS_span.pdf filter=lfs diff=lfs merge=lfs -text
6432
+ parse/train/Tt1s9Oi1kCS/Tt1s9Oi1kCS_layout.pdf filter=lfs diff=lfs merge=lfs -text
6433
+ parse/train/rkxw-hAcFQ/rkxw-hAcFQ_origin.pdf filter=lfs diff=lfs merge=lfs -text
6434
+ parse/train/rkxw-hAcFQ/rkxw-hAcFQ_layout.pdf filter=lfs diff=lfs merge=lfs -text
6435
+ parse/train/rkxw-hAcFQ/rkxw-hAcFQ_span.pdf filter=lfs diff=lfs merge=lfs -text
parse/train/-b5OSCydOMe/-b5OSCydOMe_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7707120ff3cf9cf51fa18b8a24b0f7edc4bffbd7257b482e678b936d45d31045
3
+ size 628008
parse/train/-b5OSCydOMe/-b5OSCydOMe_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:178a7241082461381fb53aa3debb7f7196a123b5aeaafca7b33016ccf206eaf7
3
+ size 509912
parse/train/-b5OSCydOMe/-b5OSCydOMe_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d8638c43e6419c15f7a75197d5c16882715956b522137270ddcdf962cb5a24e
3
+ size 634905
parse/train/0HW7A5YZjq7/0HW7A5YZjq7_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:37c288c435c499c91c0e2eb8c299ac997dfaf2c2c4848e3d0cefba133cda5e2a
3
+ size 2789331
parse/train/0HW7A5YZjq7/0HW7A5YZjq7_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7dc8351a519102c56b0f2e976619de2ece8230aff4738d9acaaec27e55930078
3
+ size 2603204
parse/train/0HW7A5YZjq7/0HW7A5YZjq7_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cbc7d177efcc8acf9ea78f171e40e7572532057186652fec2f4368213721b3c3
3
+ size 2804924
parse/train/0lz69oI5iZP/0lz69oI5iZP.md ADDED
@@ -0,0 +1,241 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Per-Pixel Classification is Not All You Need for Semantic Segmentation
2
+
3
+ Bowen Cheng1,2∗ Alexander G. Schwing2 Alexander Kirillov1
4
+
5
+ 1Facebook AI Research (FAIR)
6
+
7
+ 2University of Illinois at Urbana-Champaign (UIUC)
8
+
9
+ # Abstract
10
+
11
+ Modern approaches typically formulate semantic segmentation as a per-pixel classification task, while instance-level segmentation is handled with an alternative mask classification. Our key insight: mask classification is sufficiently general to solve both semantic- and instance-level segmentation tasks in a unified manner using the exact same model, loss, and training procedure. Following this observation, we propose MaskFormer, a simple mask classification model which predicts a set of binary masks, each associated with a single global class label prediction. Overall, the proposed mask classification-based method simplifies the landscape of effective approaches to semantic and panoptic segmentation tasks and shows excellent empirical results. In particular, we observe that MaskFormer outperforms per-pixel classification baselines when the number of classes is large. Our mask classification-based method outperforms both current state-of-the-art semantic (55.6 mIoU on ADE20K) and panoptic segmentation (52.7 PQ on COCO) models.1
12
+
13
+ # 1 Introduction
14
+
15
+ The goal of semantic segmentation is to partition an image into regions with different semantic categories. Starting from Fully Convolutional Networks (FCNs) work of Long et al. [28], most deep learning-based semantic segmentation approaches formulate semantic segmentation as per-pixel classification (Figure 1 left), applying a classification loss to each output pixel [8, 46]. Per-pixel predictions in this formulation naturally partition an image into regions of different classes.
16
+
17
+ Mask classification is an alternative paradigm that disentangles the image partitioning and classification aspects of segmentation. Instead of classifying each pixel, mask classification-based methods predict a set of binary masks, each associated with a single class prediction (Figure 1 right). The more flexible mask classification dominates the field of instance-level segmentation. Both Mask R-CNN [19] and DETR [3] yield a single class prediction per segment for instance and panoptic segmentation. In contrast, per-pixel classification assumes a static number of outputs and cannot return a variable number of predicted regions/segments, which is required for instance-level tasks.
18
+
19
+ Our key observation: mask classification is sufficiently general to solve both semantic- and instancelevel segmentation tasks. In fact, before FCN [28], the best performing semantic segmentation methods like O2P [4] and SDS [18] used a mask classification formulation. Given this perspective, a natural question emerges: can a single mask classification model simplify the landscape of effective approaches to semantic- and instance-level segmentation tasks? And can such a mask classification model outperform existing per-pixel classification methods for semantic segmentation?
20
+
21
+ To address both questions we propose a simple MaskFormer approach that seamlessly converts any existing per-pixel classification model into a mask classification. Using the set prediction mechanism proposed in DETR [3], MaskFormer employs a Transformer decoder [37] to compute a set of pairs, each consisting of a class prediction and a mask embedding vector. The mask embedding vector is used to get the binary mask prediction via a dot product with the per-pixel embedding obtained from an underlying fully-convolutional network. The new model solves both semantic- and instance-level segmentation tasks in a unified manner: no changes to the model, losses, and training procedure are required. Specifically, for semantic and panoptic segmentation tasks alike, MaskFormer is supervised with the same per-pixel binary mask loss and a single classification loss per mask. Finally, we design a simple inference strategy to blend MaskFormer outputs into a task-dependent prediction format.
22
+
23
+ ![](images/6c865ff89e1ebcc297bb1742e7ca52ffcee661225a78ea093cb69da114208a3b.jpg)
24
+ Figure 1: Per-pixel classification vs. mask classification. (left) Semantic segmentation with perpixel classification applies the same classification loss to each location. (right) Mask classification predicts a set of binary masks and assigns a single class to each mask. Each prediction is supervised with a per-pixel binary mask loss and a classification loss. Matching between the set of predictions and ground truth segments can be done either via bipartite matching similarly to DETR [3] or by fixed matching via direct indexing if the number of predictions and classes match, i.e., if $N = K$ .
25
+
26
+ We evaluate MaskFormer on five semantic segmentation datasets with various numbers of categories: Cityscapes [13] (19 classes), Mapillary Vistas [31] (65 classes), ADE20K [49] (150 classes), COCOStuff-10K [2] (171 classes), and ADE20K-Full [49] (847 classes). While MaskFormer performs on par with per-pixel classification models for Cityscapes, which has a few diverse classes, the new model demonstrates superior performance for datasets with larger vocabulary. We hypothesize that a single class prediction per mask models fine-grained recognition better than per-pixel class predictions. MaskFormer achieves the new state-of-the-art on ADE20K $\mathbf { \left( 5 5 . 6 \ m I o U \right) }$ ) with Swin-Transformer [27] backbone, outperforming a per-pixel classification model [27] with the same backbone by 2.1 mIoU, while being more efficient ( $10 \%$ reduction in parameters and $40 \%$ reduction in FLOPs).
27
+
28
+ Finally, we study MaskFormer’s ability to solve instance-level tasks using two panoptic segmentation datasets: COCO [26, 22] and ADE20K [49]. MaskFormer outperforms a more complex DETR model [3] with the same backbone and the same post-processing. Moreover, MaskFormer achieves the new state-of-the-art on COCO (52.7 PQ), outperforming prior state-of-the-art [38] by 1.6 PQ. Our experiments highlight MaskFormer’s ability to unify instance- and semantic-level segmentation.
29
+
30
+ # 2 Related Works
31
+
32
+ Both per-pixel classification and mask classification have been extensively studied for semantic segmentation. In early work, Konishi and Yuille [23] apply per-pixel Bayesian classifiers based on local image statistics. Then, inspired by early works on non-semantic groupings [11, 33], mask classification-based methods became popular demonstrating the best performance in PASCAL VOC challenges [16]. Methods like O2P [4] and CFM [14] have achieved state-of-the-art results by classifying mask proposals [5, 36, 1]. In 2015, FCN [28] extended the idea of per-pixel classification to deep nets, significantly outperforming all prior methods on mIoU (a per-pixel evaluation metric which particularly suits the per-pixel classification formulation of segmentation).
33
+
34
+ Per-pixel classification became the dominant way for deep-net-based semantic segmentation since the seminal work of Fully Convolutional Networks (FCNs) [28]. Modern semantic segmentation models focus on aggregating long-range context in the final feature map: ASPP [6, 7] uses atrous convolutions with different atrous rates; PPM [46] uses pooling operators with different kernel sizes; DANet [17], OCNet [45], and CCNet [21] use different variants of non-local blocks [39]. Recently, SETR [47] and Segmenter [34] replace traditional convolutional backbones with Vision Transformers (ViT) [15] that capture long-range context starting from the very first layer. However, these concurrent Transformer-based [37] semantic segmentation approaches still use a per-pixel classification formulation. Note, that our MaskFormer module can convert any per-pixel classification model to the mask classification setting, allowing seamless adoption of advances in per-pixel classification.
35
+
36
+ Mask classification is commonly used for instance-level segmentation tasks [18, 22]. These tasks require a dynamic number of predictions, making application of per-pixel classification challenging as it assumes a static number of outputs. Omnipresent Mask R-CNN [19] uses a global classifier to classify mask proposals for instance segmentation. DETR [3] further incorporates a Transformer [37] design to handle thing and stuff segmentation simultaneously for panoptic segmentation [22]. However, these mask classification methods require predictions of bounding boxes, which may limit their usage in semantic segmentation. The recently proposed Max-DeepLab [38] removes the dependence on box predictions for panoptic segmentation with conditional convolutions [35, 40]. However, in addition to the main mask classification losses it requires multiple auxiliary losses (i.e., instance discrimination loss, mask-ID cross entropy loss, and the standard per-pixel classification loss).
37
+
38
+ # 3 From Per-Pixel to Mask Classification
39
+
40
+ In this section, we first describe how semantic segmentation can be formulated as either a per-pixel classification or a mask classification problem. Then, we introduce our instantiation of the mask classification model with the help of a Transformer decoder [37]. Finally, we describe simple inference strategies to transform mask classification outputs into task-dependent prediction formats.
41
+
42
+ # 3.1 Per-pixel classification formulation
43
+
44
+ For per-pixel classification, a segmentation model aims to predict the probability distribution over all possible K categories for every pixel of an H×W image: y = {pi|pi ∈ ∆K }H·Wi=1 . Here ∆K is the Kdimensional probability simplex. Training a per-pixel classification model is straight-forward: given ground truth category labels $y ^ { \mathrm { g t } } = \{ y _ { i } ^ { \mathrm { g t } } | y _ { i } ^ { \mathrm { g t } } \in \{ 1 , \dots , K \} \} _ { i = 1 } ^ { H \cdot W }$ for every pixel, a per-pixel crossentropy (negative log-likelihood) loss is usually applied, i.e., $\begin{array} { r } { \dot { \mathcal { L } } _ { \mathrm { p i x e l - c l s } } ( y , y ^ { \mathrm { g t } } ) = \sum _ { i = 1 } ^ { H \cdot W } - \log p _ { i } ( y _ { i } ^ { \mathrm { g t } } ) } \end{array}$ .
45
+
46
+ # 3.2 Mask classification formulation
47
+
48
+ Mask classification splits the segmentation task into 1) partitioning/grouping the image into $N$ regions $N$ does not need to equal $K$ ), represented with binary masks $\{ m _ { i } | \bar { m } _ { i } \in [ 0 , 1 ] ^ { \bar { H } \times W } \} _ { i = 1 } ^ { N }$ }Ni=1; and 2) associating each region as a whole with some distribution over $K$ categories. To jointly group and classify a segment, i.e., to perform mask classification, we define the desired output $z$ as a set of $N$ probability-mask pairs, i.e., $z = \{ ( p _ { i } , m _ { i } ) \} _ { i = 1 } ^ { N }$ . In contrast to per-pixel class probability prediction, for mask classification the probability distribution $p _ { i } \in \Delta ^ { K + 1 }$ contains an auxiliary “no object” label $( \emptyset )$ in addition to the $K$ category labels. The $\mathcal { D }$ label is predicted for masks that do not correspond to any of the $K$ categories. Note, mask classification allows multiple mask predictions with the same associated class, making it applicable to both semantic- and instance-level segmentation tasks.
49
+
50
+ To train a mask classification model, a matching $\sigma$ between the set of predictions $z$ and the set of $N ^ { \mathrm { g t } }$ ground truth segments zgt = {(cgti , mgti )|cgti ∈ {1, . . . , K }, mgti ∈ {0, 1}H×W }N gti=1 i s required.2 Here $c _ { i } ^ { \mathrm { g t } }$ is the ground truth class of the $i ^ { \mathrm { { t h } } }$ ground truth segment. Since the size of prediction set $| z | = N$ and ground truth set $| z ^ { \mathrm { g t } } | = N ^ { \mathrm { g t } }$ generally differ, we assume $N \geq N ^ { \mathrm { g t } }$ and pad the set of ground truth labels with “no object” tokens $\mathcal { D }$ to allow one-to-one matching.
51
+
52
+ For semantic segmentation, a trivial fixed matching is possible if the number of predictions $N$ matches the number of category labels $K$ . In this case, the $i ^ { \mathrm { { t h } } }$ prediction is matched to a ground truth region with class label $i$ and to $\mathcal { D }$ if a region with class label $i$ is not present in the ground truth. In our experiments, we found that a bipartite matching-based assignment demonstrates better results than the fixed matching. Unlike DETR [3] that uses bounding boxes to compute the assignment costs between prediction $z _ { i }$ and ground truth $z _ { j } ^ { \mathrm { g t } }$ for the matching problem, we directly use class and mask predictions, i.e., $- p _ { i } ( c _ { j } ^ { \mathrm { g t } } ) + \mathcal { L } _ { \mathrm { m a s k } } ( m _ { i } , m _ { j } ^ { \mathrm { g t } } )$ , where ${ \mathcal { L } } _ { \mathrm { m a s k } }$ is a binary mask loss.
53
+
54
+ To train model parameters, given a matching, the main mask classification loss $\mathcal { L } _ { \mathrm { m a s k - c l s } }$ is composed of a cross-entropy classification loss and a binary mask loss $\mathcal { L } _ { \mathrm { m a s k } }$ for each predicted segment:
55
+
56
+ $$
57
+ \begin{array} { r } { \mathcal { L } _ { \mathrm { m a s k - c l s } } ( z , z ^ { \mathsf { g t } } ) = \sum _ { j = 1 } ^ { N } \left[ - \log p _ { \sigma ( j ) } ( c _ { j } ^ { \mathsf { g t } } ) + \mathbb { 1 } _ { c _ { j } ^ { \mathsf { g t } } \neq \sigma } \mathcal { L } _ { \mathrm { m a s k } } ( m _ { \sigma ( j ) } , m _ { j } ^ { \mathsf { g t } } ) \right] . } \end{array}
58
+ $$
59
+
60
+ ![](images/80d5cbaf1d83eaec5aa6fc1a91131a3b51bc0a3d769578d338e903483120c65b.jpg)
61
+ Figure 2: MaskFormer overview. We use a backbone to extract image features $\mathcal { F }$ . A pixel decoder gradually upsamples image features to extract per-pixel embeddings $\mathcal { E } _ { \mathrm { p i x e l } }$ . A transformer decoder attends to image features and produces $N$ per-segment embeddings $\mathcal { Q }$ . The embeddings independently generate $N$ class predictions with $N$ corresponding mask embeddings ${ \mathcal { E } } _ { \mathrm { m a s k } }$ . Then, the model predicts $N$ possibly overlapping binary mask predictions via a dot product between pixel embeddings $\mathcal { E } _ { \mathrm { p i x e l } }$ and mask embeddings ${ \mathcal { E } } _ { \mathrm { m a s k } }$ followed by a sigmoid activation. For semantic segmentation task we can get the final prediction by combining $N$ binary masks with their class predictions using a simple matrix multiplication (see Section 3.4). Note, the dimensions for multiplication $\otimes$ are shown in gray.
62
+
63
+ Note, that most existing mask classification models use auxiliary losses (e.g., a bounding box loss [19, 3] or an instance discrimination loss [38]) in addition to $\mathcal { L } _ { \mathrm { m a s k - c l s } }$ . In the next section we present a simple mask classification model that allows end-to-end training with $\mathcal { L } _ { \mathrm { m a s k - c l s } }$ alone.
64
+
65
+ # 3.3 MaskFormer
66
+
67
+ We now introduce MaskFormer, the new mask classification model, which computes $N$ probabilitymask pairs $z = \{ ( p _ { i } , m _ { i } ) \} _ { i = 1 } ^ { N }$ . The model contains three modules (see Fig. 2): 1) a pixel-level module that extracts per-pixel embeddings used to generate binary mask predictions; 2) a transformer module, where a stack of Transformer decoder layers [37] computes $N$ per-segment embeddings; and 3) a segmentation module, which generates predictions $\{ ( p _ { i } , m _ { i } ) \} _ { i = 1 } ^ { N ^ { \ast } }$ from these embeddings. During inference, discussed in Sec. 3.4, $p _ { i }$ and $m _ { i }$ are assembled into the final prediction.
68
+
69
+ Pixel-level module takes an image of size $H \times W$ as input. A backbone generates a (typically) low-resolution image feature map $\mathcal { F } \in \mathbb { R } ^ { C _ { \mathcal { F } } \times \frac { H } { S } \times \frac { W } { S } }$ , where $C _ { \mathcal { F } }$ is the number of channels and $S$ is the stride of the feature map ( $C _ { \mathcal { F } }$ depends on the specific backbone and we use $S = 3 2$ in this work). Then, a pixel decoder gradually upsamples the features to generate per-pixel embeddings $\mathcal { E } _ { \mathrm { p i x e l } } \in \mathbb { R } ^ { C _ { \varepsilon } \times H \stackrel { \cdot } { \times } W }$ , where $C _ { \mathcal { E } }$ is the embedding dimension. Note, that any per-pixel classificationbased segmentation model fits the pixel-level module design including recent Transformer-based models [34, 47, 27]. MaskFormer seamlessly converts such a model to mask classification.
70
+
71
+ Transformer module uses the standard Transformer decoder [37] to compute from image features $\mathcal { F }$ and $N$ learnable positional embeddings (i.e., queries) its output, i.e., $N$ per-segment embeddings $\mathcal { Q } \in \mathbb { R } ^ { C _ { \mathcal { Q } } \times N }$ of dimension $C _ { \mathcal { Q } }$ that encode global information about each segment MaskFormer predicts. Similarly to [3], the decoder yields all predictions in parallel.
72
+
73
+ Segmentation module applies a linear classifier, followed by a softmax activation, on top of the per-segment embeddings Note, that the classifier p $\mathcal { Q }$ to yield class probability predictions dicts an additional “no object” categ $\{ p _ { i } \in \Delta ^ { K + 1 } \} _ { i = 1 } ^ { N }$ for each segment. embedding does $( \emptyset )$ not correspond to any region. For mask prediction, a Multi-Layer Perceptron (MLP) with 2 hidden layers converts the per-segment embeddings $\mathcal { Q }$ to $N$ mask embeddings $\bar { \mathcal { E } _ { \mathrm { m a s k } } } \in \mathbb { R } ^ { C \varepsilon \times N }$ of dimension $C _ { \mathcal { E } }$ . Finally, we obtain each binary mask prediction $m _ { i } \in [ 0 , 1 ] ^ { H \times \widecheck W }$ via a dot product between the $i ^ { \mathrm { { t h } } }$ mask embedding and per-pixel embeddings $\mathcal { E } _ { \mathrm { p i x e l } }$ computed by the pixel-level module. The dot product is followed by a sigmoid activation, i.e., $\begin{array} { r } { \dot { m } _ { i } [ h , w ] = \mathrm { s i g m o i d } ( \mathcal { E } _ { \mathrm { m a s k } } [ : , i ] ^ { \mathrm { T } } \cdot \mathcal { E } _ { \mathrm { p i x e l } } [ : , h , w ] ) } \end{array}$ .
74
+
75
+ Note, we empirically find it is beneficial to not enforce mask predictions to be mutually exclusive to each other by using a softmax activation. During training, the $\mathcal { L } _ { \mathrm { m a s k - c l s } }$ loss combines a cross entropy classification loss and a binary mask loss $\mathcal { L } _ { \mathrm { m a s k } }$ for each predicted segment. For simplicity we use the same $\mathcal { L } _ { \mathrm { m a s k } }$ as DETR [3], i.e., a linear combination of a focal loss [25] and a dice loss [30] multiplied by hyper-parameters $\lambda _ { \mathrm { f o c a l } }$ and $\lambda _ { \mathrm { d i c e } }$ respectively.
76
+
77
+ # 3.4 Mask-classification inference
78
+
79
+ First, we present a simple general inference procedure that converts mask classification outputs $\{ ( p _ { i } , m _ { i } ) \bar \} _ { i = 1 } ^ { N }$ to either panoptic or semantic segmentation output formats. Then, we describe a semantic inference procedure specifically designed for semantic segmentation. We note, that the specific choice of inference strategy largely depends on the evaluation metric rather than the task.
80
+
81
+ General inference partitions an image into segments by assigning each pixel $[ h , w ]$ to one of the $N$ predicted probability-mask pairs via arg $\mathrm { m a x } _ { i : c _ { i } \neq \emptyset } p _ { i } ( c _ { i } ) \cdot m _ { i } [ h , w ]$ . Here $c _ { i }$ is the most likely class label $c _ { i } = \arg \operatorname* { m a x } _ { c \in \{ 1 , \ldots , K , \infty \} } p _ { i } ( c )$ for each probability-mask pair $i$ . Intuitively, this procedure assigns a pixel at location $[ h , w ]$ to probability-mask pair $i$ only if both the most likely class probability $p _ { i } ( c _ { i } )$ and the mask prediction probability $m _ { i } [ h , w ]$ are high. Pixels assigned to the same probabilitymask pair $i$ form a segment where each pixel is labelled with $c _ { i }$ . For semantic segmentation, segments sharing the same category label are merged; whereas for instance-level segmentation tasks, the index $i$ of the probability-mask pair helps to distinguish different instances of the same class. Finally, to reduce false positive rates in panoptic segmentation we follow previous inference strategies [3, 22]. Specifically, we filter out low-confidence predictions prior to inference and remove predicted segments that have large parts of their binary masks $( m _ { i } > 0 . 5 )$ occluded by other predictions.
82
+
83
+ Semantic inference is designed specifically for semantic segmentation and is done via a simple matrix multiplication. We empirically find that marginalization over probability-mask pairs, i.e., arg $\begin{array} { r } { \operatorname* { m a x } _ { c \in \{ 1 , \ldots , K \} } \sum _ { i = 1 } ^ { N } p _ { i } ( c ) \cdot m _ { i } [ h , w ] } \end{array}$ , yields better results than the hard assignment of each pixel to a probability-mask pair $i$ used in the general inference strategy. The argmax does not include the “no object” category $( \emptyset )$ as standard semantic segmentation requires each output pixel to take a label. Note, this strategy returns a per-pixel class probability $\begin{array} { r } { \sum _ { i = 1 } ^ { N } p _ { i } ( c ) \cdot m _ { i } [ h , w ] } \end{array}$ . However, we observe that directly maximizing per-pixel class likelihood leads to poor performance. We hypothesize, that gradients are evenly distributed to every query, which complicates training.
84
+
85
+ # 4 Experiments
86
+
87
+ We demonstrate that MaskFormer seamlessly unifies semantic- and instance-level segmentation tasks by showing state-of-the-art results on both semantic segmentation and panoptic segmentation datasets. Then, we ablate the MaskFormer design confirming that observed improvements in semantic segmentation indeed stem from the shift from per-pixel classification to mask classification.
88
+
89
+ Datasets. We study MaskFormer using four widely used semantic segmentation datasets: ADE20K [49] (150 classes) from the SceneParse150 challenge [48], COCO-Stuff-10K [2] (171 classes), Cityscapes [13] (19 classes), and Mapillary Vistas [31] (65 classes). In addition, we use the ADE20K-Full [49] dataset annotated in an open vocabulary setting (we keep 874 classes that are present in both train and validation sets). For panotic segmenation evaluation we use COCO [26, 2, 22] (80 “things” and 53 “stuff” categories) and ADE20K-Panoptic [49, 22] (100 “things” and 50 “stuff” categories). Please see the appendix for detailed descriptions of all used datasets.
90
+
91
+ Evaluation metrics. For semantic segmentation the standard metric is mIoU (mean Intersection-overUnion) [16], a per-pixel metric that directly corresponds to the per-pixel classification formulation. To better illustrate the difference between segmentation approaches, in our ablations we supplement mIoU with $\mathbf { P Q } ^ { \mathbf { S t } }$ (PQ stuff) [22], a per-region metric that treats all classes as “stuff” and evaluates each segment equally, irrespective of its size. We report the median of 3 runs for all datasets, except for Cityscapes where we report the median of 5 runs. For panoptic segmentation, we use the standard PQ (panoptic quality) metric [22] and report single run results due to prohibitive training costs.
92
+
93
+ Baseline models. On the right we sketch the used per-pixel classification baselines. The PerPixelBaseline uses the pixel-level module of MaskFormer and directly outputs per-pixel class scores. For a fair comparison, we design PerPixelBaseline+ which adds the transformer module and mask em
94
+
95
+ ![](images/b57ad823f8fc97519af6d2b349e90c0278692fb8d303fd19f3e9b2c5cf677508.jpg)
96
+
97
+ bedding MLP to the PerPixelBaseline. Thus, PerPixelBaseline+ and MaskFormer differ only in the formulation: per-pixel vs. mask classification. Note that these baselines are for ablation and we compare MaskFormer with state-of-the-art per-pixel classification models as well.
98
+
99
+ # 4.1 Implementation details
100
+
101
+ Backbone. MaskFormer is compatible with any backbone architecture. In our work we use the standard convolution-based ResNet [20] backbones (R50 and R101 with 50 and 101 layers respectively) and recently proposed Transformer-based Swin-Transformer [27] backbones. In addition, we use the R101c model [6] which replaces the first $7 \times 7$ convolution layer of R101 with 3 consecutive $3 \times 3$ convolutions and which is popular in the semantic segmentation community [46, 7, 8, 21, 44, 10].
102
+
103
+ Pixel decoder. The pixel decoder in Figure 2 can be implemented using any semantic segmentation decoder (e.g., [8–10]). Many per-pixel classification methods use modules like ASPP [6] or PSP [46] to collect and distribute context across locations. The Transformer module attends to all image features, collecting global information to generate class predictions. This setup reduces the need of the per-pixel module for heavy context aggregation. Therefore, for MaskFormer, we design a light-weight pixel decoder based on the popular FPN [24] architecture.
104
+
105
+ Following FPN, we $2 \times$ upsample the low-resolution feature map in the decoder and sum it with the projected feature map of corresponding resolution from the backbone; Projection is done to match channel dimensions of the feature maps with a $1 \times 1$ convolution layer followed by GroupNorm (GN) [41]. Next, we fuse the summed features with an additional $3 \times 3$ convolution layer followed by GN and ReLU activation. We repeat this process starting with the stride 32 feature map until we obtain a final feature map of stride 4. Finally, we apply a single $1 \times 1$ convolution layer to get the per-pixel embeddings. All feature maps in the pixel decoder have a dimension of 256 channels.
106
+
107
+ Transformer decoder. We use the same Transformer decoder design as DETR [3]. The $N$ query embeddings are initialized as zero vectors, and we associate each query with a learnable positional encoding. We use 6 Transformer decoder layers with 100 queries by default, and, following DETR, we apply the same loss after each decoder. In our experiments we observe that MaskFormer is competitive for semantic segmentation with a single decoder layer too, whereas for instance-level segmentation multiple layers are necessary to remove duplicates from the final predictions.
108
+
109
+ Segmentation module. The multi-layer perceptron (MLP) in Figure 2 has 2 hidden layers of 256 channels to predict the mask embeddings $\mathcal { E } _ { \mathrm { m a s k } }$ , analogously to the box head in DETR. Both per-pixel $\mathcal { E } _ { \mathrm { p i x e l } }$ and mask ${ \mathcal { E } } _ { \mathrm { m a s k } }$ embeddings have 256 channels.
110
+
111
+ Loss weights. We use focal loss [25] and dice loss [30] for our mask loss: ${ \mathcal { L } } _ { \mathrm { m a s k } } ( m , m ^ { \mathrm { g t } } ) =$ $\lambda _ { \mathrm { f o c a l } } \mathcal { L } _ { \mathrm { f o c a l } } ( m , m ^ { \mathrm { g t } } ) + \lambda _ { \mathrm { d i c e } } \mathcal { L } _ { \mathrm { d i c e } } ( m , m ^ { \mathrm { g t } } )$ , and set the hyper-parameters to $\lambda _ { \mathrm { f o c a l } } = 2 0 . 0$ and $\lambda _ { \mathrm { d i c e } } =$ 1.0. Following DETR [3], the weight for the “no object” $( \emptyset )$ in the classification loss is set to 0.1.
112
+
113
+ # 4.2 Training settings
114
+
115
+ Semantic segmentation. We use Detectron2 [42] and follow the commonly used training settings for each dataset. More specifically, we use AdamW [29] and the poly [6] learning rate schedule with an initial learning rate of $1 0 ^ { - \bar { 4 } }$ and a weight decay of $1 0 ^ { - 4 }$ for ResNet [20] backbones, and an initial learning rate of $6 \cdot 1 0 ^ { - 5 }$ and a weight decay of $1 0 ^ { - 2 }$ for Swin-Transformer [27] backbones. Backbones are pre-trained on ImageNet-1K [32] if not stated otherwise. A learning rate multiplier of 0.1 is applied to CNN backbones and 1.0 is applied to Transformer backbones. The standard random scale jittering between 0.5 and 2.0, random horizontal flipping, random cropping as well as random color jittering are used as data augmentation [12]. For the ADE20K dataset, if not stated otherwise, we use a crop size of $5 1 2 \times 5 1 2$ , a batch size of 16 and train all models for $1 6 0 \mathrm { k }$ iterations. For the ADE20K-Full dataset, we use the same setting as ADE20K except that we train all models for $2 0 0 \mathrm { k }$ iterations. For the COCO-Stuff-10k dataset, we use a crop size of $6 4 0 \times 6 4 0$ , a batch size of 32 and train all models for $6 0 \mathrm { k }$ iterations. All models are trained with 8 V100 GPUs. We report both performance of single scale (s.s.) inference and multi-scale (m.s.) inference with horizontal flip and scales of 0.5, 0.75, 1.0, 1.25, 1.5, 1.75. See appendix for Cityscapes and Mapillary Vistas settings.
116
+
117
+ Panoptic segmentation. We follow exactly the same architecture, loss, and training procedure as we use for semantic segmentation. The only difference is supervision: i.e., category region masks in semantic segmentation vs. object instance masks in panoptic segmentation. We strictly follow the DETR [3] setting to train our model on the COCO panoptic segmentation dataset [22] for a fair comparison. On the ADE20K panoptic segmentation dataset, we follow the semantic segmentation setting but train for longer (720k iterations) and use a larger crop size $6 4 0 \times 6 4 0 )$ ). COCO models are trained using 64 V100 GPUs and ADE20K experiments are trained with 8 V100 GPUs. We use the general inference (Section 3.4) with the following parameters: we filter out masks with class confidence below 0.8 and set masks whose contribution to the final panoptic segmentation is less than $80 \%$ of its mask area to VOID. We report performance of single scale inference.
118
+
119
+ Table 1: Semantic segmentation on ADE20K val with 150 categories. Mask classification-based MaskFormer outperforms the best per-pixel classification approaches while using fewer parameters and less computation. We report both single-scale (s.s.) and multi-scale (m.s.) inference results with ±std. FLOPs are computed for the given crop size. Frames-per-second (fps) is measured on a V100 GPU with a batch size of 1.3 Backbones pre-trained on ImageNet-22K are marked with †.
120
+
121
+ <table><tr><td></td><td>method</td><td>backbone</td><td>crop size</td><td>mIoU (s.s.)</td><td>mloU (m.s.)</td><td>#params.</td><td>FLOPs</td><td>fps</td></tr><tr><td rowspan="5">GN egeess</td><td rowspan="2">OCRNet [44]</td><td>R101c</td><td>520×520</td><td>1</td><td>45.3</td><td>-</td><td>-</td><td>-</td></tr><tr><td>R50c</td><td>512×512</td><td>44.0</td><td>44.9</td><td>44M</td><td>177G</td><td>21.0</td></tr><tr><td rowspan="2">DeepLabV3+ [8]</td><td>R101c</td><td>512×512</td><td>45.5</td><td>46.4</td><td>63M</td><td>255G</td><td>14.2</td></tr><tr><td>R50</td><td>512×512</td><td>44.5 ±0.5</td><td>46.7 ±0.6</td><td>41M</td><td>53G</td><td>24.5</td></tr><tr><td rowspan="2">MaskFormer (ours)</td><td>R101</td><td>512 × 512</td><td>45.5 ±0.5</td><td>47.2 ±0.2</td><td>60M</td><td>73G</td><td>19.5</td></tr><tr><td>R101c</td><td>512 × 512</td><td>46.0 ±0.1</td><td>48.1 ±0.2</td><td>60M</td><td>80G</td><td>19.0</td></tr><tr><td rowspan="10">Trrirrrrrgrreloreors</td><td>SETR[47]</td><td>ViT-L</td><td>512×512</td><td>-</td><td>50.3</td><td>308M</td><td>-</td><td>-</td></tr><tr><td rowspan="4">Swin-UperNet [27,43]</td><td>Swin-T</td><td>512×512</td><td>1</td><td>46.1</td><td>60M</td><td>236G</td><td>18.5</td></tr><tr><td>Swin-S</td><td>512× 512</td><td>1</td><td>49.3</td><td>81M</td><td>259G</td><td>15.2</td></tr><tr><td>Swin-B</td><td>640 × 640</td><td>1</td><td>51.6</td><td>121M</td><td>471G</td><td>8.7</td></tr><tr><td>Swin-L</td><td>640× 640</td><td>-</td><td>53.5</td><td>234M</td><td>647G</td><td>6.2</td></tr><tr><td rowspan="5">MaskFormer (ours)</td><td>Swin-T</td><td>512×512</td><td>46.7 ±0.7</td><td>48.8 ±0.6</td><td>42M</td><td>55G</td><td>22.1</td></tr><tr><td>Swin-S</td><td>512× 512</td><td>49.8 ±0.4</td><td>51.0 ±0.4</td><td>63M</td><td>79G</td><td>19.6</td></tr><tr><td>Swin-B</td><td>640× 640</td><td>51.1 ±0.2</td><td>52.3 ±0.4</td><td>102M</td><td>195G</td><td>12.6</td></tr><tr><td>Swin-B</td><td>640×640</td><td>52.7 ±0.4</td><td>53.9 ±0.2</td><td>102M</td><td>195G</td><td>12.6</td></tr><tr><td>Swin-L†</td><td>640 × 640</td><td>54.1 ±0.2</td><td>55.6 ±0.1</td><td>212M</td><td>375G</td><td>7.9</td></tr></table>
122
+
123
+ Table 2: MaskFormer vs. per-pixel classification baselines on 4 semantic segmentation datasets. MaskFormer improvement is larger when the number of classes is larger. We use a ResNet-50 backbone and report single scale mIoU and $\mathrm { P Q } ^ { \mathrm { S t } }$ for ADE20K, COCO-Stuff and ADE20K-Full, whereas for higher-resolution Cityscapes we use a deeper ResNet-101 backbone following [7, 8].
124
+
125
+ <table><tr><td></td><td>Cityscapes (19 classes) mIoU</td><td>PQS</td><td>ADE20K(150 classes) mIoU</td><td>PQS</td><td>COCO-Stuff (171 classes) mIoU</td><td>PQSt</td><td>ADE20K-Full(847 classes) mIoU</td><td>PQSt</td></tr><tr><td>PerPixelBaseline</td><td>77.4</td><td>58.9</td><td>39.2</td><td>21.6</td><td>32.4</td><td>15.5</td><td>12.4</td><td>5.8</td></tr><tr><td>PerPixelBaseline+</td><td>78.5</td><td>60.2</td><td>41.9</td><td>28.3</td><td>34.2</td><td>24.6</td><td>13.9</td><td>9.0</td></tr><tr><td>MaskFormer(ours)</td><td>78.5(+0.0)</td><td>63.1 (+2.9)</td><td>44.5 (+2.6)</td><td>33.4 (+5.1)</td><td>37.1 (+2.9)</td><td>28.9 (+4.3)</td><td>17.4 (+3.5)</td><td>11.9 (+2.9)</td></tr></table>
126
+
127
+ # 4.3 Main results
128
+
129
+ Semantic segmentation. In Table 1, we compare MaskFormer with state-of-the-art per-pixel classification models for semantic segmentation on the ADE20K val set. With the same standard CNN backbones (e.g., ResNet [20]), MaskFormer outperforms DeepLab ${ \mathrm { V } } 3 +$ [8] by 1.7 mIoU. MaskFormer is also compatible with recent Vision Transformer [15] backbones (e.g., the Swin Transformer [27]), achieving a new state-of-the-art of $5 5 . 6 \mathrm { m I o U }$ , which is 2.1 mIoU better than the prior state-of-theart [27]. Observe that MaskFormer outperforms the best per-pixel classification-based models while having fewer parameters and faster inference time. This result suggests that the mask classification formulation has significant potential for semantic segmentation. See appendix for results on test set.
130
+
131
+ Beyond ADE20K, we further compare MaskFormer with our baselines on COCO-Stuff-10K, ADE20K-Full as well as Cityscapes in Table 2 and we refer to the appendix for comparison with state-of-the-art methods on these datasets. The improvement of MaskFormer over PerPixelBaseline $^ +$ is larger when the number of classes is larger: For Cityscapes, which has only 19 categories, MaskFormer performs similarly well as PerPixelBaseline $^ +$ ; While for ADE20K-Full, which has 847 classes, MaskFormer outperforms PerPixelBaseline $^ +$ by 3.5 mIoU.
132
+
133
+ Although MaskFormer shows no improvement in mIoU for Cityscapes, the $\mathrm { P Q } ^ { \mathrm { S t } }$ metric increases by $2 . 9 \mathrm { \bar { P Q } ^ { S t } }$ . We find MaskFormer performs better in terms of recognition quality $( \mathsf { R Q } ^ { \mathsf { S t } } )$ while lagging in per-pixel segmentation quality $( \mathrm { S Q } ^ { \mathrm { S t } } )$ (we refer to the appendix for detailed numbers). This observation suggests that on datasets where class recognition is relatively easy to solve, the main challenge for mask classification-based approaches is pixel-level accuracy (i.e., mask quality).
134
+
135
+ Table 3: Panoptic segmentation on COCO panoptic val with 133 categories. MaskFormer seamlessly unifies semantic- and instance-level segmentation without modifying the model architecture or loss. Our model, which achieves better results, can be regarded as a box-free simplification of DETR [3]. The major improvement comes from “stuff” classes $( \mathrm { P Q } ^ { \mathrm { S t } } )$ which are ambiguous to represent with bounding boxes. For MaskFormer (DETR) we use the exact same post-processing as DETR. Note, that in this setting MaskFormer performance is still better than DETR $( + 2 . 2 \ : \mathrm { P Q } )$ . Our model also outperforms recently proposed Max-DeepLab [38] without the need of sophisticated auxiliary losses, while being more efficient. FLOPs are computed as the average FLOPs over 100 validation images (COCO images have varying sizes). Frames-per-second (fps) is measured on a V100 GPU with a batch size of 1 by taking the average runtime on the entire val set including post-processing time. Backbones pre-trained on ImageNet-22K are marked with †.
136
+
137
+ <table><tr><td></td><td>method</td><td>backbone</td><td>PQ</td><td>PQTh</td><td>PQSt</td><td>SQ</td><td>RQ</td><td>#params.</td><td>FLOPs</td><td>fps</td></tr><tr><td></td><td>DETR [3]</td><td>R50+6Enc</td><td>43.4</td><td>48.2</td><td>36.3</td><td>79.3</td><td>53.8</td><td>-</td><td>-</td><td>-</td></tr><tr><td></td><td>MaskFormer (DETR)</td><td>R50 +6Enc</td><td>45.6</td><td>50.0 (+1.8)</td><td>39.0 (+2.7)</td><td>80.2</td><td>55.8</td><td>-</td><td>-</td><td>-</td></tr><tr><td></td><td>MaskFormer (ours)</td><td>R50 +6Enc</td><td>46.5</td><td>51.0 (+2.8)</td><td>39.8 (+3.5)</td><td>80.4</td><td>56.8</td><td>45M</td><td>181G</td><td>17.6</td></tr><tr><td>Ceee</td><td>DETR [3]</td><td>R101+6Enc</td><td>45.1</td><td>50.5</td><td>37.0</td><td>79.9</td><td>55.5</td><td>-</td><td>1</td><td>-</td></tr><tr><td></td><td>MaskFormer (ours)</td><td>R101 +6Enc</td><td>47.6</td><td>52.5 (+2.0)</td><td>40.3 (+3.3)</td><td>80.7</td><td>58.0</td><td>64M</td><td>248G</td><td>14.0</td></tr><tr><td></td><td>Max-DeepLab [38]</td><td>Max-S</td><td>48.4</td><td>53.0</td><td>41.5</td><td>-</td><td>·</td><td>62M</td><td>324G</td><td>7.6</td></tr><tr><td>rirrerigarrrseers</td><td></td><td>Max-L</td><td>51.1</td><td>57.0</td><td>42.2</td><td>-</td><td>1</td><td>451M</td><td>3692G</td><td>-</td></tr><tr><td></td><td></td><td>Swin-T</td><td>47.7</td><td>51.7</td><td>41.7</td><td>80.4</td><td>58.3</td><td>42M</td><td>179G</td><td>17.0</td></tr><tr><td></td><td></td><td>Swin-S</td><td>49.7</td><td>54.4</td><td>42.6</td><td>80.9</td><td>60.4</td><td>63M</td><td>259G</td><td>12.4</td></tr><tr><td></td><td>MaskFormer (ours)</td><td>Swin-B</td><td>51.1</td><td>56.3</td><td>43.2</td><td>81.4</td><td>61.8</td><td>102M</td><td>411G</td><td>8.4</td></tr><tr><td></td><td></td><td>Swin-B</td><td>51.8</td><td>56.9</td><td>44.1</td><td>81.4</td><td>62.6</td><td>102M</td><td>411G</td><td>8.4</td></tr><tr><td></td><td></td><td>Swin-L</td><td>52.7</td><td>58.5</td><td>44.0</td><td>81.8</td><td>63.5</td><td>212M</td><td>792G</td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>5.2</td></tr></table>
138
+
139
+ Panoptic segmentation. In Table 3, we compare the same exact MaskFormer model with DETR [3] on the COCO panoptic val set. To match the standard DETR design, we add 6 additional Transformer encoder layers after the CNN backbone. Unlike DETR, our model does not predict bounding boxes but instead predicts masks directly. MaskFormer achieves better results while being simpler than DETR. To disentangle the improvements from the model itself and our post-processing inference strategy we run our model following DETR post-processing (MaskFormer (DETR)) and observe that this setup outperforms DETR by 2.2 PQ. Overall, we observe a larger improvement in $\mathrm { P Q } ^ { \mathrm { S t } }$ compared to $\mathrm { P Q } ^ { \mathrm { T h } }$ . This suggests that detecting “stuff” with bounding boxes is suboptimal, and therefore, boxbased segmentation models (e.g., Mask R-CNN [19]) do not suit semantic segmentation. MaskFormer also outperforms recently proposed Max-DeepLab [38] without the need of special network design as well as sophisticated auxiliary losses (i.e., instance discrimination loss, mask-ID cross entropy loss, and per-pixel classification loss in [38]). MaskFormer, for the first time, unifies semantic- and instance-level segmentation with the exact same model, loss, and training pipeline.
140
+
141
+ We further evaluate our model on the panoptic segmentation version of the ADE20K dataset. Our model also achieves state-of-the-art performance. We refer to the appendix for detailed results.
142
+
143
+ # 4.4 Ablation studies
144
+
145
+ We perform a series of ablation studies of MaskFormer using a single ResNet-50 backbone [20].
146
+
147
+ Per-pixel vs. mask classification. In Table 4, we verify that the gains demonstrated by MaskFromer come from shifting the paradigm to mask classification. We start by comparing PerPixelBaseline+ and MaskFormer. The models are very similar and there are only 3 differences: 1) per-pixel vs. mask classification used by the models, 2) MaskFormer uses bipartite matching, and 3) the new model uses a combination of focal and dice losses as a mask loss, whereas PerPixelBaseline+ utilizes per-pixel cross entropy loss. First, we rule out the influence of loss differences by training PerPixelBaseline $^ +$ with exactly the same losses and observing no improvement. Next, in Table 4a, we compare PerPixelBaseline $^ +$ with MaskFormer trained using a fixed matching (MaskFormer-fixed), i.e., $N = K$ and assignment done based on category label indices identically to the per-pixel classification setup. We observe that MaskFormer-fixed is 1.8 mIoU better than the baseline, suggesting that shifting from per-pixel classification to mask classification is indeed the main reason for the gains of MaskFormer. In Table 4b, we further compare MaskFormer-fixed with MaskFormer trained with bipartite matching (MaskFormer-bipartite) and find bipartite matching is not only more flexible (allowing to predict less masks than the total number of categories) but also produces better results.
148
+
149
+ Table 4: Per-pixel vs. mask classification for semantic segmentation. All models use 150 queries for a fair comparison. We evaluate the models on ADE20K val with 150 categories. 4a: PerPixelBaseline $^ +$ and MaskFormer-fixed use similar fixed matching (i.e., matching by category index), this result confirms that the shift from per-pixel to mask classification is the key. 4b: bipartite matching is not only more flexible (can make less prediction than total class count) but also gives better results.
150
+
151
+ (a) Per-pixel vs. mask classification.
152
+
153
+ (b) Fixed vs. bipartite matching assignment.
154
+
155
+ <table><tr><td></td><td>mIoU</td><td>PQSt</td></tr><tr><td>PerPixelBaseline+</td><td>41.9</td><td>28.3</td></tr><tr><td>MaskFormer-fixed</td><td>43.7 (+1.8)</td><td>30.3 (+2.0)</td></tr></table>
156
+
157
+ <table><tr><td></td><td>mIoU</td><td>PQSt</td></tr><tr><td>MaskFormer-fixed</td><td>43.7</td><td>30.3</td></tr><tr><td>MaskFormer-bipartite (ours)</td><td>44.2 (+0.5)</td><td>33.4 (+3.1)</td></tr></table>
158
+
159
+ Number of queries. The table to the right shows results of MaskFormer trained with a varying number of queries on datasets with different number of categories. The model with 100 queries consistently performs the best across the studied datasets. This suggest we may not need to adjust the number of queries w.r.t. the number of categories or datasets much. Interestingly, even with 20 queries MaskFormer outperforms our per-pixel classification baseline.
160
+
161
+ <table><tr><td># of queries</td><td>ADE20K mIoU PQS</td><td>mIoU</td><td>COCO-Stuff PQS</td><td>ADE20K-Full mIoU</td><td>PQS</td></tr><tr><td>PerPixelBaseline+</td><td>41.9</td><td>28.3</td><td>34.2</td><td>24.6 13.9</td><td>9.0</td></tr><tr><td>20</td><td>42.9</td><td>32.6</td><td>35.0 27.6</td><td>14.1</td><td>10.8</td></tr><tr><td>50</td><td>43.9</td><td>32.7</td><td>35.5 27.9</td><td>15.4</td><td>11.1</td></tr><tr><td>100</td><td> 44.5</td><td>33.4</td><td> 37.1</td><td>28.9 16.0</td><td>11.9</td></tr><tr><td>150</td><td>44.2</td><td>33.4</td><td>37.0</td><td>28.9 15.5</td><td>11.5</td></tr><tr><td>300</td><td>43.5</td><td>32.3</td><td>36.1</td><td>29.1 14.2</td><td>10.3</td></tr><tr><td>1000</td><td>35.4</td><td>26.7</td><td>34.4</td><td>27.6</td><td>8.0 5.8</td></tr></table>
162
+
163
+ We further calculate the number of classes which are on average present in a training set image. We find these statistics to be similar across datasets despite the fact that the datasets have different number of total categories: 8.2 classes per image for ADE20K (150 classes), 6.6 classes per image for COCO-Stuff-10K (171 classes) and 9.1 classes per image for ADE20K-Full (847 classes). We hypothesize that each query is able to capture masks from multiple categories.
164
+
165
+ The figure to the right shows the number of unique categories predicted by each query (sorted in descending order) of our MaskFormer model on the validation sets of the corresponding datasets. Interestingly, the number of unique categories per query does not follow a uniform distribution: some queries capture more classes than others. We try to analyze how MaskFormer queries group categories, but we do not observe any obvious pattern: there are queries capturing categories with similar semantics or shapes (e.g., “house” and “building”), but there are also queries capturing completely different categories (e.g., “water” and “sofa”).
166
+
167
+ ![](images/ae89dfd9e70e3e0680496b42fc9d272c5369941d71040c6cb96f485bff205fd8.jpg)
168
+
169
+ Number of Transformer decoder layers. Interestingly, MaskFormer with even a single Transformer decoder layer already performs well for semantic segmentation and achieves better performance than our 6-layer-decoder PerPixelBaseline+. For panoptic segmentation, however, multiple decoder layers are required to achieve competitive performance. Please see the appendix for a detailed discussion.
170
+
171
+ # 5 Discussion
172
+
173
+ Our main goal is to show that mask classification is a general segmentation paradigm that could be a competitive alternative to per-pixel classification for semantic segmentation. To better understand its potential for segmentation tasks, we focus on exploring mask classification independently of other factors like architecture, loss design, or augmentation strategy. We pick the DETR [3] architecture as our baseline for its simplicity and deliberately make as few architectural changes as possible. Therefore, MaskFormer can be viewed as a “box-free” version of DETR.
174
+
175
+ Table 5: Matching with masks vs. boxes. We compare DETR [3] which uses box-based matching with two MaskFormer models trained with box- and mask-based matching respectively. To use box-based matching in MaskFormer we add to the model an additional box prediction head as in DETR. Note, that with box-based matching MaskFormer performs on par with DETR, whereas with mask-based matching it shows better results. The evaluation is done on COCO panoptic val set.
176
+
177
+ <table><tr><td>method</td><td>backbone</td><td>matching</td><td>PQ</td><td>PQTh</td><td>PQSt</td></tr><tr><td>DETR [3]</td><td>R50 +6Enc</td><td>by box</td><td>43.4</td><td>48.2</td><td>36.3</td></tr><tr><td rowspan="2">MaskFormer (ours)</td><td>R50 +6Enc</td><td>by box</td><td>43.7</td><td>49.2</td><td>35.3</td></tr><tr><td>R50+6Enc</td><td>by mask</td><td>46.5</td><td>51.0</td><td>39.8</td></tr></table>
178
+
179
+ In this section, we discuss in detail the differences between MaskFormer and DETR and show how these changes are required to ensure that mask classification performs well. First, to achieve a pure mask classification setting we remove the box prediction head and perform matching between prediction and ground truth segments with masks instead of boxes. Secondly, we replace the computeheavy per-query mask head used in DETR with a more efficient per-image FPN-based head to make end-to-end training without box supervision feasible.
180
+
181
+ Matching with masks is superior to matching with boxes. We compare MaskFormer models trained using matching with boxes or masks in Table 5. To do box-based matching, we add to MaskFormer an additional box prediction head as in DETR [3]. Observe that MaskFormer, which directly matches with mask predictions, has a clear advantage. We hypothesize that matching with boxes is more ambiguous than matching with masks, especially for stuff categories where completely different masks can have similar boxes as stuff regions often spread over a large area in an image.
182
+
183
+ MaskFormer mask head reduces computation. Results in Table 5 also show that MaskFormer performs on par with DETR when the same matching strategy is used. This suggests that the difference in mask head designs between the models does not significantly influence the prediction quality. The new head, however, has significantly lower computational and memory costs in comparison with the original mask head used in DETR. In MaskFormer, we first upsample image features to get highresolution per-pixel embeddings and directly generate binary mask predictions at a high-resolution. Note, that the per-pixel embeddings from the upsampling module (i.e., pixel decoder) are shared among all queries. In contrast, DETR first generates low-resolution attention maps and applies an independent upsampling module to each query. Thus, the mask head in DETR is $N$ times more computationally expensive than the mask head in MaskFormer (where $N$ is the number of queries).
184
+
185
+ # 6 Conclusion
186
+
187
+ The paradigm discrepancy between semantic- and instance-level segmentation results in entirely different models for each task, hindering development of image segmentation as a whole. We show that a simple mask classification model can outperform state-of-the-art per-pixel classification models, especially in the presence of large number of categories. Our model also remains competitive for panoptic segmentation, without a need to change model architecture, losses, or training procedure. We hope this unification spurs a joint effort across semantic- and instance-level segmentation tasks.
188
+
189
+ # Acknowledgments and Disclosure of Funding
190
+
191
+ We thank Ross Girshick for insightful comments and suggestions. Work of UIUC authors Bowen Cheng and Alexander G. Schwing was supported in part by NSF under Grant #1718221, 2008387, 2045586, 2106825, MRI #1725729, NIFA award 2020-67021-32799 and Cisco Systems Inc. (Gift Award CG 1377144 - thanks for access to Arcetri).
192
+
193
+ # References
194
+
195
+ [1] Pablo Arbeláez, Jordi Pont-Tuset, Jonathan T Barron, Ferran Marques, and Jitendra Malik. Multiscale combinatorial grouping. In CVPR, 2014. 2
196
+ [2] Holger Caesar, Jasper Uijlings, and Vittorio Ferrari. COCO-Stuff: Thing and stuff classes in context. In CVPR, 2018. 2, 5
197
+ [3] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In ECCV, 2020. 1, 2, 3, 4, 5, 6, 8, 9, 10 second-order pooling. In ECCV, 2012. 1, 2
198
+ [5] Joao Carreira and Cristian Sminchisescu. CPMC: Automatic object segmentation using constrained parametric min-cuts. PAMI, 2011. 2
199
+ [6] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. DeepLab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected CRFs. PAMI, 2018. 2, 6
200
+ [7] Liang-Chieh Chen, George Papandreou, Florian Schroff, and Hartwig Adam. Rethinking atrous convolution for semantic image segmentation. arXiv:1706.05587, 2017. 2, 6, 7 [8] Liang-Chieh Chen, Yukun Zhu, George Papandreou, Florian Schroff, and Hartwig Adam. Encoder-decoder with atrous separable convolution for semantic image segmentation. In ECCV, 2018. 1, 6, 7
201
+ [9] Bowen Cheng, Liang-Chieh Chen, Yunchao Wei, Yukun Zhu, Zilong Huang, Jinjun Xiong, Thomas S Huang, Wen-Mei Hwu, and Honghui Shi. SPGNet: Semantic prediction guidance for scene parsing. In ICCV, 2019.
202
+ [10] Bowen Cheng, Maxwell D Collins, Yukun Zhu, Ting Liu, Thomas S Huang, Hartwig Adam, and LiangChieh Chen. Panoptic-DeepLab: A simple, strong, and fast baseline for bottom-up panoptic segmentation. In CVPR, 2020. 6
203
+ [11] Dorin Comaniciu and Peter Meer. Robust Analysis of Feature Spaces: Color Image Segmentation. In CVPR, 1997. 2
204
+ [12] MMSegmentation Contributors. MMSegmentation: OpenMMLab semantic segmentation toolbox and benchmark. https://github.com/open-mmlab/mmsegmentation, 2020. 6, 7
205
+ [13] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The Cityscapes dataset for semantic urban scene understanding. In CVPR, 2016. 2, 5
206
+ [14] Jifeng Dai, Kaiming He, and Jian Sun. Convolutional feature masking for joint object and stuff segmentation. In CVPR, 2015. 2
207
+ [15] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2021. 2, 7
208
+ [16] Mark Everingham, SM Ali Eslami, Luc Van Gool, Christopher KI Williams, John Winn, and Andrew Zisserman. The PASCAL visual object classes challenge: A retrospective. IJCV, 2015. 2, 5
209
+ [17] Jun Fu, Jing Liu, Haijie Tian, Yong Li, Yongjun Bao, Zhiwei Fang, and Hanqing Lu. Dual attention network for scene segmentation. In CVPR, 2019. 2
210
+ [18] Bharath Hariharan, Pablo Arbeláez, Ross Girshick, and Jitendra Malik. Simultaneous detection and segmentation. In ECCV, 2014. 1, 3
211
+ [19] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask R-CNN. In ICCV, 2017. 1, 3, 4, 8
212
+ [20] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 6, 7, 8
213
+ [21] Zilong Huang, Xinggang Wang, Lichao Huang, Chang Huang, Yunchao Wei, and Wenyu Liu. CCNet: Criss-cross attention for semantic segmentation. In ICCV, 2019. 2, 6
214
+ [22] Alexander Kirillov, Kaiming He, Ross Girshick, Carsten Rother, and Piotr Dollár. Panoptic segmentation. In CVPR, 2019. 2, 3, 5, 6
215
+ [23] Scott Konishi and Alan Yuille. Statistical Cues for Domain Specific Image Segmentation with Performance Analysis. In CVPR, 2000. 2
216
+ [24] Tsung-Yi Lin, Piotr Dollár, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In CVPR, 2017. 6
217
+ [25] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollár. Focal loss for dense object detection. In ICCV, 2017. 4, 6
218
+ [26] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft COCO: Common objects in context. In ECCV, 2014. 2, 5
219
+ [27] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. arXiv:2103.14030, 2021. 2, 4, 6, 7
220
+ [28] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015. 1, 2
221
+ [29] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In ICLR, 2019. 6
222
+ [30] Fausto Milletari, Nassir Navab, and Seyed-Ahmad Ahmadi. V-Net: Fully convolutional neural networks for volumetric medical image segmentation. In 3DV, 2016. 4, 6
223
+ [31] Gerhard Neuhold, Tobias Ollmann, Samuel Rota Bulò, and Peter Kontschieder. The mapillary vistas dataset for semantic understanding of street scenes. In CVPR, 2017. 2, 5
224
+ [32] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. IJCV, 2015. 6
225
+ [33] Jianbo Shi and Jitendra Malik. Normalized Cuts and Image Segmentation. PAMI, 2000. 2
226
+ [34] Robin Strudel, Ricardo Garcia, Ivan Laptev, and Cordelia Schmid. Segmenter: Transformer for semantic segmentation. arXiv:2105.05633, 2021. 2, 4
227
+ [35] Zhi Tian, Chunhua Shen, and Hao Chen. Conditional convolutions for instance segmentation. In ECCV, 2020. 3
228
+ [36] Jasper RR Uijlings, Koen EA Van De Sande, Theo Gevers, and Arnold WM Smeulders. Selective search for object recognition. IJCV, 2013. 2
229
+ [37] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017. 1, 2, 3, 4
230
+ [38] Huiyu Wang, Yukun Zhu, Hartwig Adam, Alan Yuille, and Liang-Chieh Chen. MaX-DeepLab: End-to-end panoptic segmentation with mask transformers. In CVPR, 2021. 2, 3, 4, 8
231
+ [39] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In CVPR, 2018. 2
232
+ [40] Xinlong Wang, Rufeng Zhang, Tao Kong, Lei Li, and Chunhua Shen. SOLOv2: Dynamic and fast instance segmentation. NeurIPS, 2020. 3
233
+ [41] Yuxin Wu and Kaiming He. Group normalization. In ECCV, 2018. 6
234
+ [42] Yuxin Wu, Alexander Kirillov, Francisco Massa, Wan-Yen Lo, and Ross Girshick. Detectron2. https: //github.com/facebookresearch/detectron2, 2019. 6
235
+ [43] Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, and Jian Sun. Unified perceptual parsing for scene understanding. In ECCV, 2018. 7
236
+ [44] Yuhui Yuan, Xilin Chen, and Jingdong Wang. Object-contextual representations for semantic segmentation. In ECCV, 2020. 6, 7
237
+ [45] Yuhui Yuan, Lang Huang, Jianyuan Guo, Chao Zhang, Xilin Chen, and Jingdong Wang. OCNet: Object context for semantic segmentation. IJCV, 2021. 2
238
+ [46] Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, and Jiaya Jia. Pyramid scene parsing network. In CVPR, 2017. 1, 2, 6
239
+ [47] Sixiao Zheng, Jiachen Lu, Hengshuang Zhao, Xiatian Zhu, Zekun Luo, Yabiao Wang, Yanwei Fu, Jianfeng Feng, Tao Xiang, Philip HS Torr, et al. Rethinking semantic segmentation from a sequence-to-sequence perspective with transformers. In CVPR, 2021. 2, 4, 7
240
+ [48] Bolei Zhou, Hang Zhao, Xavier Puig, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Scene parsing challenge 2016. http://sceneparsing.csail.mit.edu/index_challenge.html, 2016. 5
241
+ [49] Bolei Zhou, Hang Zhao, Xavier Puig, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Scene parsing through ADE20K dataset. In CVPR, 2017. 2, 5
parse/train/0lz69oI5iZP/0lz69oI5iZP_content_list.json ADDED
@@ -0,0 +1,1150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Per-Pixel Classification is Not All You Need for Semantic Segmentation ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 236,
8
+ 122,
9
+ 759,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Bowen Cheng1,2∗ Alexander G. Schwing2 Alexander Kirillov1 ",
17
+ "bbox": [
18
+ 266,
19
+ 224,
20
+ 723,
21
+ 241
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "1Facebook AI Research (FAIR) ",
28
+ "bbox": [
29
+ 205,
30
+ 246,
31
+ 411,
32
+ 261
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "2University of Illinois at Urbana-Champaign (UIUC) ",
39
+ "bbox": [
40
+ 444,
41
+ 246,
42
+ 795,
43
+ 261
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "Abstract ",
50
+ "text_level": 1,
51
+ "bbox": [
52
+ 462,
53
+ 289,
54
+ 535,
55
+ 306
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "Modern approaches typically formulate semantic segmentation as a per-pixel classification task, while instance-level segmentation is handled with an alternative mask classification. Our key insight: mask classification is sufficiently general to solve both semantic- and instance-level segmentation tasks in a unified manner using the exact same model, loss, and training procedure. Following this observation, we propose MaskFormer, a simple mask classification model which predicts a set of binary masks, each associated with a single global class label prediction. Overall, the proposed mask classification-based method simplifies the landscape of effective approaches to semantic and panoptic segmentation tasks and shows excellent empirical results. In particular, we observe that MaskFormer outperforms per-pixel classification baselines when the number of classes is large. Our mask classification-based method outperforms both current state-of-the-art semantic (55.6 mIoU on ADE20K) and panoptic segmentation (52.7 PQ on COCO) models.1 ",
62
+ "bbox": [
63
+ 232,
64
+ 320,
65
+ 766,
66
+ 500
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "1 Introduction ",
73
+ "text_level": 1,
74
+ "bbox": [
75
+ 174,
76
+ 523,
77
+ 310,
78
+ 540
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "The goal of semantic segmentation is to partition an image into regions with different semantic categories. Starting from Fully Convolutional Networks (FCNs) work of Long et al. [28], most deep learning-based semantic segmentation approaches formulate semantic segmentation as per-pixel classification (Figure 1 left), applying a classification loss to each output pixel [8, 46]. Per-pixel predictions in this formulation naturally partition an image into regions of different classes. ",
85
+ "bbox": [
86
+ 174,
87
+ 554,
88
+ 825,
89
+ 625
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Mask classification is an alternative paradigm that disentangles the image partitioning and classification aspects of segmentation. Instead of classifying each pixel, mask classification-based methods predict a set of binary masks, each associated with a single class prediction (Figure 1 right). The more flexible mask classification dominates the field of instance-level segmentation. Both Mask R-CNN [19] and DETR [3] yield a single class prediction per segment for instance and panoptic segmentation. In contrast, per-pixel classification assumes a static number of outputs and cannot return a variable number of predicted regions/segments, which is required for instance-level tasks. ",
96
+ "bbox": [
97
+ 174,
98
+ 631,
99
+ 825,
100
+ 728
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Our key observation: mask classification is sufficiently general to solve both semantic- and instancelevel segmentation tasks. In fact, before FCN [28], the best performing semantic segmentation methods like O2P [4] and SDS [18] used a mask classification formulation. Given this perspective, a natural question emerges: can a single mask classification model simplify the landscape of effective approaches to semantic- and instance-level segmentation tasks? And can such a mask classification model outperform existing per-pixel classification methods for semantic segmentation? ",
107
+ "bbox": [
108
+ 174,
109
+ 733,
110
+ 825,
111
+ 818
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "To address both questions we propose a simple MaskFormer approach that seamlessly converts any existing per-pixel classification model into a mask classification. Using the set prediction mechanism proposed in DETR [3], MaskFormer employs a Transformer decoder [37] to compute a set of pairs, each consisting of a class prediction and a mask embedding vector. The mask embedding vector is used to get the binary mask prediction via a dot product with the per-pixel embedding obtained from an underlying fully-convolutional network. The new model solves both semantic- and instance-level segmentation tasks in a unified manner: no changes to the model, losses, and training procedure are required. Specifically, for semantic and panoptic segmentation tasks alike, MaskFormer is supervised with the same per-pixel binary mask loss and a single classification loss per mask. Finally, we design a simple inference strategy to blend MaskFormer outputs into a task-dependent prediction format. ",
118
+ "bbox": [
119
+ 176,
120
+ 823,
121
+ 825,
122
+ 866
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "image",
128
+ "img_path": "images/6c865ff89e1ebcc297bb1742e7ca52ffcee661225a78ea093cb69da114208a3b.jpg",
129
+ "image_caption": [
130
+ "Figure 1: Per-pixel classification vs. mask classification. (left) Semantic segmentation with perpixel classification applies the same classification loss to each location. (right) Mask classification predicts a set of binary masks and assigns a single class to each mask. Each prediction is supervised with a per-pixel binary mask loss and a classification loss. Matching between the set of predictions and ground truth segments can be done either via bipartite matching similarly to DETR [3] or by fixed matching via direct indexing if the number of predictions and classes match, i.e., if $N = K$ . "
131
+ ],
132
+ "image_footnote": [],
133
+ "bbox": [
134
+ 176,
135
+ 87,
136
+ 821,
137
+ 203
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "",
144
+ "bbox": [
145
+ 174,
146
+ 321,
147
+ 825,
148
+ 420
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "We evaluate MaskFormer on five semantic segmentation datasets with various numbers of categories: Cityscapes [13] (19 classes), Mapillary Vistas [31] (65 classes), ADE20K [49] (150 classes), COCOStuff-10K [2] (171 classes), and ADE20K-Full [49] (847 classes). While MaskFormer performs on par with per-pixel classification models for Cityscapes, which has a few diverse classes, the new model demonstrates superior performance for datasets with larger vocabulary. We hypothesize that a single class prediction per mask models fine-grained recognition better than per-pixel class predictions. MaskFormer achieves the new state-of-the-art on ADE20K $\\mathbf { \\left( 5 5 . 6 \\ m I o U \\right) }$ ) with Swin-Transformer [27] backbone, outperforming a per-pixel classification model [27] with the same backbone by 2.1 mIoU, while being more efficient ( $10 \\%$ reduction in parameters and $40 \\%$ reduction in FLOPs). ",
155
+ "bbox": [
156
+ 174,
157
+ 426,
158
+ 825,
159
+ 550
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "Finally, we study MaskFormer’s ability to solve instance-level tasks using two panoptic segmentation datasets: COCO [26, 22] and ADE20K [49]. MaskFormer outperforms a more complex DETR model [3] with the same backbone and the same post-processing. Moreover, MaskFormer achieves the new state-of-the-art on COCO (52.7 PQ), outperforming prior state-of-the-art [38] by 1.6 PQ. Our experiments highlight MaskFormer’s ability to unify instance- and semantic-level segmentation. ",
166
+ "bbox": [
167
+ 174,
168
+ 556,
169
+ 825,
170
+ 626
171
+ ],
172
+ "page_idx": 1
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "2 Related Works ",
177
+ "text_level": 1,
178
+ "bbox": [
179
+ 174,
180
+ 654,
181
+ 328,
182
+ 671
183
+ ],
184
+ "page_idx": 1
185
+ },
186
+ {
187
+ "type": "text",
188
+ "text": "Both per-pixel classification and mask classification have been extensively studied for semantic segmentation. In early work, Konishi and Yuille [23] apply per-pixel Bayesian classifiers based on local image statistics. Then, inspired by early works on non-semantic groupings [11, 33], mask classification-based methods became popular demonstrating the best performance in PASCAL VOC challenges [16]. Methods like O2P [4] and CFM [14] have achieved state-of-the-art results by classifying mask proposals [5, 36, 1]. In 2015, FCN [28] extended the idea of per-pixel classification to deep nets, significantly outperforming all prior methods on mIoU (a per-pixel evaluation metric which particularly suits the per-pixel classification formulation of segmentation). ",
189
+ "bbox": [
190
+ 174,
191
+ 683,
192
+ 825,
193
+ 794
194
+ ],
195
+ "page_idx": 1
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "Per-pixel classification became the dominant way for deep-net-based semantic segmentation since the seminal work of Fully Convolutional Networks (FCNs) [28]. Modern semantic segmentation models focus on aggregating long-range context in the final feature map: ASPP [6, 7] uses atrous convolutions with different atrous rates; PPM [46] uses pooling operators with different kernel sizes; DANet [17], OCNet [45], and CCNet [21] use different variants of non-local blocks [39]. Recently, SETR [47] and Segmenter [34] replace traditional convolutional backbones with Vision Transformers (ViT) [15] that capture long-range context starting from the very first layer. However, these concurrent Transformer-based [37] semantic segmentation approaches still use a per-pixel classification formulation. Note, that our MaskFormer module can convert any per-pixel classification model to the mask classification setting, allowing seamless adoption of advances in per-pixel classification. ",
200
+ "bbox": [
201
+ 174,
202
+ 800,
203
+ 825,
204
+ 911
205
+ ],
206
+ "page_idx": 1
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "",
211
+ "bbox": [
212
+ 173,
213
+ 90,
214
+ 823,
215
+ 119
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "text",
221
+ "text": "Mask classification is commonly used for instance-level segmentation tasks [18, 22]. These tasks require a dynamic number of predictions, making application of per-pixel classification challenging as it assumes a static number of outputs. Omnipresent Mask R-CNN [19] uses a global classifier to classify mask proposals for instance segmentation. DETR [3] further incorporates a Transformer [37] design to handle thing and stuff segmentation simultaneously for panoptic segmentation [22]. However, these mask classification methods require predictions of bounding boxes, which may limit their usage in semantic segmentation. The recently proposed Max-DeepLab [38] removes the dependence on box predictions for panoptic segmentation with conditional convolutions [35, 40]. However, in addition to the main mask classification losses it requires multiple auxiliary losses (i.e., instance discrimination loss, mask-ID cross entropy loss, and the standard per-pixel classification loss). ",
222
+ "bbox": [
223
+ 173,
224
+ 126,
225
+ 826,
226
+ 265
227
+ ],
228
+ "page_idx": 2
229
+ },
230
+ {
231
+ "type": "text",
232
+ "text": "3 From Per-Pixel to Mask Classification ",
233
+ "text_level": 1,
234
+ "bbox": [
235
+ 174,
236
+ 275,
237
+ 522,
238
+ 292
239
+ ],
240
+ "page_idx": 2
241
+ },
242
+ {
243
+ "type": "text",
244
+ "text": "In this section, we first describe how semantic segmentation can be formulated as either a per-pixel classification or a mask classification problem. Then, we introduce our instantiation of the mask classification model with the help of a Transformer decoder [37]. Finally, we describe simple inference strategies to transform mask classification outputs into task-dependent prediction formats. ",
245
+ "bbox": [
246
+ 173,
247
+ 299,
248
+ 825,
249
+ 354
250
+ ],
251
+ "page_idx": 2
252
+ },
253
+ {
254
+ "type": "text",
255
+ "text": "3.1 Per-pixel classification formulation ",
256
+ "text_level": 1,
257
+ "bbox": [
258
+ 176,
259
+ 366,
260
+ 455,
261
+ 381
262
+ ],
263
+ "page_idx": 2
264
+ },
265
+ {
266
+ "type": "text",
267
+ "text": "For per-pixel classification, a segmentation model aims to predict the probability distribution over all possible K categories for every pixel of an H×W image: y = {pi|pi ∈ ∆K }H·Wi=1 . Here ∆K is the Kdimensional probability simplex. Training a per-pixel classification model is straight-forward: given ground truth category labels $y ^ { \\mathrm { g t } } = \\{ y _ { i } ^ { \\mathrm { g t } } | y _ { i } ^ { \\mathrm { g t } } \\in \\{ 1 , \\dots , K \\} \\} _ { i = 1 } ^ { H \\cdot W }$ for every pixel, a per-pixel crossentropy (negative log-likelihood) loss is usually applied, i.e., $\\begin{array} { r } { \\dot { \\mathcal { L } } _ { \\mathrm { p i x e l - c l s } } ( y , y ^ { \\mathrm { g t } } ) = \\sum _ { i = 1 } ^ { H \\cdot W } - \\log p _ { i } ( y _ { i } ^ { \\mathrm { g t } } ) } \\end{array}$ . ",
268
+ "bbox": [
269
+ 174,
270
+ 387,
271
+ 826,
272
+ 463
273
+ ],
274
+ "page_idx": 2
275
+ },
276
+ {
277
+ "type": "text",
278
+ "text": "3.2 Mask classification formulation ",
279
+ "text_level": 1,
280
+ "bbox": [
281
+ 176,
282
+ 473,
283
+ 431,
284
+ 488
285
+ ],
286
+ "page_idx": 2
287
+ },
288
+ {
289
+ "type": "text",
290
+ "text": "Mask classification splits the segmentation task into 1) partitioning/grouping the image into $N$ regions $N$ does not need to equal $K$ ), represented with binary masks $\\{ m _ { i } | \\bar { m } _ { i } \\in [ 0 , 1 ] ^ { \\bar { H } \\times W } \\} _ { i = 1 } ^ { N }$ }Ni=1; and 2) associating each region as a whole with some distribution over $K$ categories. To jointly group and classify a segment, i.e., to perform mask classification, we define the desired output $z$ as a set of $N$ probability-mask pairs, i.e., $z = \\{ ( p _ { i } , m _ { i } ) \\} _ { i = 1 } ^ { N }$ . In contrast to per-pixel class probability prediction, for mask classification the probability distribution $p _ { i } \\in \\Delta ^ { K + 1 }$ contains an auxiliary “no object” label $( \\emptyset )$ in addition to the $K$ category labels. The $\\mathcal { D }$ label is predicted for masks that do not correspond to any of the $K$ categories. Note, mask classification allows multiple mask predictions with the same associated class, making it applicable to both semantic- and instance-level segmentation tasks. ",
291
+ "bbox": [
292
+ 173,
293
+ 496,
294
+ 825,
295
+ 622
296
+ ],
297
+ "page_idx": 2
298
+ },
299
+ {
300
+ "type": "text",
301
+ "text": "To train a mask classification model, a matching $\\sigma$ between the set of predictions $z$ and the set of $N ^ { \\mathrm { g t } }$ ground truth segments zgt = {(cgti , mgti )|cgti ∈ {1, . . . , K }, mgti ∈ {0, 1}H×W }N gti=1 i s required.2 Here $c _ { i } ^ { \\mathrm { g t } }$ is the ground truth class of the $i ^ { \\mathrm { { t h } } }$ ground truth segment. Since the size of prediction set $| z | = N$ and ground truth set $| z ^ { \\mathrm { g t } } | = N ^ { \\mathrm { g t } }$ generally differ, we assume $N \\geq N ^ { \\mathrm { g t } }$ and pad the set of ground truth labels with “no object” tokens $\\mathcal { D }$ to allow one-to-one matching. ",
302
+ "bbox": [
303
+ 174,
304
+ 627,
305
+ 825,
306
+ 702
307
+ ],
308
+ "page_idx": 2
309
+ },
310
+ {
311
+ "type": "text",
312
+ "text": "For semantic segmentation, a trivial fixed matching is possible if the number of predictions $N$ matches the number of category labels $K$ . In this case, the $i ^ { \\mathrm { { t h } } }$ prediction is matched to a ground truth region with class label $i$ and to $\\mathcal { D }$ if a region with class label $i$ is not present in the ground truth. In our experiments, we found that a bipartite matching-based assignment demonstrates better results than the fixed matching. Unlike DETR [3] that uses bounding boxes to compute the assignment costs between prediction $z _ { i }$ and ground truth $z _ { j } ^ { \\mathrm { g t } }$ for the matching problem, we directly use class and mask predictions, i.e., $- p _ { i } ( c _ { j } ^ { \\mathrm { g t } } ) + \\mathcal { L } _ { \\mathrm { m a s k } } ( m _ { i } , m _ { j } ^ { \\mathrm { g t } } )$ , where ${ \\mathcal { L } } _ { \\mathrm { m a s k } }$ is a binary mask loss. ",
313
+ "bbox": [
314
+ 173,
315
+ 708,
316
+ 825,
317
+ 814
318
+ ],
319
+ "page_idx": 2
320
+ },
321
+ {
322
+ "type": "text",
323
+ "text": "To train model parameters, given a matching, the main mask classification loss $\\mathcal { L } _ { \\mathrm { m a s k - c l s } }$ is composed of a cross-entropy classification loss and a binary mask loss $\\mathcal { L } _ { \\mathrm { m a s k } }$ for each predicted segment: ",
324
+ "bbox": [
325
+ 174,
326
+ 818,
327
+ 823,
328
+ 847
329
+ ],
330
+ "page_idx": 2
331
+ },
332
+ {
333
+ "type": "equation",
334
+ "img_path": "images/eba2ac1841e35a34475de92a35f48c8abec10d0f339482086803e788c26f4f34.jpg",
335
+ "text": "$$\n\\begin{array} { r } { \\mathcal { L } _ { \\mathrm { m a s k - c l s } } ( z , z ^ { \\mathsf { g t } } ) = \\sum _ { j = 1 } ^ { N } \\left[ - \\log p _ { \\sigma ( j ) } ( c _ { j } ^ { \\mathsf { g t } } ) + \\mathbb { 1 } _ { c _ { j } ^ { \\mathsf { g t } } \\neq \\sigma } \\mathcal { L } _ { \\mathrm { m a s k } } ( m _ { \\sigma ( j ) } , m _ { j } ^ { \\mathsf { g t } } ) \\right] . } \\end{array}\n$$",
336
+ "text_format": "latex",
337
+ "bbox": [
338
+ 258,
339
+ 848,
340
+ 740,
341
+ 877
342
+ ],
343
+ "page_idx": 2
344
+ },
345
+ {
346
+ "type": "image",
347
+ "img_path": "images/80d5cbaf1d83eaec5aa6fc1a91131a3b51bc0a3d769578d338e903483120c65b.jpg",
348
+ "image_caption": [
349
+ "Figure 2: MaskFormer overview. We use a backbone to extract image features $\\mathcal { F }$ . A pixel decoder gradually upsamples image features to extract per-pixel embeddings $\\mathcal { E } _ { \\mathrm { p i x e l } }$ . A transformer decoder attends to image features and produces $N$ per-segment embeddings $\\mathcal { Q }$ . The embeddings independently generate $N$ class predictions with $N$ corresponding mask embeddings ${ \\mathcal { E } } _ { \\mathrm { m a s k } }$ . Then, the model predicts $N$ possibly overlapping binary mask predictions via a dot product between pixel embeddings $\\mathcal { E } _ { \\mathrm { p i x e l } }$ and mask embeddings ${ \\mathcal { E } } _ { \\mathrm { m a s k } }$ followed by a sigmoid activation. For semantic segmentation task we can get the final prediction by combining $N$ binary masks with their class predictions using a simple matrix multiplication (see Section 3.4). Note, the dimensions for multiplication $\\otimes$ are shown in gray. "
350
+ ],
351
+ "image_footnote": [],
352
+ "bbox": [
353
+ 178,
354
+ 88,
355
+ 818,
356
+ 239
357
+ ],
358
+ "page_idx": 3
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "Note, that most existing mask classification models use auxiliary losses (e.g., a bounding box loss [19, 3] or an instance discrimination loss [38]) in addition to $\\mathcal { L } _ { \\mathrm { m a s k - c l s } }$ . In the next section we present a simple mask classification model that allows end-to-end training with $\\mathcal { L } _ { \\mathrm { m a s k - c l s } }$ alone. ",
363
+ "bbox": [
364
+ 174,
365
+ 387,
366
+ 825,
367
+ 429
368
+ ],
369
+ "page_idx": 3
370
+ },
371
+ {
372
+ "type": "text",
373
+ "text": "3.3 MaskFormer ",
374
+ "text_level": 1,
375
+ "bbox": [
376
+ 174,
377
+ 446,
378
+ 303,
379
+ 462
380
+ ],
381
+ "page_idx": 3
382
+ },
383
+ {
384
+ "type": "text",
385
+ "text": "We now introduce MaskFormer, the new mask classification model, which computes $N$ probabilitymask pairs $z = \\{ ( p _ { i } , m _ { i } ) \\} _ { i = 1 } ^ { N }$ . The model contains three modules (see Fig. 2): 1) a pixel-level module that extracts per-pixel embeddings used to generate binary mask predictions; 2) a transformer module, where a stack of Transformer decoder layers [37] computes $N$ per-segment embeddings; and 3) a segmentation module, which generates predictions $\\{ ( p _ { i } , m _ { i } ) \\} _ { i = 1 } ^ { N ^ { \\ast } }$ from these embeddings. During inference, discussed in Sec. 3.4, $p _ { i }$ and $m _ { i }$ are assembled into the final prediction. ",
386
+ "bbox": [
387
+ 174,
388
+ 469,
389
+ 826,
390
+ 554
391
+ ],
392
+ "page_idx": 3
393
+ },
394
+ {
395
+ "type": "text",
396
+ "text": "Pixel-level module takes an image of size $H \\times W$ as input. A backbone generates a (typically) low-resolution image feature map $\\mathcal { F } \\in \\mathbb { R } ^ { C _ { \\mathcal { F } } \\times \\frac { H } { S } \\times \\frac { W } { S } }$ , where $C _ { \\mathcal { F } }$ is the number of channels and $S$ is the stride of the feature map ( $C _ { \\mathcal { F } }$ depends on the specific backbone and we use $S = 3 2$ in this work). Then, a pixel decoder gradually upsamples the features to generate per-pixel embeddings $\\mathcal { E } _ { \\mathrm { p i x e l } } \\in \\mathbb { R } ^ { C _ { \\varepsilon } \\times H \\stackrel { \\cdot } { \\times } W }$ , where $C _ { \\mathcal { E } }$ is the embedding dimension. Note, that any per-pixel classificationbased segmentation model fits the pixel-level module design including recent Transformer-based models [34, 47, 27]. MaskFormer seamlessly converts such a model to mask classification. ",
397
+ "bbox": [
398
+ 174,
399
+ 559,
400
+ 825,
401
+ 659
402
+ ],
403
+ "page_idx": 3
404
+ },
405
+ {
406
+ "type": "text",
407
+ "text": "Transformer module uses the standard Transformer decoder [37] to compute from image features $\\mathcal { F }$ and $N$ learnable positional embeddings (i.e., queries) its output, i.e., $N$ per-segment embeddings $\\mathcal { Q } \\in \\mathbb { R } ^ { C _ { \\mathcal { Q } } \\times N }$ of dimension $C _ { \\mathcal { Q } }$ that encode global information about each segment MaskFormer predicts. Similarly to [3], the decoder yields all predictions in parallel. ",
408
+ "bbox": [
409
+ 174,
410
+ 665,
411
+ 825,
412
+ 722
413
+ ],
414
+ "page_idx": 3
415
+ },
416
+ {
417
+ "type": "text",
418
+ "text": "Segmentation module applies a linear classifier, followed by a softmax activation, on top of the per-segment embeddings Note, that the classifier p $\\mathcal { Q }$ to yield class probability predictions dicts an additional “no object” categ $\\{ p _ { i } \\in \\Delta ^ { K + 1 } \\} _ { i = 1 } ^ { N }$ for each segment. embedding does $( \\emptyset )$ not correspond to any region. For mask prediction, a Multi-Layer Perceptron (MLP) with 2 hidden layers converts the per-segment embeddings $\\mathcal { Q }$ to $N$ mask embeddings $\\bar { \\mathcal { E } _ { \\mathrm { m a s k } } } \\in \\mathbb { R } ^ { C \\varepsilon \\times N }$ of dimension $C _ { \\mathcal { E } }$ . Finally, we obtain each binary mask prediction $m _ { i } \\in [ 0 , 1 ] ^ { H \\times \\widecheck W }$ via a dot product between the $i ^ { \\mathrm { { t h } } }$ mask embedding and per-pixel embeddings $\\mathcal { E } _ { \\mathrm { p i x e l } }$ computed by the pixel-level module. The dot product is followed by a sigmoid activation, i.e., $\\begin{array} { r } { \\dot { m } _ { i } [ h , w ] = \\mathrm { s i g m o i d } ( \\mathcal { E } _ { \\mathrm { m a s k } } [ : , i ] ^ { \\mathrm { T } } \\cdot \\mathcal { E } _ { \\mathrm { p i x e l } } [ : , h , w ] ) } \\end{array}$ . ",
419
+ "bbox": [
420
+ 173,
421
+ 727,
422
+ 825,
423
+ 840
424
+ ],
425
+ "page_idx": 3
426
+ },
427
+ {
428
+ "type": "text",
429
+ "text": "Note, we empirically find it is beneficial to not enforce mask predictions to be mutually exclusive to each other by using a softmax activation. During training, the $\\mathcal { L } _ { \\mathrm { m a s k - c l s } }$ loss combines a cross entropy classification loss and a binary mask loss $\\mathcal { L } _ { \\mathrm { m a s k } }$ for each predicted segment. For simplicity we use the same $\\mathcal { L } _ { \\mathrm { m a s k } }$ as DETR [3], i.e., a linear combination of a focal loss [25] and a dice loss [30] multiplied by hyper-parameters $\\lambda _ { \\mathrm { f o c a l } }$ and $\\lambda _ { \\mathrm { d i c e } }$ respectively. ",
430
+ "bbox": [
431
+ 174,
432
+ 847,
433
+ 825,
434
+ 916
435
+ ],
436
+ "page_idx": 3
437
+ },
438
+ {
439
+ "type": "text",
440
+ "text": "3.4 Mask-classification inference ",
441
+ "text_level": 1,
442
+ "bbox": [
443
+ 174,
444
+ 92,
445
+ 413,
446
+ 106
447
+ ],
448
+ "page_idx": 4
449
+ },
450
+ {
451
+ "type": "text",
452
+ "text": "First, we present a simple general inference procedure that converts mask classification outputs $\\{ ( p _ { i } , m _ { i } ) \\bar \\} _ { i = 1 } ^ { N }$ to either panoptic or semantic segmentation output formats. Then, we describe a semantic inference procedure specifically designed for semantic segmentation. We note, that the specific choice of inference strategy largely depends on the evaluation metric rather than the task. ",
453
+ "bbox": [
454
+ 174,
455
+ 109,
456
+ 825,
457
+ 165
458
+ ],
459
+ "page_idx": 4
460
+ },
461
+ {
462
+ "type": "text",
463
+ "text": "General inference partitions an image into segments by assigning each pixel $[ h , w ]$ to one of the $N$ predicted probability-mask pairs via arg $\\mathrm { m a x } _ { i : c _ { i } \\neq \\emptyset } p _ { i } ( c _ { i } ) \\cdot m _ { i } [ h , w ]$ . Here $c _ { i }$ is the most likely class label $c _ { i } = \\arg \\operatorname* { m a x } _ { c \\in \\{ 1 , \\ldots , K , \\infty \\} } p _ { i } ( c )$ for each probability-mask pair $i$ . Intuitively, this procedure assigns a pixel at location $[ h , w ]$ to probability-mask pair $i$ only if both the most likely class probability $p _ { i } ( c _ { i } )$ and the mask prediction probability $m _ { i } [ h , w ]$ are high. Pixels assigned to the same probabilitymask pair $i$ form a segment where each pixel is labelled with $c _ { i }$ . For semantic segmentation, segments sharing the same category label are merged; whereas for instance-level segmentation tasks, the index $i$ of the probability-mask pair helps to distinguish different instances of the same class. Finally, to reduce false positive rates in panoptic segmentation we follow previous inference strategies [3, 22]. Specifically, we filter out low-confidence predictions prior to inference and remove predicted segments that have large parts of their binary masks $( m _ { i } > 0 . 5 )$ occluded by other predictions. ",
464
+ "bbox": [
465
+ 173,
466
+ 171,
467
+ 826,
468
+ 328
469
+ ],
470
+ "page_idx": 4
471
+ },
472
+ {
473
+ "type": "text",
474
+ "text": "Semantic inference is designed specifically for semantic segmentation and is done via a simple matrix multiplication. We empirically find that marginalization over probability-mask pairs, i.e., arg $\\begin{array} { r } { \\operatorname* { m a x } _ { c \\in \\{ 1 , \\ldots , K \\} } \\sum _ { i = 1 } ^ { N } p _ { i } ( c ) \\cdot m _ { i } [ h , w ] } \\end{array}$ , yields better results than the hard assignment of each pixel to a probability-mask pair $i$ used in the general inference strategy. The argmax does not include the “no object” category $( \\emptyset )$ as standard semantic segmentation requires each output pixel to take a label. Note, this strategy returns a per-pixel class probability $\\begin{array} { r } { \\sum _ { i = 1 } ^ { N } p _ { i } ( c ) \\cdot m _ { i } [ h , w ] } \\end{array}$ . However, we observe that directly maximizing per-pixel class likelihood leads to poor performance. We hypothesize, that gradients are evenly distributed to every query, which complicates training. ",
475
+ "bbox": [
476
+ 173,
477
+ 333,
478
+ 826,
479
+ 452
480
+ ],
481
+ "page_idx": 4
482
+ },
483
+ {
484
+ "type": "text",
485
+ "text": "4 Experiments ",
486
+ "text_level": 1,
487
+ "bbox": [
488
+ 174,
489
+ 463,
490
+ 312,
491
+ 479
492
+ ],
493
+ "page_idx": 4
494
+ },
495
+ {
496
+ "type": "text",
497
+ "text": "We demonstrate that MaskFormer seamlessly unifies semantic- and instance-level segmentation tasks by showing state-of-the-art results on both semantic segmentation and panoptic segmentation datasets. Then, we ablate the MaskFormer design confirming that observed improvements in semantic segmentation indeed stem from the shift from per-pixel classification to mask classification. ",
498
+ "bbox": [
499
+ 174,
500
+ 489,
501
+ 825,
502
+ 546
503
+ ],
504
+ "page_idx": 4
505
+ },
506
+ {
507
+ "type": "text",
508
+ "text": "Datasets. We study MaskFormer using four widely used semantic segmentation datasets: ADE20K [49] (150 classes) from the SceneParse150 challenge [48], COCO-Stuff-10K [2] (171 classes), Cityscapes [13] (19 classes), and Mapillary Vistas [31] (65 classes). In addition, we use the ADE20K-Full [49] dataset annotated in an open vocabulary setting (we keep 874 classes that are present in both train and validation sets). For panotic segmenation evaluation we use COCO [26, 2, 22] (80 “things” and 53 “stuff” categories) and ADE20K-Panoptic [49, 22] (100 “things” and 50 “stuff” categories). Please see the appendix for detailed descriptions of all used datasets. ",
509
+ "bbox": [
510
+ 173,
511
+ 551,
512
+ 825,
513
+ 650
514
+ ],
515
+ "page_idx": 4
516
+ },
517
+ {
518
+ "type": "text",
519
+ "text": "Evaluation metrics. For semantic segmentation the standard metric is mIoU (mean Intersection-overUnion) [16], a per-pixel metric that directly corresponds to the per-pixel classification formulation. To better illustrate the difference between segmentation approaches, in our ablations we supplement mIoU with $\\mathbf { P Q } ^ { \\mathbf { S t } }$ (PQ stuff) [22], a per-region metric that treats all classes as “stuff” and evaluates each segment equally, irrespective of its size. We report the median of 3 runs for all datasets, except for Cityscapes where we report the median of 5 runs. For panoptic segmentation, we use the standard PQ (panoptic quality) metric [22] and report single run results due to prohibitive training costs. ",
520
+ "bbox": [
521
+ 173,
522
+ 656,
523
+ 826,
524
+ 753
525
+ ],
526
+ "page_idx": 4
527
+ },
528
+ {
529
+ "type": "text",
530
+ "text": "Baseline models. On the right we sketch the used per-pixel classification baselines. The PerPixelBaseline uses the pixel-level module of MaskFormer and directly outputs per-pixel class scores. For a fair comparison, we design PerPixelBaseline+ which adds the transformer module and mask em",
531
+ "bbox": [
532
+ 173,
533
+ 758,
534
+ 419,
535
+ 869
536
+ ],
537
+ "page_idx": 4
538
+ },
539
+ {
540
+ "type": "image",
541
+ "img_path": "images/b57ad823f8fc97519af6d2b349e90c0278692fb8d303fd19f3e9b2c5cf677508.jpg",
542
+ "image_caption": [],
543
+ "image_footnote": [],
544
+ "bbox": [
545
+ 433,
546
+ 761,
547
+ 823,
548
+ 866
549
+ ],
550
+ "page_idx": 4
551
+ },
552
+ {
553
+ "type": "text",
554
+ "text": "bedding MLP to the PerPixelBaseline. Thus, PerPixelBaseline+ and MaskFormer differ only in the formulation: per-pixel vs. mask classification. Note that these baselines are for ablation and we compare MaskFormer with state-of-the-art per-pixel classification models as well. ",
555
+ "bbox": [
556
+ 179,
557
+ 869,
558
+ 825,
559
+ 911
560
+ ],
561
+ "page_idx": 4
562
+ },
563
+ {
564
+ "type": "text",
565
+ "text": "4.1 Implementation details ",
566
+ "text_level": 1,
567
+ "bbox": [
568
+ 176,
569
+ 92,
570
+ 372,
571
+ 106
572
+ ],
573
+ "page_idx": 5
574
+ },
575
+ {
576
+ "type": "text",
577
+ "text": "Backbone. MaskFormer is compatible with any backbone architecture. In our work we use the standard convolution-based ResNet [20] backbones (R50 and R101 with 50 and 101 layers respectively) and recently proposed Transformer-based Swin-Transformer [27] backbones. In addition, we use the R101c model [6] which replaces the first $7 \\times 7$ convolution layer of R101 with 3 consecutive $3 \\times 3$ convolutions and which is popular in the semantic segmentation community [46, 7, 8, 21, 44, 10]. ",
578
+ "bbox": [
579
+ 174,
580
+ 118,
581
+ 825,
582
+ 188
583
+ ],
584
+ "page_idx": 5
585
+ },
586
+ {
587
+ "type": "text",
588
+ "text": "Pixel decoder. The pixel decoder in Figure 2 can be implemented using any semantic segmentation decoder (e.g., [8–10]). Many per-pixel classification methods use modules like ASPP [6] or PSP [46] to collect and distribute context across locations. The Transformer module attends to all image features, collecting global information to generate class predictions. This setup reduces the need of the per-pixel module for heavy context aggregation. Therefore, for MaskFormer, we design a light-weight pixel decoder based on the popular FPN [24] architecture. ",
589
+ "bbox": [
590
+ 174,
591
+ 194,
592
+ 825,
593
+ 277
594
+ ],
595
+ "page_idx": 5
596
+ },
597
+ {
598
+ "type": "text",
599
+ "text": "Following FPN, we $2 \\times$ upsample the low-resolution feature map in the decoder and sum it with the projected feature map of corresponding resolution from the backbone; Projection is done to match channel dimensions of the feature maps with a $1 \\times 1$ convolution layer followed by GroupNorm (GN) [41]. Next, we fuse the summed features with an additional $3 \\times 3$ convolution layer followed by GN and ReLU activation. We repeat this process starting with the stride 32 feature map until we obtain a final feature map of stride 4. Finally, we apply a single $1 \\times 1$ convolution layer to get the per-pixel embeddings. All feature maps in the pixel decoder have a dimension of 256 channels. ",
600
+ "bbox": [
601
+ 174,
602
+ 284,
603
+ 825,
604
+ 381
605
+ ],
606
+ "page_idx": 5
607
+ },
608
+ {
609
+ "type": "text",
610
+ "text": "Transformer decoder. We use the same Transformer decoder design as DETR [3]. The $N$ query embeddings are initialized as zero vectors, and we associate each query with a learnable positional encoding. We use 6 Transformer decoder layers with 100 queries by default, and, following DETR, we apply the same loss after each decoder. In our experiments we observe that MaskFormer is competitive for semantic segmentation with a single decoder layer too, whereas for instance-level segmentation multiple layers are necessary to remove duplicates from the final predictions. ",
611
+ "bbox": [
612
+ 174,
613
+ 387,
614
+ 825,
615
+ 470
616
+ ],
617
+ "page_idx": 5
618
+ },
619
+ {
620
+ "type": "text",
621
+ "text": "Segmentation module. The multi-layer perceptron (MLP) in Figure 2 has 2 hidden layers of 256 channels to predict the mask embeddings $\\mathcal { E } _ { \\mathrm { m a s k } }$ , analogously to the box head in DETR. Both per-pixel $\\mathcal { E } _ { \\mathrm { p i x e l } }$ and mask ${ \\mathcal { E } } _ { \\mathrm { m a s k } }$ embeddings have 256 channels. ",
622
+ "bbox": [
623
+ 176,
624
+ 477,
625
+ 821,
626
+ 518
627
+ ],
628
+ "page_idx": 5
629
+ },
630
+ {
631
+ "type": "text",
632
+ "text": "Loss weights. We use focal loss [25] and dice loss [30] for our mask loss: ${ \\mathcal { L } } _ { \\mathrm { m a s k } } ( m , m ^ { \\mathrm { g t } } ) =$ $\\lambda _ { \\mathrm { f o c a l } } \\mathcal { L } _ { \\mathrm { f o c a l } } ( m , m ^ { \\mathrm { g t } } ) + \\lambda _ { \\mathrm { d i c e } } \\mathcal { L } _ { \\mathrm { d i c e } } ( m , m ^ { \\mathrm { g t } } )$ , and set the hyper-parameters to $\\lambda _ { \\mathrm { f o c a l } } = 2 0 . 0$ and $\\lambda _ { \\mathrm { d i c e } } =$ 1.0. Following DETR [3], the weight for the “no object” $( \\emptyset )$ in the classification loss is set to 0.1. ",
633
+ "bbox": [
634
+ 173,
635
+ 525,
636
+ 825,
637
+ 566
638
+ ],
639
+ "page_idx": 5
640
+ },
641
+ {
642
+ "type": "text",
643
+ "text": "4.2 Training settings ",
644
+ "text_level": 1,
645
+ "bbox": [
646
+ 174,
647
+ 587,
648
+ 330,
649
+ 602
650
+ ],
651
+ "page_idx": 5
652
+ },
653
+ {
654
+ "type": "text",
655
+ "text": "Semantic segmentation. We use Detectron2 [42] and follow the commonly used training settings for each dataset. More specifically, we use AdamW [29] and the poly [6] learning rate schedule with an initial learning rate of $1 0 ^ { - \\bar { 4 } }$ and a weight decay of $1 0 ^ { - 4 }$ for ResNet [20] backbones, and an initial learning rate of $6 \\cdot 1 0 ^ { - 5 }$ and a weight decay of $1 0 ^ { - 2 }$ for Swin-Transformer [27] backbones. Backbones are pre-trained on ImageNet-1K [32] if not stated otherwise. A learning rate multiplier of 0.1 is applied to CNN backbones and 1.0 is applied to Transformer backbones. The standard random scale jittering between 0.5 and 2.0, random horizontal flipping, random cropping as well as random color jittering are used as data augmentation [12]. For the ADE20K dataset, if not stated otherwise, we use a crop size of $5 1 2 \\times 5 1 2$ , a batch size of 16 and train all models for $1 6 0 \\mathrm { k }$ iterations. For the ADE20K-Full dataset, we use the same setting as ADE20K except that we train all models for $2 0 0 \\mathrm { k }$ iterations. For the COCO-Stuff-10k dataset, we use a crop size of $6 4 0 \\times 6 4 0$ , a batch size of 32 and train all models for $6 0 \\mathrm { k }$ iterations. All models are trained with 8 V100 GPUs. We report both performance of single scale (s.s.) inference and multi-scale (m.s.) inference with horizontal flip and scales of 0.5, 0.75, 1.0, 1.25, 1.5, 1.75. See appendix for Cityscapes and Mapillary Vistas settings. ",
656
+ "bbox": [
657
+ 173,
658
+ 614,
659
+ 825,
660
+ 808
661
+ ],
662
+ "page_idx": 5
663
+ },
664
+ {
665
+ "type": "text",
666
+ "text": "Panoptic segmentation. We follow exactly the same architecture, loss, and training procedure as we use for semantic segmentation. The only difference is supervision: i.e., category region masks in semantic segmentation vs. object instance masks in panoptic segmentation. We strictly follow the DETR [3] setting to train our model on the COCO panoptic segmentation dataset [22] for a fair comparison. On the ADE20K panoptic segmentation dataset, we follow the semantic segmentation setting but train for longer (720k iterations) and use a larger crop size $6 4 0 \\times 6 4 0 )$ ). COCO models are trained using 64 V100 GPUs and ADE20K experiments are trained with 8 V100 GPUs. We use the general inference (Section 3.4) with the following parameters: we filter out masks with class confidence below 0.8 and set masks whose contribution to the final panoptic segmentation is less than $80 \\%$ of its mask area to VOID. We report performance of single scale inference. ",
667
+ "bbox": [
668
+ 174,
669
+ 814,
670
+ 823,
671
+ 911
672
+ ],
673
+ "page_idx": 5
674
+ },
675
+ {
676
+ "type": "table",
677
+ "img_path": "images/174bccaa8505a067b442ea0dd0c60c559002705bb990065a45c5b35210a720b1.jpg",
678
+ "table_caption": [
679
+ "Table 1: Semantic segmentation on ADE20K val with 150 categories. Mask classification-based MaskFormer outperforms the best per-pixel classification approaches while using fewer parameters and less computation. We report both single-scale (s.s.) and multi-scale (m.s.) inference results with ±std. FLOPs are computed for the given crop size. Frames-per-second (fps) is measured on a V100 GPU with a batch size of 1.3 Backbones pre-trained on ImageNet-22K are marked with †. "
680
+ ],
681
+ "table_footnote": [],
682
+ "table_body": "<table><tr><td></td><td>method</td><td>backbone</td><td>crop size</td><td>mIoU (s.s.)</td><td>mloU (m.s.)</td><td>#params.</td><td>FLOPs</td><td>fps</td></tr><tr><td rowspan=\"5\">GN egeess</td><td rowspan=\"2\">OCRNet [44]</td><td>R101c</td><td>520×520</td><td>1</td><td>45.3</td><td>-</td><td>-</td><td>-</td></tr><tr><td>R50c</td><td>512×512</td><td>44.0</td><td>44.9</td><td>44M</td><td>177G</td><td>21.0</td></tr><tr><td rowspan=\"2\">DeepLabV3+ [8]</td><td>R101c</td><td>512×512</td><td>45.5</td><td>46.4</td><td>63M</td><td>255G</td><td>14.2</td></tr><tr><td>R50</td><td>512×512</td><td>44.5 ±0.5</td><td>46.7 ±0.6</td><td>41M</td><td>53G</td><td>24.5</td></tr><tr><td rowspan=\"2\">MaskFormer (ours)</td><td>R101</td><td>512 × 512</td><td>45.5 ±0.5</td><td>47.2 ±0.2</td><td>60M</td><td>73G</td><td>19.5</td></tr><tr><td>R101c</td><td>512 × 512</td><td>46.0 ±0.1</td><td>48.1 ±0.2</td><td>60M</td><td>80G</td><td>19.0</td></tr><tr><td rowspan=\"10\">Trrirrrrrgrreloreors</td><td>SETR[47]</td><td>ViT-L</td><td>512×512</td><td>-</td><td>50.3</td><td>308M</td><td>-</td><td>-</td></tr><tr><td rowspan=\"4\">Swin-UperNet [27,43]</td><td>Swin-T</td><td>512×512</td><td>1</td><td>46.1</td><td>60M</td><td>236G</td><td>18.5</td></tr><tr><td>Swin-S</td><td>512× 512</td><td>1</td><td>49.3</td><td>81M</td><td>259G</td><td>15.2</td></tr><tr><td>Swin-B</td><td>640 × 640</td><td>1</td><td>51.6</td><td>121M</td><td>471G</td><td>8.7</td></tr><tr><td>Swin-L</td><td>640× 640</td><td>-</td><td>53.5</td><td>234M</td><td>647G</td><td>6.2</td></tr><tr><td rowspan=\"5\">MaskFormer (ours)</td><td>Swin-T</td><td>512×512</td><td>46.7 ±0.7</td><td>48.8 ±0.6</td><td>42M</td><td>55G</td><td>22.1</td></tr><tr><td>Swin-S</td><td>512× 512</td><td>49.8 ±0.4</td><td>51.0 ±0.4</td><td>63M</td><td>79G</td><td>19.6</td></tr><tr><td>Swin-B</td><td>640× 640</td><td>51.1 ±0.2</td><td>52.3 ±0.4</td><td>102M</td><td>195G</td><td>12.6</td></tr><tr><td>Swin-B</td><td>640×640</td><td>52.7 ±0.4</td><td>53.9 ±0.2</td><td>102M</td><td>195G</td><td>12.6</td></tr><tr><td>Swin-L†</td><td>640 × 640</td><td>54.1 ±0.2</td><td>55.6 ±0.1</td><td>212M</td><td>375G</td><td>7.9</td></tr></table>",
683
+ "bbox": [
684
+ 184,
685
+ 170,
686
+ 812,
687
+ 382
688
+ ],
689
+ "page_idx": 6
690
+ },
691
+ {
692
+ "type": "table",
693
+ "img_path": "images/730498b062293d8f3037ac0e3381910d3d23eda32f6d04173f2bc62dac34b3a3.jpg",
694
+ "table_caption": [
695
+ "Table 2: MaskFormer vs. per-pixel classification baselines on 4 semantic segmentation datasets. MaskFormer improvement is larger when the number of classes is larger. We use a ResNet-50 backbone and report single scale mIoU and $\\mathrm { P Q } ^ { \\mathrm { S t } }$ for ADE20K, COCO-Stuff and ADE20K-Full, whereas for higher-resolution Cityscapes we use a deeper ResNet-101 backbone following [7, 8]. "
696
+ ],
697
+ "table_footnote": [],
698
+ "table_body": "<table><tr><td></td><td>Cityscapes (19 classes) mIoU</td><td>PQS</td><td>ADE20K(150 classes) mIoU</td><td>PQS</td><td>COCO-Stuff (171 classes) mIoU</td><td>PQSt</td><td>ADE20K-Full(847 classes) mIoU</td><td>PQSt</td></tr><tr><td>PerPixelBaseline</td><td>77.4</td><td>58.9</td><td>39.2</td><td>21.6</td><td>32.4</td><td>15.5</td><td>12.4</td><td>5.8</td></tr><tr><td>PerPixelBaseline+</td><td>78.5</td><td>60.2</td><td>41.9</td><td>28.3</td><td>34.2</td><td>24.6</td><td>13.9</td><td>9.0</td></tr><tr><td>MaskFormer(ours)</td><td>78.5(+0.0)</td><td>63.1 (+2.9)</td><td>44.5 (+2.6)</td><td>33.4 (+5.1)</td><td>37.1 (+2.9)</td><td>28.9 (+4.3)</td><td>17.4 (+3.5)</td><td>11.9 (+2.9)</td></tr></table>",
699
+ "bbox": [
700
+ 174,
701
+ 446,
702
+ 825,
703
+ 507
704
+ ],
705
+ "page_idx": 6
706
+ },
707
+ {
708
+ "type": "text",
709
+ "text": "",
710
+ "bbox": [
711
+ 173,
712
+ 522,
713
+ 825,
714
+ 564
715
+ ],
716
+ "page_idx": 6
717
+ },
718
+ {
719
+ "type": "text",
720
+ "text": "4.3 Main results ",
721
+ "text_level": 1,
722
+ "bbox": [
723
+ 174,
724
+ 577,
725
+ 300,
726
+ 592
727
+ ],
728
+ "page_idx": 6
729
+ },
730
+ {
731
+ "type": "text",
732
+ "text": "Semantic segmentation. In Table 1, we compare MaskFormer with state-of-the-art per-pixel classification models for semantic segmentation on the ADE20K val set. With the same standard CNN backbones (e.g., ResNet [20]), MaskFormer outperforms DeepLab ${ \\mathrm { V } } 3 +$ [8] by 1.7 mIoU. MaskFormer is also compatible with recent Vision Transformer [15] backbones (e.g., the Swin Transformer [27]), achieving a new state-of-the-art of $5 5 . 6 \\mathrm { m I o U }$ , which is 2.1 mIoU better than the prior state-of-theart [27]. Observe that MaskFormer outperforms the best per-pixel classification-based models while having fewer parameters and faster inference time. This result suggests that the mask classification formulation has significant potential for semantic segmentation. See appendix for results on test set. ",
733
+ "bbox": [
734
+ 174,
735
+ 598,
736
+ 826,
737
+ 710
738
+ ],
739
+ "page_idx": 6
740
+ },
741
+ {
742
+ "type": "text",
743
+ "text": "Beyond ADE20K, we further compare MaskFormer with our baselines on COCO-Stuff-10K, ADE20K-Full as well as Cityscapes in Table 2 and we refer to the appendix for comparison with state-of-the-art methods on these datasets. The improvement of MaskFormer over PerPixelBaseline $^ +$ is larger when the number of classes is larger: For Cityscapes, which has only 19 categories, MaskFormer performs similarly well as PerPixelBaseline $^ +$ ; While for ADE20K-Full, which has 847 classes, MaskFormer outperforms PerPixelBaseline $^ +$ by 3.5 mIoU. ",
744
+ "bbox": [
745
+ 173,
746
+ 715,
747
+ 826,
748
+ 799
749
+ ],
750
+ "page_idx": 6
751
+ },
752
+ {
753
+ "type": "text",
754
+ "text": "Although MaskFormer shows no improvement in mIoU for Cityscapes, the $\\mathrm { P Q } ^ { \\mathrm { S t } }$ metric increases by $2 . 9 \\mathrm { \\bar { P Q } ^ { S t } }$ . We find MaskFormer performs better in terms of recognition quality $( \\mathsf { R Q } ^ { \\mathsf { S t } } )$ while lagging in per-pixel segmentation quality $( \\mathrm { S Q } ^ { \\mathrm { S t } } )$ (we refer to the appendix for detailed numbers). This observation suggests that on datasets where class recognition is relatively easy to solve, the main challenge for mask classification-based approaches is pixel-level accuracy (i.e., mask quality). ",
755
+ "bbox": [
756
+ 173,
757
+ 805,
758
+ 825,
759
+ 876
760
+ ],
761
+ "page_idx": 6
762
+ },
763
+ {
764
+ "type": "text",
765
+ "text": "Table 3: Panoptic segmentation on COCO panoptic val with 133 categories. MaskFormer seamlessly unifies semantic- and instance-level segmentation without modifying the model architecture or loss. Our model, which achieves better results, can be regarded as a box-free simplification of DETR [3]. The major improvement comes from “stuff” classes $( \\mathrm { P Q } ^ { \\mathrm { S t } } )$ which are ambiguous to represent with bounding boxes. For MaskFormer (DETR) we use the exact same post-processing as DETR. Note, that in this setting MaskFormer performance is still better than DETR $( + 2 . 2 \\ : \\mathrm { P Q } )$ . Our model also outperforms recently proposed Max-DeepLab [38] without the need of sophisticated auxiliary losses, while being more efficient. FLOPs are computed as the average FLOPs over 100 validation images (COCO images have varying sizes). Frames-per-second (fps) is measured on a V100 GPU with a batch size of 1 by taking the average runtime on the entire val set including post-processing time. Backbones pre-trained on ImageNet-22K are marked with †. ",
766
+ "bbox": [
767
+ 173,
768
+ 97,
769
+ 825,
770
+ 250
771
+ ],
772
+ "page_idx": 7
773
+ },
774
+ {
775
+ "type": "table",
776
+ "img_path": "images/6e7db6f4718dfab5ac8852ebd6bd0bf33faf11664099d470869774f22066b597.jpg",
777
+ "table_caption": [],
778
+ "table_footnote": [],
779
+ "table_body": "<table><tr><td></td><td>method</td><td>backbone</td><td>PQ</td><td>PQTh</td><td>PQSt</td><td>SQ</td><td>RQ</td><td>#params.</td><td>FLOPs</td><td>fps</td></tr><tr><td></td><td>DETR [3]</td><td>R50+6Enc</td><td>43.4</td><td>48.2</td><td>36.3</td><td>79.3</td><td>53.8</td><td>-</td><td>-</td><td>-</td></tr><tr><td></td><td>MaskFormer (DETR)</td><td>R50 +6Enc</td><td>45.6</td><td>50.0 (+1.8)</td><td>39.0 (+2.7)</td><td>80.2</td><td>55.8</td><td>-</td><td>-</td><td>-</td></tr><tr><td></td><td>MaskFormer (ours)</td><td>R50 +6Enc</td><td>46.5</td><td>51.0 (+2.8)</td><td>39.8 (+3.5)</td><td>80.4</td><td>56.8</td><td>45M</td><td>181G</td><td>17.6</td></tr><tr><td>Ceee</td><td>DETR [3]</td><td>R101+6Enc</td><td>45.1</td><td>50.5</td><td>37.0</td><td>79.9</td><td>55.5</td><td>-</td><td>1</td><td>-</td></tr><tr><td></td><td>MaskFormer (ours)</td><td>R101 +6Enc</td><td>47.6</td><td>52.5 (+2.0)</td><td>40.3 (+3.3)</td><td>80.7</td><td>58.0</td><td>64M</td><td>248G</td><td>14.0</td></tr><tr><td></td><td>Max-DeepLab [38]</td><td>Max-S</td><td>48.4</td><td>53.0</td><td>41.5</td><td>-</td><td>·</td><td>62M</td><td>324G</td><td>7.6</td></tr><tr><td>rirrerigarrrseers</td><td></td><td>Max-L</td><td>51.1</td><td>57.0</td><td>42.2</td><td>-</td><td>1</td><td>451M</td><td>3692G</td><td>-</td></tr><tr><td></td><td></td><td>Swin-T</td><td>47.7</td><td>51.7</td><td>41.7</td><td>80.4</td><td>58.3</td><td>42M</td><td>179G</td><td>17.0</td></tr><tr><td></td><td></td><td>Swin-S</td><td>49.7</td><td>54.4</td><td>42.6</td><td>80.9</td><td>60.4</td><td>63M</td><td>259G</td><td>12.4</td></tr><tr><td></td><td>MaskFormer (ours)</td><td>Swin-B</td><td>51.1</td><td>56.3</td><td>43.2</td><td>81.4</td><td>61.8</td><td>102M</td><td>411G</td><td>8.4</td></tr><tr><td></td><td></td><td>Swin-B</td><td>51.8</td><td>56.9</td><td>44.1</td><td>81.4</td><td>62.6</td><td>102M</td><td>411G</td><td>8.4</td></tr><tr><td></td><td></td><td>Swin-L</td><td>52.7</td><td>58.5</td><td>44.0</td><td>81.8</td><td>63.5</td><td>212M</td><td>792G</td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>5.2</td></tr></table>",
780
+ "bbox": [
781
+ 176,
782
+ 252,
783
+ 823,
784
+ 417
785
+ ],
786
+ "page_idx": 7
787
+ },
788
+ {
789
+ "type": "text",
790
+ "text": "Panoptic segmentation. In Table 3, we compare the same exact MaskFormer model with DETR [3] on the COCO panoptic val set. To match the standard DETR design, we add 6 additional Transformer encoder layers after the CNN backbone. Unlike DETR, our model does not predict bounding boxes but instead predicts masks directly. MaskFormer achieves better results while being simpler than DETR. To disentangle the improvements from the model itself and our post-processing inference strategy we run our model following DETR post-processing (MaskFormer (DETR)) and observe that this setup outperforms DETR by 2.2 PQ. Overall, we observe a larger improvement in $\\mathrm { P Q } ^ { \\mathrm { S t } }$ compared to $\\mathrm { P Q } ^ { \\mathrm { T h } }$ . This suggests that detecting “stuff” with bounding boxes is suboptimal, and therefore, boxbased segmentation models (e.g., Mask R-CNN [19]) do not suit semantic segmentation. MaskFormer also outperforms recently proposed Max-DeepLab [38] without the need of special network design as well as sophisticated auxiliary losses (i.e., instance discrimination loss, mask-ID cross entropy loss, and per-pixel classification loss in [38]). MaskFormer, for the first time, unifies semantic- and instance-level segmentation with the exact same model, loss, and training pipeline. ",
791
+ "bbox": [
792
+ 173,
793
+ 441,
794
+ 825,
795
+ 621
796
+ ],
797
+ "page_idx": 7
798
+ },
799
+ {
800
+ "type": "text",
801
+ "text": "We further evaluate our model on the panoptic segmentation version of the ADE20K dataset. Our model also achieves state-of-the-art performance. We refer to the appendix for detailed results. ",
802
+ "bbox": [
803
+ 173,
804
+ 627,
805
+ 825,
806
+ 655
807
+ ],
808
+ "page_idx": 7
809
+ },
810
+ {
811
+ "type": "text",
812
+ "text": "4.4 Ablation studies ",
813
+ "text_level": 1,
814
+ "bbox": [
815
+ 174,
816
+ 671,
817
+ 325,
818
+ 686
819
+ ],
820
+ "page_idx": 7
821
+ },
822
+ {
823
+ "type": "text",
824
+ "text": "We perform a series of ablation studies of MaskFormer using a single ResNet-50 backbone [20]. ",
825
+ "bbox": [
826
+ 173,
827
+ 696,
828
+ 802,
829
+ 712
830
+ ],
831
+ "page_idx": 7
832
+ },
833
+ {
834
+ "type": "text",
835
+ "text": "Per-pixel vs. mask classification. In Table 4, we verify that the gains demonstrated by MaskFromer come from shifting the paradigm to mask classification. We start by comparing PerPixelBaseline+ and MaskFormer. The models are very similar and there are only 3 differences: 1) per-pixel vs. mask classification used by the models, 2) MaskFormer uses bipartite matching, and 3) the new model uses a combination of focal and dice losses as a mask loss, whereas PerPixelBaseline+ utilizes per-pixel cross entropy loss. First, we rule out the influence of loss differences by training PerPixelBaseline $^ +$ with exactly the same losses and observing no improvement. Next, in Table 4a, we compare PerPixelBaseline $^ +$ with MaskFormer trained using a fixed matching (MaskFormer-fixed), i.e., $N = K$ and assignment done based on category label indices identically to the per-pixel classification setup. We observe that MaskFormer-fixed is 1.8 mIoU better than the baseline, suggesting that shifting from per-pixel classification to mask classification is indeed the main reason for the gains of MaskFormer. In Table 4b, we further compare MaskFormer-fixed with MaskFormer trained with bipartite matching (MaskFormer-bipartite) and find bipartite matching is not only more flexible (allowing to predict less masks than the total number of categories) but also produces better results. ",
836
+ "bbox": [
837
+ 174,
838
+ 717,
839
+ 826,
840
+ 911
841
+ ],
842
+ "page_idx": 7
843
+ },
844
+ {
845
+ "type": "text",
846
+ "text": "Table 4: Per-pixel vs. mask classification for semantic segmentation. All models use 150 queries for a fair comparison. We evaluate the models on ADE20K val with 150 categories. 4a: PerPixelBaseline $^ +$ and MaskFormer-fixed use similar fixed matching (i.e., matching by category index), this result confirms that the shift from per-pixel to mask classification is the key. 4b: bipartite matching is not only more flexible (can make less prediction than total class count) but also gives better results. ",
847
+ "bbox": [
848
+ 173,
849
+ 97,
850
+ 826,
851
+ 166
852
+ ],
853
+ "page_idx": 8
854
+ },
855
+ {
856
+ "type": "text",
857
+ "text": "(a) Per-pixel vs. mask classification. ",
858
+ "bbox": [
859
+ 236,
860
+ 170,
861
+ 450,
862
+ 183
863
+ ],
864
+ "page_idx": 8
865
+ },
866
+ {
867
+ "type": "text",
868
+ "text": "(b) Fixed vs. bipartite matching assignment. ",
869
+ "bbox": [
870
+ 501,
871
+ 170,
872
+ 758,
873
+ 183
874
+ ],
875
+ "page_idx": 8
876
+ },
877
+ {
878
+ "type": "table",
879
+ "img_path": "images/5aff2c131b80e2b82ff62860a36cbceb898b6e8d0abd975382b2ff19c3908fe6.jpg",
880
+ "table_caption": [],
881
+ "table_footnote": [],
882
+ "table_body": "<table><tr><td></td><td>mIoU</td><td>PQSt</td></tr><tr><td>PerPixelBaseline+</td><td>41.9</td><td>28.3</td></tr><tr><td>MaskFormer-fixed</td><td>43.7 (+1.8)</td><td>30.3 (+2.0)</td></tr></table>",
883
+ "bbox": [
884
+ 230,
885
+ 186,
886
+ 465,
887
+ 224
888
+ ],
889
+ "page_idx": 8
890
+ },
891
+ {
892
+ "type": "table",
893
+ "img_path": "images/18e39f0d0be8dab4f49c7f6b81d89bf2c303aee95792ceac4ae92dbc76d5d6f1.jpg",
894
+ "table_caption": [],
895
+ "table_footnote": [],
896
+ "table_body": "<table><tr><td></td><td>mIoU</td><td>PQSt</td></tr><tr><td>MaskFormer-fixed</td><td>43.7</td><td>30.3</td></tr><tr><td>MaskFormer-bipartite (ours)</td><td>44.2 (+0.5)</td><td>33.4 (+3.1)</td></tr></table>",
897
+ "bbox": [
898
+ 493,
899
+ 186,
900
+ 772,
901
+ 224
902
+ ],
903
+ "page_idx": 8
904
+ },
905
+ {
906
+ "type": "text",
907
+ "text": "Number of queries. The table to the right shows results of MaskFormer trained with a varying number of queries on datasets with different number of categories. The model with 100 queries consistently performs the best across the studied datasets. This suggest we may not need to adjust the number of queries w.r.t. the number of categories or datasets much. Interestingly, even with 20 queries MaskFormer outperforms our per-pixel classification baseline. ",
908
+ "bbox": [
909
+ 174,
910
+ 247,
911
+ 485,
912
+ 386
913
+ ],
914
+ "page_idx": 8
915
+ },
916
+ {
917
+ "type": "table",
918
+ "img_path": "images/3c723224322082212b38b2906f1fc2118d2308b6aa8a817be3dd1d4e4db92538.jpg",
919
+ "table_caption": [],
920
+ "table_footnote": [],
921
+ "table_body": "<table><tr><td># of queries</td><td>ADE20K mIoU PQS</td><td>mIoU</td><td>COCO-Stuff PQS</td><td>ADE20K-Full mIoU</td><td>PQS</td></tr><tr><td>PerPixelBaseline+</td><td>41.9</td><td>28.3</td><td>34.2</td><td>24.6 13.9</td><td>9.0</td></tr><tr><td>20</td><td>42.9</td><td>32.6</td><td>35.0 27.6</td><td>14.1</td><td>10.8</td></tr><tr><td>50</td><td>43.9</td><td>32.7</td><td>35.5 27.9</td><td>15.4</td><td>11.1</td></tr><tr><td>100</td><td> 44.5</td><td>33.4</td><td> 37.1</td><td>28.9 16.0</td><td>11.9</td></tr><tr><td>150</td><td>44.2</td><td>33.4</td><td>37.0</td><td>28.9 15.5</td><td>11.5</td></tr><tr><td>300</td><td>43.5</td><td>32.3</td><td>36.1</td><td>29.1 14.2</td><td>10.3</td></tr><tr><td>1000</td><td>35.4</td><td>26.7</td><td>34.4</td><td>27.6</td><td>8.0 5.8</td></tr></table>",
922
+ "bbox": [
923
+ 501,
924
+ 250,
925
+ 818,
926
+ 363
927
+ ],
928
+ "page_idx": 8
929
+ },
930
+ {
931
+ "type": "text",
932
+ "text": "We further calculate the number of classes which are on average present in a training set image. We find these statistics to be similar across datasets despite the fact that the datasets have different number of total categories: 8.2 classes per image for ADE20K (150 classes), 6.6 classes per image for COCO-Stuff-10K (171 classes) and 9.1 classes per image for ADE20K-Full (847 classes). We hypothesize that each query is able to capture masks from multiple categories. ",
933
+ "bbox": [
934
+ 173,
935
+ 392,
936
+ 826,
937
+ 463
938
+ ],
939
+ "page_idx": 8
940
+ },
941
+ {
942
+ "type": "text",
943
+ "text": "The figure to the right shows the number of unique categories predicted by each query (sorted in descending order) of our MaskFormer model on the validation sets of the corresponding datasets. Interestingly, the number of unique categories per query does not follow a uniform distribution: some queries capture more classes than others. We try to analyze how MaskFormer queries group categories, but we do not observe any obvious pattern: there are queries capturing categories with similar semantics or shapes (e.g., “house” and “building”), but there are also queries capturing completely different categories (e.g., “water” and “sofa”). ",
944
+ "bbox": [
945
+ 174,
946
+ 468,
947
+ 421,
948
+ 690
949
+ ],
950
+ "page_idx": 8
951
+ },
952
+ {
953
+ "type": "image",
954
+ "img_path": "images/ae89dfd9e70e3e0680496b42fc9d272c5369941d71040c6cb96f485bff205fd8.jpg",
955
+ "image_caption": [],
956
+ "image_footnote": [],
957
+ "bbox": [
958
+ 433,
959
+ 484,
960
+ 836,
961
+ 683
962
+ ],
963
+ "page_idx": 8
964
+ },
965
+ {
966
+ "type": "text",
967
+ "text": "",
968
+ "bbox": [
969
+ 178,
970
+ 690,
971
+ 457,
972
+ 703
973
+ ],
974
+ "page_idx": 8
975
+ },
976
+ {
977
+ "type": "text",
978
+ "text": "Number of Transformer decoder layers. Interestingly, MaskFormer with even a single Transformer decoder layer already performs well for semantic segmentation and achieves better performance than our 6-layer-decoder PerPixelBaseline+. For panoptic segmentation, however, multiple decoder layers are required to achieve competitive performance. Please see the appendix for a detailed discussion. ",
979
+ "bbox": [
980
+ 174,
981
+ 709,
982
+ 826,
983
+ 765
984
+ ],
985
+ "page_idx": 8
986
+ },
987
+ {
988
+ "type": "text",
989
+ "text": "5 Discussion ",
990
+ "text_level": 1,
991
+ "bbox": [
992
+ 174,
993
+ 791,
994
+ 292,
995
+ 809
996
+ ],
997
+ "page_idx": 8
998
+ },
999
+ {
1000
+ "type": "text",
1001
+ "text": "Our main goal is to show that mask classification is a general segmentation paradigm that could be a competitive alternative to per-pixel classification for semantic segmentation. To better understand its potential for segmentation tasks, we focus on exploring mask classification independently of other factors like architecture, loss design, or augmentation strategy. We pick the DETR [3] architecture as our baseline for its simplicity and deliberately make as few architectural changes as possible. Therefore, MaskFormer can be viewed as a “box-free” version of DETR. ",
1002
+ "bbox": [
1003
+ 174,
1004
+ 827,
1005
+ 825,
1006
+ 911
1007
+ ],
1008
+ "page_idx": 8
1009
+ },
1010
+ {
1011
+ "type": "table",
1012
+ "img_path": "images/bf413290950fed2721c61eef88c71c41bb2a33319997ddede11164d04ee23480.jpg",
1013
+ "table_caption": [
1014
+ "Table 5: Matching with masks vs. boxes. We compare DETR [3] which uses box-based matching with two MaskFormer models trained with box- and mask-based matching respectively. To use box-based matching in MaskFormer we add to the model an additional box prediction head as in DETR. Note, that with box-based matching MaskFormer performs on par with DETR, whereas with mask-based matching it shows better results. The evaluation is done on COCO panoptic val set. "
1015
+ ],
1016
+ "table_footnote": [],
1017
+ "table_body": "<table><tr><td>method</td><td>backbone</td><td>matching</td><td>PQ</td><td>PQTh</td><td>PQSt</td></tr><tr><td>DETR [3]</td><td>R50 +6Enc</td><td>by box</td><td>43.4</td><td>48.2</td><td>36.3</td></tr><tr><td rowspan=\"2\">MaskFormer (ours)</td><td>R50 +6Enc</td><td>by box</td><td>43.7</td><td>49.2</td><td>35.3</td></tr><tr><td>R50+6Enc</td><td>by mask</td><td>46.5</td><td>51.0</td><td>39.8</td></tr></table>",
1018
+ "bbox": [
1019
+ 294,
1020
+ 166,
1021
+ 707,
1022
+ 218
1023
+ ],
1024
+ "page_idx": 9
1025
+ },
1026
+ {
1027
+ "type": "text",
1028
+ "text": "In this section, we discuss in detail the differences between MaskFormer and DETR and show how these changes are required to ensure that mask classification performs well. First, to achieve a pure mask classification setting we remove the box prediction head and perform matching between prediction and ground truth segments with masks instead of boxes. Secondly, we replace the computeheavy per-query mask head used in DETR with a more efficient per-image FPN-based head to make end-to-end training without box supervision feasible. ",
1029
+ "bbox": [
1030
+ 173,
1031
+ 241,
1032
+ 825,
1033
+ 324
1034
+ ],
1035
+ "page_idx": 9
1036
+ },
1037
+ {
1038
+ "type": "text",
1039
+ "text": "Matching with masks is superior to matching with boxes. We compare MaskFormer models trained using matching with boxes or masks in Table 5. To do box-based matching, we add to MaskFormer an additional box prediction head as in DETR [3]. Observe that MaskFormer, which directly matches with mask predictions, has a clear advantage. We hypothesize that matching with boxes is more ambiguous than matching with masks, especially for stuff categories where completely different masks can have similar boxes as stuff regions often spread over a large area in an image. ",
1040
+ "bbox": [
1041
+ 174,
1042
+ 330,
1043
+ 825,
1044
+ 415
1045
+ ],
1046
+ "page_idx": 9
1047
+ },
1048
+ {
1049
+ "type": "text",
1050
+ "text": "MaskFormer mask head reduces computation. Results in Table 5 also show that MaskFormer performs on par with DETR when the same matching strategy is used. This suggests that the difference in mask head designs between the models does not significantly influence the prediction quality. The new head, however, has significantly lower computational and memory costs in comparison with the original mask head used in DETR. In MaskFormer, we first upsample image features to get highresolution per-pixel embeddings and directly generate binary mask predictions at a high-resolution. Note, that the per-pixel embeddings from the upsampling module (i.e., pixel decoder) are shared among all queries. In contrast, DETR first generates low-resolution attention maps and applies an independent upsampling module to each query. Thus, the mask head in DETR is $N$ times more computationally expensive than the mask head in MaskFormer (where $N$ is the number of queries). ",
1051
+ "bbox": [
1052
+ 174,
1053
+ 420,
1054
+ 825,
1055
+ 559
1056
+ ],
1057
+ "page_idx": 9
1058
+ },
1059
+ {
1060
+ "type": "text",
1061
+ "text": "6 Conclusion ",
1062
+ "text_level": 1,
1063
+ "bbox": [
1064
+ 174,
1065
+ 578,
1066
+ 299,
1067
+ 594
1068
+ ],
1069
+ "page_idx": 9
1070
+ },
1071
+ {
1072
+ "type": "text",
1073
+ "text": "The paradigm discrepancy between semantic- and instance-level segmentation results in entirely different models for each task, hindering development of image segmentation as a whole. We show that a simple mask classification model can outperform state-of-the-art per-pixel classification models, especially in the presence of large number of categories. Our model also remains competitive for panoptic segmentation, without a need to change model architecture, losses, or training procedure. We hope this unification spurs a joint effort across semantic- and instance-level segmentation tasks. ",
1074
+ "bbox": [
1075
+ 174,
1076
+ 608,
1077
+ 826,
1078
+ 691
1079
+ ],
1080
+ "page_idx": 9
1081
+ },
1082
+ {
1083
+ "type": "text",
1084
+ "text": "Acknowledgments and Disclosure of Funding ",
1085
+ "text_level": 1,
1086
+ "bbox": [
1087
+ 174,
1088
+ 710,
1089
+ 553,
1090
+ 728
1091
+ ],
1092
+ "page_idx": 9
1093
+ },
1094
+ {
1095
+ "type": "text",
1096
+ "text": "We thank Ross Girshick for insightful comments and suggestions. Work of UIUC authors Bowen Cheng and Alexander G. Schwing was supported in part by NSF under Grant #1718221, 2008387, 2045586, 2106825, MRI #1725729, NIFA award 2020-67021-32799 and Cisco Systems Inc. (Gift Award CG 1377144 - thanks for access to Arcetri). ",
1097
+ "bbox": [
1098
+ 174,
1099
+ 741,
1100
+ 826,
1101
+ 797
1102
+ ],
1103
+ "page_idx": 9
1104
+ },
1105
+ {
1106
+ "type": "text",
1107
+ "text": "References ",
1108
+ "text_level": 1,
1109
+ "bbox": [
1110
+ 174,
1111
+ 815,
1112
+ 267,
1113
+ 830
1114
+ ],
1115
+ "page_idx": 9
1116
+ },
1117
+ {
1118
+ "type": "text",
1119
+ "text": "[1] Pablo Arbeláez, Jordi Pont-Tuset, Jonathan T Barron, Ferran Marques, and Jitendra Malik. Multiscale combinatorial grouping. In CVPR, 2014. 2 \n[2] Holger Caesar, Jasper Uijlings, and Vittorio Ferrari. COCO-Stuff: Thing and stuff classes in context. In CVPR, 2018. 2, 5 \n[3] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In ECCV, 2020. 1, 2, 3, 4, 5, 6, 8, 9, 10 second-order pooling. In ECCV, 2012. 1, 2 \n[5] Joao Carreira and Cristian Sminchisescu. CPMC: Automatic object segmentation using constrained parametric min-cuts. PAMI, 2011. 2 \n[6] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. DeepLab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected CRFs. PAMI, 2018. 2, 6 \n[7] Liang-Chieh Chen, George Papandreou, Florian Schroff, and Hartwig Adam. Rethinking atrous convolution for semantic image segmentation. arXiv:1706.05587, 2017. 2, 6, 7 [8] Liang-Chieh Chen, Yukun Zhu, George Papandreou, Florian Schroff, and Hartwig Adam. Encoder-decoder with atrous separable convolution for semantic image segmentation. In ECCV, 2018. 1, 6, 7 \n[9] Bowen Cheng, Liang-Chieh Chen, Yunchao Wei, Yukun Zhu, Zilong Huang, Jinjun Xiong, Thomas S Huang, Wen-Mei Hwu, and Honghui Shi. SPGNet: Semantic prediction guidance for scene parsing. In ICCV, 2019. \n[10] Bowen Cheng, Maxwell D Collins, Yukun Zhu, Ting Liu, Thomas S Huang, Hartwig Adam, and LiangChieh Chen. Panoptic-DeepLab: A simple, strong, and fast baseline for bottom-up panoptic segmentation. In CVPR, 2020. 6 \n[11] Dorin Comaniciu and Peter Meer. Robust Analysis of Feature Spaces: Color Image Segmentation. In CVPR, 1997. 2 \n[12] MMSegmentation Contributors. MMSegmentation: OpenMMLab semantic segmentation toolbox and benchmark. https://github.com/open-mmlab/mmsegmentation, 2020. 6, 7 \n[13] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The Cityscapes dataset for semantic urban scene understanding. In CVPR, 2016. 2, 5 \n[14] Jifeng Dai, Kaiming He, and Jian Sun. Convolutional feature masking for joint object and stuff segmentation. In CVPR, 2015. 2 \n[15] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2021. 2, 7 \n[16] Mark Everingham, SM Ali Eslami, Luc Van Gool, Christopher KI Williams, John Winn, and Andrew Zisserman. The PASCAL visual object classes challenge: A retrospective. IJCV, 2015. 2, 5 \n[17] Jun Fu, Jing Liu, Haijie Tian, Yong Li, Yongjun Bao, Zhiwei Fang, and Hanqing Lu. Dual attention network for scene segmentation. In CVPR, 2019. 2 \n[18] Bharath Hariharan, Pablo Arbeláez, Ross Girshick, and Jitendra Malik. Simultaneous detection and segmentation. In ECCV, 2014. 1, 3 \n[19] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask R-CNN. In ICCV, 2017. 1, 3, 4, 8 \n[20] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 6, 7, 8 \n[21] Zilong Huang, Xinggang Wang, Lichao Huang, Chang Huang, Yunchao Wei, and Wenyu Liu. CCNet: Criss-cross attention for semantic segmentation. In ICCV, 2019. 2, 6 \n[22] Alexander Kirillov, Kaiming He, Ross Girshick, Carsten Rother, and Piotr Dollár. Panoptic segmentation. In CVPR, 2019. 2, 3, 5, 6 \n[23] Scott Konishi and Alan Yuille. Statistical Cues for Domain Specific Image Segmentation with Performance Analysis. In CVPR, 2000. 2 \n[24] Tsung-Yi Lin, Piotr Dollár, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In CVPR, 2017. 6 \n[25] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollár. Focal loss for dense object detection. In ICCV, 2017. 4, 6 \n[26] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft COCO: Common objects in context. In ECCV, 2014. 2, 5 \n[27] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. arXiv:2103.14030, 2021. 2, 4, 6, 7 \n[28] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015. 1, 2 \n[29] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In ICLR, 2019. 6 \n[30] Fausto Milletari, Nassir Navab, and Seyed-Ahmad Ahmadi. V-Net: Fully convolutional neural networks for volumetric medical image segmentation. In 3DV, 2016. 4, 6 \n[31] Gerhard Neuhold, Tobias Ollmann, Samuel Rota Bulò, and Peter Kontschieder. The mapillary vistas dataset for semantic understanding of street scenes. In CVPR, 2017. 2, 5 \n[32] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. IJCV, 2015. 6 \n[33] Jianbo Shi and Jitendra Malik. Normalized Cuts and Image Segmentation. PAMI, 2000. 2 \n[34] Robin Strudel, Ricardo Garcia, Ivan Laptev, and Cordelia Schmid. Segmenter: Transformer for semantic segmentation. arXiv:2105.05633, 2021. 2, 4 \n[35] Zhi Tian, Chunhua Shen, and Hao Chen. Conditional convolutions for instance segmentation. In ECCV, 2020. 3 \n[36] Jasper RR Uijlings, Koen EA Van De Sande, Theo Gevers, and Arnold WM Smeulders. Selective search for object recognition. IJCV, 2013. 2 \n[37] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017. 1, 2, 3, 4 \n[38] Huiyu Wang, Yukun Zhu, Hartwig Adam, Alan Yuille, and Liang-Chieh Chen. MaX-DeepLab: End-to-end panoptic segmentation with mask transformers. In CVPR, 2021. 2, 3, 4, 8 \n[39] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In CVPR, 2018. 2 \n[40] Xinlong Wang, Rufeng Zhang, Tao Kong, Lei Li, and Chunhua Shen. SOLOv2: Dynamic and fast instance segmentation. NeurIPS, 2020. 3 \n[41] Yuxin Wu and Kaiming He. Group normalization. In ECCV, 2018. 6 \n[42] Yuxin Wu, Alexander Kirillov, Francisco Massa, Wan-Yen Lo, and Ross Girshick. Detectron2. https: //github.com/facebookresearch/detectron2, 2019. 6 \n[43] Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, and Jian Sun. Unified perceptual parsing for scene understanding. In ECCV, 2018. 7 \n[44] Yuhui Yuan, Xilin Chen, and Jingdong Wang. Object-contextual representations for semantic segmentation. In ECCV, 2020. 6, 7 \n[45] Yuhui Yuan, Lang Huang, Jianyuan Guo, Chao Zhang, Xilin Chen, and Jingdong Wang. OCNet: Object context for semantic segmentation. IJCV, 2021. 2 \n[46] Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, and Jiaya Jia. Pyramid scene parsing network. In CVPR, 2017. 1, 2, 6 \n[47] Sixiao Zheng, Jiachen Lu, Hengshuang Zhao, Xiatian Zhu, Zekun Luo, Yabiao Wang, Yanwei Fu, Jianfeng Feng, Tao Xiang, Philip HS Torr, et al. Rethinking semantic segmentation from a sequence-to-sequence perspective with transformers. In CVPR, 2021. 2, 4, 7 \n[48] Bolei Zhou, Hang Zhao, Xavier Puig, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Scene parsing challenge 2016. http://sceneparsing.csail.mit.edu/index_challenge.html, 2016. 5 \n[49] Bolei Zhou, Hang Zhao, Xavier Puig, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Scene parsing through ADE20K dataset. In CVPR, 2017. 2, 5 ",
1120
+ "bbox": [
1121
+ 181,
1122
+ 837,
1123
+ 825,
1124
+ 911
1125
+ ],
1126
+ "page_idx": 9
1127
+ },
1128
+ {
1129
+ "type": "text",
1130
+ "text": "",
1131
+ "bbox": [
1132
+ 171,
1133
+ 106,
1134
+ 828,
1135
+ 898
1136
+ ],
1137
+ "page_idx": 10
1138
+ },
1139
+ {
1140
+ "type": "text",
1141
+ "text": "",
1142
+ "bbox": [
1143
+ 171,
1144
+ 93,
1145
+ 828,
1146
+ 429
1147
+ ],
1148
+ "page_idx": 11
1149
+ }
1150
+ ]
parse/train/0lz69oI5iZP/0lz69oI5iZP_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/0lz69oI5iZP/0lz69oI5iZP_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/1flmvXGGJaa/1flmvXGGJaa_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3448256d7370e7158d4e75e9ba08df5f45751224b9dbd84993257350e28bf87f
3
+ size 8605143
parse/train/1flmvXGGJaa/1flmvXGGJaa_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1dc66ac03afcb3c2df02774a2bf16839641945516aa82adc0ecd85f107acfaf1
3
+ size 8392650
parse/train/1flmvXGGJaa/1flmvXGGJaa_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:611ce7c30f5e6ad627885a3137bae3e792e308cb7baef23873bb81a97c666421
3
+ size 8609995
parse/train/3ccoZ40Us0N/3ccoZ40Us0N_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1cb3a90f8c818d67d02ceefea6055955cdb02d9d07ce760b9fe42bdb458eaa4f
3
+ size 12675481
parse/train/3ccoZ40Us0N/3ccoZ40Us0N_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa96ea1bcac6dd0d3586144a2ebbd61a72ac0868bbf5134fb6acabf1bb534136
3
+ size 12546083
parse/train/3ccoZ40Us0N/3ccoZ40Us0N_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3620fb19c11981547b979633127edef8714c87e920ed1bf1bb75225e558759b4
3
+ size 12681567
parse/train/6YL_BntJrz6/6YL_BntJrz6_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:798f8f90f1e48f704b5da7c88f3bb10ed7b8762dda2dd4b41fc7d2d817f22b65
3
+ size 473542
parse/train/6YL_BntJrz6/6YL_BntJrz6_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a180b1dadd77072a72efecc9a9b434bfb2ea844c546329cf4cf54611e8acb7e3
3
+ size 309378
parse/train/6YL_BntJrz6/6YL_BntJrz6_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7ec1896b1853f117714d631b5d4d0f35699c45596b47ea5d6f58780b4dab5239
3
+ size 485532
parse/train/784_F-WCW46/784_F-WCW46_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:97698af5b5e5c194526a36fa6cbc09e00bf2f9a45929e286f7ddf48d98571c80
3
+ size 2278862
parse/train/784_F-WCW46/784_F-WCW46_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a9bd8dbc981b53c50a81ebba9dfd7ed9d5531d33a04d024294d01aa51e01e7fa
3
+ size 2147993
parse/train/784_F-WCW46/784_F-WCW46_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ef2a6a9136c5c2e785539b02fcf1b4be182aa780ea8373f7c00bec3f40ef159
3
+ size 2281671
parse/train/9BpjtPMyDQ/9BpjtPMyDQ_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:97cf2ea20233834b2d1dda9adda546953aaa743068a2bf5267039ce8db8e8f9f
3
+ size 2333172
parse/train/9BpjtPMyDQ/9BpjtPMyDQ_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a4bcd2fdafc6dcf39a14a6fa41f249b4079c312467043ab762a375a5c9782fd3
3
+ size 2191492
parse/train/9BpjtPMyDQ/9BpjtPMyDQ_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:26ce7bc91946a23d5cad725a5f6668c993d2efe96c4730d192a94c88e5fa508e
3
+ size 2342349
parse/train/ALvt7nXa2q/ALvt7nXa2q_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b57dd491c2bd7a86262676658303e2ce7232d0ee79cc2ba417382d039d892eb
3
+ size 550187
parse/train/ALvt7nXa2q/ALvt7nXa2q_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5a561db0653868c1aaf7f09d214cae6ef3653d280a30e5d508cc309b860555be
3
+ size 382182
parse/train/ALvt7nXa2q/ALvt7nXa2q_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88c765710626982a10586e5e229d1dc809d5687bb26a160a17b139a42ab53000
3
+ size 561241
parse/train/B1IzH7cxl/B1IzH7cxl.md ADDED
@@ -0,0 +1,401 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # A NEURAL STOCHASTIC VOLATILITY MODEL
2
+
3
+ Rui Luo†, Xiaojun $\mathbf { X } \mathbf { u } ^ { \ddag }$ , Weinan Zhang‡, Jun Wang†
4
+ †University College London, $^ \ddag$ Shanghai Jiao Tong University
5
+ {r.luo,j.wang}@cs.ucl.ac.uk, {xuxj,wnzhang}@apex.sjtu.edu.cn
6
+
7
+ # ABSTRACT
8
+
9
+ In this paper, we show that the recent integration of statistical models with recurrent neural networks provides a new way of formulating volatility models that have been popular in time series analysis and prediction. The model comprises a pair of complementary stochastic recurrent neural networks: the generative network models the joint distribution of the stochastic volatility process; the inference network approximates the conditional distribution of the latent variables given the observable ones. Our focus in this paper is on the formulation of temporal dynamics of volatility over time under a stochastic recurrent neural network framework. Our derivations show that some popular volatility models are a special case of our proposed neural stochastic volatility model. Experiments demonstrate that the proposed model generates a smoother volatility estimation, and outperforms standard econometric models GARCH, EGARCH, GJR-GARCH and some other GARCH variants as well as MCMC-based model stochvol and a recent Gaussian processes based volatility model GPVOL on several metrics about the fitness of the volatility modelling and the accuracy of the prediction.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ The volatility of the price movements reflects the ubiquitous uncertainty within financial markets. It is critical that the level of risk, indicated by volatility, is taken into consideration before investment decisions are made and portfolio are optimised (Hull, 2006); volatility is substantially a key variable in the pricing of derivative securities. Hence, estimating and forecasting volatility is of great importance in branches of financial studies, including investment, risk management, security valuation and monetary policy making (Poon & Granger, 2003).
14
+
15
+ Volatility is measured typically by using the standard deviation of price change in a fixed time interval, such as a day, a month or a year. The higher the volatility, the riskier the asset. One of the primary challenges in designing volatility models is to identify the existence of latent (stochastic) variables or processes and to characterise the underlying dependences or interactions between variables within a certain time span. A classic approach has been to handcraft the characteristic features of volatility models by imposing assumptions and constraints, given prior knowledge and observations. Notable examples include autoregressive conditional heteroskedasticity (ARCH) model (Engle, 1982) and its generalisation GARCH (Bollerslev, 1986), which makes use of autoregression to capture the properties of time-variant volatility within many time series. Heston (1993) assumed that the volatility follows a Cox-Ingersoll-Ross (CIR) process (Cox et al., 1985) and derived a closed-form solution for options pricing. While theoretically sound, those approaches require strong assumptions which might involve complex probability distributions and non-linear dynamics that drive the process, and in practice, one may have to impose less prior knowledge and rectify a solution under the worst-case volatility case (Avellaneda & Paras, 1996).
16
+
17
+ In this paper, we take a fully data driven approach and determine the configurations with as few exogenous input as possible, or even purely from the historical data. We propose a neural network re-formulation of stochastic volatility by leveraging stochastic models and recurrent neural networks (RNNs). We are inspired by the recent development on variational approaches of stochastic (deep) neural networks (Kingma & Welling, 2013; Rezende et al., 2014) to a recurrent case (Chung et al., 2015; Fabius & van Amersfoort, 2014; Bayer & Osendorfer, 2014), and our formulation shows that existing volatility models such as the GARCH (Bollerslev, 1986) and the Heston model (Heston, 1993) are the special cases of our neural stochastic volatility formulation. With the hidden latent variables in the neural networks we naturally uncover the underlying stochastic process formulated from the models.
18
+
19
+ Experiments with synthetic data and real-world financial data are performed, showing that the proposed model outperforms the widely-used GARCH model on several metrics of the fitness and the accuracy of time series modelling and prediction: it verifies our model’s high flexibility and rich expressive power.
20
+
21
+ # 2 RELATED WORK
22
+
23
+ A notable volatility method is autoregressive conditional heteroskedasticity (ARCH) model (Engle, 1982): it can accurately capture the properties of time-variant volatility within many types of time series. Inspired by ARCH model, a large body of diverse work based on stochastic process for volatility modelling has emerged. Bollerslev (1986) generalised ARCH model to the generalised autoregressive conditional heteroskedasticity (GARCH) model in a manner analogous to the extension from autoregressive (AR) model to autoregressive moving average (ARMA) model by introducing the past conditional variances in the current conditional variance estimation. Engle & Kroner (1995) presented theoretical results on the formulation and estimation of multivariate GARCH model within simultaneous equations systems. The extension to multivariate model allows the covariances to present and depend on the historical information, which are particularly useful in multivariate financial models. Heston (1993) derived a closed-form solution for option pricing with stochastic volatility where the volatility process is a CIR process driven by a latent Wiener process such that the current volatility is no longer a deterministic function even if the historical information is provided. Notably, empirical evidences have confirmed that volatility models provide accurate forecasts (Andersen & Bollerslev, 1998) and models such as ARCH and its descendants/variants have become indispensable tools in asset pricing and risk evaluation.
24
+
25
+ On the other hand, deep learning (LeCun et al., 2015; Schmidhuber, 2015) that utilises nonlinear structures known as deep neural networks, powers various applications. It has triumph over pattern recognition challenges, such as image recognition (Krizhevsky et al., 2012; He et al., 2015; van den Oord et al., 2016), speech recognition (Hinton et al., 2012; Graves et al., 2013; Chorowski et al., 2015), machine translation (Sutskever et al., 2014; Cho et al., 2014; Bahdanau et al., 2014; Luong et al., 2015) to name a few.
26
+
27
+ Time-dependent neural networks models include RNNs with advanced neuron structure such as long short-term memory (LSTM) (Hochreiter & Schmidhuber, 1997), gated recurrent unit (GRU) (Cho et al., 2014), and bidirectional RNN (BRNN) (Schuster & Paliwal, 1997). Recent results show that RNNs excel for sequence modelling and generation in various applications (Graves, 2013; Gregor et al., 2015). However, despite its capability as non-linear universal approximator, one of the drawbacks of neural networks is its deterministic nature. Adding latent variables and their processes into neural networks would easily make the posterori computationally intractable. Recent work shows that efficient inference can be found by variational inference when hidden continuous variables are embedded into the neural networks structure (Kingma & Welling, 2013; Rezende et al., 2014). Some early work has started to explore the use of variational inference to make RNNs stochastic (Chung et al., 2015; Bayer & Osendorfer, 2014; Fabius & van Amersfoort, 2014). Bayer & Osendorfer (2014) and Fabius & van Amersfoort (2014) considered the hidden variables are independent between times, whereas (Fraccaro et al., 2016) utilised a backward propagating inference network according to its Markovian properties. Our work in this paper extends the work (Chung et al., 2015) with a focus on volatility modelling for time series. We assume that the hidden stochastic variables follow a Gaussian autoregression process, which is then used to model both the variance and the mean. We show that the neural network formulation is a general one, which covers two major financial stochastic volatility models as the special cases by defining the specific hidden variables and non-linear transforms.
28
+
29
+ # 3 PRELIMINARY: VOLATILITY MODELS
30
+
31
+ Stochastic processes are often defined by stochastic differential equations (SDEs), e.g. a (univariate) generalised Wiener process is $\mathrm { d } x _ { t } = \mu \mathrm { d } t + \sigma \mathrm { d } w _ { t }$ , where $\mu$ and $\sigma$ denote the time-invariant rates of drift and standard deviation (square root of variance) while $\mathrm { d } w _ { t } \sim \mathcal { N } ( 0 , \mathrm { d } t )$ is the increment of
32
+
33
+ standard Wiener process at time $t$ . In a small time interval between $t$ and $t + \Delta t$ , the change in the variable is $\varDelta x _ { t } = \mu \varDelta t + \sigma \varDelta w _ { t }$ . Let $\varDelta t = 1$ , we obtain the discrete-time version of basic volatility model:
34
+
35
+ $$
36
+ x _ { t } = x _ { t - 1 } + \mu + \sigma \epsilon _ { t } ,
37
+ $$
38
+
39
+ where $\epsilon _ { t } \sim \mathcal { N } ( 0 , 1 )$ is a sample drawn from standard normal distribution. In the multivariate case, $\pmb { \Sigma }$ represents the covariance matrix in place of $\sigma ^ { 2 }$ . As presumed that the variables are multidimensional, we will use $\pmb { \Sigma }$ to represent variance in general case except explicitly noted.
40
+
41
+ # 3.1 DETERMINISTIC VOLATILITY
42
+
43
+ The time-invariant variance $\pmb { \Sigma }$ can be extended to be a function $\pmb { \mathscr { D } } _ { t } = \pmb { \mathscr { D } } ( \pmb { \mathscr { x } } _ { < t } )$ relying on history of the (observable) underlying stochastic process $\{ { \pmb x } _ { < t } \}$ . The current variance $\Sigma _ { t }$ is therefore determined given the history $\{ { \pmb x } _ { < t } \}$ up to time $t$ . An example of such extensions is the univariate GARCH(1,1) model (Bollerslev, 1986):
44
+
45
+ $$
46
+ \sigma _ { t } ^ { 2 } = \alpha _ { 0 } + \alpha _ { 1 } ( x _ { t - 1 } - \mu _ { t - 1 } ) ^ { 2 } + \beta _ { 1 } \sigma _ { t - 1 } ^ { 2 } ,
47
+ $$
48
+
49
+ where $x _ { t - 1 }$ is the observation from $\mathcal { N } ( \mu _ { t - 1 } , \sigma _ { t - 1 } ^ { 2 } )$ at time $t - 1$ . Note that the determinism is in a conditional sense, which means that it only holds under the condition that the complete history $\{ \pmb { x } _ { < t } \}$ is presented, such as the case of 1-step-ahead forecast. otherwise the current volatility would still be stochastic as it is built on stochastic process $\{ \pmb { x } _ { t } \}$ . However, for multi-step-ahead forecast, we usually exploit the relation $\mathbb { E } _ { t - 1 } [ ( x _ { t } - \mu _ { t } ) ^ { 2 } ] = \sigma _ { t } ^ { 2 }$ to substitute the corresponding terms and calculate the forecasts with longer horizon in a recursive fashion, for example, $\bar { \sigma _ { t + 1 } ^ { 2 } } = \bar { \alpha } _ { 0 } + \alpha _ { 1 } \mathbb { E } _ { t - 1 } [ ( x _ { t } -$ $\mu _ { t } ) ^ { 2 } ] + \beta _ { 1 } \sigma _ { t } ^ { 2 } = \alpha _ { 0 } + ( \alpha _ { 1 } + \beta _ { 1 } ) \sigma _ { t } ^ { 2 }$ . For $\mathbf { n }$ -step-ahead forecast, there will be $n$ iterations and the procedure is hence also deterministic.
50
+
51
+ # 3.2 STOCHASTIC VOLATILITY
52
+
53
+ Another extension is applicable for $\Sigma _ { t }$ from being conditionally deterministic (i.e. deterministic given the complete history $\{ { \pmb x } _ { < t } \} )$ to fully stochastic: $\pmb { \mathscr { D } } _ { t } = \pmb { \mathscr { D } } ( \pmb { z } _ { \le t } )$ is driven by another latent stochastic process $\{ z _ { t } \}$ instead of the observable process $\{ x _ { t } \}$ . Heston (1993) model instantiates a continuous-time stochastic volatility model for univariate processes:
54
+
55
+ $$
56
+ \begin{array} { r l } & { \mathrm { d } x _ { t } = ( \mu - 0 . 5 \sigma _ { t } ^ { 2 } ) \mathrm { d } t + \sigma _ { t } \mathrm { d } w _ { t } ^ { \langle 1 \rangle } , } \\ & { \mathrm { d } \sigma _ { t } = a \sigma _ { t } \mathrm { d } t + b \mathrm { d } w _ { t } ^ { \langle 2 \rangle } , } \end{array}
57
+ $$
58
+
59
+ where the correlation between d wh1t i and d wh2it applies: $\mathbb { E } [ \mathrm { d } w _ { t } ^ { ( 1 ) } \cdot \mathrm { d } w _ { t } ^ { \langle 2 \rangle } ] = \rho \mathrm { d } t$ . We apply Euler’s scheme of quantisation (Stoer & Bulirsch, 2013) to obtain the discrete analogue to the continuoustime Heston model (Eqs. (3) and (4)):
60
+
61
+ $$
62
+ \begin{array}{c} \begin{array} { r l } & { x _ { t } = ( x _ { t - 1 } + \mu - 0 . 5 \sigma _ { t } ^ { 2 } ) + \sigma \epsilon _ { t } } \\ & { \sigma _ { t } = ( 1 + a ) \sigma _ { t - 1 } + b z _ { t } } \end{array} \quad \mathrm { w h e r e } \quad \begin{array} { l } { \Big [ \epsilon _ { t } } \\ { z _ { t } } \end{array} \Big ] = \mathcal { N } ( \mathbf { 0 } , \Big [ \begin{array} { l l } { 1 } & { \rho } \\ { \rho } & { 1 } \end{array} \Big ] ) . \end{array}
63
+ $$
64
+
65
+ # 3.3 VOLATILITY MODEL IN GENERAL
66
+
67
+ As discussed above, the observable variable $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ follows Gaussian distribution of which the mean and variance depend on the history of observable process $\{ x _ { t } \}$ and latent $\left\{ { z } _ { t } \right\}$ . We presume in addition that the latent process $\{ z _ { t } \}$ is an autoregressive model such that ${ \boldsymbol { z } } _ { t }$ is (conditionally) Gaussian distributed. Therefore, we formulate the volatility model in general as:
68
+
69
+ $$
70
+ \begin{array} { r l } & { z _ { t } \sim \mathcal { N } ( \pmb { \mu } ^ { z } ( \pmb { z } _ { < t } ) , \pmb { \Sigma } ^ { z } ( \pmb { z } _ { < t } ) ) , } \\ & { \pmb { x } _ { t } \sim \mathcal { N } ( \pmb { \mu } ^ { x } ( \pmb { x } _ { < t } , \pmb { z } _ { \leq t } ) , \pmb { \Sigma } ^ { x } ( \pmb { x } _ { < t } , \pmb { z } _ { \leq t } ) ) , } \end{array}
71
+ $$
72
+
73
+ where $\pmb { \mu } ^ { z } ( \pmb { x } _ { < t } , \pmb { z } _ { \leq t } )$ and $\begin{array} { r } { \pmb { \Sigma } ^ { z } ( \pmb { x } _ { < t } , z _ { \leq t } ) } \end{array}$ denote the autoregressive time-varying mean and variance of the latent variable ${ \boldsymbol { z } } _ { t }$ while $\pmb { \mu } ^ { x } ( \pmb { x } _ { < t } , \pmb { z } _ { \leq t } )$ and $\begin{array} { r } { \pmb { \Sigma ^ { x } } ( \pmb { x } _ { < t } , \pmb { z } _ { \leq t } ) } \end{array}$ represent the mean and variance of observable variable $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ , which depend on not only history of the observable process $\{ \pmb { x } _ { < t } \}$ but that of the latent process $\{ { z } _ { \leq t } \}$ .
74
+
75
+ These two formulas (Eqs. (6) and (7)) abstract the generalised formulation of volatility models. Together, they represents a broad family of volatility models with latent variables, where the Heston model for stochastic volatility is merely a special case of the family. Furthermore, it will degenerate to deterministic volatility models such as the well-studied GARCH model if we disable the latent process.
76
+
77
+ # 4 NEURAL STOCHASTIC VOLATILITY MODELS
78
+
79
+ In this section, we establish the neural stochastic volatility model (NSVM) for stochastic volatility estimation and forecast.
80
+
81
+ # 4.1 GENERATING OBSERVABLE SEQUENCE
82
+
83
+ Recall that the latent variable $z _ { t }$ (Eq. (6)) and the observable $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ (Eq. (7)) are described by autoregressive models ${ \bf \nabla } _ { { \bf \mathcal { X } } _ { t } }$ has the exogenous input $\{ { z } _ { \leq t } \}$ .) For the distributions of $\{ z _ { t } \}$ and $\{ x _ { t } \}$ , the following factorisation applies:
84
+
85
+ $$
86
+ \begin{array} { c } { { p _ { \Phi } ( Z ) = \displaystyle \prod _ { t } p _ { \Phi } ( z _ { t } | z _ { < t } ) = \displaystyle \prod _ { t } { \mathcal N } ( z _ { t } ; \mu _ { \Phi } ^ { z } ( z _ { < t } ) , \Sigma _ { \Phi } ^ { z } ( z _ { < t } ) ) , } } \\ { { p _ { \Phi } ( X | Z ) = \displaystyle \prod _ { t } p _ { \Phi } ( x _ { t } | x _ { < t } , z _ { \le t } ) = \displaystyle \prod _ { t } { \mathcal N } ( x _ { t } ; \mu _ { \Phi } ^ { x } ( x _ { < t } , z _ { \le t } ) , \Sigma _ { \Phi } ^ { x } ( x _ { < t } , z _ { \le t } ) ) , } } \end{array}
87
+ $$
88
+
89
+ where ${ \pmb X } = \{ { \pmb x } _ { t } \}$ and $Z = \{ z _ { t } \}$ are the sequences of observable and latent variables, respectively, while $\Phi$ represents the parameter set of the model. The full generative model is defined as the joint distribution:
90
+
91
+ $$
92
+ \begin{array} { l } { { \displaystyle p _ { \Phi } ( X , Z ) = \prod _ { t } p _ { \Phi } ( x _ { t } | x _ { < t } , z _ { \le t } ) p _ { \Phi } ( z _ { t } | z _ { < t } ) } } \\ { { \displaystyle \qquad = \prod _ { t } \mathcal { N } ( z _ { t } ; \mu _ { \Phi } ^ { z } ( z _ { < t } ) , \Sigma _ { \Phi } ^ { z } ( z _ { < t } ) ) \mathcal { N } ( x _ { t } ; \mu _ { \Phi } ^ { x } ( x _ { < t } , z _ { \le t } ) , \Sigma _ { \Phi } ^ { x } ( x _ { < t } , z _ { \le t } ) ) . } } \end{array}
93
+ $$
94
+
95
+ It is observed that the means and variances are conditionally deterministic: given the historical information $\{ z _ { < t } \}$ , the current mean $\mu _ { t } ^ { z } = \mu _ { \Phi } ^ { z } ( z _ { < t } )$ and variance $\begin{array} { r } { \pmb { \Sigma _ { t } ^ { z } } = \pmb { \Sigma _ { \Phi } ^ { z } } ( \pmb { z } _ { < t } ) } \end{array}$ of ${ \boldsymbol { z } } _ { t }$ is obtained and hence the distribution $\mathcal { N } ( z _ { t } ; \mu _ { t } ^ { z } , \Sigma _ { t } ^ { z } )$ of ${ \boldsymbol { z } } _ { t }$ is specified; after sampling ${ \boldsymbol { z } } _ { t }$ from the specified distribution, we incorporate $\{ \pmb { x } _ { < t } \}$ and calculate the current mean $\pmb { \mu } _ { t } ^ { x } = \pmb { \mu } _ { \Phi } ^ { x } ( \pmb { x } _ { < t } , \pmb { z } _ { \leq t } )$ and variance $\begin{array} { r } { \Sigma _ { t } ^ { x } = \Sigma _ { \Phi } ^ { x } ( \pmb { x } _ { < t } , \pmb { z } _ { \le t } ) } \end{array}$ of $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ and determine its distribution $\mathcal { N } ( \pmb { x } _ { t } ; \pmb { \mu } _ { t } ^ { x } , \pmb { \Sigma } _ { t } ^ { x } )$ of $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ . It is natural and convenient to present such a procedure in a recurrent fashion because of its autoregressive nature. As is known that RNNs can essentially approximate arbitrary function of recurrent form (Hammer, 2000), the means and variances, which may be driven by complex non-linear dynamics, can be efficiently computed using RNNs.
96
+
97
+ It is always a good practice to reparameterise the random variables before we go into RNN architecture. As the covariance matrix $\pmb { \Sigma }$ is symmetric and positive definite, it can be factorised as $\Sigma = U A U ^ { \top }$ , where $\pmb { A }$ is a full-rank diagonal matrix with positive diagonal elements. Let $A = U A ^ { \frac { 1 } { 2 } }$ , we have $\pmb { \Sigma } = \pmb { A } \pmb { A } ^ { \top }$ . Hence we can reparameterise the latent variable ${ \boldsymbol { z } } _ { t }$ (Eq. (6)) and observable $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ (Eq. (7)):
98
+
99
+ $$
100
+ \begin{array} { r } { z _ { t } = \pmb { \mu } _ { t } ^ { z } + \pmb { A } _ { t } ^ { z } \pmb { \epsilon } _ { t } ^ { z } , } \\ { \pmb { x } _ { t } = \pmb { \mu } _ { t } ^ { x } + \pmb { A } _ { t } ^ { x } \pmb { \epsilon } _ { t } ^ { x } , } \end{array}
101
+ $$
102
+
103
+ where $A _ { t } ^ { z } ( A _ { t } ^ { z } ) ^ { \top } = \Sigma _ { t } ^ { z }$ , $A _ { t } ^ { x } ( A _ { t } ^ { x } ) ^ { \top } = \Sigma _ { t } ^ { x }$ and $\epsilon _ { t } ^ { x } \sim \mathcal { N } ( \mathbf { 0 } , I _ { x } ) , \epsilon _ { t } ^ { z } \sim \mathcal { N } ( \mathbf { 0 } , I _ { z } )$ are auxiliary variables. Note that the randomness within the variables of interest (e.g. ${ \boldsymbol { z } } _ { t }$ ) is extracted by the auxiliary variables (e.g. $\epsilon _ { t . }$ ) which follow the standard distributions. Hence, the reparameterisation guarantees that gradient-based methods can be applied in learning phase (Kingma & Welling, 2013).
104
+
105
+ In this paper, the joint generative model is comprised of two sets of RNN and multilayer perceptron (MLP): $\mathrm { \bar { R N N } } _ { g } ^ { z } / \mathrm { \bar { M L P } } _ { g } ^ { z }$ for the latent variable, while $\mathrm { R N N } _ { g } ^ { x } / \mathrm { M L P } _ { g } ^ { z }$ for the observables. We stack these two RNN/MLP together according to the causal dependency between those variables. The joint generative model is implemented as the generative network:
106
+
107
+ $$
108
+ \begin{array} { r l } & { \{ \mu _ { t } ^ { z } , A _ { t } ^ { z } \} = \mathrm { M L P } _ { g } ^ { z } ( h _ { t } ^ { z } ; \Phi ) , } \\ & { \quad \quad h _ { t } ^ { z } = \mathrm { R N N } _ { g } ^ { z } ( h _ { t - 1 } ^ { z } , z _ { t - 1 } ; \Phi ) , } \\ & { \quad \quad z _ { t } = \mu _ { t } ^ { z } + A _ { t } ^ { z } \epsilon _ { t } ^ { z } , } \\ & { \{ \mu _ { t } ^ { x } , A _ { t } ^ { x } \} = \mathrm { M L P } _ { g } ^ { x } ( h _ { t } ^ { x } ; \Phi ) , } \\ & { \quad \quad h _ { t } ^ { x } = \mathrm { R N N } _ { g } ^ { x } ( h _ { t - 1 } ^ { x } , x _ { t - 1 } , z _ { t } ; \Phi ) , } \\ & { \quad \quad x _ { t } = \mu _ { t } ^ { x } + A _ { t } ^ { x } \epsilon _ { t } ^ { x } , } \end{array}
109
+ $$
110
+
111
+ where $ { \boldsymbol { h } } _ { t } ^ { z }$ and ${ h } _ { t } ^ { x }$ denote the hidden states of the corresponding RNNs. The MLPs map the hidden states of RNNs into the means and deviations of variables of interest. The parameter set $\Phi$ is comprised of the weights of RNNs and MLPs.
112
+
113
+ One should notice that when the latent variable $_ z$ is obtained, e.g. by inference (details in the next subsection), the conditional distribution $p _ { \Phi } ( \pmb { X } | Z )$ (Eq. (9)) will involve in generating the observable $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ instead of the joint distribution $p _ { \Phi } ( X , Z )$ (Eq. (10)). This is essentially the scenario of predicting future values of the observable variable given its history. We will use the term “generative model” and will not discriminate the joint generative model or the conditional one as it can be inferred in context.
114
+
115
+ # 4.2 INFERENCING THE LATENT PROCESS
116
+
117
+ As the generative model involves latent variable ${ \boldsymbol { z } } _ { t }$ , of which the true valus are unaccessible even we have observed $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ . Hence, the marginal likelihood $p _ { \Phi } ( X )$ becomes the key that bridges the model and the data. The calculation of marginal likelihood involves the posterior distribution $p _ { \Phi } ( Z | X )$ , which is often intractable as complex integrals are involved. We are unable to learn the paramters or to infer the latent variables. Therefore, we consider instead a restricted family of tractable distributions $q _ { \Psi } ( Z | X )$ , referred to as the approximate posterior family, as approximations to the true posterior $p _ { \Phi } ( Z | X )$ such that the family is sufficiently rich and flexible to provide good approximations (Bishop, 2006; Kingma & Welling, 2013; Rezende et al., 2014).
118
+
119
+ We define the inference model in accordance with the approximate posterior family we have presumed, in a similar fashion as (Chung et al., 2015), where the factorised distribution is formulated as follows:
120
+
121
+ $$
122
+ q _ { \Psi } ( Z | X ) = \prod _ { t } q _ { \Psi } ( z _ { t } | z _ { < t } , \pmb { x } _ { < t } ) = \prod _ { t } \mathcal { N } ( z _ { t } ; \tilde { \mu } _ { \Psi } ^ { z } ( z _ { < t } , \pmb { x } _ { < t } ) , \tilde { \Sigma } _ { \Psi } ^ { z } ( z _ { < t } , \pmb { x } _ { < t } ) ) ,
123
+ $$
124
+
125
+ where $\tilde { \mu } _ { \Psi } ^ { z } ( \boldsymbol { z } _ { < t } , \boldsymbol { x } _ { < t } )$ and $\tilde { \Sigma } _ { \Psi } ^ { z } ( z _ { < t } , \pmb { x } _ { < t } )$ are functions of the historical information $\{ { \boldsymbol { z } } _ { < t } \} , \{ { \boldsymbol { x } } _ { < t } \}$ , representing the approximated mean and variance of the latent variable ${ \boldsymbol { z } } _ { t }$ , respectively. Note that $\pmb { \psi }$ represents the parameter set of inference model.
126
+
127
+ The inference model essentially describes an autoregressive model on ${ \boldsymbol { z } } _ { t }$ with exogenous input $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ . Hence, in a similar fashion as the generative model, we implement the inference model as the inference network using RNN/MLP:
128
+
129
+ $$
130
+ \begin{array} { r l } & { \{ \tilde { \pmb { \mu } } _ { t } ^ { z } , \tilde { \pmb { A } } _ { t } ^ { z } \} = \mathrm { M L P } _ { i } ^ { z } ( \tilde { \pmb { h } } _ { t } ^ { z } ) , } \\ & { \quad \quad \quad \tilde { \pmb { h } } _ { t } ^ { z } = \mathrm { R N N } _ { i } ^ { z } ( \tilde { \pmb { h } } _ { t - 1 } ^ { z } , z _ { t - 1 } , { \pmb { x } } _ { t - 1 } ) , } \\ & { \quad \quad \quad z _ { t } = \tilde { \pmb { \mu } } _ { t } ^ { z } + \tilde { \pmb { A } } _ { t } ^ { z } \tilde { \epsilon } _ { t } ^ { z } , } \end{array}
131
+ $$
132
+
133
+ where $\tilde { A } _ { t } ^ { z } ( \tilde { A } _ { t } ^ { z } ) ^ { \top } = \tilde { \Sigma } _ { t } ^ { z } = \tilde { \Sigma } _ { \Psi } ^ { z } ( z _ { < t } , { \pmb x } _ { < t } )$ while $\tilde { h } _ { t } ^ { z }$ represents the hidden state of RNN and $\tilde { \epsilon } _ { t } ^ { z } \sim$ $\textstyle \mathcal { N } ( \mathbf { 0 } , \pmb { I } _ { z } )$ is an auxiliary variable to extract randomness. The inference mean $\tilde { \mu } _ { t } ^ { z }$ and deviation $\tilde { A } _ { t } ^ { z }$ is computed by an MLP from the hidden state $\tilde { h } _ { t } ^ { z }$ . We use the subscript $i$ instead of $g$ to distinguish the architecture used in inference model in contrast to generative model.
134
+
135
+ # 4.3 FORECASTING OBSERVATIONS IN FUTURE
136
+
137
+ In the realm of time series analysis, we usually pay more attention on forecasting over generating (Box et al., 2015). It means that we are essentially more interested in the generation procedure conditioning on the historical information rather than generation purely based on a priori belief since the observations in the past of $\scriptstyle { \mathbf { { \mathcal { x } } } } _ { < t }$ influences our belief of the latent variable ${ \boldsymbol { z } } _ { t }$ . Therefore, we apply the approximate posterior distribution of the latent variable ${ \boldsymbol { z } } _ { t }$ (Eq. (19)) as discussed in previous subsection, in place of the prior distribution (Eq. (8)) to build our predictive model.
138
+
139
+ ![](images/852dde43a7bb5c25766ead25232f56522d381c9a08a4e2765edea88184ee2287.jpg)
140
+ Figure 1: Forecasting the future using Neural Stochastic Volatility Model.
141
+
142
+ Given the historical observations $\scriptstyle { \mathbf { \mathcal { x } } } _ { < t }$ , the predictive model infers the current value of latent variable ${ \boldsymbol { z } } _ { t }$ using inference network and then generates the prediction of the current observation $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ using generative network. The procedure of forecasting is shown in Fig. 1.
143
+
144
+ NSVM is learned using Stochastic Gradient Variational Bayes following (Kingma & Welling, 2013;
145
+ Rezende et al., 2014). For readability, we provide the detailed derivation in Appendix A.
146
+
147
+ # 4.4 LINKS TO GARCH(1,1) AND HESTON MODEL
148
+
149
+ Although we refer to GARCH and Heston as volatility models, the purposes of them are quite different: GARCH is a predictive model used for volatility forecasting whereas Heston is more of a generative model of the underlying dynamics which facilitate closed-form solutions to SDEs in option pricing. The proposed NSVM has close relations to GARCH(1,1) and Heston model: both of them can be regarded as a special case of the neural network formulation. Recall Eq. (2), GARCH(1,1) is formulated as $\sigma _ { t } ^ { 2 } \stackrel { . } { = } \alpha _ { 0 } + \alpha _ { 1 } ( x _ { t - 1 } - \mu _ { t - 1 } ) ^ { 2 } + \beta _ { 1 } \sigma _ { t - 1 } ^ { 2 }$ , where $\mu _ { t - 1 }$ is the trend estimate of $\{ x _ { t } \}$ at time step $t$ calculated by some mean models. A common practice is to assume that $\mu _ { t }$ follows the ARMA family (Box et al., 2015), or even simpler, as a constant that $\mu _ { t } \equiv \mu$ . We adopt the constant trend for simplicity as our focus is on volatility estimation.
150
+
151
+ We define the hidden state as $h _ { t } ^ { x } = [ \mu , \sigma _ { t } ] ^ { \top }$ , and disable the latent variable $z _ { t } \equiv 0$ as the volatility modelled by GARCH(1,1) is conditionally deterministic. Hence, we instantiate the generative network (Eqs. (16), (17) and (18)) as follows:
152
+
153
+ $$
154
+ \begin{array} { r l r } { { \{ \mu , \sigma _ { t } \} = \mathrm { M L P } _ { g } ^ { x } ( h _ { t } ^ { x } ; \Phi ) = \{ [ 1 , 0 ] h _ { t } ^ { x } , [ 0 , 1 ] h _ { t } ^ { x } \} , } } \\ & { } & { h _ { t } ^ { x } = \mathrm { R N N } _ { g } ^ { x } ( h _ { t - 1 } ^ { x } , x _ { t - 1 } ; \Phi ) } \\ & { } & { = \sqrt { [ \begin{array} { l } { 0 } \\ { \alpha _ { 0 } } \end{array} ] + [ \begin{array} { l } { 0 } \\ { \alpha _ { 1 } } \end{array} ] ( x _ { t - 1 } - [ 1 , 0 ] h _ { t - 1 } ^ { x } ) ^ { 2 } + [ \begin{array} { l l } { 1 } & { 0 } \\ { 0 } & { \beta _ { 1 } } \end{array} ] ( h _ { t - 1 } ^ { x } ) ^ { 2 } } , } \\ & { } & { x _ { t } = \mu + \sigma _ { t } \epsilon _ { t } \qquad \mathrm { w h e r e } ~ \epsilon _ { t } \sim \mathcal { N } ( 0 , 1 ) . } \end{array}
155
+ $$
156
+
157
+ The set of generative parameters is $\Phi = \{ \mu , \alpha _ { 0 } , \alpha _ { 1 } , \beta _ { 1 } \}$ .
158
+
159
+ Next, we show the link between NSVM and (discrete-time) Heston model (Eq. (5)). Let $h _ { t } ^ { x } \ =$ $[ x _ { t - 1 } , \mu , \sigma _ { t } ] ^ { \top }$ be the hidden state and $z _ { t }$ be i.i.d. standard Gaussian instead of autoregressive vari
160
+
161
+ able, we represent the Heston model in the framework of NSVM as:
162
+
163
+ $$
164
+ \begin{array} { r l } & { \quad \left[ \epsilon _ { t } \right] = \mathcal { N } ( \mathbf { 0 } , \left[ \begin{array} { l l } { 1 } & { \rho } \\ { \rho } & { 1 } \end{array} \right] ) , } \\ & { \lbrace \mu _ { t } , \sigma _ { t } \rbrace = \mathrm { M L P } _ { g } ^ { x } ( h _ { t } ^ { x } ; \Phi ) = \lbrace [ 1 , 1 , 0 ] h _ { t } ^ { x } - [ 0 , 0 , 0 . 5 ] ( h _ { t } ^ { x } ) ^ { 2 } , [ 0 , 0 , 1 ] h _ { t } ^ { x } \rbrace , } \\ & { \quad \quad h _ { t } ^ { x } = \mathrm { R N N } _ { g } ^ { x } ( h _ { t - 1 } ^ { x } , x _ { t - 1 } , z _ { t } ; \Phi ) } \\ & { \quad \quad \quad = \left[ \begin{array} { l l l } { 0 } & { 0 } & { 0 } \\ { 0 } & { 1 } & { 0 } \\ { 0 } & { 0 } & { 1 + a } \end{array} \right] h _ { t - 1 } ^ { x } + \left[ \begin{array} { l } { 1 } \\ { 0 } \end{array} \right] x _ { t - 1 } + \left[ \begin{array} { l } { 0 } \\ { 0 } \end{array} \right] z _ { t } , } \\ & { \quad \quad x _ { t } = \mu _ { t } + \sigma _ { t } \epsilon _ { t } . } \end{array}
165
+ $$
166
+
167
+ The set of generative parameters is $\Phi = \{ \mu , a , b \}$
168
+
169
+ One should notice that, in practice, the formulation may change in accordance with the specific architecture of neural networks involved in building the model, and hence a closed-form representation may be absent.
170
+
171
+ # 5 EXPERIMENTS
172
+
173
+ In this section, we present our experiments1 both on the synthetic and real-world datasets to validate the effectiveness of NSVM.
174
+
175
+ # 5.1 BASELINES AND EVALUATION METRICS
176
+
177
+ To evaluate the performance of volatility modelling, we adopt the standard econometric model GARCH(1,1) Bollerslev (1986) as well as its variants EGARCH(1,1) Nelson (1991), GJR-GARCH(1,1,1) Glosten et al. (1993), ARCH(5), TARCH(1,1,1), APARCH(1,1,1), AGARCH(1,1,1), NAGARCH(1,1,1), IGARCH(1,1), IAVGARCH(1,1), FIGARCH(1,d,1) as baselines, which incorporate with the corresponding mean model AR(20). We would also compare our NSVM against a MCMC-based model “stochvol” and the recent Gaussian-processes-based model “GPVOL” Wu et al. (2014), which is a non-parametric model jointly learning the dynamics and hidden states via online inference algorithm. In addition, we setup a naive forecasting model as an alternative baseline referred to as NAIVE, which maintains a sliding window of size 20 on the most recent historical observations and forecasts the current values of mean and volatility by the average mean and variance of the window.
178
+
179
+ For synthetic data experiments, we take four metrics into consideration for performance evaluation: 1) the negative log-likelihood (NLL) of observing the test sequence with respect to the generative model parameters; 2) the mean-squared error (MSE) between the predicted mean and the ground truth ( $\mu$ -MSE), 3) MSE of the predicted variance against the true variance ( $\sigma$ -MSE); 4) smoothness of fit, which is the standard deviation of the differences of succesive variance estimates. As for the real-world scenarios, the trend and volatility are implicit such that no ground truth is accessible to compare with, we consider only NLL and smoothness as the metrics for evaluation on real-world data experiment.
180
+
181
+ # 5.2 MODEL IMPLEMENTATION
182
+
183
+ The implementation of NSVM in experiments is in accordance with the architecture illustrated in Fig. 1: it consists of two neural networks, namely inference network and generative network. Each network comprises a set of RNN/MLP as we have discussed above: the RNN is instantiated by stacked LSTM layers whereas the MLP is essentially a 1-layer fully-connected feedforward network which splits into two equal-sized sublayers with different activation functions – one sublayer applies exponential function to impose the non-negativity and prevents overshooting of variance estimates while the other uses linear function to calculate mean estimates. During experiment, the model is structured by cascading the inference network and generative network as depicted in Fig. 1. The input layer is of size 20, which is the same as the embedding dimension $D _ { E }$ ; the layer on the interface of inference network and generative network – we call it latent variable layer – represents the latent variable $z$ , where its dimension is 2. The output layer has the same structure as the input one, therefore the latent variable layer acts as a bottleneck of the entire architecture which helps to extract the key factor. The stacked layers between input layer, latent variable layer and output layer are the hidden layers of either inference network or generative network, it consists of 1 or 2 LSTM layers with size 10, which contains recurrent connection for temporal dependencies modelling.
184
+
185
+ State-of-the-art learning techniques have been applied: we introduce Dropout (Zaremba et al., 2014) into each LSTM recurrent layer and impose L2-norm on the weights of each fully-connected feedforward layer as regularistion; NADAM optimiser (Dozat, 2015) is exploited for fast convergence, which is a variant of ADAM optimiser (Kingma & Ba, 2014) incorporated with Nesterov momentum; stepwise exponential learning rate decay is adopted to anneal the variations of convergence as time goes.
186
+
187
+ For econometric models, we utilise several widely-used packages for time series analysis: statsmodels (http://statsmodels.sourceforge.net/), arch (https://pypi.python. org/pypi/arch/3.2), Oxford-MFE-toolbox (https://www.kevinsheppard. com/MFE_Toolbox), stochvol (https://cran.r-project.org/web/packages/ stochvol) and fGarch (https://cran.r-project.org/web/packages/fGarch). The implementation of GPVOL is retrived from http://jmhl.org and we adopt the same hyperparameter setting as in Wu et al. (2014).
188
+
189
+ # 5.3 SYNTHETIC DATA EXPERIMENT
190
+
191
+ We build up the synthetic dataset by generating 256 heteroskedastic univariate time series, each with 2000 data points i.e. 2000 time steps. At each time step, the observation is drawn from a Gaussian distribution with pre-determined mean and variance, where the tendency of mean and variance is synthesised as linear combinations of sine functions. Specifically, for the trend and variance, we synthesis each using 3 sine functions with randomly chosen amplitudes and frequencies; then the value of the synthesised signal at each timestep is drawn from a Gaussian distribution with the corresponding value of trend and variance at that timestep. A sampled sequence is shown in Fig. 2a. We expect that this limited dataset could well simulate the real-world scenarios: one usually has very limited chances to observe and collect a large amount of data from time-invariant distributions. In addition, it seems that every observable or latent quantity within time series varies from time to time and seldom repeats the old patterns. Hence, we presume that the tendency shows long-term patterns and the period of tendency is longer than observation. In the experiment, we take the former 1500 time steps as the training set whereas the latter 500 as the test set.
192
+
193
+ For the synthetic data experiment, we simplify the recurrent layers in both inference net and generative net as single LSTM layer of size 10. The actual input $\{ \vec { \pmb { x } } _ { t } \}$ fed to NSVM is $D _ { E }$ - dimensional time-delay embedding (Kennel et al., 1992) of raw univariate observation $\{ x _ { t } \}$ such that $\vec { \pmb { x } } _ { t } = [ x _ { t + 1 - D _ { E } } , \ldots , x _ { t } ]$ . 2-dimensional latent variable ${ \boldsymbol { z } } _ { t }$ is adopted to capture the latent process, and enforces an orthogonal representation of the process by using diagonal covariance matrix. At each time step, 30 samples of latent variable ${ \boldsymbol { z } } _ { t }$ are generated via reparameterisation (Eq. (22)).
194
+
195
+ # 5.4 REAL-WORLD DATA EXPERIMENT
196
+
197
+ We select 162 out of more than 1500 stocks from Chinese stock market and collect the time series of their daily closing prices from 3 institutions in China. We favour those with earlier listing date of trading (from 2006 or earlier) and fewer suspension days (at most 50 suspension days in total during the period of observation) so as to reduce the noise introduced by insufficient observation or missing values, which has significant influences on the performance but is essentially irrelevant to the purpose of volatility forecasting. More specifically, the dataset obtained contains 162 time series, each with 2552 data points (7 years). A sampled sequence is shown in Fig. 2b. We divide the whole dataset into two subsets: the training subset consists of the first 2000 data points while the test subset contains the rest 552 data points.
198
+
199
+ Similar model configuration is applied to the real-world data experiment: time-delay embedding of dimension $D _ { E }$ on the raw univariate time series; 2-dimensional latent variable with diagonal (a) Synthetic time series prediction. (up) The data and the predicted $\mu ^ { x }$ and bounds $\mu ^ { x } \pm \sigma ^ { x }$ . (down) The groundtruth data variance and the corresponding prediction from GARCH(1,1) and NSVM.
200
+
201
+ ![](images/4019d43352f97311d7c9fcf91d932c937cf2eef3ef065be2dfb5d2655247be46.jpg)
202
+
203
+ ![](images/0f4267086df87d704e935cf7b8baa2f7349e39f858a7ba0e54f10a6f3ad78001.jpg)
204
+ Figure 2: A case study of time series prediction.
205
+
206
+ (b) Real-world stock price prediction. (up) The data and the predicted $\mu ^ { x }$ and bounds $\mu ^ { x } \pm \sigma ^ { x }$ . (down) The variance prediction from GARCH(1,1) and NSVM. The prediction of NSVM is more smooth and stable than that of GARCH(1,1), also yielding smaller NLL.
207
+
208
+ covariance matrix; 30 sampling for the latent variable at each time step. Instead of single LSTM layers, here we adopt stacked LSTM layers composed of $2 \times 1 0$ LSTM cells.
209
+
210
+ # 5.5 RESULT AND DISCUSSION
211
+
212
+ The overall performance of NSVM and baselines is listed in details in Table 1 and case studies on synthetic data and real-world financial data are illustrated in Fig. 2. The results show that NSVM has higher accuracies for modelling heteroskedastic time series on various metrics: NLL shows the fitness of the model under likelihood measure; the smoothness indicates that NSVM obtains more robust representation of the latent volatility; $\mu$ -MSE and $\sigma$ -MSE in synthetic data experiment imply the ability of recognising the underlying patterns of both trend and volatility, which in fact verifies our claim of NSVM’s high flexibility and rich expressive power for volatility (as well as trend) modelling and forecasting compared with the baselines. Although the improvement comes at the cost of longer training time before convergence, it can be mitigated by applying parallel computing techniques as well as more advanced network architecture or training procedure.
213
+
214
+ Table 1: Results of the experiments.
215
+
216
+ <table><tr><td colspan="6">SYNTHETICDATA STOCKDATA</td></tr><tr><td></td><td>NLL</td><td>μ-MSE</td><td>σ-MSE</td><td>smoothness</td><td>NLL smoothness</td></tr><tr><td>NSVM</td><td>3.932e-2</td><td>2.393e-3</td><td>6.178e-4</td><td>4.322e-3</td><td>-2.184 3.505e-3</td></tr><tr><td>GARCH(1,1)</td><td>6.905e-2</td><td>7.594e-3*</td><td>8.408e-4</td><td>4.616e-3</td><td>-1.961 6.659e-3</td></tr><tr><td>GJRGARCH(1,1,1)</td><td>6.491e-2</td><td>7.594e-3*</td><td>7.172e-4</td><td>4.426e-3</td><td>-2.016 4.967e-3</td></tr><tr><td>EGARCH(1,1)</td><td>5.913e-2</td><td>7.594e-3*</td><td>8.332e-4</td><td>4.546e-3</td><td>-2.001 5.451e-3</td></tr><tr><td>ARCH(5)</td><td>7.577e-2</td><td>7.594e-3*</td><td>1.610e-3</td><td>5.880e-3</td><td>-1.955 7.917e-3</td></tr><tr><td>TARCH(1,1,1)</td><td>6.365e-2</td><td>7.594e-3*</td><td>7.284e-4</td><td>4.727e-3</td><td>-2.012 3.399e-3</td></tr><tr><td>APARCH(1,1,1)</td><td>6.187e-2</td><td>7.594e-3*</td><td>9.115e-4</td><td>4.531e-3</td><td>-2.014 4.214e-3</td></tr><tr><td>AGARCH(1,1)</td><td>6.311e-2</td><td>7.594e-3*</td><td>9.543e-4</td><td>4.999e-3</td><td>-2.008 5.847e-3</td></tr><tr><td>NAGARCH(1,1,1)</td><td>1.134e-1</td><td>7.594e-3*</td><td>9.516e-4</td><td>4.904e-3</td><td>-2.020 5.224e-3</td></tr><tr><td>IGARCH(1,1)</td><td>6.751e-2</td><td>7.594e-3*</td><td>9.322e-4</td><td>4.019e-3</td><td>-1.999 4.284e-3</td></tr><tr><td>IAVGARCH(1,1)</td><td>6.901e-2</td><td>7.594e-3*</td><td>7.174e-4</td><td>4.282e-3</td><td>-1.984 4.062e-3</td></tr><tr><td>FIGARCH(1,d,1)</td><td>6.666e-2</td><td>7.594e-3*</td><td>1.055e-3</td><td>5.045e-3</td><td>-2.002 5.604e-3</td></tr><tr><td>MCMC-stochvol</td><td>0.368</td><td>7.594e-3*</td><td>3.956e-2</td><td>6.421e-4</td><td>-0.909 1.511e-3</td></tr><tr><td>GPVOL</td><td>1.273</td><td>7.594e-3*</td><td>6.457e-1</td><td>4.142e-2</td><td>-2.052 5.739e-3</td></tr><tr><td>NAIVE</td><td>2.037e-1</td><td>8.423e-3</td><td>3.515e-3</td><td>2.708e-2</td><td>-0.918 7.459e-3</td></tr></table>
217
+
218
+ \*the same results obtained from AR(20) mean models
219
+
220
+ The newly proposed NSVM outperforms standard econometric models GARCH(1,1), EGARCH(1,1), GJR-GARCH(1,1,1) and some other variants as well as the MCMC-based model “stochvol” and the recent GP-based model “GPVOL”. Apart from the higher accuracy NSVM obtained, it provides us with the ability to simply generalise univariate time series analysis to multivariate cases by extending network dimensions and manipulating the covariance matrices. Furthermore, it allows us to implement and deploy a similar framework on other applications, for example signal processing and denoising. The shortcoming of NSVM comparing to GPVOL is that the training procedure is offline: for short-term prediction, the experiments have shown the accuracy, but for long-term forecasting, the parameters need retraining, which will be rather time consuming. The online algorithm for inference will be one of the work in the future.
221
+
222
+ Specifically, our NSVM outperforms GARCH(1,1) on 142 out of 162 stocks on the metric of NLL. In particular, NSVM obtains $- 2 . 1 1 1$ , $- 2 . 0 4 4$ , $- 2 . 6 0 9$ and $- 1 . 9 3 9$ on the stocks corresponding to Fig2(b), Fig 4(a), (b) and (c) respectively, each of which is better than the that of GARCH (0.3433, 0.589, 0.109 and 0.207 lower on NLL).
223
+
224
+ # 6 CONCLUSION
225
+
226
+ In this paper, a novel volatility model NSVM has been proposed for stochastic volatility estimation and forecast. We integrated statistical models and RNNs, leveraged the characteristics of each model, organised the dependences between random variables in the form of graphical models, implemented the mappings among variables and parameters through RNNs, and finally established a powerful stochastic recurrent model with universal approximation capability. The proposed architecture comprises a pair of complementary stochastic neural networks: the generative network and inference network. The former models the joint distribution of the stochastic volatility process with both observable and latent variables of interest; the latter provides with the approximate posterior i.e. an analytical approximation to the (intractable) conditional distribution of the latent variables given the observable ones. The parameters (and consequently the underlying distributions) are learned (and inferred) via variational inference, which maximises the lower bound for the marginal log-likelihood of the observable variables. Our NSVM has presented higher accuracy compared to GARCH(1,1), EGARCH(1,1) and GJR-GARCH(1,1,1) as well as GPVOL for volatility modelling and forecasting on synthetic data and real-world financial data. Future work on NSVM would be to incorporate well-established models such as ARMA/ARIMA and to investigate the modelling of seasonal time series and correlated sequences.
227
+
228
+ As we have known, for models that evolve explicitly in terms of the squares of the residuals $( e _ { t } ^ { 2 } =$ $( x _ { t } - \mu _ { t } ) ^ { 2 } )$ , e.g. GARCH, the multi-step-ahead forecasts have closed-form solutions, which means that those forecasts can be efficiently computed in a recursive fashion due to the linear formulation of the model and the exploitation of relation $E _ { t - 1 } [ e _ { t } ^ { 2 } ] = \sigma _ { t } ^ { 2 }$ .
229
+
230
+ On the other hand, for models that are not linear or do not explicitly evolve in terms of $e ^ { 2 }$ , e.g. EGARCH (linear but not evolve in terms of $e ^ { 2 }$ ), our NSVM (nonlinear and not evolve in terms of $e ^ { 2 }$ ), the closed-form solutions are absent and thus the analytical forecast is not available. We will instead use simulation-based forecast, which uses random number generator to simulate draws from the predicted distribution and build up a pre-specified number of paths of the variances at 1 step ahead. The draws are then averaged to produce the forecast of the next step. For n-step-ahead forecast, it requires n iterations of 1-step-ahead forecast to get there.
231
+
232
+ NSVM is designed as an end-to-end model for volatility estimation and forecast. It takes the price of stocks as input and outputs the distribution of the price at next step. It learns the dynamics using RNN, leading to an implicit, highly nonlinear formulation, where only simulation-based forecast is available. In order to obtain reasonably accurate forecasts, the number of draws should be relatively large, which will be very expensive for computation. Moreover, the number of draws will increase exponentially as the forecast horizon grows, so it will be infeasible to forecast several time steps ahead. We have planned to investigate the characteristics of NSVM’s long-horizontal forecasts and try to design a model specific sampling method for efficient evaluation in the future.
233
+
234
+ # REFERENCES
235
+
236
+ Torben G Andersen and Tim Bollerslev. Answering the skeptics: Yes, standard volatility models do provide accurate forecasts. International economic review, pp. 885–905, 1998.
237
+
238
+ Marco Avellaneda and Antonio Paras. Managing the volatility risk of portfolios of derivative securities: the lagrangian uncertain volatility model. Applied Mathematical Finance, 3(1):21–52, 1996.
239
+
240
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014.
241
+
242
+ Justin Bayer and Christian Osendorfer. Learning stochastic recurrent networks. arXiv preprint arXiv:1411.7610, 2014.
243
+
244
+ Christopher M Bishop. Pattern recognition. Machine Learning, 128, 2006.
245
+
246
+ Tim Bollerslev. Generalized autoregressive conditional heteroskedasticity. Journal of econometrics, 31(3):307–327, 1986.
247
+
248
+ George EP Box, Gwilym M Jenkins, Gregory C Reinsel, and Greta M Ljung. Time series analysis: forecasting and control. John Wiley & Sons, 2015.
249
+
250
+ Kyunghyun Cho, Bart Van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Hol- ¨ ger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014.
251
+
252
+ Jan K Chorowski, Dzmitry Bahdanau, Dmitriy Serdyuk, Kyunghyun Cho, and Yoshua Bengio. Attention-based models for speech recognition. In Advances in Neural Information Processing Systems, pp. 577–585, 2015.
253
+
254
+ Junyoung Chung, Kyle Kastner, Laurent Dinh, Kratarth Goel, Aaron C Courville, and Yoshua Bengio. A recurrent latent variable model for sequential data. In Advances in neural information processing systems, pp. 2980–2988, 2015.
255
+
256
+ John C Cox, Jonathan E Ingersoll Jr, and Stephen A Ross. A theory of the term structure of interest rates. Econometrica: Journal of the Econometric Society, pp. 385–407, 1985.
257
+
258
+ Timothy Dozat. Incorporating nesterov momentum into adam. 2015.
259
+
260
+ Robert F Engle. Autoregressive conditional heteroscedasticity with estimates of the variance of united kingdom inflation. Econometrica: Journal of the Econometric Society, pp. 987–1007, 1982.
261
+
262
+ Robert F Engle and Kenneth F Kroner. Multivariate simultaneous generalized arch. Econometric theory, 11(01):122–150, 1995.
263
+
264
+ Otto Fabius and Joost R van Amersfoort. Variational recurrent auto-encoders. arXiv preprint arXiv:1412.6581, 2014.
265
+
266
+ Marco Fraccaro, Søren Kaae Sønderby, Ulrich Paquet, and Ole Winther. Sequential neural models with stochastic layers. arXiv preprint arXiv:1605.07571, 2016.
267
+
268
+ Lawrence R Glosten, Ravi Jagannathan, and David E Runkle. On the relation between the expected value and the volatility of the nominal excess return on stocks. The journal of finance, 48(5): 1779–1801, 1993.
269
+
270
+ Alex Graves. Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850, 2013.
271
+
272
+ Alex Graves, Abdel-rahman Mohamed, and Geoffrey Hinton. Speech recognition with deep recurrent neural networks. In 2013 IEEE international conference on acoustics, speech and signal processing, pp. 6645–6649. IEEE, 2013.
273
+
274
+ Karol Gregor, Ivo Danihelka, Alex Graves, Danilo Jimenez Rezende, and Daan Wierstra. Draw: A recurrent neural network for image generation. arXiv preprint arXiv:1502.04623, 2015.
275
+
276
+ Barbara Hammer. On the approximation capability of recurrent neural networks. Neurocomputing, 31(1):107–123, 2000.
277
+
278
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015.
279
+
280
+ Steven L Heston. A closed-form solution for options with stochastic volatility with applications to bond and currency options. Review of financial studies, 6(2):327–343, 1993.
281
+
282
+ Geoffrey Hinton, Li Deng, Dong Yu, George E Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara N Sainath, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 29(6):82–97, 2012.
283
+
284
+ Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
285
+
286
+ John C Hull. Options, futures, and other derivatives. Pearson Education India, 2006.
287
+
288
+ Matthew B Kennel, Reggie Brown, and Henry DI Abarbanel. Determining embedding dimension for phase-space reconstruction using a geometrical construction. Physical review A, 45(6):3403, 1992.
289
+
290
+ Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
291
+
292
+ Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
293
+
294
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012.
295
+
296
+ Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015.
297
+
298
+ Minh-Thang Luong, Hieu Pham, and Christopher D Manning. Effective approaches to attentionbased neural machine translation. arXiv preprint arXiv:1508.04025, 2015.
299
+
300
+ Daniel B Nelson. Conditional heteroskedasticity in asset returns: A new approach. Econometrica: Journal of the Econometric Society, pp. 347–370, 1991.
301
+
302
+ Ser-Huang Poon and Clive WJ Granger. Forecasting volatility in financial markets: A review. Journal of economic literature, 41(2):478–539, 2003.
303
+
304
+ Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. arXiv preprint arXiv:1401.4082, 2014.
305
+
306
+ Jurgen Schmidhuber. Deep learning in neural networks: An overview. ¨ Neural Networks, 61:85–117, 2015.
307
+
308
+ Mike Schuster and Kuldip K Paliwal. Bidirectional recurrent neural networks. IEEE Transactions on Signal Processing, 45(11):2673–2681, 1997.
309
+
310
+ Josef Stoer and Roland Bulirsch. Introduction to numerical analysis, volume 12. Springer Science & Business Media, 2013.
311
+
312
+ Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pp. 3104–3112, 2014.
313
+
314
+ Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016.
315
+
316
+ Yue Wu, Jose Miguel Hern ´ andez-Lobato, and Zoubin Ghahramani. Gaussian process volatility ´ model. In Advances in Neural Information Processing Systems, pp. 1044–1052, 2014.
317
+
318
+ Wojciech Zaremba, Ilya Sutskever, and Oriol Vinyals. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, 2014.
319
+
320
+ # A COMPLEMENTARY DISCUSSIONS OF NSVM
321
+
322
+ In this appendix section we present detailed derivations of NSVM, specifically, the parameters learning and calibration, and covariance reparameterisation.
323
+
324
+ # A.1 LEARNING PARAMETERS / CALIBRATION
325
+
326
+ Given the observations $\boldsymbol { X }$ , the objective of learning is to maximise the marginal log-likelihood of $\boldsymbol { X }$ given $\Phi$ , where the posterior is involved. However, as we have discussed in the previous subsection, the true posterior is usually intractable, which means exact inference is difficult. Hence, approximate inference is applied instead of rather than exact inference by following (Kingma & Welling, 2013; Rezende et al., 2014). We represent the marginal log-likelihood of $\boldsymbol { X }$ in the following form:
327
+
328
+ $$
329
+ \begin{array} { r l } & { \displaystyle \ln p _ { \Phi } ( \pmb X ) = \mathbb { E } _ { q _ { \Psi } ( Z | \pmb X ) } \Big [ \ln \frac { p _ { \Phi } ( \pmb X , Z ) } { p _ { \Phi } ( Z | \pmb X ) } \Big ] = \mathbb { E } _ { q _ { \Psi } ( Z | \pmb X ) } \Big [ \ln \frac { p _ { \Phi } ( \pmb X , Z ) } { q _ { \Psi } ( Z | \pmb X ) } \frac { q _ { \Psi } ( Z | \pmb X ) } { p _ { \Phi } ( Z | \pmb X ) } \Big ] } \\ & { \quad \quad \quad \quad \quad = \mathbb { E } _ { q _ { \Psi } ( Z | \pmb X ) } [ \ln p _ { \Phi } ( \pmb X , Z ) - \ln q _ { \Psi } ( Z | \pmb X ) ] + K L [ q _ { \Psi } ( Z | \pmb X ) | | p _ { \Phi } ( Z | \pmb X ) ] } \\ & { \quad \quad \quad \quad \geq \mathbb { E } _ { q _ { \Psi } ( Z | \pmb X ) } [ \ln p _ { \Phi } ( \pmb X , Z ) - \ln q _ { \Psi } ( Z | \pmb X ) ] \qquad ( \mathrm { a s } K L \geq 0 ) , } \end{array}
330
+ $$
331
+
332
+ where the expectation term $\mathbb { E } _ { q _ { \Psi } ( Z | X ) } [ \ln p _ { \Phi } ( X , Z ) - \ln q _ { \Psi } ( Z | X ) ]$ is referred to as the variational lower bound $\mathcal { L } [ q ; X , \Phi , \Psi ]$ of the approximate posterior $q _ { \Psi } ( Z | X , \Psi )$ . The lower bound is essentially a functional with respect to distribution $q$ and parameterised by observations $\boldsymbol { X }$ and parameter sets $\Phi , \Psi$ of both generative and inference model. In theory, the marginal log-likelihood is maximised by optimisation on the lower bound $\mathcal { L } [ q ; X , \Phi , \Psi ]$ with respect to $\Phi$ and $\pmb { \psi }$ .
333
+
334
+ We apply the factorisations in Eqs. (10) and (19) to the integrand within expectation of Eq. (30):
335
+
336
+ $$
337
+ \begin{array} { l } { \displaystyle \ln p _ { \Phi } ( X , Z ) - \ln q _ { \Psi } ( Z | X ) = \sum _ { t } \Big [ \ln \mathcal { N } ( x _ { t } ; \mu _ { \Phi } ^ { x } ( x _ { < t } , z _ { \le t } ) , \Sigma _ { \Phi } ^ { x } ( x _ { < t } , z _ { \le t } ) ) } \\ { \displaystyle \qquad + \ln \mathcal { N } ( z _ { t } ; \mu _ { \Phi } ^ { z } ( z _ { < t } ) , \Sigma _ { \Phi } ^ { z } ( z _ { < t } ) ) - \ln \mathcal { N } ( z _ { t } ; \mu _ { \Psi } ^ { z } ( z _ { < t } , x _ { < t } ) , \tilde { \Sigma } _ { \Psi } ^ { z } ( z _ { < t } , x _ { < t } ) ) \Big ] . } \end{array}
338
+ $$
339
+
340
+ As there is usually no closed-form solution for the expecation (Eq. (30)), we have to estimate the expectation by applying sampling methods to latent variable ${ \boldsymbol { z } } _ { t }$ through time in accordance with the causal dependences. We utilise the reparameterisation of ${ \boldsymbol { z } } _ { t }$ as shown in Eq. (22) such that we sample the corresponding auxiliary standard variable $\tilde { \epsilon } _ { t }$ rather than ${ \boldsymbol { z } } _ { t }$ itself and compute the value of ${ \boldsymbol { z } } _ { t }$ on the fly. This ensures that the gradient-based optimisation techniques are applicable as the reparameterisation isolates the model parameters of interest from the sampling procedure. By sampling $N$ sample paths, the estimator of the lower bound is defined as the average of paths:
341
+
342
+ $$
343
+ \begin{array} { r l } & { \widehat { \mathcal { L } } = - \displaystyle \frac { 1 } { 2 N } \sum _ { t } \Big [ \ln \operatorname* { d e t } { \textstyle \Sigma _ { t } ^ { z } } + ( \tilde { \mu } _ { t } ^ { z } + \tilde { A } _ { t } ^ { z } \tilde { \epsilon } _ { t } ^ { z } - \mu _ { t } ^ { z } ) ^ { \top } ( { \textstyle \Sigma _ { t } ^ { z } } ) ^ { - 1 } ( \tilde { \mu } _ { t } ^ { z } + \tilde { A } _ { t } ^ { z } \tilde { \epsilon } _ { t } ^ { z } - \mu _ { t } ^ { z } ) } \\ & { \qquad + \ln \operatorname* { d e t } { \textstyle \Sigma _ { t } ^ { x } } + ( x _ { t } - \mu _ { t } ^ { x } ) ^ { \top } ( { \textstyle \Sigma _ { t } ^ { x } } ) ^ { - 1 } ( x _ { t } - \mu _ { t } ^ { x } ) - \ln \operatorname* { d e t } { \textstyle \tilde { \Sigma } _ { t } } \Big ] + \mathrm { c o n s t } , } \end{array}
344
+ $$
345
+
346
+ where $\tilde { A } _ { t } ^ { z } ( \tilde { A } _ { t } ^ { z } ) ^ { \top } = \tilde { \Sigma } _ { t } ^ { z }$ and $\tilde { \epsilon } _ { t } ^ { z } \sim \mathcal { N } ( \mathbf { 0 } , I _ { z } )$ is parameter-independent and considered as constant when calculating derivatives.
347
+
348
+ # A.2 COVARIANCE PARAMETERISATION
349
+
350
+ As is known, it entails a computational complexity of $\mathcal { O } ( M ^ { 3 } )$ to maintain and update the full-size covariance $\pmb { \Sigma }$ with $M$ dimensions (Rezende et al., 2014). In the case of very high dimensions, the full-size covariance matrix would be too computationally expensive to afford. Hence, we use instead the covariance matrices with much fewer parameters for efficiency. The simplest setting is to use diagonal precision matrix (i.e. the inverse of covariance matrix) $\overrightharpoon { \mathbfcal { Z } } ^ { - 1 } = \overrightharpoon { \cal D }$ . However, it draws very strong restrictions on representation of the random variable of interest as the diagonal precision matrix (and thus diagonal covariance matrix) indicates independence among the dimensions. Therefore, the tradeoff becomes low-rank perturbation on diagonal matrix: $\pmb { \Sigma } ^ { - 1 } = \pmb { D } + \pmb { V V } ^ { \top }$ , where $V = \{ \pmb { v } _ { 1 } , \dots , \pmb { v } _ { K } \}$ denotes the perturbation while each ${ \pmb v } _ { k }$ is a $M$ -dimensional column vector.
351
+
352
+ The corresponding covariance matrix and its determinant is obtained using Woodbury identity and matrix determinant lemma:
353
+
354
+ $$
355
+ { \begin{array} { r l } & { \qquad \Sigma = D ^ { - 1 } - D ^ { - 1 } V ( I + V ^ { \top } D ^ { - 1 } V ) ^ { - 1 } V ^ { \top } D ^ { - 1 } } \\ & { } \\ & { \ln \operatorname* { d e t } \Sigma = - \ln \operatorname* { d e t } { ( D + V V ^ { \top } ) } = - \ln \operatorname* { d e t } D - \ln \operatorname* { d e t } { ( I + V ^ { \top } D ^ { - 1 } V ) } } \end{array} }
356
+ $$
357
+
358
+ To calculate the deviation $\pmb { A }$ for the factorisation of covariance matrix $\pmb { \Sigma } = \pmb { A } \pmb { A } ^ { \top }$ , we first consider the rank-1 perturbation where $K \ = \ 1$ . It follows that $V ~ = ~ v$ is a column vector, and $I + V ^ { \top } D ^ { - 1 } V \stackrel { \cdot } { = } 1 + v ^ { \top } D ^ { - 1 } v$ is a real number. A particular solution of $\pmb { A }$ is obtain:
359
+
360
+ $$
361
+ A = D ^ { - \frac { 1 } { 2 } } - [ \gamma ^ { - 1 } ( 1 - \sqrt { \eta } ) ] D ^ { - 1 } v v ^ { \top } D ^ { - \frac { 1 } { 2 } }
362
+ $$
363
+
364
+ where $\gamma = v ^ { \top } D ^ { - 1 } v$ , $\eta = ( 1 + \gamma ) ^ { - 1 }$ . The computational complexity involved here is merely $\mathcal { O } ( M )$ .
365
+
366
+ bserve that $\begin{array} { r } { V V ^ { \top } = \sum _ { k = 1 } ^ { K } { v _ { k } v _ { k } ^ { \top } } } \end{array}$ , the perturbation of rank $K$ is es ntially the superposition of $K$ $\pmb { A }$
367
+ provided to demonstrate the procedure of calculation. The computational complexity for rank- $K$ perturbation remains to be $\mathcal { O } ( M )$ given $K \ll M$ .
368
+
369
+ Algorithm 1 gives the detailed calculation scheme.
370
+
371
+ <table><tr><td>Algorithm1 Calculation of rank-K perturbation of precision matrices</td></tr><tr><td>Input: The original diagonal matrix D; The rank-K perturbation V = {U1,..., Uk}</td></tr><tr><td>Output: A such that the factorisation AAT = ∑= (D + VVT)-1 holds</td></tr><tr><td>1: A(0) = D-¹</td></tr><tr><td>2:i=0</td></tr><tr><td>3:while i&lt;K_do 4: Y(i) =U)A(i))A)U(i)</td></tr><tr><td>5: n(i) = (1+Y())-1</td></tr><tr><td>6: A(i+1) =A(i)-[γ(i1(1-√n(a)]A(i)A)U(i)U(𝑖)A(𝑖) 7: A= A(K)</td></tr></table>
372
+
373
+ # B MORE CASE STUDIES
374
+
375
+ In this appendix section we add more case studies of NVSM performance on both synthetic data and real-world stock data.
376
+
377
+ NSVM obtains $- 2 . 0 4 4$ , $- 2 . 6 0 9$ and $- 1 . 9 3 9$ on the stocks corresponding to Fig 4(a), (b) and (c) respectively, each of which is better than the that of GARCH (0.589, 0.109 and 0.207 lower on NLL).
378
+
379
+ The reason of the drops in Fig 4(b) and (c) seems to be that NSVM has captured the jumps and drops of the stock price using its nonlinear dynamics and modelled the sudden changes as part of the trend: the estimated trend “mu” goes very close to the real observed price even around the jumps and drops (see the upper figure of Fig 4(b) and (c) around step 1300 and 1600). The residual (i.e. difference between the real value of observation and the trend of prediction) therefore becomes quite small, which lead to a lower volatility estimation.
380
+
381
+ On the other hand, for the baselines, we adopt AR as the trend model, which is a relatively simple linear model compared with the nonlinear NSVM. AR would not capture the sudden changes and leave those spikes in the residual; GARCH then took the residuals as input for volatility modelling, resulting in the spikes in volatility estimation.
382
+
383
+ ![](images/f43ff1bc495c169e73aa911c03a878aa3a393f55577ca834838d3698e86186d6.jpg)
384
+
385
+ (a) Synthetic time series prediction II. (up) The data and the predicted $\mu ^ { x }$ and bounds $\mu ^ { x } \pm \sigma ^ { x }$ . (down) The groundtruth data variance and the corresponding prediction from GARCH(1,1) and NSVM.
386
+
387
+ ![](images/1b651a01073939c302698d3354c49a9ab7c7b3941aa09e36a8f018842b56c5a5.jpg)
388
+ Figure 3: A case study of synthetic time series prediction.
389
+
390
+ (b) Synthetic time series prediction IV. (up) The data and the predicted $\mu ^ { x }$ and bounds $\mu ^ { x } \pm \sigma ^ { x }$ . (down) The groundtruth data variance and the corresponding prediction from GARCH(1,1) and NSVM.
391
+
392
+ ![](images/b0fe530281b1acc1169c13d45e343fa8a7c1e248898be60bf2cd72f86cf67b7b.jpg)
393
+ (a) Real-world stock price prediction II. (up) The data and the predicted $\mu ^ { x }$ and bounds $\mu ^ { x } \pm \sigma ^ { x }$ . (down) The variance prediction from GARCH(1,1) and NSVM. The prediction of NSVM is more smooth and stable than that of GARCH(1,1), also yielding smaller NLL.
394
+
395
+ ![](images/aaa3fb36f229f2934bd102fd6afebcd7437777c69d894aead7542c2c4c4d34e3.jpg)
396
+ (b) Real-world stock price prediction III. (up) The data and the predicted $\mu ^ { x }$ and bounds $\mu ^ { x } \pm \sigma ^ { x }$ . (down) The variance prediction from GARCH(1,1) and NSVM. The prediction of NSVM is more smooth and stable than that of GARCH(1,1), also yielding smaller NLL.
397
+
398
+ ![](images/6c59a9568d5de3de16d22ae651e0b90c39f62322077353e6665f93557889c043.jpg)
399
+ Figure 4: A case study of real-world stock time series prediction.
400
+
401
+ (c) Real-world stock price prediction IV. (up) The data and the predicted $\mu ^ { x }$ and bounds $\mu ^ { x } \pm \sigma ^ { x }$ . (down) The variance prediction from GARCH(1,1) and NSVM. The prediction of NSVM is more smooth and stable than that of GARCH(1,1), also yielding smaller NLL.
parse/train/B1IzH7cxl/B1IzH7cxl_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1IzH7cxl/B1IzH7cxl_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/B1IzH7cxl/B1IzH7cxl_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJedHRVtPB/BJedHRVtPB_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:273f45e4e0eb42266c680ab7b02a9b053b48abb4e89ca8af29c3895096b8b552
3
+ size 7207599
parse/train/BJedHRVtPB/BJedHRVtPB_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e0afb57785187a0678a037d8ae586b19878cd7a504e961fa559ccaf8a1e59dda
3
+ size 6915345
parse/train/BJedHRVtPB/BJedHRVtPB_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3aef5dd12dc005d9b05e8b85c1d528cfc7bf2e1e855196cbeed18581f9064485
3
+ size 7217711
parse/train/BJij4yg0Z/BJij4yg0Z_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:52cde42995483a9bb7c9cf42576f3dcdf568202951593a7ea2d046f69284b0ad
3
+ size 824261
parse/train/BJij4yg0Z/BJij4yg0Z_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d6cd8ee7cb11fc68c471964fe11543ba22b815be9ef442b8648f0bc4c3dbbe15
3
+ size 680601
parse/train/BJij4yg0Z/BJij4yg0Z_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b3972f470eb45816ed6f50419febc1016b61d4261f6ef4a99ea50d2d1f51694
3
+ size 827343
parse/train/BJlguT4YPr/BJlguT4YPr_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b26e683889e8985f4a55981bc04f4d2966a3b9dcf82fbe5bbe05ea82e9d6a02e
3
+ size 616350
parse/train/BJlguT4YPr/BJlguT4YPr_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea13599dd1afbfd98774a26e9d318b41b9dff628ebd92cc7e264de961e574a94
3
+ size 403465
parse/train/BJlguT4YPr/BJlguT4YPr_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bee1c87af3d7ad42c18756e00632465ac65f263b2161f10504dcd532a06cb3cf
3
+ size 634370
parse/train/BJlo91BYPr/BJlo91BYPr_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:be2cfe69034aa2048162d4c057871e1b529db1b1596d5baeaf9767999b0d854a
3
+ size 1498337
parse/train/BJlo91BYPr/BJlo91BYPr_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e1c9dcd18387e55289b5fea6aaf5c7e3ba4befde16257621ad67c95842a1363
3
+ size 1370669
parse/train/BJlo91BYPr/BJlo91BYPr_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5e176e4decafff5c0b1f009ce18dd99a4f31c2c5d169f5a1ddd2b29ca15b936d
3
+ size 1497092
parse/train/ByedzkrKvH/ByedzkrKvH_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:00c78c6e0aa4e293c35b643e291c634e41ba2242d3dbc555a9a28408c69d6ebc
3
+ size 2603246
parse/train/ByedzkrKvH/ByedzkrKvH_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e43c2b945280966e12e5e98bae6c3301f7b759aa635e88bd4316b386269970c7
3
+ size 1993818
parse/train/ByedzkrKvH/ByedzkrKvH_span.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2dfb24f8cfb626ee5de4a1c9711ca27f47d8861fa60d80d5eb4f22f923ddeba3
3
+ size 2633790
parse/train/Byl1W1rtvH/Byl1W1rtvH_layout.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3982c8704f1a0c48c7be5d97a0e3bbe0146fa148d068027f692702ec1738fd65
3
+ size 3274752
parse/train/Byl1W1rtvH/Byl1W1rtvH_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3d6d3e56e232f2a4c35d5d50e04c875771958db0d0624400266e9db11418e687
3
+ size 3042823