Get AI summaries of any video or article — Sign up free
Richard Socher on NLP at Salesforce (Full Stack Deep Learning - March 2019) thumbnail

Richard Socher on NLP at Salesforce (Full Stack Deep Learning - March 2019)

The Full Stack·
6 min read

Based on The Full Stack's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

DecaNLP unifies many NLP tasks by converting them into a single “context + question → answer” generation format.

Briefing

Natural language processing is stuck in a cycle of single-task models that improve benchmarks but don’t add up to a general system. Richard Socher’s core push is that the field should unify most NLP tasks under one multitask framework—so a single model can transfer knowledge across tasks, adapt to new domains, and eventually support zero-shot learning.

Socher traces how NLP moved from heavy manual feature engineering (hand-built signals like negation cues) to deep learning, where progress increasingly comes from engineering architectures for individual tasks. That approach works—especially when each task has enough labeled data—but it doesn’t naturally produce a continuously improving “one model for everything,” analogous to how humans learn across experiences rather than swapping models per problem. The missing ingredient, in his view, is a mechanism for knowledge transfer that doesn’t require retraining from scratch every time the task changes.

The proposed solution is “NLP decathlon” (DecaNLP), a multitask turning framework built around a single input-output pattern: provide a context document and ask a question, then generate an answer word-by-word. Most NLP problems can be cast into one of three structural families—sequence tagging, text classification, and sequence-to-sequence generation—but DecaNLP maps them into a unified “language modeling + question answering + dialogue” style. Language modeling becomes “predict the next words that answer the question,” translation becomes “generate the next words in the target language,” summarization becomes “generate the summary tokens,” and classification becomes “ask for the label,” with the label options embedded in the question.

A major practical challenge is making tasks share representations without forcing the model into a narrow solution. Socher argues that NLP’s reasoning needs vary widely—logical and linguistic reasoning, sentiment judgment, and even commonsense/visual-like inference—so the community historically split NLP into many small benchmarks and chased improvements within each. DecaNLP instead aims for weight sharing across tasks, including shared encoders and a shared decoder, so the model learns how to adapt internally based on the task prompt.

The architecture combines shared bidirectional LSTMs for context and question encoding, a co-attention mechanism (capturing interactions between the two sequences), transformer layers, and a pointer-style generation mechanism that can either copy from the context, copy from the question, or generate from a vocabulary via a softmax. Training is evaluated across ten publicly available tasks spanning question answering, semantic role labeling, relation extraction, sentiment analysis, entailment, translation, summarization, and more.

Results highlight that multitasking helps—especially for zero-shot relation extraction—while also revealing a key failure mode: when tasks are dissimilar, joint training can cause catastrophic interference, where learning for one task harms another. To address this, DecaNLP uses “anti-curriculum learning,” starting with harder tasks (like translation and question answering) and adding easier ones (like sentiment classification) later. With tuning and improved pretraining, the combined model narrows the gap to an “oracle” setup that would otherwise use separate models per task.

Beyond benchmark scores, the most striking claim is transfer: a pretrained multitask model can be applied off-the-shelf to new domains like Amazon product reviews and Yelp restaurant reviews, and it can answer newly phrased label questions (a form of zero-shot learning) by learning to point to relevant adjectives—even if those exact label prompts weren’t in training. The broader takeaway is that unified multitask learning and prompt-based task specification may be a fundamental step toward generalized NLP systems rather than more incremental architecture tweaks.

Cornell Notes

DecaNLP reframes most NLP tasks as a single problem: given a context and a natural-language question, generate the answer token-by-token. The approach unifies language modeling, question answering, and classification under one multitask model with shared encoders/decoder plus a pointer mechanism that can copy from the context or question or generate from vocabulary. Training across ten tasks improves transfer and enables zero-shot behavior, but joint training can also trigger catastrophic interference when tasks don’t relate. To reduce that, the system uses anti-curriculum learning—start with harder tasks and add easier ones later—then tunes pretraining and model components. The practical goal is a general NLP model that adapts to new tasks and domains without retraining separate systems for every benchmark.

Why does casting many NLP tasks into one “context + question → answer” format matter?

It forces task identity into the model’s inputs instead of treating each task as a separate training setup. In DecaNLP, the context is the text (a sentence, paragraph, or document), and the question encodes what to do—e.g., ask for a translation, a summary, an entailment label, or a sentiment class. Because the task prompt is part of the sequence the model reads, the same shared model can learn how to switch behaviors internally, enabling transfer and reducing the need for separate task-specific architectures.

What are the three structural families of NLP tasks, and how does DecaNLP unify them?

Socher groups NLP tasks into sequence tagging (label each token, like named entity recognition), text classification (label an entire text, like sentiment), and sequence-to-sequence generation (map an input sequence to an output sequence, like translation and summarization). DecaNLP unifies them by converting each into a question-answering style generation problem: the model always generates an answer sequence, even when the original task was classification or tagging.

How does the pointer mechanism help the model handle tasks like translation, extraction, and classification?

The decoder can produce output in three ways: (1) point to/copy a word from the context, (2) point to/copy a word from the question, or (3) generate a word from a vocabulary using a softmax. This matters because many answers are spans or label tokens that already appear in the input (or are provided as label options in the question). The pointer option lets the model reuse relevant tokens rather than forcing it to generate them from scratch.

What is catastrophic interference in multitask learning, and how does DecaNLP respond?

Catastrophic interference (or catastrophic forgetting) occurs when learning one task degrades performance on another, especially when tasks are not closely related. Socher notes that transfer tends to work when tasks share underlying signals (e.g., part-of-speech cues helping named entity recognition), but it can fail when tasks are unrelated (e.g., English-to-German translation and sentiment). DecaNLP uses anti-curriculum learning—start with harder tasks like translation and question answering, then add easier tasks like sentiment—to reduce the tendency for the model to collapse into a simpler solution.

What evidence is offered for zero-shot transfer and domain adaptation?

The model is pretrained on the multitask set and then applied to new domains without retraining. For sentiment, it reportedly reaches over 80% accuracy on Amazon product reviews and Yelp restaurant reviews using the existing model, then improves further with fine-tuning. For zero-shot label prompting, the system can answer newly phrased questions about unseen label prompts (e.g., asking whether a story is sad or happy when the exact phrasing wasn’t in training) by learning to point to relevant adjectives, though robustness can vary.

Why does Socher argue that NLP needs more than unsupervised learning to become general?

He argues that purely unsupervised learning won’t teach language the way humans learn it. In nature, language acquisition involves communication and some form of supervision. Similarly, for computer systems, learning language likely requires task-driven signals—at least enough structure to connect inputs to outputs—so multitask learning with prompts can supply that guidance.

Review Questions

  1. How does embedding the task definition into the model inputs (as a question) change the training and transfer dynamics compared with training separate task-specific models?
  2. What mechanisms in DecaNLP allow outputs to be copied from the context or question, and why is that useful for extraction and classification tasks?
  3. Why might anti-curriculum learning outperform curriculum learning in large multitask settings, according to the explanation given?

Key Points

  1. 1

    DecaNLP unifies many NLP tasks by converting them into a single “context + question → answer” generation format.

  2. 2

    Shared weights across tasks are intended to enable transfer learning and reduce the need for separate models per benchmark.

  3. 3

    A pointer-style generation mechanism lets the decoder copy from the context or question or generate from vocabulary, improving performance on tasks with extractive or label-token outputs.

  4. 4

    Multitask training can fail via catastrophic interference when tasks are dissimilar, so task relatedness strongly affects outcomes.

  5. 5

    Anti-curriculum learning—starting with harder tasks and adding easier ones later—helps prevent the model from collapsing into solutions optimized for simple tasks.

  6. 6

    Pretraining the full multitask model (not just word vectors) supports faster convergence and better zero-shot/domain transfer.

  7. 7

    Zero-shot behavior is demonstrated by prompting for new label questions and applying the pretrained model to new sentiment domains without retraining.

Highlights

DecaNLP treats translation, summarization, sentiment, entailment, and extraction as variations of the same operation: generate an answer to a task prompt over a context.
The model’s pointer mechanism can copy from the context or question, which is crucial when correct outputs are spans or label tokens rather than novel vocabulary items.
Joint multitask learning can produce catastrophic interference; anti-curriculum training is used to reduce that risk by ordering tasks from hard to easy.
The most compelling transfer claim is off-the-shelf performance on new sentiment domains and label prompts, suggesting a path toward zero-shot NLP.

Topics

  • Multitask NLP
  • Zero-Shot Learning
  • Pointer Networks
  • Anti-Curriculum Learning
  • NLP Decathlon

Mentioned

  • Richard Socher
  • Ashley
  • Brian McCann
  • Nitesh Cask
  • Simon’s Young
  • NLP
  • AGI
  • F1
  • ELMo
  • SQuAD
  • CNN
  • LSTM
  • GPU
  • IR