๐ "Deep Dive into Distribution-Aware HAR: From Mathematical Design to Implementation"*
Compositional Action Recognition via Factorized Spatio-Temporal Representation
Abstract :
- ๋ณธ ๋ฆฌํฌํธ๋ ์ธ๊ฐ ํ๋(Human Action)์ ๊ณ ์ ๋ ํด๋์ค ๋ผ๋ฒจ์ด ์๋ ๊ธฐ๋ณธ ๋์(Atomic Actions)์ ํ๋ฅ ์ ์กฐํฉ(Probabilistic Composition) ์ผ๋ก ๋ชจ๋ธ๋งํ๋ ๋ฐฉ๋ฒ๋ก ์ ์ ์ํ๋ค.
- ์ด๋ฅผ ์ํด Factorized Spatio-Temporal Transformer๋ฅผ ์ค๊ณํ์ฌ ๊ณต๊ฐ(Spatial)๊ณผ ์๊ฐ(Temporal) ํน์ง์ ๋ถ๋ฆฌ ํ์ต(Disentangle)ํ๊ณ , Information-Theoretic Multimodal Fusion์ ํตํด ๋ ธ์ด์ฆ์ ๊ฐ๊ฑดํ ํํ์ ํ์ตํ๋ค.
- ๋ํ, Soft-Mapping Training Strategy๋ฅผ ํตํด ๋ชจ๋ธ์ด Unseen Action์ ๋ํด์๋ ์ ์๋ฏธํ ์ํ ๋ถํฌ(State Distribution)๋ฅผ ์ถ๋ ฅํ๋๋ก ์ ๋ํ๋ค.
1. Introduction
"ํ์ค ์ธ๊ณ์ ๋์ ๋ฐ์ดํฐ(Human Action, Volumetric Data ๋ฑ)๋ ๋ช
ํํ ๊ฒฝ๊ณ(Hard Boundary)๋ฅผ ๊ฐ์ง ์๋๋ค.
์๋ฅผ ๋ค์ด '๊ฑท๊ธฐ'์ '๋ฐ๊ธฐ' ์ฌ์ด์๋ ๋ฌด์ํ ์ค๊ฐ ์ํ(Intermediate State)๊ฐ ์กด์ฌํ๋ค.
๊ทธ๋ฌ๋ ๊ธฐ์กด ๋ค์์ Deep Learning ๋ชจ๋ธ์ One-hot Label์ ๊ฐ์ ํ์ฌ ๋ฐ์ดํฐ์ ๋ด์ฌ์ ๋ชจํธ์ฑ(Ambiguity)์ ๋ฌด์ํ๋ฉฐ, ์ด๋ Unseen Action์ ๋ํ ์์ธก ์คํจ๋ก ์ด์ด์ง๋ค."
- Problem: ์ ํ๋์ ์ฐ์์ฑ๊ณผ ์ค์ฒฉ์ฑ์ ๋ฌด์ํ๋ค.
- Solution: ํ๋์ Latent Space ์์ ๋งค๋ํด๋(Manifold)๋ก ๋งคํํ๊ณ , ์ถ๋ ฅ ๋ฅผ Basis Action๋ค์ Linear Combination์ผ๋ก ํํํ๋ค.
- ex)
- Goal: "๋ณธ ์ฐ๊ตฌ๋ ํ๋์ ๋จ์ ๋ถ๋ฅ๊ฐ ์๋ ํ๋ฅ ๋ถํฌ(Distribution)๋ก ๋ชจ๋ธ๋งํ์ฌ, Unseen Action์ ๋ํ ์กฐํฉ์ ํด์(Compositional Understanding) ์ ๊ฐ๋ฅํ๊ฒ ํ๋ ๊ฒ์ ๋ชฉํ๋ก ํ๋ค."
2. Methodology: Designing Inductive Bias
2.1 Short-term Pose Encoder
2.1.1 Input Representation
๊ฐ pose๋:
- (T): frame
- (J): number of joints
- (C = 3) (x, y, normalized depth)
๋ชจ๋ธ์์๋ depth๋ฅผ ์์ ํ์ํค๊ธฐ ์ํด ๋ค์๊ณผ ๊ฐ์ด tanh๋ฅผ ์ทจํ๋ค:
2.1.2 Joint Embedding
๊ฐ joint๋ joint ID embedding (e_j) ์ ์ถ๊ฐํ์ฌ ๊ตฌ์กฐ์ ์ ๋ณด๋ฅผ ๋ถ์ฌํ๋ค.
2.1.3 Temporal Inductive Bias: Why Learnable PE?
Transformer์์ ์์ ์ ๋ณด๋ฅผ ์ฃผ์
ํ๊ธฐ ์ํด Positional Encoding(PE)์ด ํ์์ ์ด๋ค. ๋ณธ ์ฐ๊ตฌ์์๋ ์ผ๋ฐ์ ์ธ Sinusoidal PE ๋์ Learnable PE๋ฅผ ์ฑํํ์๋ค.
- Sinusoidal PE์ ํ๊ณ (HAR์ ๋ถ์ ํฉํ ์ด์ )
sinusoidal PE๋ Transformer์ ์๋ ์๋์ฒ๋ผ
๋ก โ์ ๋ ์์นโ๋ฅผ ๊ณ ์ ์ฃผํ์๋ก ๋ถํธํํ๋ค.
๊ทธ๋ฌ๋ HAR์ ๋ค์ ํน์ง์ ๊ฐ์ง๋ค:
-
(1) Temporal length๊ฐ ๋งค์ฐ ์งง๋ค (8~30 frames)
โ ๊ณ ์ ์ฃผํ์ ๊ธฐ๋ฐ ํํ์์ ๋ค์ํ phase ๋ณํ๊ฐ ๋ฐ์ํ์ง ์์ ์ฃผํ์ ๊ธฐ๋ฐ ์์น ๊ตฌ๋ถ์ ์ด์ ์ด ๊ฑฐ์ ์์. -
(2) ๋ฐ์ดํฐ์ ์ด ์๊ณ ๋๋ฉ์ธ ํน์์ฑ์ด ๊ฐํจ
sinusoidal PE๋ task-specific temporal pattern์ ํ์ตํ ์์ ๋ 0
โ ์คํ๋ ค underfitting ์ํ์ด ๋ ํฌ๋ค. -
(3) short-term modeling ๊ตฌ์กฐ์์ ๋ถ์กฐํ
PoseFormerFactorized๋- TemporalBlock(๊ฐ joint time-series)
- SpatialBlock(๊ฐ frame joint-set attention)
์ผ๋ก short-term filter ์ญํ ์ ํจ
โ โrelative local variationโ์ด ๋ ์ค์
(์ฆ absolute position scale์ ๋ฌด์๋ฏธํด์ง๊ณ ํ์ต ๊ฐ๋ฅํ bias๊ฐ ์ ๋ฆฌํจ)
๋ฐ๋ผ์ sinusoidal PE๋ HAR์ inductive bias์ ์ถฉ๋ํ๋ค.
2.1.4 Learnable PE์ ์ฅ์ (HAR์์ ๋ ์ ํฉํ ์ด์ )
HAR ์์๋ learnable parameter
์ timeline dim์ broadcastingํ์ฌ ์ ์ฉํ๋ค.
์ฅ์ ์์ฝ:
| ๊ด์ | Learnable PE | Sinusoidal PE |
|---|---|---|
| HAR temporal length | ์ต์ ํ ์ฉ์ด | ์๋ฏธ ์์ |
| ๋๋ฉ์ธ ํนํ ํจํด | ํ์ต ๊ฐ๋ฅ | ๋ถ๊ฐ๋ฅ |
| short-term block ํธํ์ฑ | ๋์ | ๋ฎ์ |
| ๋ฐ์ดํฐ ๊ท๋ชจ ์์ | ์ ๋ฆฌ | ๋ถ๋ฆฌ |
์ด๋ก ์ ๊ทผ๊ฑฐ (soft position bias)
Learnable PE๋ ๋ค์ ์ต์ ํ ๋ฌธ์ ๋ฅผ ํ์ตํ๋ค:
์ด๋ ์ฌ์ค์ โ์๊ฐ ์ถ latent shift biasโ ๋ก ์๋ํ์ฌ
๊ฐ joint์ ์๋ฒ ๋ฉ ๊ณต๊ฐ์ task-specific temporal variation์ ๋ถ์ฌํ๋ค.
์ด๋ ๋ค์์ ๋ง์กฑํ๋ค:
-
local motion derivative
๊ฐ ๋ ์ ๊ตฌ๋ถ๋๋๋ก ๋ณด์กฐ ์ ํธ ์ ๊ณต
-
temporal block์ self-attention์ด
๋ฅผ ํตํด ์๊ฐ ์ฐจ์ด๋ฅผ ๋ ํจ๊ณผ์ ์ผ๋ก ๋ถ๋ฆฌ
๊ฒฐ๋ก ์ ์ผ๋ก HAR์ ๋ฐ์ดํฐ ์ค์ผ์ผ๊ณผ ๊ตฌ์กฐ์ ํน์ฑ์์
learnable PE๊ฐ ๋ expressiveํ๊ณ optimization-friendlyํ๋ค.
2.2 Factorized Spatio-Temporal Encoder (Short-term)
Factorized Architecture: Implementation Details
1. Spatial-Temporal Disentanglement
๋ณธ ์ฐ๊ตฌ์ ๋ชจ๋ธ์ "์์ธ(Geometry)" ์ "์์ง์(Dynamics)" ์ ๋
๋ฆฝ์ ์ธ Latent Factor๋ก ๋ถ๋ฆฌ(Disentangle)ํ์ฌ ํ์ตํ๋๋ก ์ค๊ณ๋์๋ค.
Temporal Block (Per-Joint):
- Tensor View:
- ๊ฐ ๊ด์ ์ ์๊ฐ์ ๊ถค์ ๋ง์ ๋ ๋ฆฝ์ ์ผ๋ก Attentionํ์ฌ Pose-invariant Motion์ ์ถ์ถํ๋ค.
Spatial Block (Per-Frame):
- Tensor View:
- ๊ฐ ์์ ์ ๊ด์ ๊ฐ ๊ด๊ณ๋ฅผ Attentionํ์ฌ Time-invariant Geometry๋ฅผ ์ถ์ถํ๋ค.
2. Complexity Proof (Mathematical Derivation)
์ด๋ฌํ ๋ถ๋ฆฌ ์ค๊ณ๋ ์ง๋ฅ์ ์ด์ ๋ฟ๋ง ์๋๋ผ ๊ทน์ ์ธ ์ฐ์ฐ ํจ์จ์ฑ์ ์ ๊ณตํ๋ค.
-
Step 1 (Full Attention): ๊ฐ์ ํ ํฐ์ ๋ํด ์ฐ์ฐ์ ์ํํ๋ค.
-
Step 2 (Factorized Attention): ์๊ฐ์ถ๊ณผ ๊ณต๊ฐ์ถ์ผ๋ก ๋๋์ด ์ํํ๋ค.
-
Step 3 (Efficiency Ratio):
Insight: ์ผ ๋ ์ฐ์ฐ๋์ ์ฝ 13.7๋ฐฐ ๊ฐ์ํ๋ค. ์ด๋ ๋ฉ๋ชจ๋ฆฌ ์ ์ฝ์ด ์ฌํ 3D Volumetric Data (CT, MRI) ์ฒ๋ฆฌ ์ ํด์๋๋ฅผ ์ ์งํ๋ฉฐ ๊น์ ๋ชจ๋ธ์ ์์ ์ ์๊ฒ ํ๋ ํต์ฌ ๊ธฐ์ ์ด๋ค.
2.3 Long-term Temporal Modeling
Short-term Window๋ค์ ๊ตญ์์ ํน์ง๋ง ๊ฐ์ง๋ค. ์ด๋ฅผ Transformer Encoder๋ก ๋ค์ ํตํฉ(Aggregation)ํจ์ผ๋ก์จ, ๋ชจ๋ธ์ ๊ธด ์๊ฐ(Long-term)์ ๊ฑธ์น ์ธ๊ณผ๊ด๊ณ(Causality)์ ๋งฅ๋ฝ(Context) ์ ํ์ ํ๋ค."
2.4 Multimodal Context Injection (Image Encoder)
Pose๊ฐ ๋์น๋ ํ๊ฒฝ ์ ๋ณด(Context)๋ฅผ ๋ณด์ํ๊ธฐ ์ํด 2D CNN์ ์ฌ์ฉ. ํฝ์ ๋ ๋ฒจ ์ ๋ณด๋ฅผ ์๋งจํฑ ๋ ๋ฒจ๋ก ์์ถํ์ฌ Pose Feature์ ๊ฒฐํฉํ๋ค.
3. Multimodal Fusion: Information-Theoretic Fusion Analysis
3.1 Robustness of Concat-LN in Noisy Alignment
(1) The Alignment Problem
์ค์ ํ๊ฒฝ ๋ฐ์ดํฐ(Real-world Data)๋ Pose Estimation Jitter, Frame Drop, Motion Artifact ๋ฑ์ผ๋ก ์ธํด ์ ๊ฐ์ ์๊ณต๊ฐ์ ์ ๋ ฌ์ด ์๋ฒฝํ์ง ์๋ค.
(2) Proof via Fano's Inequality
๋ณธ ์ฐ๊ตฌ๋ Concat-LN (Concatenation + LayerNorm) ๋ฐฉ์์ด Noisy Alignment ํ๊ฒฝ์์ Cross-Attention๋ณด๋ค ์ ๋ณด์ด๋ก ์ ์ผ๋ก ๊ฐ๊ฑดํจ์ ์ฆ๋ช ํ๋ค.
-
Fano's Inequality: ์ค๋ถ๋ฅ ํ๋ฅ ์ ํํ์ ์กฐ๊ฑด๋ถ ์ํธ๋กํผ ์ ์ํด ๊ฒฐ์ ๋๋ค.
-
Case 1: Cross-Attention (Hard Alignment Assumption) Cross-Attention์ Query()์ Key()์ ์ ํํ ๋์์ ๊ฐ์ ํ๋ค. ์ ๋ ฌ ๋ ธ์ด์ฆ๊ฐ ๋ฐ์ํ๋ฉด Attention Weight๊ฐ ๋ฐ์ฐ(Diffuse)ํ์ฌ ๋ถํ์ค์ฑ(Entropy)์ด ์ฆ๊ฐํ๋ค.
-
Case 2: Concat-LN (Joint Distribution Approximation) Concat-LN์ MLP๊ฐ ๋ ๋ชจ๋ฌ๋ฆฌํฐ์ **๊ฒฐํฉ ๋ถํฌ(Joint Distribution)**๋ฅผ ๋น์ ํ์ ์ผ๋ก ๊ทผ์ฌํ๋ค. ์ด๋ ์๊ฒฉํ ์ ๋ ฌ ๋์ , ์ํธ์ ๋ณด๋(Mutual Information) ์ ์ด๋์ ๋ณด์กดํ๋ ๋ฐ ์ง์คํ๋ค.
Conclusion: ๋ฐ๋ผ์ ์ ๋ ฌ์ด ๋ถ์์ ํ ์ค์ธ๊ณ ๋ฐ์ดํฐ์์๋ Concat-LN์ด ์ผ๋ฐํ ์ฑ๋ฅ(Generalization) ์ธก๋ฉด์์ ์ฐ์ํ๋ค.
4. Optimization Dynamics (Training Strategy)
๋จ์ํ Transfer Learning์ด ์๋, Representation Manifold๋ฅผ ๋ณด์กดํ๊ธฐ ์ํ 3๋จ๊ณ ํ์ต ์ ๋ต์ ์ค๊ณํ์๋ค.
4.1 Manifold Learning (Stage 1 & 2)
- Masked Joint Modeling (MJM): BERT์ MLM๊ณผ ์ ์ฌํ๊ฒ ๊ด์ ์ ๋ง์คํนํ๊ณ ๋ณต์ํ๋ฉฐ ๋ฐ์ดํฐ์ ๋ด์ฌ์ ๊ธฐํํ(Intrinsic Geometry)์ ํ์ตํ๋ค.
- Contrastive Learning: ์ ์ฌํ ํ๋์ ๊ฐ๊น๊ฒ, ์์ดํ ํ๋์ ๋ฉ๊ฒ ๋งคํํ์ฌ ๊ฒฌ๊ณ ํ Metric Space๋ฅผ ๊ตฌ์ถํ๋ค.
4.2 Regularization for Open-Set (Stage 3)
- Problem: Fine-tuning ์ ๋จ์ Cross-Entropy(CE) Loss๋ฅผ ์ฌ์ฉํ๋ฉด Pretrained Manifold๊ฐ Task-specificํ๊ฒ ๋ถ๊ดด(Collapse)๋๋ค.
- Solution (Soft-Mapping): Backbone Freezing๊ณผ Label Smoothing์ ๊ฒฐํฉํ์ฌ, ๋ชจ๋ธ์ด ํ์ต ๋ฐ์ดํฐ์ ์๋ ํ๋(Unseen Action)์ ๋ํด์๋ ๊ธฐ์กด Basis Action๋ค์ ํ๋ฅ ์ ์กฐํฉ(Interpolation) ์ผ๋ก ํํํ ์ ์๋๋ก ์ ๋ํ๋ค. ์ด๋ ์ต์ ํ ์งํ(Optimization Landscape)์ ํํํ๊ฒ ๋ง๋ค์ด Local Minima๋ฅผ ๋ฐฉ์งํ๋ค.
5. Discussion: Generalizability & Representation Power
๋ณธ ์ฐ๊ตฌ์์ ์ ์ํ Factorized Spatio-Temporal Representation์ HAR ๋๋ฉ์ธ์ ๊ตญํ๋์ง ์๋ ๋ฒ์ฉ์ฑ์ ๊ฐ์ง๋ค.
5.1 Isomorphism to Volumetric Data
๋ณธ ๋ชจ๋ธ์ ํต์ฌ ๊ตฌ์กฐ์ธ ์๊ฐ()๊ณผ ๊ณต๊ฐ()์ ๋ถํด๋, 3D Volumetric Data (e.g., CT, MRI, Point Cloud) ๋ถ์๊ณผ ์ํ์ ์ผ๋ก ๋ํ(Isomorphic) ์ด๋ค.
- Time Sequence () Depth / Slice Sequence ()
- ๋ณธ ์ฐ๊ตฌ์ ๋ฐฉ๋ฒ๋ก ์ 3D ๋ฐ์ดํฐ์ Anisotropic Resolution (๋น๋ฑ๋ฐฉ์ฑ ํด์๋) ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๊ณ , Slice ๊ฐ์ ์ฐ์์ฑ(Consistency)์ ํจ์จ์ ์ผ๋ก ํ์ตํ๋ ๋ฒ์ฉ์ ์ธ ์๋ฃจ์ ์ผ๋ก ํ์ฅ ๊ฐ๋ฅํ๋ค.
5.2 Probabilistic Modeling for Safety-Critical Domains
๋ณธ ์ฐ๊ตฌ๊ฐ ์งํฅํ Distribution-Aware Output์ ๋จ์ ์์ธก์ ๋์ด, ๋ชจ๋ธ์ ์ ๋ขฐ๋(Confidence) ์ธก์ ๋ฐ OOD(Out-of-Distribution) ํ์ง๋ฅผ ๊ฐ๋ฅํ๊ฒ ํ๋ค. ์ด๋ ์๋ฃ(Medical), ์์จ์ฃผํ(Autonomous Driving), ๋ก๋ณดํฑ์ค(Robotics) ๋ฑ ์ค๋ฅ ๋น์ฉ์ด ๋งค์ฐ ๋์ High-Stakes Domain์์ '์ ๋ขฐํ ์ ์๋ AI(Trustworthy AI)'๋ฅผ ๊ตฌ์ถํ๋ ํต์ฌ ๊ธฐ๋ฐ ๊ธฐ์ ์ด ๋๋ค.