> For the complete documentation index, see [llms.txt](https://kh-kim.gitbook.io/natural-language-processing-with-pytorch/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kh-kim.gitbook.io/natural-language-processing-with-pytorch/00-cover-12.md).

# 듀얼리티 활용

![Rico Sennrich](/files/-Lg-ehGeSKzGN0KRiGgl){ width=400px }

앞서 12장에서는 강화학습을 통해 최대가능도 추정(MLE) 기반 신경망 훈련 방법의 한계를 극복하고, 샘플링을 통해 자연어 생성의 성능을 끌어올리는 방법에 대해 이야기했습니다. 하지만 수많은 샘플링을 통해 훈련하는 강화학습 기법은 비효율적인 단점이 있습니다. 이때 듀얼리티(duality) 속성을 활용하여 기존의 MLE 방식에서도 강화학습의 성과를 뛰어넘는 성능의 자연어 생성 기술을 구현할 수 있습니다.

13장에서는 머신러닝 전반에 걸친 듀얼리티 속성을 소개하고, 이를 통해 기존의 자연어 생성 또는 기계번역의 성능을 더욱 극대화하는 방법을 다루고자 합니다. 또한 이를 실제 파이토치 코드를 통해서 어떻게 구현하는지 이야기하겠습니다.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://kh-kim.gitbook.io/natural-language-processing-with-pytorch/00-cover-12.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
