Skip to main content
QUICK REVIEW

[Paper Review] Data Programming by Demonstration: A Framework for Interactively Learning Labeling Functions

Sara Evensen, Chang Ge|arXiv (Cornell University)|Sep 3, 2020
Advanced Database Systems and QueriesComputer Science38 references4 citations
TL;DR

This paper introduces Data Programming by Demonstration (DPBD), a framework that enables non-expert users to create labeling functions for weak supervision via interactive visual annotations, reducing reliance on manual rule coding. The Ruler system synthesizes generalized labeling rules from user-provided span-level annotations and relationships, achieving performance comparable to traditional data programming while significantly improving usability and user satisfaction in a user study with 10 data scientists.

ABSTRACT

Data programming is a programmatic weak supervision approach to efficiently curate large-scale labeled training data. Writing data programs (labeling functions) requires, however, both programming literacy and domain expertise. Many subject matter experts have neither programming proficiency nor time to effectively write data programs. Furthermore, regardless of one's expertise in coding or machine learning, transferring domain expertise into labeling functions by enumerating rules and thresholds is not only time consuming but also inherently difficult. Here we propose a new framework, data programming by demonstration (DPBD), to generate labeling rules using interactive demonstrations of users. DPBD aims to relieve the burden of writing labeling functions from users, enabling them to focus on higher-level semantics such as identifying relevant signals for labeling tasks. We operationalize our framework with Ruler, an interactive system that synthesizes labeling rules for document classification by using span-level annotations of users on document examples. We compare Ruler with conventional data programming through a user study conducted with 10 data scientists creating labeling functions for sentiment and spam classification tasks. We find that Ruler is easier to use and learn and offers higher overall satisfaction, while providing discriminative model performances comparable to ones achieved by conventional data programming.

Motivation & Objective

  • To address the high barrier to entry in data programming, where writing labeling functions requires programming literacy and deep domain expertise.
  • To reduce the cognitive and technical burden of manually authoring labeling functions by shifting the focus to interactive, visual demonstrations of labeling decisions.
  • To enable subject matter experts without coding skills to contribute domain knowledge effectively through intuitive interaction with data examples.
  • To develop a system that automatically generalizes user interactions into reusable, semantically meaningful labeling rules.

Proposed method

  • The DPBD framework collects user interactions—span-level annotations and relationships—on specific data examples to represent labeling rationales.
  • Labeling rules are expressed in a domain relational calculus notation: {tokens | conditions} ⇒ label, where conditions are conjunctive boolean predicates over tokens.
  • The synthesizer generalizes initial rules by substituting tokens with reusable concepts, enforcing positional or co-occurrence constraints, and applying transformation functions (e.g., lemmatization).
  • Generalization is scored using G(r) = ∏|c.rhs|, favoring rules applicable to more data instances.
  • Rules are ranked by generalization score and presented to the user for selection, enabling efficient rule curation.
  • The system translates selected rules into executable labeling functions for training discriminative models via weak supervision.

Experimental results

Research questions

  • RQ1Can interactive, demonstration-based labeling reduce the effort and expertise required to author labeling functions in data programming?
  • RQ2How does the quality of labeling functions generated via user demonstrations compare to those written manually by experts?
  • RQ3To what extent does the proposed framework improve usability, learnability, and user satisfaction compared to conventional data programming?
  • RQ4Can the synthesizer generalize user interactions into semantically meaningful and effective labeling rules without loss of model performance?

Key findings

  • Ruler significantly improved user satisfaction and perceived ease of use compared to conventional data programming, as reported in a user study with 10 data scientists.
  • The predictive performance of models trained using Ruler-generated labeling functions was comparable to those trained with manually written labeling functions from Snorkel.
  • Users found Ruler easier to learn and use, particularly due to the intuitive visual interaction and reduced need for programming knowledge.
  • The synthesizer successfully generalized user interactions into a set of effective labeling rules, with high coverage of the labeled examples and minimal redundancy.
  • The framework demonstrated that domain knowledge can be effectively captured through interactive demonstrations rather than explicit rule authoring.
  • The open-source Ruler system and research artifacts are publicly available, supporting reproducibility and further research.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.