Machine Translation (MT)의 발전

2025. 6. 21. 18:13·AI & ML/LLM

sentence x를 source language에서 target lanuge인 sentence y로 번역하는 task

 

Statistical Machine Translation 

Core Idea

data로부터 probabilistic model을 학습하자!!

프랑스어 sentence x가 주어졌을 때, sentence y를 찾아보자!!!

즉 2개의 component로 각각 분리해서 학습시킨다! 

  • Translation Modelword나 phrases를 어떻게 번역해야 하는지 모델링, parallel data로부터 학습됨
  • Language Model
    좋은 English를 어떻게 써야 하는지 모델링, monologual data로부터 학습됨

그러나... 극도로 복잡하고 중요한 detail들이 너무 많다... 

 

갑자기...등장한 것이 있으니..

 

Neural Machine Translation (NMT)

구글 번역도 원래 SMT system이었는데..! NMT system으로 바뀌면서 빠르게 발전됨!!

sequence-to-sequence model 이다!!

 

  • Encoder RNN
    Encoder RNN은 source sentence의 encoding을 생성
    Encoding 결과는 Decoder의 초기 hidden state로 제공 
  • Decoder RNN
    encoding을 조건으로 하여 target sentence를 생성하는 Language Model 

즉 Encoder는 input을 취하고 neural representaion을 생성, Decoder는 neural representation을 기반으로 output을 생성

이는 seq2seq model 이라고 부른다. 

 

많은 NLP task에서는 seq-to-seq로 표현될 수 있음!

  • Summarization (long text → short text)
  • Dialogue (previous utterances → next utterance)
  • Parsing (input text → output parse as sequence)
  • Code generation (natural language → Python code)

 

NMT

seq2seq 모델은 Conditional Laguage Model의 한 예시임!

Language model인 이유는 decoder가 target sentece y의 다음 word를 예측하기 때문이고 

Conditional인 이유는 predction이 이전 단어들에 더해 source sentece에 의존하기 때문! 

 

어떻게 train?

즉 loss는 decoder에서 계산되고... 하나의 systemdㅡ로서 end-to-end로 Backpropagation함! 

 

 

문제점: issues with recurrent models

Linear interaction distance 

O(sequence length) 단계의 거리의 word pairs간 상호작용한다는 뜻은...

긴 거리의 dependencies은 학습하기 어렵다..(grdient 소실 문제 여전히...)

→ 예: "The dog that chased the cat ran" → "dog"과 "ran"은 멀리 떨어져 있음

 

RNN은 그냥 왼쪽부터 오른쪽으로 하나씩 처리하기 때문에 문장 구조에 Linear order가 장제로 박혀있다.

문장을 단순한 순서로만 생각해서는 안 된다..!  

 

"The dog that chased the cat ran away."
→ 주어는 "The dog", 동사는 "ran", 근데 둘 사이에 관계 있는 단어들이 멀리 떨어져 있음

 

즉 이를 순서대로 처리하는 모델은 구문 구조나 의미 관계를 잘 파악하지 못한다. 

 

Lack of parallelizability

Unparallelizable하게 작동하기 때문에 forward와 backward 연산은  O(seq length)를 가진다. 

GPU 병렬 처리에 잘 안 맞고..(이전 hidden state를 계산해야 다음 hidden state를 계산할 수 있기 때문!!) 

큰 데이터 학습이 힘들다!! 

'AI & ML > LLM' 카테고리의 다른 글

Pretraining  (0) 2025.07.06
Transformer : Decoder  (0) 2025.06.22
Transformer(1) : Self-attention  (0) 2025.06.21
Attention  (0) 2025.06.21
Language Modeling  (0) 2025.06.21
'AI & ML/LLM' 카테고리의 다른 글
  • Transformer : Decoder
  • Transformer(1) : Self-attention
  • Attention
  • Language Modeling
GoGoDDubi
GoGoDDubi
  • GoGoDDubi
    LetsGoDDubi
    GoGoDDubi
  • 전체
    오늘
    어제
    • 분류 전체보기 (12)
      • AI & ML (6)
        • LLM (6)
        • Vision (0)
      • Data (0)
      • Paper (3)
      • DevOps (3)
        • MLOps (0)
        • Airflow (3)
      • Infra (0)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    AI/ML
    vlm
    Airflow
    mlops
    DevOps
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.6
GoGoDDubi
Machine Translation (MT)의 발전
상단으로

티스토리툴바