File size: 14,567 Bytes
2948983 f6e614c 2948983 f6e614c 2948983 f6e614c 2948983 f6e614c e2729fe f6e614c e2729fe f6e614c 2948983 e2729fe f770448 e2729fe f770448 e2729fe f770448 e2729fe f770448 e2729fe f770448 e2729fe f770448 e2729fe 2948983 e2729fe 2948983 e2729fe 2948983 e2729fe 2948983 e2729fe 2948983 f6e614c e2729fe f6e614c e2729fe f6e614c e2729fe f6e614c e2729fe f6e614c e2729fe f6e614c e2729fe f6e614c 2948983 e2729fe 2948983 e2729fe 2948983 e2729fe f6e614c e2729fe f6e614c 2948983 e2729fe 2948983 e2729fe f6e614c e2729fe f6e614c e2729fe 2948983 e2729fe f6e614c e2729fe f6e614c e2729fe f6e614c e2729fe f6e614c e2729fe 33080a1 e2729fe 33080a1 e2729fe 33080a1 e2729fe 33080a1 e2729fe f6e614c e2729fe f6e614c e2729fe 2948983 e2729fe f6e614c e2729fe f6e614c e2729fe f6e614c e2729fe f6e614c e2729fe f6e614c e2729fe f6e614c e2729fe 4a3cd2f e2729fe 4a3cd2f e2729fe 4a3cd2f e2729fe 4a3cd2f e2729fe 4a3cd2f e2729fe 0194e59 e2729fe 0194e59 e2729fe 0194e59 e2729fe f6e614c e2729fe f6e614c e2729fe bf8ae1c e2729fe bf8ae1c e2729fe 50549ab e2729fe 50549ab e2729fe 50549ab e2729fe 5aff889 e2729fe 5aff889 e2729fe 5aff889 e2729fe 5aff889 e2729fe 6ab8274 e2729fe 6ab8274 e2729fe 0dcf39e e2729fe 0dcf39e e2729fe 0dcf39e e2729fe 0dcf39e e2729fe 0dcf39e e2729fe f6e614c e2729fe f6e614c e2729fe 2948983 e2729fe f6e614c e2729fe 5094348 e2729fe 5094348 e2729fe 5094348 e2729fe 5094348 e2729fe 5094348 e2729fe 5094348 e2729fe 5094348 e2729fe c4c9192 e2729fe c4c9192 e2729fe c4c9192 e2729fe c4c9192 e2729fe c4c9192 e2729fe bb698e6 e2729fe bb698e6 e2729fe bb698e6 e2729fe 2dde02d e2729fe 2dde02d e2729fe 2dde02d e2729fe 58b3b50 e2729fe 58b3b50 e2729fe a16cd95 e2729fe c228b1d e2729fe 5ee3a5e e2729fe 58b3b50 e2729fe f6e614c e2729fe f6e614c e2729fe f6e614c e2729fe f6e614c e2729fe f6e614c e2729fe f6e614c e2729fe f6e614c e2729fe 2948983 f6e614c 2948983 e2729fe | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 | ---
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. ๊ธฐํธ ๋ถ๋ฅ์ ์์ ๋ฌธ๋งฅ์ ๊ฒฐํฉํ๋ ๋ฐฉ๋ฒ

## ์ฐ๊ตฌ ์์ด๋์ด
### 1. Trajectory-first representation
์ผ๋ฐ์ ์ธ ์ด๋ฏธ์ง ๋ถ๋ฅ ๋ฐฉ์์ ํ๊ธฐ๋ฅผ ๊ณ ์ ๋ bitmap์ผ๋ก ๋ณํํ๋ฉด์ stroke ์์์ ์๊ฐ ์ ๋ณด๋ฅผ ์ ๊ฑฐํ๋ค.
AIFlow Math Ink๋ ํ๊ธฐ๋ฅผ ๋ค์๊ณผ ๊ฐ์ ์๊ณ์ด๋ก ํํํ๋ค.
```text
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์์ ๋น๊ตํ ์ ์๋ค.
```text
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๋ ๋ ์ขํ๊ณ๋ฅผ ๋์์ ์ฌ์ฉํ๋ค.
```text
shape_x, shape_y
```
๊ธฐํธ ์์ฒด์ bounding box๋ฅผ ๊ธฐ์ค์ผ๋ก ์ ๊ทํํ ์ขํ๋ค. ๊ธ์์ ํฌ๊ธฐ์ ์์น ์ํฅ์ ์ค์ด๊ณ ์์ํ ํํ๋ฅผ ํํํ๋ค.
```text
canvas_x, canvas_y
```
์ ์ฒด canvas ๋๋ ์์ ์์ญ์ ๊ธฐ์ค์ผ๋ก ํ ์ขํ๋ค. ๊ธฐํธ์ ์๋ ํฌ๊ธฐ์ ์์ง ์์น๋ฅผ ๋ณด์กดํ๋ค.
์๋ฅผ ๋ค์ด ์๋ฌธ์ `x`, ๋๋ฌธ์ `X`, ๊ณฑ์
๊ธฐํธ `ร`๋ ๋ชจ์์ด ๋น์ทํ์ง๋ง ์์ ์์์์ ํฌ๊ธฐ์ ์์น ๋ถํฌ๊ฐ ๋ค๋ฅผ ์ ์๋ค. ๋ ์ขํ๊ณ๋ฅผ ํจ๊ป ์ฌ์ฉํ๋ฉด ํํ์ ๋ฌธ๋งฅ์ ๋ถ๋ฆฌํด ํ์ตํ ์ ์๋ค.
### 4. Online๊ณผ raster์ ๊ณตํต trajectory space
์จ๋ผ์ธ ์
๋ ฅ์๋ stroke sequence๊ฐ ์ง์ ์กด์ฌํ์ง๋ง, raster ์ด๋ฏธ์ง์๋ stroke ์์๊ฐ ์๋ค.
Raster ๊ฒฝ๋ก๋ ์ด๋ฏธ์ง๋ฅผ ๊ณง๋ฐ๋ก symbol label๋ก ๋ถ๋ฅํ๋ ๋์ , ์ด๋ฏธ์ง์์ ์ฌ๋ฌ ๊ฐ์ virtual trajectory๋ฅผ ์์ฑํ๋ค.
```text
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์ ๊ณ์ธต์ ์์ธก
์ํ ๊ธฐํธ์๋ ํํ๊ฐ ๊ฑฐ์ ๋์ผํ์ง๋ง ์๋ฏธ๊ฐ ๋ค๋ฅธ ๊ฒฝ์ฐ๊ฐ ๋ง๋ค.
์:
```text
O / 0 / o
x / X / ร
| / 1 / l
```
๋ชจ๋ธ์ ์ด๋ฅผ ํ๋์ ๋ถ๋ฅ ๋ฌธ์ ๋ก๋ง ๋ค๋ฃจ์ง ์๊ณ ๋ ๊ฐ์ prediction head๋ก ๋๋๋ค.
```text
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๋ ๋ค์ ๋ ํํ์ ๊ฒฐํฉํ๋ค.
```text
128ร19 stroke representation
+
49-dimensional formula context
```
Context feature์๋ ๋ค์๊ณผ ๊ฐ์ ์ ๋ณด๊ฐ ํฌํจ๋๋ค.
- ์์ ์ ์ฒด ํฌ๊ธฐ ๋๋น ๊ธฐํธ ํฌ๊ธฐ
- baseline๊ณผ์ ์๋ ์์น
- ์ฃผ๋ณ ๊ธฐํธ์ ์์น์ ๊ฐ๊ฒฉ
- symbol group geometry
- ์ด์ token ํจํด
ํ์ฌ behavior head์ ๋ํ ์ญํ ๋ถ๋ฅ๋ ๋ค์๊ณผ ๊ฐ๋ค.
```text
identifier_lower
identifier_upper
multiply_operator
```
์๋ฅผ ๋ค์ด `x`, `X`, `ร`์ trajectory๊ฐ ๋น์ทํ ๋, ๊ธฐํธ์ ์๋ ํฌ๊ธฐ์ ์ฃผ๋ณ token์ ์ด์ฉํด ์ญํ ์ ์ ํํ๋ค.
### 7. Boundary behavior modeling
์์ ์ธ์์์๋ ์ฌ๋ฌ stroke๋ฅผ ํ๋์ ๊ธฐํธ๋ก ๋ฌถ๋ grouping ๊ณผ์ ์ด ํ์ํ๋ค.
Boundary behavior head๋ segmentation candidate๊ฐ ์ค์ ๊ธฐํธ ๊ฒฝ๊ณ๋ฅผ ๊ฐ๋ก์ง๋ฅด๋์ง๋ฅผ geometry feature๋ก ์์ธกํ๋ค.
```text
Segmentation lattice geometry
โ 17-dimensional boundary features
โ boundary behavior score
```
์ด score๋ ๊ฐ๊น์ด ์๋ ๋ ๊ธฐํธ๊ฐ ํ๋์ symbol group์ผ๋ก ํฉ์ณ์ง๋ overmerge๋ฅผ ์ต์ ํ๋ ๋ฐ ์ฌ์ฉ๋๋ค.
## ์
๋ ฅ ํํ
๋ชจ๋ธ ์
๋ ฅ์ ์ต๋ 128๊ฐ์ event์ 19๊ฐ์ feature๋ก ๊ตฌ์ฑ๋๋ค.
```text
input shape: 128 ร 19
sample rate: 6 Hz
normalized ink space: 128 ร 128
```

### 19 input channels
```text
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 ์ ๋ณด๋ฅผ ํจ๊ป ์ฌ์ฉํ๋ค.
## ๋ชจ๋ธ ๊ตฌ์กฐ
```text
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์ ํจ๊ป ํฉ์ฑ๋๋ค.
```text
base trajectory state
โ online shared state
โ modality-specific adaptation
โ classifier heads
```
## Checkpoints
๊ฐ seed๋ ๋ค์ ์ธ ํ์ผ๋ก ๊ตฌ์ฑ๋๋ค.
```text
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 ํน์ฑ์ ๋ถ์ํ๋ ๋ฐ ์ฌ์ฉ๋๋ค.
## ์ฌ์ฉ ์์
```python
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 ํ๋ณด์ ๊ฐ ํ๋ณด์ ํ๋ฅ ์ด ํฌํจ๋๋ค.
```python
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 ๋ด๋ถ ํผ๋์ด์๋ค.
```text
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์ ๋ค์๊ณผ ๊ฐ์ด ๋ณํํ๋ค.
```text
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๋ฅผ ์ถ๊ฐํ๋ค.
```text
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๋ฅผ ์ ํํ๋ค.
```text
exact score
+
0.15 ร family-consistency score
```
Paired test exact top-1:
```text
83.71% โ 83.82%
```
Family prediction์ exact classifier์ ํ๋ณด ์์๋ฅผ ์์ ๋ฒ์์์ ๋ณด์ ํ๋ ์ญํ ์ ํ๋ค.
## ์ฐ๊ตฌ ํด์
AIFlow Math Ink 0.6์ ์คํ์ ์ํ ํ๊ธฐ ์ธ์์ ๋ค์ ์ธ ๋จ๊ณ๋ก ๋ถ๋ฆฌํ ์ ์์์ ๋ณด์ฌ์ค๋ค.
```text
1. Stroke trajectory์์ ์๊ฐ์ ํํ๋ฅผ ์ถ์ถ
2. Visual family ์์์ ๊ฐ๋ฅํ symbol ํ๋ณด๋ฅผ ๊ตฌ์ฑ
3. ์์ ๋ฌธ๋งฅ๊ณผ geometry๋ก exact meaning์ ์ ํ
```
์ด ๊ตฌ์กฐ๋ ๊ณ ๋ฆฝ ๊ธฐํธ ์ธ์๊ณผ ์ ์ฒด ์์ ํด์์ ํ๋์ ๊ฑฐ๋ํ classifier๋ก ์ฒ๋ฆฌํ๋ ๋์ , ๊ฐ ๋จ๊ณ๊ฐ ์๋ก ๋ค๋ฅธ ์ ๋ณด๋ฅผ ๋ด๋นํ๋๋ก ํ๋ค.
- Trajectory encoder: ํ๊ธฐ ๋์๊ณผ ํํ
- Family head: ์๊ฐ์ ์ ์ฌ์ฑ
- Behavior head: ๊ธฐํธ์ ๋ฌธ๋ฒ์ ์ญํ
- Boundary head: stroke grouping
- Formula adapter: ์์ ์์์์ ์๋ ํฌ๊ธฐ์ ์์น
## ์ฐ๊ตฌ ์๋ฃ
- [์ ์ฒด ๊ธฐ์ ๋ณด๊ณ ์](reports/RESEARCH_REPORT.md)
- [Federation audit](reports/FEDERATION_AUDIT_20260724.md)
- [3-seed behavior ๊ฒฐ๊ณผ](reports/behavior_role_3seed_summary.json)
- [Boundary ๊ฒฐ๊ณผ](reports/boundary_behavior_guard_report.json)
- [Online ์ค๋ฅ ํฉ์ ๋ถ์](reports/online_error_consensus_paired_test_3seed.json)
- [Family-fusion calibration](reports/online_family_fusion_calibration_3seed.json)
- [Formula-context ๊ณ์ฝ ๋ถ์](reports/formula_context_contract_3seed.json)
- [Formula adapter ๊ฒฐ๊ณผ](reports/formula_adapter_h64_3seed_summary.json)
- [Checkpoint manifest](MANIFEST.json) |