cwLeeDev's picture
Update README.md
e2729fe verified
|
Raw
History Blame
14.6 kB
metadata
language:
  - ko
  - en
library_name: pytorch
license: other
pipeline_tag: feature-extraction
tags:
  - online-handwriting
  - mathematical-expression-recognition
  - trajectory
  - temporal-convolution
  - on-device
  - pytorch

AIFlow Math Ink 0.6

AIFlow Math Ink 0.6์€ ์ˆ˜ํ•™ ํ•„๊ธฐ๋ฅผ ์ด๋ฏธ์ง€๋ณด๋‹ค stroke trajectory๋กœ ๋จผ์ € ํ•ด์„ํ•˜๋Š” PyTorch ์—ฐ๊ตฌ ๋ชจ๋ธ์ด๋‹ค.

์˜จ๋ผ์ธ ํŽœ ์ž…๋ ฅ์„ ์‹œ๊ฐ„ ์ˆœ์„œ๊ฐ€ ์žˆ๋Š” point sequence๋กœ ํ‘œํ˜„ํ•˜๊ณ , ๊ฐ ๊ณ ๋ฆฝ ๊ธฐํ˜ธ์— ๋Œ€ํ•ด ๋‹ค์Œ ๋‘ ์ข…๋ฅ˜์˜ ํ™•๋ฅ ์„ ์˜ˆ์ธกํ•œ๋‹ค.

  • 378๊ฐœ exact symbol label
  • 324๊ฐœ visual family

ํ•ต์‹ฌ ์—ฐ๊ตฌ ์ฃผ์ œ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

  1. ์„œ๋กœ ๋‹ค๋ฅธ ํ•„๊ธฐ ์†๋„๋ฅผ ์ผ์ •ํ•œ temporal representation์œผ๋กœ ์ •๊ทœํ™”ํ•˜๋Š” ๋ฐฉ๋ฒ•
  2. ์˜จ๋ผ์ธ stroke์™€ raster ์ด๋ฏธ์ง€๋ฅผ ํ•˜๋‚˜์˜ trajectory encoder๋กœ ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฐฉ๋ฒ•
  3. ์‹œ๊ฐ์ ์œผ๋กœ ์œ ์‚ฌํ•œ ๊ธฐํ˜ธ์˜ ํ˜•ํƒœ์™€ ์˜๋ฏธ๋ฅผ ๋ถ„๋ฆฌํ•˜๋Š” ๋ฐฉ๋ฒ•
  4. ๊ธฐํ˜ธ ๋ถ„๋ฅ˜์™€ ์ˆ˜์‹ ๋ฌธ๋งฅ์„ ๊ฒฐํ•ฉํ•˜๋Š” ๋ฐฉ๋ฒ•

AIFlow Math Ink 0.6 architecture

์—ฐ๊ตฌ ์•„์ด๋””์–ด

1. Trajectory-first representation

์ผ๋ฐ˜์ ์ธ ์ด๋ฏธ์ง€ ๋ถ„๋ฅ˜ ๋ฐฉ์‹์€ ํ•„๊ธฐ๋ฅผ ๊ณ ์ •๋œ bitmap์œผ๋กœ ๋ณ€ํ™˜ํ•˜๋ฉด์„œ stroke ์ˆœ์„œ์™€ ์‹œ๊ฐ„ ์ •๋ณด๋ฅผ ์ œ๊ฑฐํ•œ๋‹ค.

AIFlow Math Ink๋Š” ํ•„๊ธฐ๋ฅผ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์‹œ๊ณ„์—ด๋กœ ํ‘œํ˜„ํ•œ๋‹ค.

pointโ‚ โ†’ pointโ‚‚ โ†’ pointโ‚ƒ โ†’ ... โ†’ pen-up

๊ฐ point์—๋Š” ์œ„์น˜๋ฟ ์•„๋‹ˆ๋ผ ๋‹ค์Œ ์ •๋ณด๊ฐ€ ํฌํ•จ๋œ๋‹ค.

  • ์ด๋™ ๋ฐฉํ–ฅ
  • ๊ณก๋ฅ 
  • ํ•„๊ธฐ ์†๋„
  • stroke ๋‚ด๋ถ€ ์ง„ํ–‰๋ฅ 
  • pen-up ์ƒํƒœ
  • ์ „์ฒด ๊ธฐํ˜ธ ์•ˆ์—์„œ์˜ ์ƒ๋Œ€ ์œ„์น˜
  • timestamp ๊ด€์ธก ์—ฌ๋ถ€

์ด ํ‘œํ˜„์€ ๊ฐ™์€ ๋ชจ์–‘์ด๋ผ๋„ stroke ์ˆœ์„œ์™€ ์›€์ง์ž„์ด ๋‹ค๋ฅธ ํ•„๊ธฐ๋ฅผ ๊ตฌ๋ถ„ํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•œ๋‹ค.

2. Canonical temporal sampling

์‚ฌ๋žŒ๋งˆ๋‹ค ํ•„๊ธฐ ์†๋„์™€ touch event ๋ฐœ์ƒ ๋นˆ๋„๊ฐ€ ๋‹ค๋ฅด๊ธฐ ๋•Œ๋ฌธ์— ์›๋ณธ event ๊ฐœ์ˆ˜๋Š” ์ผ์ •ํ•˜์ง€ ์•Š๋‹ค.

๋ชจ๋ธ์€ ๊ฐ stroke๋ฅผ 6Hz canonical timeline์œผ๋กœ ์žฌํ‘œ๋ณธํ™”ํ•œ๋‹ค. ์ด๋•Œ ๋‹ค์Œ anchor๋Š” ํ•ญ์ƒ ๋ณด์กดํ•œ๋‹ค.

  • stroke ์‹œ์ž‘์ 
  • stroke ๋์ 
  • pen-up
  • ์›๋ณธ timestamp

์ด๋ฅผ ํ†ตํ•ด ๋น ๋ฅด๊ฒŒ ์“ด ๊ธฐํ˜ธ์™€ ๋А๋ฆฌ๊ฒŒ ์“ด ๊ธฐํ˜ธ๋ฅผ ๋น„์Šทํ•œ temporal scale์—์„œ ๋น„๊ตํ•  ์ˆ˜ ์žˆ๋‹ค.

Raw touch events
  โ†’ stroke anchor preservation
  โ†’ 6 Hz canonical sampling
  โ†’ maximum 128 events

์›๋ณธ touch event๋Š” ๊ทธ๋Œ€๋กœ ์œ ์ง€ํ•˜๊ณ , ์žฌํ‘œ๋ณธํ™”๋œ sequence๋Š” ๋ชจ๋ธ ์ž…๋ ฅ์šฉ view๋กœ ์‚ฌ์šฉํ•œ๋‹ค.

3. Shape coordinate์™€ canvas coordinate์˜ ๋ถ„๋ฆฌ

๊ธฐํ˜ธ์˜ ๋ชจ์–‘๊ณผ ์ˆ˜์‹ ์•ˆ์—์„œ์˜ ์œ„์น˜๋Š” ์„œ๋กœ ๋‹ค๋ฅธ ์ •๋ณด๋ฅผ ๊ฐ€์ง„๋‹ค.

AIFlow Math Ink๋Š” ๋‘ ์ขŒํ‘œ๊ณ„๋ฅผ ๋™์‹œ์— ์‚ฌ์šฉํ•œ๋‹ค.

shape_x, shape_y

๊ธฐํ˜ธ ์ž์ฒด์˜ bounding box๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์ •๊ทœํ™”ํ•œ ์ขŒํ‘œ๋‹ค. ๊ธ€์ž์˜ ํฌ๊ธฐ์™€ ์œ„์น˜ ์˜ํ–ฅ์„ ์ค„์ด๊ณ  ์ˆœ์ˆ˜ํ•œ ํ˜•ํƒœ๋ฅผ ํ‘œํ˜„ํ•œ๋‹ค.

canvas_x, canvas_y

์ „์ฒด canvas ๋˜๋Š” ์ˆ˜์‹ ์˜์—ญ์„ ๊ธฐ์ค€์œผ๋กœ ํ•œ ์ขŒํ‘œ๋‹ค. ๊ธฐํ˜ธ์˜ ์ƒ๋Œ€ ํฌ๊ธฐ์™€ ์ˆ˜์ง ์œ„์น˜๋ฅผ ๋ณด์กดํ•œ๋‹ค.

์˜ˆ๋ฅผ ๋“ค์–ด ์†Œ๋ฌธ์ž x, ๋Œ€๋ฌธ์ž X, ๊ณฑ์…ˆ ๊ธฐํ˜ธ ร—๋Š” ๋ชจ์–‘์ด ๋น„์Šทํ•˜์ง€๋งŒ ์ˆ˜์‹ ์•ˆ์—์„œ์˜ ํฌ๊ธฐ์™€ ์œ„์น˜ ๋ถ„ํฌ๊ฐ€ ๋‹ค๋ฅผ ์ˆ˜ ์žˆ๋‹ค. ๋‘ ์ขŒํ‘œ๊ณ„๋ฅผ ํ•จ๊ป˜ ์‚ฌ์šฉํ•˜๋ฉด ํ˜•ํƒœ์™€ ๋ฌธ๋งฅ์„ ๋ถ„๋ฆฌํ•ด ํ•™์Šตํ•  ์ˆ˜ ์žˆ๋‹ค.

4. Online๊ณผ raster์˜ ๊ณตํ†ต trajectory space

์˜จ๋ผ์ธ ์ž…๋ ฅ์—๋Š” stroke sequence๊ฐ€ ์ง์ ‘ ์กด์žฌํ•˜์ง€๋งŒ, raster ์ด๋ฏธ์ง€์—๋Š” stroke ์ˆœ์„œ๊ฐ€ ์—†๋‹ค.

Raster ๊ฒฝ๋กœ๋Š” ์ด๋ฏธ์ง€๋ฅผ ๊ณง๋ฐ”๋กœ symbol label๋กœ ๋ถ„๋ฅ˜ํ•˜๋Š” ๋Œ€์‹ , ์ด๋ฏธ์ง€์—์„œ ์—ฌ๋Ÿฌ ๊ฐœ์˜ virtual trajectory๋ฅผ ์ƒ์„ฑํ•œ๋‹ค.

Raster image
  โ†’ spatial encoder
  โ†’ virtual-trajectory decoder
  โ†’ top-4 stroke hypotheses
  โ†’ shared trajectory encoder

๊ฐ hypothesis๋Š” ๋‹ค์Œ ์ •๋ณด๋ฅผ ํฌํ•จํ•œ๋‹ค.

  • virtual stroke coordinates
  • stroke state
  • progress
  • hypothesis score

์ดํ›„ ์˜จ๋ผ์ธ ์ž…๋ ฅ๊ณผ ๋™์ผํ•œ residual TCN์ด virtual trajectory๋ฅผ ์ฒ˜๋ฆฌํ•œ๋‹ค.

์ด ๊ตฌ์กฐ์˜ ๋ชฉ์ ์€ ์ž…๋ ฅ modality๊ฐ€ ๋‹ฌ๋ผ๋„ ์ตœ์ข… ์ธ์‹์€ ๋™์ผํ•œ trajectory representation ์œ„์—์„œ ์ˆ˜ํ–‰ํ•˜๋Š” ๊ฒƒ์ด๋‹ค.

5. Exact label๊ณผ visual family์˜ ๊ณ„์ธต์  ์˜ˆ์ธก

์ˆ˜ํ•™ ๊ธฐํ˜ธ์—๋Š” ํ˜•ํƒœ๊ฐ€ ๊ฑฐ์˜ ๋™์ผํ•˜์ง€๋งŒ ์˜๋ฏธ๊ฐ€ ๋‹ค๋ฅธ ๊ฒฝ์šฐ๊ฐ€ ๋งŽ๋‹ค.

์˜ˆ:

O / 0 / o
x / X / ร—
| / 1 / l

๋ชจ๋ธ์€ ์ด๋ฅผ ํ•˜๋‚˜์˜ ๋ถ„๋ฅ˜ ๋ฌธ์ œ๋กœ๋งŒ ๋‹ค๋ฃจ์ง€ ์•Š๊ณ  ๋‘ ๊ฐœ์˜ prediction head๋กœ ๋‚˜๋ˆˆ๋‹ค.

Shared trajectory representation
  โ”œโ”€ exact head: 378 labels
  โ””โ”€ family head: 324 visual families

Exact head๋Š” ์ตœ์ข… symbol token์„ ์˜ˆ์ธกํ•œ๋‹ค.

Family head๋Š” ์‹œ๊ฐ์ ์œผ๋กœ ๊ฐ€๊นŒ์šด ๊ธฐํ˜ธ ์ง‘ํ•ฉ์„ ์˜ˆ์ธกํ•œ๋‹ค. ์ด๋ฅผ ํ†ตํ•ด trajectory encoder๊ฐ€ ํ˜•ํƒœ๋ฅผ ๋จผ์ € ์•ˆ์ •์ ์œผ๋กœ ๊ตฌ๋ถ„ํ•˜๊ณ , ์ •ํ™•ํ•œ ์˜๋ฏธ ์„ ํƒ์€ ๋ณ„๋„์˜ ๋ฌธ๋งฅ ์ •๋ณด์™€ ๊ฒฐํ•ฉํ•  ์ˆ˜ ์žˆ๋‹ค.

6. Formula-context behavior modeling

๊ณ ๋ฆฝ ๊ธฐํ˜ธ์˜ trajectory๋งŒ์œผ๋กœ ๊ตฌ๋ถ„ํ•˜๊ธฐ ์–ด๋ ค์šด ๊ธฐํ˜ธ์—๋Š” ์ˆ˜์‹ ๋ฌธ๋งฅ์„ ์ถ”๊ฐ€ํ•œ๋‹ค.

Behavior head๋Š” ๋‹ค์Œ ๋‘ ํ‘œํ˜„์„ ๊ฒฐํ•ฉํ•œ๋‹ค.

128ร—19 stroke representation
+
49-dimensional formula context

Context feature์—๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ •๋ณด๊ฐ€ ํฌํ•จ๋œ๋‹ค.

  • ์ˆ˜์‹ ์ „์ฒด ํฌ๊ธฐ ๋Œ€๋น„ ๊ธฐํ˜ธ ํฌ๊ธฐ
  • baseline๊ณผ์˜ ์ƒ๋Œ€ ์œ„์น˜
  • ์ฃผ๋ณ€ ๊ธฐํ˜ธ์˜ ์œ„์น˜์™€ ๊ฐ„๊ฒฉ
  • symbol group geometry
  • ์ด์›ƒ token ํŒจํ„ด

ํ˜„์žฌ behavior head์˜ ๋Œ€ํ‘œ ์—ญํ•  ๋ถ„๋ฅ˜๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

identifier_lower
identifier_upper
multiply_operator

์˜ˆ๋ฅผ ๋“ค์–ด x, X, ร—์˜ trajectory๊ฐ€ ๋น„์Šทํ•  ๋•Œ, ๊ธฐํ˜ธ์˜ ์ƒ๋Œ€ ํฌ๊ธฐ์™€ ์ฃผ๋ณ€ token์„ ์ด์šฉํ•ด ์—ญํ• ์„ ์„ ํƒํ•œ๋‹ค.

7. Boundary behavior modeling

์ˆ˜์‹ ์ธ์‹์—์„œ๋Š” ์—ฌ๋Ÿฌ stroke๋ฅผ ํ•˜๋‚˜์˜ ๊ธฐํ˜ธ๋กœ ๋ฌถ๋Š” grouping ๊ณผ์ •์ด ํ•„์š”ํ•˜๋‹ค.

Boundary behavior head๋Š” segmentation candidate๊ฐ€ ์‹ค์ œ ๊ธฐํ˜ธ ๊ฒฝ๊ณ„๋ฅผ ๊ฐ€๋กœ์ง€๋ฅด๋Š”์ง€๋ฅผ geometry feature๋กœ ์˜ˆ์ธกํ•œ๋‹ค.

Segmentation lattice geometry
  โ†’ 17-dimensional boundary features
  โ†’ boundary behavior score

์ด score๋Š” ๊ฐ€๊นŒ์ด ์žˆ๋Š” ๋‘ ๊ธฐํ˜ธ๊ฐ€ ํ•˜๋‚˜์˜ symbol group์œผ๋กœ ํ•ฉ์ณ์ง€๋Š” overmerge๋ฅผ ์–ต์ œํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋œ๋‹ค.

์ž…๋ ฅ ํ‘œํ˜„

๋ชจ๋ธ ์ž…๋ ฅ์€ ์ตœ๋Œ€ 128๊ฐœ์˜ event์™€ 19๊ฐœ์˜ feature๋กœ ๊ตฌ์„ฑ๋œ๋‹ค.

input shape: 128 ร— 19
sample rate: 6 Hz
normalized ink space: 128 ร— 128

Stroke encoding

19 input channels

shape_x, shape_y,
canvas_x, canvas_y,
direction_x, direction_y,
curvature, pen_up, stroke_progress,
aspect_ratio,
bbox_top, bbox_bottom, bbox_height, center_y,
baseline_available,
time_delta, speed, missing_mask, source_modality
Feature group ์—ญํ• 
shape_x, shape_y ๊ธฐํ˜ธ ๋‚ด๋ถ€์˜ ์ •๊ทœํ™”๋œ ํ˜•ํƒœ
canvas_x, canvas_y ์ „์ฒด canvas ์•ˆ์—์„œ์˜ ์ƒ๋Œ€ ์œ„์น˜
direction_x, direction_y point ์ด๋™ ๋ฐฉํ–ฅ
curvature stroke์˜ ๊ตญ์†Œ ๊ณก๋ฅ 
pen_up stroke ๊ฒฝ๊ณ„
stroke_progress stroke ์‹œ์ž‘๋ถ€ํ„ฐ ๋๊นŒ์ง€์˜ ์ง„ํ–‰๋„
aspect_ratio ๊ธฐํ˜ธ bounding box ๋น„์œจ
bbox_*, center_y ์ˆ˜์‹ ์•ˆ์—์„œ์˜ geometry
baseline_available baseline feature์˜ ์œ ํšจ์„ฑ
time_delta, speed temporal dynamics
missing_mask ๊ด€์ธก๋˜์ง€ ์•Š์€ ์‹œ๊ฐ„ ์ •๋ณด ํ‘œ์‹œ
source_modality online ๋˜๋Š” raster ์ž…๋ ฅ ๊ตฌ๋ถ„

Timestamp๊ฐ€ ์กด์žฌํ•˜๋Š” ์ž…๋ ฅ์€ ๊ด€์ธก๋œ ์‹œ๊ฐ„ ์ฐจ์ด์™€ ์†๋„๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค. ์ •์  ์ด๋ฏธ์ง€์—์„œ ์ƒ์„ฑ๋œ virtual trajectory๋Š” canonical timing๊ณผ missingness ์ •๋ณด๋ฅผ ํ•จ๊ป˜ ์‚ฌ์šฉํ•œ๋‹ค.

๋ชจ๋ธ ๊ตฌ์กฐ

Online strokes
  โ†’ canonical sampler
  โ†’ 128ร—19 sequence
  โ†’ dual-TCN online adapter
  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                               โ”‚
Raster 128ร—128                                 โ”‚
  โ†’ spatial encoder                            โ”‚
  โ†’ causal virtual-trajectory decoder          โ”‚
  โ†’ top-4 trajectory hypotheses                โ”‚
  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
                                               โ–ผ
                                shared residual TCN
                                     โ”œโ”€ exact head
                                     โ””โ”€ visual-family head

์ฃผ์š” ์„ค์ •:

ํ•ญ๋ชฉ ๊ฐ’
Maximum events 128
Input features 19
Shared hidden size 128
Exact labels 378
Visual families 324
Raster hypotheses 4
Canonical sample rate 6Hz

Dual-TCN online adapter

์˜จ๋ผ์ธ ์ž…๋ ฅ์€ ๋‘ ์ข…๋ฅ˜์˜ temporal pattern์„ ํ•จ๊ป˜ ์ฒ˜๋ฆฌํ•œ๋‹ค.

  • ๊ธฐํ˜ธ ์ „์ฒด์˜ ๊ธด stroke ํ๋ฆ„
  • point ์‚ฌ์ด์˜ ์งง์€ ๊ตญ์†Œ ๋ณ€ํ™”

Dual-TCN adapter๋Š” ์„œ๋กœ ๋‹ค๋ฅธ receptive field๋ฅผ ๊ฐ€์ง„ temporal convolution์„ ๊ฒฐํ•ฉํ•ด ์ด ๋‘ ํŒจํ„ด์„ ํ‘œํ˜„ํ•œ๋‹ค.

Adapter์˜ shared state๋Š” base trajectory encoder์™€ ํ•จ๊ป˜ ํ•ฉ์„ฑ๋œ๋‹ค.

base trajectory state
  โ†’ online shared state
  โ†’ modality-specific adaptation
  โ†’ classifier heads

Checkpoints

๊ฐ seed๋Š” ๋‹ค์Œ ์„ธ ํŒŒ์ผ๋กœ ๊ตฌ์„ฑ๋œ๋‹ค.

models/
  seed17/
    base_378.pt
    online_adapter.pt
    behavior_role_head.pt
  seed31/
    base_378.pt
    online_adapter.pt
    behavior_role_head.pt
  seed47/
    base_378.pt
    online_adapter.pt
    behavior_role_head.pt
ํŒŒ์ผ ๋‚ด์šฉ
base_378.pt ๊ณตํ†ต trajectory encoder, raster encoder, exact/family classifier
online_adapter.pt ์‹ค์ œ online stroke์— ๋Œ€ํ•œ dual-TCN adaptation
behavior_role_head.pt ๊ธฐํ˜ธ์˜ ์ˆ˜์‹ ๋‚ด ์—ญํ• ์„ ๋ถ„๋ฅ˜ํ•˜๋Š” context head

์„ธ seed๋Š” ์„œ๋กœ ๋‹ค๋ฅธ ์ดˆ๊ธฐํ™”์—์„œ ํ•™์Šต๋˜์–ด ๋ชจ๋ธ ๊ฐ„ ์˜ค๋ฅ˜ ํ•ฉ์˜์™€ ensemble ํŠน์„ฑ์„ ๋ถ„์„ํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋œ๋‹ค.

์‚ฌ์šฉ ์˜ˆ์‹œ

from pathlib import Path
from math_grid_drawer.research.math_ink_06 import MathInk06Engine

root = Path("models/seed17")

engine = MathInk06Engine(
    root / "base_378.pt",
    adapter_checkpoint=root / "online_adapter.pt",
)

result = engine.recognize_online(
    strokes,
    canvas_width=128,
    canvas_height=128,
    top_k=5,
)

์ถœ๋ ฅ์—๋Š” exact symbol ํ›„๋ณด์™€ ๊ฐ ํ›„๋ณด์˜ ํ™•๋ฅ ์ด ํฌํ•จ๋œ๋‹ค.

for candidate in result.candidates:
    print(candidate.token, candidate.probability)

์—ฐ๊ตฌ ๊ฒฐ๊ณผ

๊ณ ๋ฆฝ ๊ธฐํ˜ธ trajectory classification

Seed 17์˜ writer-disjoint ํ‰๊ฐ€ ๊ฒฐ๊ณผ:

Split Exact top-1 Exact top-5 Family top-1
Writer validation, 4,261 samples 86.13% 99.48% 92.94%
Paired test, 3,782 samples 82.87% 97.73% 91.22%

์„ธ seed์˜ ํ™•๋ฅ ์„ ํ‰๊ท ํ•œ ensemble ๊ฒฐ๊ณผ:

Metric Result
Exact top-1 83.71%
Exact top-5 98.02%
Visual-family top-1 92.99%
Seed oracle top-1 88.05%

Exact top-1๊ณผ family top-1์˜ ์ฐจ์ด๋Š” ์ „์ฒด์ ์ธ ํ˜•ํƒœ ์ธ์‹๋ณด๋‹ค ๋™์ผ family ๋‚ด๋ถ€์˜ ์˜๋ฏธ ์„ ํƒ์ด ๋” ์–ด๋ ค์šด ๋ฌธ์ œ์ž„์„ ๋ณด์—ฌ์ค€๋‹ค.

Exact ์˜ค๋ฅ˜์˜ 56.98%๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋™์ผ visual-family ๋‚ด๋ถ€ ํ˜ผ๋™์ด์—ˆ๋‹ค.

O / 0 / o
uppercase / lowercase
vertical-line family
cross family

์ด ๊ฒฐ๊ณผ๋Š” trajectory encoder๊ฐ€ ํ˜•ํƒœ ํ›„๋ณด๋ฅผ ๋งŒ๋“ค๊ณ , formula context๊ฐ€ ์ตœ์ข… ์˜๋ฏธ๋ฅผ ์„ ํƒํ•˜๋Š” ๊ณ„์ธต์  ๊ตฌ์กฐ๋ฅผ ๋’ท๋ฐ›์นจํ•œ๋‹ค.

Formula-context behavior head

์ •๋‹ต symbol grouping ์œ„์—์„œ ํ‰๊ฐ€ํ•œ 3-seed ํ‰๊ท :

Metric Result
Role accuracy 93.33%
Macro-F1 76.41%
Lowercase identifier recall 95.66%
Uppercase identifier recall 55.91%
Multiplication recall 88.89%
Expected calibration error 4.88%

Behavior head๋ฅผ teacher prediction ๋’ค์— ์ ์šฉํ–ˆ์„ ๋•Œ ๋Œ€์ƒ ๊ธฐํ˜ธ์˜ exact top-1์€ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋ณ€ํ™”ํ–ˆ๋‹ค.

33.65% โ†’ 47.30%

ํ‰๊ท  ์ƒ์Šน ํญ์€ 13.65%p์˜€์œผ๋ฉฐ rewrite precision์€ 81.35%์˜€๋‹ค.

์ด ์‹คํ—˜์€ trajectory๋งŒ์œผ๋กœ ์„ ํƒํ•˜๊ธฐ ์–ด๋ ค์šด exact meaning์„ ์ˆ˜์‹ ๋ฌธ๋งฅ์ด ๋ณด์™„ํ•  ์ˆ˜ ์žˆ์Œ์„ ๋ณด์—ฌ์ค€๋‹ค.

Continuous-formula adaptation

Product trajectory encoder์™€ online adapter๋ฅผ ๊ณ ์ •ํ•˜๊ณ , ์—ฐ์† ์ˆ˜์‹์˜ symbol group์— ์ž‘์€ formula adapter๋ฅผ ์ถ”๊ฐ€ํ–ˆ๋‹ค.

Frozen trajectory encoder
  + frozen online adapter
  + hidden-64 formula adapter

3-seed ํ‰๊ท  ๊ฒฐ๊ณผ:

Metric Mean
Writer-validation exact top-1 85.19%
Writer-validation family top-1 93.30%
Official-test exact top-1 82.38%
Official-test family top-1 88.17%

์ž‘์€ adapter๋งŒ์œผ๋กœ๋„ ๊ณ ๋ฆฝ ๊ธฐํ˜ธ encoder์˜ representation์„ ์—ฐ์† ์ˆ˜์‹ ํ™˜๊ฒฝ์— ๋งž๊ฒŒ ์กฐ์ •ํ•  ์ˆ˜ ์žˆ์Œ์„ ํ™•์ธํ–ˆ๋‹ค.

Grouping boundary head

Metric Base grouping Boundary head
Exact partition 60.04% 60.25%
Pair-F1 91.07% 91.26%
Overmerge formula rate 21.72% 20.49%

Boundary head๋Š” ๊ธฐํ˜ธ ์‚ฌ์ด์˜ geometry๋ฅผ ์ด์šฉํ•ด ์ธ์ ‘ symbol์˜ ๊ณผ๋„ํ•œ ๋ณ‘ํ•ฉ์„ ์ค„์˜€๋‹ค.

Family fusion

Validation์—์„œ exact probability์™€ family probability๋ฅผ ๊ฒฐํ•ฉํ•˜๋Š” fusion weight๋ฅผ ์„ ํƒํ–ˆ๋‹ค.

exact score
+
0.15 ร— family-consistency score

Paired test exact top-1:

83.71% โ†’ 83.82%

Family prediction์€ exact classifier์˜ ํ›„๋ณด ์ˆœ์„œ๋ฅผ ์ž‘์€ ๋ฒ”์œ„์—์„œ ๋ณด์ •ํ•˜๋Š” ์—ญํ• ์„ ํ•œ๋‹ค.

์—ฐ๊ตฌ ํ•ด์„

AIFlow Math Ink 0.6์˜ ์‹คํ—˜์€ ์ˆ˜ํ•™ ํ•„๊ธฐ ์ธ์‹์„ ๋‹ค์Œ ์„ธ ๋‹จ๊ณ„๋กœ ๋ถ„๋ฆฌํ•  ์ˆ˜ ์žˆ์Œ์„ ๋ณด์—ฌ์ค€๋‹ค.

1. Stroke trajectory์—์„œ ์‹œ๊ฐ์  ํ˜•ํƒœ๋ฅผ ์ถ”์ถœ
2. Visual family ์•ˆ์—์„œ ๊ฐ€๋Šฅํ•œ symbol ํ›„๋ณด๋ฅผ ๊ตฌ์„ฑ
3. ์ˆ˜์‹ ๋ฌธ๋งฅ๊ณผ geometry๋กœ exact meaning์„ ์„ ํƒ

์ด ๊ตฌ์กฐ๋Š” ๊ณ ๋ฆฝ ๊ธฐํ˜ธ ์ธ์‹๊ณผ ์ „์ฒด ์ˆ˜์‹ ํ•ด์„์„ ํ•˜๋‚˜์˜ ๊ฑฐ๋Œ€ํ•œ classifier๋กœ ์ฒ˜๋ฆฌํ•˜๋Š” ๋Œ€์‹ , ๊ฐ ๋‹จ๊ณ„๊ฐ€ ์„œ๋กœ ๋‹ค๋ฅธ ์ •๋ณด๋ฅผ ๋‹ด๋‹นํ•˜๋„๋ก ํ•œ๋‹ค.

  • Trajectory encoder: ํ•„๊ธฐ ๋™์ž‘๊ณผ ํ˜•ํƒœ
  • Family head: ์‹œ๊ฐ์  ์œ ์‚ฌ์„ฑ
  • Behavior head: ๊ธฐํ˜ธ์˜ ๋ฌธ๋ฒ•์  ์—ญํ• 
  • Boundary head: stroke grouping
  • Formula adapter: ์ˆ˜์‹ ์•ˆ์—์„œ์˜ ์ƒ๋Œ€ ํฌ๊ธฐ์™€ ์œ„์น˜

์—ฐ๊ตฌ ์ž๋ฃŒ