1. "AI 모델 좀 만들어봐"의 함정
스타트업 초기, 스스로 엄청난 미션을 잡았습니다. "우리 고객들이 올리는 리뷰 사진이 수만 장인데, 이걸 '음식', '인테리어', '메뉴판'으로 자동 분류하는 AI를 만들어보자." 앱에 리뷰 사진이 너무 섞여 있어서, 음식 사진만 따로 모아서 보여주고 싶다는 니즈였죠.
저는 자신 있게 대답했습니다. "네, 요즘 CNN(Convolutional Neural Network) 쓰면 금방 됩니다! 구글에서 나온 모델 가져다 쓰면 하루면 짜요." 그리고 신나게 TensorFlow 튜토리얼을 켜서 코드를 짰습니다. 모델 구조는 완벽했습니다. 데이터 로더(Data Loader)를 짜고 학습 버튼을 누르려는 순간, 등골이 서늘해졌습니다.
"잠깐, 학습시킬 데이터(X)는 있는데 정답(Y)이 없네?"
수만 장의 사진 파일은 서버에 있었지만, 그게 '음식'인지 '인테리어'인지 알려주는 라벨(Label)은 어디에도 없었습니다. 이걸 해결하려면 알바생을 고용해서 수만 장을 일일이 눈으로 보고 분류해야 했습니다. 장당 100원만 쳐도 5만 장이면 500만 원, 검수까지 하면 1,000만 원이 넘는 견적이 나왔습니다.
이때 처음으로 뼈저리게 느꼈습니다. AI 프로젝트의 80%는 모델링이 아니라 데이터 라벨링이라는 것을요.
2. 지도 학습 (Supervised Learning) - 쪽집게 과외 선생님
우리가 흔히 뉴스에서 보는 '알파고', '자율주행' 등은 대부분 지도 학습입니다. 이건 "문제(Input)와 정답(Label)을 같이 보여주며 가르치는 것"과 같습니다.
학습 과정 비유
- 선생님: "자, 이 사진(A) 봐. 이건 고양이(Label)야."
- 학생(모델): "아, 귀가 뾰족하고 수염이 있으면 고양이구나."
- 선생님: "이 사진(B) 봐. 이건 강아지(Label)야."
- 학생(모델): "코가 둥글고 귀가 처져 있으면 강아지구나."
장점과 단점
- 장점: 정확도가 가장 높고, 목적이 명확합니다. 우리가 원하는 걸 정확히 배웁니다.
- 치명적 단점: '정답'을 만드는 비용이 비쌉니다. 인간의 노동력이 갈려 들어갑니다. (Human-in-the-loop)
제가 처음에 시도하려던 게 바로 이거였죠. 정답 데이터가 없으면 시작조차 못 합니다.
대표적인 알고리즘:
- 분류 (Classification): 고양이냐 개냐? 스팸이냐 아니냐? (Softmax)
- 회귀 (Regression): 내일 집값은 얼마일까? 온도는 몇 도일까? (Linear)
3. 비지도 학습 (Unsupervised Learning) - 독학하는 천재
돈이 없던 저는 다른 방법을 찾았습니다. 바로 비지도 학습입니다. 이건 정답을 안 알려주고 "데이터만 툭 던져주고 알아서 패턴을 찾으라고 하는 것"입니다.
학습 과정 비유
- 선생님: (아무 말 없이 사진 10,000장을 책상에 쏟아부음) "알아서 분류해봐."
- 학생(모델): "음... 정답은 안 알려줬지만, 얘네들은 색깔이 붉고 동그랗네? (그룹 A)"
- 학생(모델): "얘네들은 네모나고 글자가 많네? (그룹 B)"
결과
나중에 사람이 확인해보니:
- 그룹 A = 음식 사진 (대부분 붉은색)
- 그룹 B = 메뉴판 사진 (글자가 많음)
모델이 스스로 데이터의 유사성(Similarity)을 기반으로 그룹을 만듭니다.
대표적인 알고리즘:
- 군집화 (Clustering): 비슷한 것끼리 묶기 (K-Means, DBSCAN)
- 차원 축소 (Dimensionality Reduction): 복잡한 데이터를 단순하게 압축하기 (PCA, t-SNE)
하지만 이것도 완벽하진 않았습니다. 그룹을 나눠주긴 하는데, 그 그룹이 '음식'인지 '쓰레기'인지는 사람이 확인해야 합니다. 그리고 '음식' 그룹에 '빨간 옷 입은 사람'이 섞여 들어가는 등 정확도도 지도 학습보다 떨어집니다.
4. 준지도 학습 (Semi-Supervised Learning) - 가성비의 끝판왕
결국 제가 선택한 방법은 준지도 학습이었습니다. 지도 학습과 비지도 학습의 장점만 섞은 것이죠. 핵심 전략은 "일부만 가르쳐주고, 나머지는 유추하게 하는 것"입니다.
4단계 전략
- 소량 라벨링: 전체 5만 장 중 딱 100장만 제가 직접 '음식', '메뉴판', '인테리어'로 분류했습니다. (1시간도 안 걸림)
- 지도 학습 (Teacher): 이 100장으로 모델을 학습시킵니다. 데이터가 적어서 정확도는 낮지만, 대충 특징은 잡습니다.
- 라벨 전파 (Label Propagation): 학습된 모델이 나머지 49,900장을 예측(Inference)하게 합니다.
- "이 사진은 내가 배운 100장 중 '음식'이랑 99% 비슷하네? 그럼 너도 '음식'이야."
- "이건 50%네? 잘 모르겠다." (이건 보류)
- 재학습 (Student): 확실하게 예측된(Confidence > 90%) 데이터들을 다시 '공짜 정답 데이터'로 취급해서 훈련 데이터에 포함시킵니다. 이걸 반복합니다(Self-training).
결과적으로 라벨링 비용 0원으로, 1,000만 원 들여서 만든 모델과 거의 비슷한 성능(92%)의 분류기를 만들 수 있었습니다. 계산해보니 1,000만 원을 아꼈다는 걸 깨달았을 때, 절로 웃음이 나왔습니다.
5. 요약 및 선택 가이드
AI 프로젝트를 시작할 때, 무조건 최신 모델(Transformer, GPT 등)부터 찾지 마세요. 가장 먼저 확인해야 할 건 "우리에게 정답(Label)이 있는가?"입니다.
| 상황 | 추천 방법 | 대표 알고리즘 |
|---|---|---|
| 정답 데이터가 충분하다 | 지도 학습 (Supervised) | Random Forest, SVM, CNN, BERT |
| 정답이 아예 없고, 패턴만 보고 싶다 | 비지도 학습 (Unsupervised) | K-Means, PCA, Autoencoder |
| 데이터는 많은데 정답 달 돈이 없다 | 준지도 학습 (Semi-Supervised) | Label Spreading, Self-training |
| 시행착오를 겪으며 배워야 한다 | 강화 학습 (Reinforcement) | Q-Learning (알파고), PPO |
"Data is the new oil"이라는 말은 반만 맞습니다. 원유(Raw Data)는 널렸습니다. 그걸 정제된 휘발유(Labeled Data)로 만드는 과정이 진짜 경쟁력입니다. 여러분의 데이터는 원유인가요, 휘발유인가요? 없다면 저처럼 정유 공장(준지도 학습)을 차려보세요.
Read This Before Spending $10,000 on Data Labeling (Supervised vs Unsupervised)
1. The Trap of "Just Build an AI Model"
In the early days of my startup, the CEO gave me a massive mission: "We have tens of thousands of user-uploaded review photos. Let's build an AI to automatically classify them into 'Food', 'Interior', and 'Menu'." The app's review section was a mess, and we wanted to show only food photos separately.
I answered confidently, "Sure! I'll use a CNN (Convolutional Neural Network)! I can grab a model from Google and build it in a day." I excitedly opened a TensorFlow tutorial and wrote the code. The model architecture was perfect. But the moment I finished the Data Loader and tried to click the "Train" button, a chill ran down my spine.
"Wait, I have the Input data (X), but where are the Answers (Y)?"
We had tens of thousands of image files on the server, but no labels telling us whether an image was 'Food' or 'Interior'. To fix this, we'd have to hire part-timers to manually look at and classify tens of thousands of images. Even at 10 cents per image, 50,000 images would cost $5,000, and with verification, the estimate exceeded $10,000.
That's when I painfully realized: 80% of an AI project isn't modeling, it's data labeling.
2. Supervised Learning: The Private Tutor
Most of what we call 'AI' today—AlphaGo, Self-driving cars—is Supervised Learning. It's like "Teaching with both the problem (Input) and the answer (Label)."
Learning Process Analogy
- Teacher: "Look at this photo (A). This is a Cat (Label)."
- Student (Model): "Ah, pointy ears and whiskers mean Cat."
- Teacher: "Look at this photo (B). This is a Dog (Label)."
- Student (Model): "Round nose and floppy ears mean Dog."
Pros and Cons
- Pros: Highest accuracy. It learns exactly what we want.
- Critical Con: Creating 'Answers' is expensive. It grinds human labor. (Human-in-the-loop)
This was what I initially tried to do. Without labeled data, you can't even start.
Key Algorithms:
- Classification: Is it a Cat or Dog? Spam or Ham? (Softmax)
- Regression: What will be the house price tomorrow? (Linear)
3. Unsupervised Learning: The Self-Taught Genius
Since we had no money, I looked for alternatives. Enter Unsupervised Learning. This is "Throwing data at the model and telling it to find patterns on its own without answers."
Learning Process Analogy
- Teacher: (Dumps 10,000 photos on the desk without saying anything) "Sort these out."
- Student (Model): "Hmm... nobody told me the answers, but these look red and round. (Group A)"
- Student (Model): "These are rectangular and have lots of text. (Group B)"
Result
Later, a human checks:
- Group A = Food photos (Mostly red)
- Group B = Menu photos (Lots of text)
The model creates groups based on the Similarity of the data itself.
Key Algorithms:
- Clustering: Grouping similar items (K-Means, DBSCAN)
- Dimensionality Reduction: Compressing complex data (PCA, t-SNE)
This wasn't perfect either. It creates groups, but a human still has to verify if a group is 'Food' or 'Garbage'. Also, 'People wearing red shirts' might get mixed into the 'Food' group. Accuracy is lower than Supervised Learning.
4. The Rising Star: Self-Supervised Learning (SSL)
Wait, isn't there something in between? You might have heard of BERT or GPT. They are trained on massive amounts of internet text without human labeling. How? They use Self-Supervised Learning.
They create their own labels from the data itself.
- BERT (Masked Language Model): Hides a word in a sentence ("I ate [MASK] for lunch") and tries to guess it. The "answer" is the hidden word itself.
- GPT (Next Token Prediction): Given "I ate", guess "pizza". The "answer" is the next word.
This allows learning from billions of web pages without paying a cent for human labeling. While this is technically a subset of Unsupervised Learning (or Supervised Learning with auto-labels), it's the dominant paradigm in modern AI.
5. Active Learning: The Smart Student
There is another strategy to save money. Active Learning. Instead of randomly labeling 100 images, the model asks the human: "I'm confused about this specific image. Is it food or not?"
- Model predicts 50,000 images.
- It selects the 100 images with the lowest confidence score (the most confusing ones).
- Human labels only those 100 images.
- Model learns from them and repeats.
Labeling the "hardest" problems is much more efficient than labeling random easy ones.
6. Semi-Supervised Learning: The King of ROI
Finally, the method I chose was Semi-Supervised Learning. It combines the best of both worlds. The core strategy is "Teach a few, and let it infer the rest."
4-Step Strategy
- Small Batch Labeling: I manually classified just 100 images out of 50,000. (Took less than an hour).
- Supervised Learning (Teacher): Trained the model on these 100 images. Accuracy was low due to small data, but it grasped general features.
- Label Propagation: Let the trained model predict the remaining 49,900 images.
- "This photo looks 99% similar to the 'Food' photos I learned. So this is probably 'Food' too."
- "This one is 50% sure? I don't know." (Skip this)
- Re-training (Student): Take the confidently predicted (Confidence > 90%) data and treat them as 'Free Labeled Data', adding them to the training set. Repeat this (Self-training).
As a result, I built a classifier with $0 spent on labeling, achieving performance (92%) comparable to a $10,000 labeled model. When I realized that I had saved $10,000, I couldn't help but smile.
7. Common Pitfalls: Don't Be a Perfectionist
A common mistake I made was trying to get 100% accuracy from the Semi-Supervised model. It's impossible. Even human labelers disagree on whether a photo is "scenic" or "interior". If your auto-labeled data has 90% accuracy, that's often good enough to train a robust model. Don't waste months trying to fix that last 10%. Launch it, collect user feedback, and improve it iteratively (Data Flywheel).