# NMT-Keras: a Very Flexible Toolkit with a Focus on Interactive NMT and Online Learning

NMT-Keras: 대화형 NMT와 온라인 학습에 초점을 맞춘 매우 유연한 툴킷

Álvaro Peris, Francisco Casacuberta · arXiv · 2018년 7월 9일

- **연구 문제** NMT-Keras는 신경 기계 번역 모델의 학습과 배포뿐 아니라 대화형 예측 번역과 온라인 학습을 함께 지원하는 툴킷입니다.
- **연구 방법** Keras 포크와 Multimodal Keras Wrapper를 결합해 NMT 모델을 구성하고, 사용자 수정을 반영하는 대화형 세션과 샘플 기반 갱신을 구현합니다.
- **주요 결과** EU와 Europarl에서 NMT-Keras는 PB-SMT 기준선과 비교해 대부분의 TER과 BLEU 결과에서 개선을 보였으며, INMT의 KSMR은 비교된 SOTA보다 낮았습니다.

## 대화형 번역 연구를 위한 툴킷의 필요성

NMT-Keras는 신경 기계 번역 모델을 학습하고 적용하는 툴킷이지만, 기존의 많은 NMT 툴킷과 달리 대화형 예측 번역과 장기적인 온라인 학습 기능에 무게를 둡니다. 이 논문은 번역 모델을 한 번 학습해 배포하는 흐름을 넘어, 사용자의 수정이 시스템 가설에 즉시 반영되고 사용자가 수락한 샘플로 모델이 계속 갱신되는 상황을 다룹니다. NMT-Keras는 Keras를 기반으로 하며 Theano와 TensorFlow 위에서 동작합니다. 저자들은 OpenNMT, Tensor2Tensor, Nematus와 비교해 NMT-Keras가 대화형 예측 기능과 장기 학습 기능을 제공하는 점에서 구분된다고 주장합니다.

이 구분은 모듈성과 확장성 위에서 이해해야 합니다. 저자들은 Keras를 수정한 포크와 데이터 관리를 담당하는 Multimodal Keras Wrapper를 함께 사용해 NMT를 특정한 시퀀스-투-시퀀스 과제로 구현했습니다. 따라서 이 논문의 핵심 질문은 툴킷이 학습, 번역, 대화형 세션, 온라인 갱신을 하나의 구조 안에서 어떻게 연결하는지와, 그렇게 만든 시스템이 기준선과 최신 기법에 비해 어느 정도의 번역 품질과 사용자 노력을 보이는지입니다.

## Keras 포크와 래퍼의 역할 분담

NMT-Keras는 두 개의 주요 라이브러리에 의존합니다. 하나는 학습 프레임워크를 제공하는 수정된 Keras이고, 다른 하나는 데이터 관리와 Keras 사용을 쉽게 만드는 Multimodal Keras Wrapper입니다. Keras에서 모델은 층이나 연산으로 이루어진 방향성 그래프로 정의되고, 손실 함수를 최소화하도록 컴파일된 뒤 확률적 경사 하강법 계열의 옵티마이저로 학습됩니다.

Multimodal Keras Wrapper는 Dataset 객체와 Model wrapper라는 두 주요 객체를 정의합니다. Dataset 객체는 학습, 검증, 테스트 분할을 관리하고 텍스트의 어휘를 구축하여 숫자 표현으로 바꾸며, 네트워크 출력을 다시 자연어로 복원합니다. Model wrapper는 Keras 라이브러리와 Dataset 객체를 연결하고 학습과 적용 함수를 관리합니다. 시퀀스-투-시퀀스 모델에서는 빔 탐색 절차도 이 래퍼에 포함되어 있습니다. 저자들은 Keras 포크를 사용하는 이유를 NMT 문제를 위한 함수를 독립적으로 설계하기 위해서라고 설명합니다.

## 대화형 예측 번역 세션의 작동

대화형 예측 기계 번역(INMT)은 사람이 번역 결과를 처음부터 고치는 후편집을 대체하는 방식으로 제안됩니다. 목표는 높은 품질의 번역을 얻으면서 사람이 들이는 노력을 줄이는 것입니다. 사용자가 시스템 가설의 일부를 수정하면 시스템은 그 수정을 반영해 대안 가설을 다시 제시합니다. 이 과정은 사용자가 원하는 번역에 도달할 때까지 반복됩니다.

NMT-Keras는 Peris 등(2017c)이 제안한 대화형 프로토콜을 구현합니다. 그림 1의 예시에서는 사용자가 한 문자 수정을 입력하자 시스템이 가설을 바꾸는 과정이 보입니다. 데모 웹사이트는 클라이언트-서버 기능으로 만들어졌으며, 시스템은 확정된 가설 접두부를 유지하면서 수정 이후의 부분을 갱신합니다. 사용자가 번역을 수락하면 Learn from sample 설정이 켜져 있을 때 그 샘플로 모델을 갱신할 수 있습니다. 이 온라인 학습은 시스템을 특정 도메인이나 사용자 선호에 맞추기 위해 대화형 프로토콜과 결합됩니다.

![Figure 2: Frontend of the INMT with OL website built with NMT-Keras. In the left-side, the source sentence to translate is displayed. The system computes a tra…](https://refivu.com/papers/1f71471f-1b41-4c8e-923d-0d64f05ab69e/figures/figure-207b4b30e4140e4b4d08037ec9790f53.png?thumb=512)

**Figure 2** . Frontend of the INMT with OL website built with NMT-Keras. In the left-side, the source sentence to translate is displayed. The system computes a translation hypothesis,

[원문](https://arxiv.org/abs/1807.03096v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Álvaro Peris, Francisco Casacuberta · NMT-Keras: a Very Flexible Toolkit with a Focus on Interactive NMT and Online Learning · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

## Moses 기준선과 번역 품질 비교

번역 품질 평가는 EU와 Europarl 두 과제에서 수행되었습니다. Europarl에서는 newstest2012를 개발 세트로, newstest2013을 테스트 세트로 사용했습니다. 비교 기준은 Moses 설정의 PB-SMT이며, 유의성은 approximate randomization으로 95%에서 검정했고 신뢰구간은 bootstrap resampling으로 계산했습니다. 평가 지표인 TER은 낮을수록 좋고 BLEU는 높을수록 좋습니다.

표 1에서 NMT-Keras는 EU En→De에서 TER 52.3과 BLEU 36.4를, EU En→Fr에서 TER 38.4와 BLEU 50.4를 보였습니다. 같은 표에서 PB-SMT는 EU En→De TER 54.1, BLEU 35.4였고 EU En→Fr TER 41.4, BLEU 47.8이었습니다. Europarl에서는 En→Fr의 TER이 PB-SMT 56.1에서 NMT 55.0으로 낮아졌고 BLEU는 26.5에서 27.8로 높아졌습니다. 저자들은 거의 모든 언어 쌍에서 유의한 개선이 있었다고 보고합니다. 다만 Europarl En→De에서는 PB-SMT의 TER 62.2가 NMT-Keras의 63.1보다 낮아 이 한 경우에만 Moses가 더 나은 TER을 보였습니다.

이 결과는 두 과제, 두 언어 방향, 제시된 Moses 설정의 범위에서 읽어야 합니다.

![Table 1: Results of translation quality for all tasks in terms of TER \[%\] and BLEU \[%\]. Results that are statistically signiﬁcantly better for each task and me…](https://refivu.com/papers/1f71471f-1b41-4c8e-923d-0d64f05ab69e/figures/figure-fd1f9ac53e0fac9769096c5e04e8380c.png?thumb=512)

**Table 1** . Results of translation quality for all tasks in terms of TER \[%\] and BLEU \[%\]. Results that are statistically signiﬁcantly better for each task and metric are boldfaced.

[원문](https://arxiv.org/abs/1807.03096v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Álvaro Peris, Francisco Casacuberta · NMT-Keras: a Very Flexible Toolkit with a Focus on Interactive NMT and Online Learning · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.

## 사용자 노력 지표 KSMR에서의 INMT 결과

대화형 예측 번역의 효율은 KSMR로 평가되었습니다. KSMR은 원하는 문장을 얻기 위해 필요한 키 입력 수와 마우스 동작 수의 합을 해당 문장의 문자 수로 나눈 값이며, 낮을수록 사용자 노력이 적습니다. 실험에서 사용자는 실제 사람이 아니라 시뮬레이션되었고, 데이터셋의 참조 번역을 사용자가 원하는 번역으로 간주했습니다.

EU 과제에서 INMT의 KSMR은 En→De 19.8과 En→Fr 16.3이었고, 비교된 SOTA는 각각 30.5와 25.5였습니다. Europarl에서는 INMT가 En→De 32.9와 En→Fr 29.8을 보였고, SOTA는 각각 49.2와 44.4였습니다. 이 비교에서 INMT 시스템은 모든 과제와 방향에서 SOTA보다 낮은 KSMR을 보였습니다. 비교 대상 SOTA 수치는 Ortiz-Martínez(2016)와 Barrachina 등(2009)의 결과이므로, 이를 이 논문의 동일한 실행 조건에서 얻은 값으로 바꾸어 읽지 않아야 합니다.

![Table 2: Eﬀort required by INMT systems compared to the state-of-the-art (SOTA), in terms of KSMR \[%\]. Results that are statistically signiﬁcantly better for e…](https://refivu.com/papers/1f71471f-1b41-4c8e-923d-0d64f05ab69e/figures/figure-f46da6cb2951cbd0a926e3f8cf7d1e49.png?thumb=512)

**Table 2** . Eﬀort required by INMT systems compared to the state-of-the-art (SOTA), in terms of KSMR \[%\]. Results that are statistically signiﬁcantly better for each task and metric are boldfaced.† refers to Ortiz-Martínez (2016),‡ to Barrachina et al. (2009).

[원문](https://arxiv.org/abs/1807.03096v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Álvaro Peris, Francisco Casacuberta · NMT-Keras: a Very Flexible Toolkit with a Focus on Interactive NMT and Online Learning · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

## 평가 범위와 해석의 한계

이 논문의 실험은 두 과제로 제한되었습니다. 저자들은 공간 제약 때문에 EU와 Europarl 결과만 보고했고, 더 많은 결과는 Peris와 Casacuberta(2018a)를 참고하도록 안내합니다. 따라서 여기서 확인된 번역 품질과 KSMR 결과를 다른 도메인, 다른 언어, 다른 모델 설정으로 넓히려면 추가 근거가 필요합니다.

또 INMT 평가는 실제 사용자 실험이 아니라 시뮬레이션에 의존합니다. 사용자의 수정 방식이 실제 사람과 다를 수 있으며, 참조 번역을 원하는 번역으로 취급한 가정도 실제 사용성의 모든 측면을 대신하지 못합니다. 번역 품질 비교에서는 Europarl En→De의 TER 한 경우에서 Moses가 더 나았다는 점도 함께 읽어야 합니다. 온라인 학습의 장기 효과에 대한 더 자세한 실험은 이 본문에서 다루지 않고 외부 참고 문헌에 위임되어 있습니다.

## 논문 정보

- **저자**: Álvaro Peris, Francisco Casacuberta
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2018년 7월 9일
- **등록일**: 2026년 11월 6일
- **수정일**: 2018년 8월 16일
- **버전**: v3
- **arXiv**: 1807.03096
- **DOI**: 10.2478/pralin-2018-0010
- **분류**: cs.CL
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/1807.03096v3) · [원문 PDF ↗](https://arxiv.org/pdf/1807.03096v3)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

We present NMT-Keras, a flexible toolkit for training deep learning models, which puts a particular emphasis on the development of advanced applications of neural machine translation systems, such as interactive-predictive translation protocols and long-term adaptation of the translation system via continuous learning. NMT-Keras is based on an extended version of the popular Keras library, and it runs on Theano and Tensorflow. State-of-the-art neural machine translation models are deployed and used following the high-level framework provided by Keras. Given its high modularity and flexibility, it also has been extended to tackle different problems, such as image and video captioning, sentence classification and visual question answering.

## 원문 인용

Álvaro Peris, Francisco Casacuberta (2018). NMT-Keras: a Very Flexible Toolkit with a Focus on Interactive NMT and Online Learning. arXiv:1807.03096v3. https://doi.org/10.2478/pralin-2018-0010

**BibTeX**

```
@article{peris2018keras,
  title = {{NMT-Keras: a Very Flexible Toolkit with a Focus on Interactive NMT and Online Learning}},
  author = {Álvaro Peris and Francisco Casacuberta},
  year = {2018},
  eprint = {1807.03096},
  archivePrefix = {arXiv},
  doi = {10.2478/pralin-2018-0010},
  url = {https://arxiv.org/abs/1807.03096v3}
}
```

## 이 논문의 용어

- [트랜스포머](https://refivu.com/terms/515e8433c447-transformer)
- [BLEU](https://refivu.com/terms/42cd9b97719e-bleu)
- [Stochastic Gradient Descent](https://refivu.com/terms/a49650824022-stochastic-gradient-descent)
- [Beam search](https://refivu.com/terms/3e449f8f713b-beam-search)
- [Active learning](https://refivu.com/terms/0e0dd6f76a6c-active-learning)
- [Neural Machine Translation](https://refivu.com/terms/17d91eb90f6d-neural-machine-translation)
- [bootstrap resampling](https://refivu.com/terms/ca9640334c5a-bootstrap-resampling)
- [Moses](https://refivu.com/terms/7ec6fd928e49-moses)
- [transformer model](https://refivu.com/terms/3016d7d02600-transformer-model)
- [Keras](https://refivu.com/terms/c4ab0475b12f-keras)
- [TER](https://refivu.com/terms/77a049e53dec-ter)

## 다른 논문 해설

- [Neural sentence embedding models for semantic similarity estimation in the biomedical domain](https://refivu.com/papers/779351be-1691-4a73-b4f4-7c1c825d9619-neural-sentence-embedding-models-for-semantic-similarity.md)
- [Applying Transformer-based Text Summarization for Keyphrase Generation](https://refivu.com/papers/9b1f8452-bbfa-41de-99fc-19492b6180b8-applying-transformer-based-text-summarization-for-keyphrase.md)
- [Ontology-driven weak supervision for clinical entity classification in electronic health records](https://refivu.com/papers/0132304f-d402-464d-afe2-8959dcfa2b3f-ontology-driven-weak-supervision-for-clinical-entity.md)
- [Ultra-fine Entity Typing with Indirect Supervision from Natural Language Inference](https://refivu.com/papers/ec3b192e-6258-46de-ab68-df02723dc86f-ultra-fine-entity-typing-with-indirect-supervision-from.md)
- [Sentiment Analysis in Finance: From Transformers Back to eXplainable Lexicons (XLex)](https://refivu.com/papers/0773363d-36cf-4538-afdb-ea972dcfe464-sentiment-analysis-in-finance-from-transformers-back-to.md)
- [TNT-KID: Transformer-based Neural Tagger for Keyword Identification](https://refivu.com/papers/a6047224-cf56-4558-b17e-b585f5202f21-tnt-kid-transformer-based-neural-tagger-for-keyword.md)
- [Multi-Head Multi-Layer Attention to Deep Language Representations for Grammatical Error Detection](https://refivu.com/papers/92cf0577-cb1d-4d18-bf79-62dc40804e86-multi-head-multi-layer-attention-to-deep-language.md)
- [Comparing Neural- and N-Gram-Based Language Models for Word Segmentation](https://refivu.com/papers/7641c662-792a-4638-be97-6e528f61fde6-comparing-neural-and-n-gram-based-language-models.md)
- [Transferable neural networks for enhanced sampling of protein dynamics](https://refivu.com/papers/c714fbcd-6f6e-4f42-8ba6-dad4e4006880-transferable-neural-networks-for-enhanced-sampling-of.md)
- [Intrinsically Motivated Hierarchical Policy Learning in Multi-objective Markov Decision Processes](https://refivu.com/papers/ed69d7df-af26-4324-9473-e48046fe20c7-intrinsically-motivated-hierarchical-policy-learning-in.md)
- [Contrastive Representation Learning: A Framework and Review](https://refivu.com/papers/8d475c35-65aa-4272-b3a4-00f7350d277d-contrastive-representation-learning-a-framework-and-review.md)
- [Opportunities and Challenges for ChatGPT and Large Language Models in Biomedicine and Health](https://refivu.com/papers/fddfbda2-67e8-44ae-b9b3-0a4666afe739-opportunities-and-challenges-for-chatgpt-and-large-language.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/1f71471f-1b41-4c8e-923d-0d64f05ab69e-nmt-keras-a-very-flexible-toolkit-with-a)
