title: Deep Language Networks: Joint Prompt Training of Stacked LLMs using
    Variational Inference
summary: We view large language models (LLMs) as stochastic language layers in
  a network, where the learnable parameters are the natural language
  prompts at each layer. We stack two such layers, feeding the output of
  one layer to the next. We call the stacked architecture a Deep Language
  Network (DLN). We first show how to effectively perform prompt optimization
  for a 1-Layer language network (DLN-1). We then show how to train 2-layer DLNs
  (DLN-2), where two prompts must be learnt. We consider the output of the first
  layer as a latent variable to marginalize, and devise a variational inference
  algorithm for joint prompt training. A DLN-2 reaches higher performance than a
  single layer, sometimes comparable to few-shot GPT-4 even when each LLM in the
  network is smaller and less powerful. The DLN code is open source:
  https://github.com/microsoft/deep-language-networks .
paper_authors._id: 6494ecf9a0438024d825ff47
paper_authors.name: Alessandro Sordoni
paper_authors.status: extracted_confirmed
paper_authors.statusLastChangedAt: 2024-05-21T02:53:13.037Z
paper_authors._id: 637c27e5e74a3e06aacfd7b4
paper_authors.avatarUrl: /avatars/27dcca787b11d880c0ad851e83a84e87.svg
paper_authors.fullname: Alessandro Sordoni
paper_authors.type: user
paper_authors.user: sordonia
paper_authors._id: 6494ecf9a0438024d825ff48
paper_authors.name: Xingdi Yuan
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2023-06-23T14:28:34.990Z
paper_authors._id: 6495947b3eaaf416d924daeb
paper_authors.avatarUrl: /avatars/2e79b75e0f5f54f11471affc2bb377b6.svg
paper_authors.fullname: Eric Yuan
paper_authors.type: user
paper_authors.user: eryua
paper_authors._id: 6494ecf9a0438024d825ff49
paper_authors.name: Marc-Alexandre Côté
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2023-06-23T12:20:19.658Z
paper_authors._id: 62960afb91760de5e547e544
paper_authors.avatarUrl: /avatars/bebed5926b04d066d4c0e49d246acd78.svg
paper_authors.fullname: Marc-Alexandre Côté
paper_authors.type: user
paper_authors.user: MarcCote
paper_authors._id: 6494ecf9a0438024d825ff4a
paper_authors.name: Matheus Pereira
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2023-06-23T11:49:36.498Z
paper_authors._id: 63d1a31b2036e44c44fc72b8
paper_authors.avatarUrl: /avatars/62eb3e4c79ff4fa642518db9ab99e0f5.svg
paper_authors.fullname: Matheus Pereira
paper_authors.type: user
paper_authors.user: mat-pereira
paper_authors._id: 6494ecf9a0438024d825ff4b
paper_authors.name: Adam Trischler
paper_authors._id: 6494ecf9a0438024d825ff4c
paper_authors.name: Ziang Xiao
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2023-06-26T07:33:14.621Z
paper_authors._id: 6495d59b5e85f28106005976
paper_authors.avatarUrl: /avatars/29f077c0da87a5db19a6b9fb53935981.svg
paper_authors.fullname: Ziang Xiao
paper_authors.type: user
paper_authors.user: ziangxiao
paper_authors._id: 6494ecf9a0438024d825ff4d
paper_authors.name: Arian Hosseini
paper_authors._id: 6494ecf9a0438024d825ff4e
paper_authors.name: Friederike Niedtner
paper_authors._id: 6494ecf9a0438024d825ff4f
paper_authors.name: Nicolas Le Roux
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2023-06-23T14:28:09.571Z
paper_authors._id: 6380eaa5b2552a70c4a19205
paper_authors.avatarUrl: /avatars/99f601bf922996a51fe9782cd20afd28.svg
paper_authors.fullname: Nicolas Le Roux
paper_authors.type: user
paper_authors.user: nicolouchka
paper_title: Deep Language Networks: Joint Prompt Training of Stacked LLMs using
    Variational Inference
paper_summary: We view large language models (LLMs) as stochastic language layers in
  a network, where the learnable parameters are the natural language
  prompts at each layer. We stack two such layers, feeding the output of
  one layer to the next. We call the stacked architecture a Deep Language
  Network (DLN). We first show how to effectively perform prompt optimization
  for a 1-Layer language network (DLN-1). We then show how to train 2-layer DLNs
  (DLN-2), where two prompts must be learnt. We consider the output of the first
  layer as a latent variable to marginalize, and devise a variational inference
  algorithm for joint prompt training. A DLN-2 reaches higher performance than a
  single layer, sometimes comparable to few-shot GPT-4 even when each LLM in the
  network is smaller and less powerful. The DLN code is open source:
  https://github.com/microsoft/deep-language-networks .
paper_ai_keywords: language layers learnable parameters prompts Deep Language Network (DLN) DLN-1 DLN-2 prompt optimization latent variable variational inference algorithm performance Few-shot GPT-3