Papers
Topics
Authors
Recent
Search
2000 character limit reached

Introspective Imitation Learning via NEIL

Updated 13 March 2026
  • Introspective imitation learning is a human-in-the-loop method that uses a model’s uncertainty to selectively query user corrections, ensuring annotation efficiency.
  • The NEIL algorithm integrates threshold-based uncertainty filtering with iterative data aggregation, reducing annotation costs while nearly matching supervised performance.
  • Empirical evaluations on WikiSQL and Spider datasets show that NEIL achieves near full-supervised accuracy with significantly fewer annotations.

Introspective imitation learning is a human-in-the-loop methodology for training semantic parsers, in which the model actively introspects its own uncertainty and queries the user for demonstration only at uncertain decision points. By carefully mixing high-confidence self-predictions with user-provided corrections, this approach achieves significant annotation efficiency while maintaining near-supervised performance. The paradigm is instantiated through the NEIL (Non-Exhaustive Imitation Learning) algorithm, with formal analysis and empirical results demonstrating its practical benefits in data-sparse semantic parsing scenarios (Yao et al., 2020).

1. Interactive Human-in-the-Loop Framework and Uncertainty Thresholding

A semantic parser is embedded within an interactive loop, such as the MISP framework. At each timestep tt, the parser executes its policy π^\hat\pi (a conditional distribution over actions aa given state sts_t):

  • The top action is proposed:

at=argmaxa  π^(ast)a_t = \arg\max_a\;\hat\pi(a\mid s_t)

  • The model computes its confidence via the posterior probability:

pπ^(atst)p_{\hat\pi}(a_t\mid s_t)

When pπ^(atst)p_{\hat\pi}(a_t\mid s_t) falls below a fixed threshold μ\mu, e.g., μ=0.95\mu = 0.95 for SQLova or μ=0.995\mu = 0.995 for EditSQL, the parser designates itself as "uncertain" and queries the user for the correct action π^\hat\pi0. Otherwise, it executes π^\hat\pi1 autonomously. This decision rule ensures user annotation effort is concentrated only where the model lacks confidence:

π^\hat\pi2

This introspective mechanism enables annotation-efficient bootstrapping and online improvement.

2. NEIL: Annotation-Efficient Imitation Learning Algorithm

The NEIL algorithm operates in alternating phases of interaction and retraining, following a DAgger-style data aggregation loop but querying the user only on uncertain states. The procedure is as follows:

  • Initialization: Start from a seed dataset π^\hat\pi3, threshold π^\hat\pi4, and an initial policy π^\hat\pi5 trained on π^\hat\pi6.
  • Data Collection: For each of π^\hat\pi7 iterations, interact with π^\hat\pi8 live user queries using policy π^\hat\pi9. For each state aa0:
    • If aa1, accept aa2 as a pseudo-gold demonstration (aa3).
    • If aa4, query the user for aa5: if valid, add as demonstration (aa6); if invalid (user chooses "None of the above"), discard (aa7).
  • Aggregation and Retraining: Aggregate aa8 and retrain:

aa9

  • Selection: The best sts_t0 on validation is returned.

Pseudo-code summarizes the above workflow and experimental details confirm all parameters and thresholds (Yao et al., 2020).

3. Theoretical Guarantees: Annotation Cost Bound

A rigorous analysis provides cost bounds on NEIL relative to full supervised imitation:

  • The one-step loss is defined as:

sts_t1

  • The total cost for sts_t2 is:

sts_t3

where sts_t4 is the expert state distribution, sts_t5 is trajectory length.

  • Supervised imitation achieves cost sts_t6, where sts_t7 is average error.
  • NEIL, under sts_t8 DAgger-style rounds and defining sts_t9 probability of "confident but wrong," achieves:

at=argmaxa  π^(ast)a_t = \arg\max_a\;\hat\pi(a\mid s_t)0

The gap to full supervision is thus controlled by the mean "confident-wrong" probability at=argmaxa  π^(ast)a_t = \arg\max_a\;\hat\pi(a\mid s_t)1, which can be minimized via high at=argmaxa  π^(ast)a_t = \arg\max_a\;\hat\pi(a\mid s_t)2 and good seeds.

This theoretical framework shows that annotation complexity is nearly linear with "confident-wrong" rate and can be tuned for practical efficiency.

4. Uncertainty Filtering and Demonstration Handling

The NEIL approach uses the parser's own posterior at=argmaxa  π^(ast)a_t = \arg\max_a\;\hat\pi(a\mid s_t)3 to estimate uncertainty, with a user-defined threshold at=argmaxa  π^(ast)a_t = \arg\max_a\;\hat\pi(a\mid s_t)4 dictating when to request human input. Practical deployment enables multi-choice feedback when uncertain, for example, prompting users with targeted column choices or a "None of the above" option. Only steps with high confidence or valid user demonstrations are stored as effective training data; invalid demonstrations (user says "None of the above") are discarded (at=argmaxa  π^(ast)a_t = \arg\max_a\;\hat\pi(a\mid s_t)5). This enables robust annotation efficiency and minimizes label noise, while conferring theoretical soundness by aligning training data with introspected uncertainty.

5. Experimental Protocol for Text-to-SQL Semantic Parsing

The evaluation uses two prominent datasets and models:

  • WikiSQL: 56K train, 8K dev, 16K test questions; base model is SQLova.
  • Spider: 7.3K train, 1K dev (after cleanup); base model is EditSQL.

Initialization uses fractions of seed annotated data (10%, 5%, 1%), with the remainder comprising "live" user interaction. Models are retrained every 1,000 queries and all experiments are repeated three times with independently shuffled query orders. Baselines include:

  • Full Expert: complete gold supervision.
  • Binary User: accept/reject feedback only.
  • Binary User + Expert: expert annotation only on rejection.
  • Self Train: pseudo-gold for self-predictions above at=argmaxa  π^(ast)a_t = \arg\max_a\;\hat\pi(a\mid s_t)6.

Performance is measured by logical form exact match accuracy and total annotation count.

6. Empirical Findings and Comparative Analysis

NEIL produces annotation-efficient learning across all settings:

WikiSQL (10% seed)

  • Full Expert: 79.4% accuracy, 56,000 annotations
  • NEIL: 77.6% accuracy, at=argmaxa  π^(ast)a_t = \arg\max_a\;\hat\pi(a\mid s_t)710,000 annotations (under 10% of full expert)
  • NEIL* (idealized perfect confidence): 79.2% accuracy, at=argmaxa  π^(ast)a_t = \arg\max_a\;\hat\pi(a\mid s_t)83,400 annotations (6% of expert)
  • Binary User: 71.2% (negatively impacted by spurious programs)
  • Binary User + Expert: at=argmaxa  π^(ast)a_t = \arg\max_a\;\hat\pi(a\mid s_t)978.8% at pπ^(atst)p_{\hat\pi}(a_t\mid s_t)050,000 annotations
  • Self Train: 53.4%

WikiSQL (5% seed)

  • NEIL: 76.1% accuracy, pπ^(atst)p_{\hat\pi}(a_t\mid s_t)16,000 annotations

WikiSQL (1% seed)

  • All methods experience pπ^(atst)p_{\hat\pi}(a_t\mid s_t)220% accuracy drops, indicating poor initialization.

Spider (10% seed)

  • Full Expert: 36.7% dev accuracy, 8,000 annotations
  • NEIL: 31.5%, pπ^(atst)p_{\hat\pi}(a_t\mid s_t)31,200 annotations
  • NEIL*: 36.1% at pπ^(atst)p_{\hat\pi}(a_t\mid s_t)4600 annotations
  • Self Train: 20.4%

Key observations:

  • NEIL attains nearly fully-supervised accuracy (within 2%) using an order of magnitude fewer annotations.
  • The remaining gap to supervised is explained by the "confident-wrong" probability pπ^(atst)p_{\hat\pi}(a_t\mid s_t)5.
  • With perfect introspective calibration (NEIL*), NEIL matches supervised accuracy at only 6% of the label cost.

Summary Table: Annotated Examples and Accuracy (WikiSQL, 10% Init)

Method Accuracy (%) # Annotations
Full Expert 79.4 56,000
NEIL 77.6 10,000
NEIL* (ideal conf) 79.2 3,400

A plausible implication is that introspective imitation learning, by rejecting overconfident errors and focusing human labeling effort, provides a scalable paradigm for annotation-constrained semantic parsing applications.

7. Broader Significance and Directions

Introspective imitation learning, exemplified by NEIL, enables efficient, theoretically grounded, and empirically effective semantic parser training directly from user interaction. By combining introspective uncertainty estimation, targeted human correction, and DAgger-style self-improving loops, it sharply reduces annotation needs—paving the way for privacy-preserving user-adaptive systems and rapid domain adaptation in low-data regimes. The empirical results on WikiSQL and Spider datasets establish NEIL as a compelling annotation-efficient alternative to traditional full-supervised regimes (Yao et al., 2020).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Introspective Imitation Learning.