nbswords
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # NEURAL MACHINE TRANSLATION BY JOINTLY LEARNING TO ALIGN AND TRANSLATE ###### tags: `paper notes` `deep learning` [paper link](https://arxiv.org/pdf/1409.0473.pdf) --- ## Intro * NMT最近的蓬勃發展 * Recurrent Continous Translation Models * Seq2Seq * 傳統方法是把句子都分開分析,各自訓練 * NMT則是嘗試以一個單獨的NN來完成Seq2Seq * 由於目前為止提出的Seq2Seq都得將所有的資訊壓縮到一個fixed-length的vector中 * 而這會讓模型難以處理很長的那種句子 (因為記憶還是有限) * 他們提出的方法能在模型產生出一個字的翻譯的時候同時搜尋source sentence中有哪些字是跟它相關的,這樣模型在做翻譯的時候就可以同時考慮source sentence還有之前產生的target word * 不使用整條的fixed-lenght vector而改為從中選擇它的subset去做decoding (要怎麼選是學出來的) * 使用attention機制使他們比以前的basic encoder-decoder表現更好 * task還是英法文翻譯 ## Learn to Align and translate ### Decoder * 新模型是將雙向的RNN(GRU)作為Encoder, Decoder也是RNN但是它同時利用Attention做align與translate * 其實可以看成是原本的Encoder-Decoder再加上一個alignment model * 新model的條件機率: $p(y_i|y_1...,y_{i-1},x) = g(y_{i-1},s_i,c_i)$ * $s_i$是hidden state * $s_i=f(s_{i-1},y_{i-1},c_i)$ * 以前的模型是共用一個上下文,現在這個是每個詞都有自己的上下文$c_i$ * $c_i=\sum_{j=1}^{T_x}a_{ij}h_j$ * 每一個$h_j$都包含對整個input sequence做attention之後的資訊(會特別關注第$h_j$個詞他周圍的詞), $j從1到T_x$ * 論文把$h$稱為 annotation , 感覺沒什麼太大意思 * 可以看成是在算$h_j$的加權 (把$a_{ij}$當成weight) * 若是把$a_{ij}當成是$target word $y_i$和source word $x_j$ align的機率 * 那麼$a_{ij}$就表現出了$h_j$相對於前一個hidden state$s_{t-1}$在決定下一個hidden state$s_i$和生成$y_I$的重要性 * 也就是說$a_{ij}越大, output第$j$個詞和input第$i$個詞關係就越大, 在翻譯第$i$個詞的時候就應該更注重在source sentence第$j$的詞的周圍$ * 這就是Attention的概念, decoder在翻譯的同時可以同時學習該注重source sentence的哪個部分 * Attention解決了fixed-length vector的問題 * $a_{ij}=exp(e_{ij}) / \sum_{k=1}^{T_x}exp(e_{ik})$ * alignment model, 用來看input的第$j$個詞周圍和output的第$i$個詞有多相關 * alignment model是一個和其他所有模型一起train的Feedforwark NN * soft alignment指的是attention的分布是機率性的而不是一個對一個, 也就是說attention算的是每一個詞跟別的詞有相關的機率, 而不是很硬的就說這個詞就是跟哪個詞相關 * 也由於是用soft alignment, 因此可以用gradient descent * $e_{ij} = a(s_{i-1},h_j)$ ![](https://i.imgur.com/RCtwSTX.jpg) ### ENCODER: BIDIRECTIONAL RNN FOR ANNOTATING SEQUENCES * 雙向的RNN (GRU) * forwark RNN吃input $X_1,...,X{_T{_x}}$, 輸出forward hidden state $\vec{h1},...,\vec{h{_x}}$ * Backward RNN吃input $X_{_T{_x}},...,X_1$ (反向輸入), 輸出Backward hidden state $\overleftarrow{h_1},...,\overleftarrow{h_x}$ * 然後把 $\overleftarrow{h_j}$和$\vec{h_j}$拼起來就得到$h_j$ * 用雙向他們覺得比較能學到"周圍"的訊息, 也是因為RNN的特性, $h_j$比較能收集到$x_j$周圍上下文的訊息 ## EXPERIMENT * 都是用BLEU score來評斷 * 資料集是WMT ’14 ![](https://i.imgur.com/Yfq9jpN.jpg) * RNNenc就是傳統的Seq2Seq * 50和30是拿來Train的句子字數 (一句50個字或者是30個字) * Mini-batch SGD, batch=80 sentence ![](https://i.imgur.com/HgIU7HK.jpg) * UNK是指Unknown token, 指的是不在他們拿來Train的3萬個word的shortlist當中的字 * Moses是conventional phrase-based translation system ## Conclusion * 他們的模型, RNNsearch超越了傳統的模型 * Seq2Seq能處理長度很長的句子了 * qualitative analysis是在研究RNNSearch產生出的soft-alignment, 並得出注意力有效的結論 * 表現也與SMT相當

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully