Towards Interactive Language Modeling

Maartje ter Hoeve, Evgeny Kharitonov, Dieuwke Hupkes, Emmanuel DupouxarXiv 2021

Introduction

Current state-of-the-art language models (LMs) are typically trained on massive, static datasets using a simple next-token prediction objective. While effective, this passive learning approach differs significantly from human language acquisition, which is inherently social and interactive. Humans learn through dynamic feedback loops with caregivers who adapt their communication to the learner's current level. This paper introduces a "Teacher-Student" framework for Interactive Language Modeling, where a teacher model strategically selects informative data to optimize a student's learning efficiency under a strict communication budget.

The Teacher-Student Framework

The proposed framework moves beyond passive observation by establishing a dynamic dialogue between two agents:

  1. The Teacher: A pretrained Transformer LM acting as a "native speaker." It employs a policy network to select specific sentences from a larger corpus to present to the student.
  2. The Student: A smaller, "blank slate" Transformer LM that learns exclusively from the data provided by the teacher.
  3. The Interaction Loop: The teacher provides a batch of data; the student trains on this data and then undergoes an "exam." The resulting exam score (negative perplexity) is returned to the teacher as a reward signal.
  4. The Environment: The shared linguistic context or task domain.
The interactive training loop over time, showing the teacher selecting data for multiple students who then provide feedback via exam scores.

To optimize the teacher's selection strategy, the researchers utilize REINFORCE with entropy regularization. A critical component of this setup is the "bit budget": the teacher is restricted to sending a small, fixed number of sentences per episode. This constraint forces the teacher to identify and prioritize the most "didactic" examples rather than simply transferring the entire dataset.

Experimental Setup and Datasets

To maintain experimental control, the authors utilize synthetic languages rather than natural language. They focus on two primary tasks:

  • Domain Selection (Task 1): The teacher must distinguish between two distinct vocabularies ($V_1$ and $V_2$). Since the student is only tested on $V_1$, the teacher must learn to filter out $V_2$.
  • Structural Selection (Task 2): The teacher must identify specific grammatical patterns (e.g., single vs. double repetitions) that are relevant to the student's exam.

Key Insights: Stability and Representation

A major finding is the "Stability of Crowds." Training a teacher against a single student proved highly noisy and often failed to converge. By training the teacher against multiple students (e.g., 12 or 24) simultaneously, the gradient signal is smoothed, allowing the teacher to learn a consistent and effective didactic strategy.

Convergence of the teacher's strategy across different student counts. Increasing the number of students per teacher significantly stabilizes the learning process.

Furthermore, the quality of the teacher's internal representation matters. The policy performed significantly better when using average hidden layer embeddings of sentences rather than simple word embeddings. This suggests that hidden layers capture the structural information necessary for effective teaching.

Results and Performance

The framework demonstrates that a learned teacher can significantly outperform random data selection:

  • Convergence to Oracle: In Task 1, the teacher's strategy successfully converged to an "oracle" strategy (selecting 100% relevant data) within approximately 40 episodes.
  • Efficiency Gains: Students guided by a learned teacher achieved drastically lower perplexity compared to those trained on random data. In the domain selection task, average perplexity dropped from ~160 (random) to ~15 (learned).
  • Structural Complexity: While the teacher quickly mastered vocabulary-based selection, learning to distinguish abstract grammatical structures (Task 2) proved more challenging and required more training episodes.

Limitations and Future Directions

While promising, this work currently relies on synthetic languages and a primarily one-way interaction (teacher "pushing" data). Future research will focus on:

  • Scaling to Natural Language: Applying the framework to large-scale, real-world datasets.
  • Bidirectional Interaction: Enabling the student to actively signal confusion or request specific types of information.
  • Grounded Learning: Incorporating environmental context beyond text, mimicking how humans learn language through physical interaction.

Summary updated

BibTeX
@misc{hoeve2021towards,
  author = {Maartje ter Hoeve and Evgeny Kharitonov and Dieuwke Hupkes and Emmanuel Dupoux},
  title = {{Towards Interactive Language Modeling}},
  year = {2021},
  eprint = {2112.11911},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2112.11911},
}
Figure