C.W.K.
Stream
Lesson 01 of 10 · published

Hand-Crafted Feature 의 한계

~22 min · features, representation, history

Level 0Curious
0 XP0/73 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

Learned representation 이 등장하기 전

Deep learning 이전에는 ML 작업의 대부분이 feature engineering 이었어. 이미지면 edge detector (Sobel, Canny), HOG, SIFT. 텍스트면 bag-of-words, TF-IDF, parse tree. 오디오면 MFCC. 도메인마다 장인 정신이 필요했고, 그게 곧 일이었지.

잘 되긴 했는데 천장이 분명했어. 새 도메인마다 새 전문가가 필요했고, 얼굴용 feature 는 X-ray 에 안 통했어. 영어 뉴스용 feature 는 코드나 한국어에 안 맞았고. 병목은 알고리즘이 아니라 사람이 데이터를 묘사하는 능력이었어 — 그게 매번 한 달씩 갉아먹었지.

원칙: Hand-crafted feature 에 의존하는 pipeline 은 영구적인 인건비를 받아들이는 거야. 새 도메인 시작할 때마다 feature design 회의를 처음부터 해야 함.

Deep learning 이 바꾼 것

계약을 뒤집었어 — 사람이 feature 설계하는 게 아니라, network 가 raw data 에서 직접 representation 을 학습해. 첫 layer 들이 단순 패턴 (edge, color blob, character n-gram) 을 배우고, 뒤쪽 layer 가 그걸 합쳐서 풍부한 개념 (눈, 문장, 멜로디) 을 만들어. 같은 architecture 가 데이터만 바꾸면 고양이 인식기에서 CT scan tumor 검출기가 돼.

이 portability 가 비용 정당화의 핵심이야. 문제마다 도메인 전문가 고용하는 대신, 데이터/loss/평가만 잘 짜는 framer 만 있으면 돼. 같은 training loop, 다른 데이터 → vision system, translation system, code completion 이 다 나와.

이게 quest 전체에 왜 중요한가

Tensor, layer, activation, optimizer, normalization, attention — 전부 representation learning 을 scale 에서 robust 하게 만들기 위한 도구야. 길 잃으면 이 lesson 으로 돌아와 — deep learning 은 representation learning 이 어려운 부분일 때만 비용값을 함. Feature 를 오후에 손으로 쓸 수 있으면, classical ML 이 보통 이겨.

Code

Hand-crafted vs learned features (sketch)·python
# Classical ML: human writes the features.
import numpy as np
from sklearn.linear_model import LogisticRegression

def hand_crafted_features(image: np.ndarray) -> np.ndarray:
    edges = sobel(image)
    color_hist = histogram(image, bins=16)
    hog = histogram_of_gradients(image)
    return np.concatenate([edges.mean(axis=(0, 1)), color_hist, hog])

X = np.stack([hand_crafted_features(img) for img in dataset])
clf = LogisticRegression().fit(X, y)

# Deep learning: the network discovers the features.
import torch, torch.nn as nn
model = nn.Sequential(
    nn.Conv2d(3, 32, 3, padding=1), nn.ReLU(),
    nn.Conv2d(32, 64, 3, padding=1), nn.ReLU(),
    nn.AdaptiveAvgPool2d(1), nn.Flatten(),
    nn.Linear(64, num_classes),
)
# Train end to end on the raw images, no feature design.

External links

Exercise

본인이 잘 아는 도메인 (의료 영상, 리테일 로그, 음악, 위성) 하나 골라봐. Classical model 한테 필요한데 손으로 설계하기 싫은 feature 3 개를 적고, 왜 learned representation 이 그걸 자동으로 찾을 수 있을지 설명해.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.