1 of 36

Advancing Large Language Models with

Input Augmentation & Output Refinement

Bill Yuchen Lin

Young Investigator @ Allen Institute for AI (AI2)

yuchenl@allenai.org

2 of 36

In the Era of LLMs → Frozen / Black-box APIs

Large

Language

Models

AGI?

NLPers

3 of 36

Inputs/Outputs with LLLMs

  • Prompts/Instructions
  • Reasoning steps
  • Documents
  • Knowledge base
  • In-context examples

Frozen LMs

  • Searching
  • Sampling

4 of 36

Input Augmentation via Retrieval

5 of 36

Input Augmentation via Retrieval

6 of 36

Input Augmentation via Retrieval

FLAN-T5

7 of 36

Input Augmentation via Retrieval

8 of 36

Input Augmentation via Retrieval

9 of 36

Input Augmentation via Retrieval

10 of 36

Input Augmentation via Retrieval

11 of 36

Input Augmentation via Retrieval

12 of 36

Input Augmentation via Retrieval

13 of 36

Input Augmentation via Retrieval

Key idea:

Iteratively training rerankers by refining the data quality with meta-learning .

14 of 36

Input Augmentation via Retrieval

15 of 36

Input Augmentation via Retrieval

16 of 36

Input Augmentation via Retrieval

The upsampling ratio.

|Q|=16; |R|=512; u=2

17 of 36

Input Augmentation via Retrieval

  • ReCross: a retrieval augmentation method for unsupervised cross-task generalization.
    • Modeling training examples (w/ instructions) as a virtual knowledge base
    • Retrieve data points (instead of docs/facts/triples) for re-learning can help generalize
    • BART0’s internal embeddings is a good start, and learning a reranker is even better
  • Limitations:
    • Re-learning can be also costly for very very large models, and thus not real-time.
      • It might be okay for llama-7b+lora/adapters, though.
    • In the era of GPT-3, ChatGPT, GPT-4, so what?
      • The definition of a “task”

18 of 36

Input Augmentation via Retrieval

Ongoing project: ReX-Instruct

Instruction

Database

(e.g., alpaca-data)

BART0/Flan-T5

User Inputs

BART0/Flan-T5

Query

Vectors

Retrieved

Examples

Concatenation ⇒ LLaMA

In-Context Learning

Index

Learning a scoring function to better estimate the utility of retrieved examples.

​

⇒ a ranking problem

⇒ “truth score” proxy

⇒ iteratively training

⇒ model-general?

19 of 36

Inputs/Outputs with LLLMs

  • Prompts/Instructions
  • Reasoning steps
  • Documents
  • Knowledge base
  • In-context examples

Frozen LMs

  • Searching
  • Sampling

20 of 36

Output Refinement via Reranking

21 of 36

Decoding methods for LMs

  • (Diverse) beam search
    • Greedy selection
  • Top-k sampling
    • Random sampling on top k plausible tokens
  • Top-p sampling
    • Random sampling on top p% likelihood tokens

22 of 36

Gap between Oracle vs Default Generations

The one in top 15 with highest metric scores.

Peagsus T5 OpusMT

23 of 36

Prior work: individually score each candidate

24 of 36

Prior work: individually score each candidate

💡 Difference between a better vs a good example is subtle, unless you compare them side by side.

25 of 36

PairReranker: A pairwise reranking method

26 of 36

Some Challenges for Pairwise Reranking

27 of 36

Model architecture for PairReranker

28 of 36

Inference stage for Pairwise Reranking

29 of 36

Dataset Statistics

30 of 36

Candidates Generation

31 of 36

Results with Smaller LMs (Pegasus, T5, Opus-MT)

32 of 36

Results with Large LMs (text-davinci-003)

33 of 36

Summary for LLM-Reranker

  • PairReranker:
    • A pairwise ranking problem, using an encoder with [input, output1, output2] for comparisons.
    • Reranking a LLM’s outputs from
      • N best generations from a single/multiple decoding methods
      • From multiple LLMs
  • Limitations:
    • Task specific, Model specific
    • Efficiency, consistency
    • Automatic metrics may not be trustworthy
      • GPT-4 summary can be better than humans’

34 of 36

Other topics that I’m working on

  • Can you continually update the LLMs with new instructions?

​

35 of 36

Other topics that I’m working on

  • Can you tell LMs to plan for an embodied task in a grounded room?
    • On Grounded Planning for Embodied Tasks with Language Models [AAAI’23]

36 of 36

Conclusion

  • Input augmentation:
    • Retrieving useful data for re-learning towards better generalization on unseen tasks
    • ReCross & Rex-instruct
  • Output refinement:
    • Reranking the outputs with a dedicated pairwise comparison model
    • LLM-Reranker (i.e., PairReranker)
  • Can we jointly learn to do both?
    • LLMs as the environment accepting inputs & outputs.
    • We jointly train the input augmentation modules + output refinement modules?