Log In Sign Up

Data Programming: Creating Large Training Sets, Quickly

Large labeled training sets are the critical building blocks of supervised learning methods and are key enablers of deep learning techniques. For some applications, creating labeled training sets is the most time-consuming and expensive part of applying machine learning. We therefore propose a paradigm for the programmatic creation of training sets called data programming in which users express weak supervision strategies or domain heuristics as labeling functions, which are programs that label subsets of the data, but that are noisy and may conflict. We show that by explicitly representing this training set labeling process as a generative model, we can "denoise" the generated training set, and establish theoretically that we can recover the parameters of these generative models in a handful of settings. We then show how to modify a discriminative loss function to make it noise-aware, and demonstrate our method over a range of discriminative models including logistic regression and LSTMs. Experimentally, on the 2014 TAC-KBP Slot Filling challenge, we show that data programming would have led to a new winning score, and also show that applying data programming to an LSTM model leads to a TAC-KBP score almost 6 F1 points over a state-of-the-art LSTM baseline (and into second place in the competition). Additionally, in initial user studies we observed that data programming may be an easier way for non-experts to create machine learning models when training data is limited or unavailable.


page 1

page 2

page 3

page 4


Socratic Learning: Augmenting Generative Models to Incorporate Latent Subsets in Training Data

A challenge in training discriminative models like neural networks is ob...

Data Programming using Continuous and Quality-Guided Labeling Functions

Scarcity of labeled data is a bottleneck for supervised learning models....

Data Programming by Demonstration: A Framework for Interactively Learning Labeling Functions

Data programming is a programmatic weak supervision approach to efficien...

Snorkel: Rapid Training Data Creation with Weak Supervision

Labeling training data is increasingly the largest bottleneck in deployi...

TagRuler: Interactive Tool for Span-Level Data Programming by Demonstration

Despite rapid developments in the field of machine learning research, co...

LogLAB: Attention-Based Labeling of Log Data Anomalies via Weak Supervision

With increasing scale and complexity of cloud operations, automated dete...

Inspector Gadget: A Data Programming-based Labeling System for Industrial Images

As machine learning for images becomes democratized in the Software 2.0 ...

Code Repositories


Adapted Snorkel for BioMedical literature mining - WORK IN PROGRESS

view repo

1 Introduction

Many of the major machine learning breakthroughs of the last decade have been catalyzed by the release of a new labeled training dataset.111

Supervised learning approaches that use such datasets have increasingly become key building blocks of applications throughout science and industry. This trend has also been fueled by the recent empirical success of automated feature generation approaches, notably deep learning methods such as long short term memory (LSTM) networks 

[14], which ameliorate the burden of feature engineering given large enough labeled training sets. For many real-world applications, however, large hand-labeled training sets do not exist, and are prohibitively expensive to create due to requirements that labelers be experts in the application domain. Furthermore, applications’ needs often change, necessitating new or modified training sets.

To help reduce the cost of training set creation, we propose data programming, a paradigm for the programmatic creation and modeling of training datasets. Data programming provides a simple, unifying framework for weak supervision, in which training labels are noisy and may be from multiple, potentially overlapping sources. In data programming, users encode this weak supervision in the form of labeling functions, which are user-defined programs that each provide a label for some subset of the data, and collectively generate a large but potentially overlapping set of training labels. Many different weak supervision approaches can be expressed as labeling functions, such as strategies which utilize existing knowledge bases (as in distant supervision [22]), model many individual annotator’s labels (as in crowdsourcing), or leverage a combination of domain-specific patterns and dictionaries. Because of this, labeling functions may have widely varying error rates and may conflict on certain data points. To address this, we model the labeling functions as a generative process, which lets us automatically denoise the resulting training set by learning the accuracies of the labeling functions along with their correlation structure. In turn, we use this model of the training set to optimize a stochastic version of the loss function of the discriminative model that we desire to train. We show that, given certain conditions on the labeling functions, our method achieves the same asymptotic scaling as supervised learning methods, but that our scaling depends on the amount of unlabeled data, and uses only a fixed number of labeling functions.

Data programming is in part motivated by the challenges that users faced when applying prior programmatic supervision approaches, and is intended to be a new software engineering paradigm for the creation and management of training sets. For example, consider the scenario when two labeling functions of differing quality and scope overlap and possibly conflict on certain training examples; in prior approaches the user would have to decide which one to use, or how to somehow integrate the signal from both. In data programming, we accomplish this automatically by learning a model of the training set that includes both labeling functions. Additionally, users are often aware of, or able to induce, dependencies between their labeling functions. In data programming, users can provide a dependency graph to indicate, for example, that two labeling functions are similar, or that one “fixes” or “reinforces” another. We describe cases in which we can learn the strength of these dependencies, and for which our generalization is again asymptotically identical to the supervised case.

One further motivation for our method is driven by the observation that users often struggle with selecting features for their models, which is a traditional development bottleneck given fixed-size training sets. However, initial feedback from users suggests that writing labeling functions in the framework of data programming may be easier [12]. While the impact of a feature on end performance is dependent on the training set and on statistical characteristics of the model, a labeling function has a simple and intuitive optimality criterion: that it labels data correctly. Motivated by this, we explore whether we can flip the traditional machine learning development process on its head, having users instead focus on generating training sets large enough to support automatically-generated features.

Summary of Contributions and Outline

Our first contribution is the data programming framework, in which users can implicitly describe a rich generative model for a training set in a more flexible and general way than in previous approaches. In Section 3, we first explore a simple model in which labeling functions are conditionally independent. We show here that under certain conditions, the sample complexity is nearly the same as in the labeled case. In Section 4, we extend our results to more sophisticated data programming models, generalizing related results in crowdsourcing [17]. In Section 5, we validate our approach experimentally on large real-world text relation extraction tasks in genomics, pharmacogenomics and news domains, where we show an average 2.34 point F1 score improvement over a baseline distant supervision approach—including what would have been a new competition-winning score for the 2014 TAC-KBP Slot Filling competition. Using LSTM-generated features, we additionally would have placed second in this competition, achieving a 5.98 point F1 score gain over a state-of-the-art LSTM baseline [32]. Additionally, we describe promising feedback from a usability study with a group of bioinformatics users.

2 Related Work

Our work builds on many previous approaches in machine learning. Distant supervision is one approach for programmatically creating training sets. The canonical example is relation extraction from text, wherein a knowledge base of known relations is heuristically mapped to an input corpus [8, 22]. Basic extensions group examples by surrounding textual patterns, and cast the problem as a multiple instance learning one [25, 15]. Other extensions model the accuracy of these surrounding textual patterns using a discriminative feature-based model [26], or generative models such as hierarchical topic models [1, 27, 31]. Like our approach, these latter methods model a generative process of training set creation, however in a proscribed way that is not based on user input as in our approach. There is also a wealth of examples where additional heuristic patterns used to label training data are collected from unlabeled data [7] or directly from users [29, 21], in a similar manner to our approach, but without any framework to deal with the fact that said labels are explicitly noisy.

Crowdsourcing is widely used for various machine learning tasks [18, 13]. Of particular relevance to our problem setting is the theoretical question of how to model the accuracy of various experts without ground truth available, classically raised in the context of crowdsourcing [10]. More recent results provide formal guarantees even in the absence of labeled data using various approaches [17, 24, 4, 33, 9, 16]. Our model can capture the basic model of the crowdsourcing setting, and can be considered equivalent in the independent case (Sec. 3). However, in addition to generalizing beyond getting inputs solely from human annotators, we also model user-supplied dependencies between the “labelers” in our model, which is not natural within the context of crowdsourcing. Additionally, while crowdsourcing results focus on the regime of a large number of labelers each labeling a small subset of the data, we consider a small set of labeling functions each labeling a large portion of the dataset.

Co-training is a classic procedure for effectively utilizing both a small amount of labeled data and a large amount of unlabeled data by selecting two conditionally independent views of the data [5]. In addition to not needing a set of labeled data, and allowing for more than two views (labeling functions in our case), our approach allows explicit modeling of dependencies between views, for example allowing observed issues with dependencies between views to be explicitly modeled [19].


is a well known procedure for combining the output of many “weak” classifiers to create a strong classifier in a supervised setting 

[28]. Recently, boosting-like methods have been proposed which leverage unlabeled data in addition to labeled data, which is also used to set constraints on the accuracies of the individual classifiers being ensembled [3]. This is similar in spirit to our approach, except that labeled data is not explicitly necessary in ours, and richer dependency structures between our “heuristic” classifiers (labeling functions) are supported.

The general case of learning with noisy labels is treated both in classical [20] and more recent contexts [23]. It has also been studied specifically in the context of label-noise robust logistic regression [6]. We consider the more general scenario where multiple noisy labeling functions can conflict and have dependencies.

3 The Data Programming Paradigm

In many applications, we would like to use machine learning, but we face the following challenges: (i) hand-labeled training data is not available, and is prohibitively expensive to obtain in sufficient quantities as it requires expensive domain expert labelers; (ii) related external knowledge bases are either unavailable or insufficiently specific, precluding a traditional distant supervision or co-training approach; (iii) application specifications are in flux, changing the model we ultimately wish to learn.

In such a setting, we would like a simple, scalable and adaptable approach for supervising a model applicable to our problem. More specifically, we would ideally like our approach to achieve

expected loss with high probability, given

inputs of some sort from a domain-expert user, rather than the traditional hand-labeled training examples required by most supervised methods (where notation hides logarithmic factors). To this end, we propose data programming, a paradigm for the programmatic creation of training sets, which enables domain-experts to more rapidly train machine learning systems and has the potential for this type of scaling of expected loss. In data programming, rather than manually labeling each example, users instead describe the processes by which these points could be labeled by providing a set of heuristic rules called labeling functions.

In the remainder of this paper, we focus on a binary classification task in which we have a distribution over object and class pairs , and we are concerned with minimizing the logistic loss under a linear model given some features,

where without loss of generality, we assume that . Then, a labeling function is a user-defined function that encodes some domain heuristic, which provides a (non-zero) label for some subset of the objects. As part of a data programming specification, a user provides some

labeling functions, which we denote in vectorized form as


def lambda_1(x):
    return 1 if (x.gene,x.pheno) in KNOWN_RELATIONS_1 else 0
def lambda_2(x):
    return -1 if re.match(r’.*notcause.*’, x.text_between) else 0
def lambda_3(x):
    return 1 if re.match(r’.*associated.*’, x.text_between)
            and (x.gene,x.pheno) in KNOWN_RELATIONS_2 else 
(a) An example set of three labeling functions written by a user.

(b) The generative model of a training set defined by the user input (unary factors omitted).
Figure 1: An example of extracting mentions of gene-disease relations from the scientific literature.
Example 3.1.

To gain intuition about labeling functions, we describe a simple text relation extraction example. In Figure  1, we consider the task of classifying co-occurring gene and disease mentions as either expressing a causal relation or not. For example, given the sentence “Gene A causes disease B”, the object has true class . To construct a training set, the user writes three labeling functions (Figure 0(a)). In , an external structured knowledge base is used to label a few objects with relatively high accuracy, and is equivalent to a traditional distant supervision rule (see Sec. 2). uses a purely heuristic approach to label a much larger number of examples with lower accuracy. Finally, is a “hybrid” labeling function, which leverages a knowledge base and a heuristic.

A labeling function need not have perfect accuracy or recall; rather, it represents a pattern that the user wishes to impart to their model and that is easier to encode as a labeling function than as a set of hand-labeled examples. As illustrated in Ex. 3.1, labeling functions can be based on external knowledge bases, libraries or ontologies, can express heuristic patterns, or some hybrid of these types; we see evidence for the existence of such diversity in our experiments (Section 5). The use of labeling functions is also strictly more general than manual annotations, as a manual annotation can always be directly encoded by a labeling function. Importantly, labeling functions can overlap, conflict, and even have dependencies which users can provide as part of the data programming specification (see Section 4); our approach provides a simple framework for these inputs.

Independent Labeling Functions

We first describe a model in which the labeling functions label independently, given the true label class. Under this model, each labeling function has some probability of labeling an object and then some probability of labeling the object correctly; for simplicity we also assume here that each class has probability 0.5. This model has distribution


where contains the labels output by the labeling functions, and is the predicted class. If we allow the parameters and to vary, (1) specifies a family of generative models. In order to expose the scaling of the expected loss as the size of the unlabeled dataset changes, we will assume here that and . We note that while these arbitrary constraints can be changed, they are roughly consistent with our applied experience, where users tend to write high-accuracy and high-coverage labeling functions.

Our first goal will be to learn which parameters

are most consistent with our observations—our unlabeled training set—using maximum likelihood estimation. To do this for a particular training set

, we will solve the problem


In other words, we are maximizing the probability that the observed labels produced on our training examples occur under the generative model in (1

). In our experiments, we use stochastic gradient descent to solve this problem; since this is a standard technique, we defer its analysis to the appendix.

Noise-Aware Empirical Loss

Given that our parameter learning phase has successfully found some and that accurately describe the training set, we can now proceed to estimate the parameter which minimizes the expected risk of a linear model over our feature mapping , given . To do so, we define the noise-aware empirical risk with regularization parameter , and compute the noise-aware empirical risk minimizer


This is a logistic regression problem, so it can be solved using stochastic gradient descent as well.

We can in fact prove that stochastic gradient descent running on (2) and (3) is guaranteed to produce accurate estimates, under conditions which we describe now. First, the problem distribution needs to be accurately modeled by some distribution in the family that we are trying to learn. That is, for some and ,


Second, given an example , the class label must be independent of the features given the labels . That is,


This assumption encodes the idea that the labeling functions, while they may be arbitrarily dependent on the features, provide sufficient information to accurately identify the class. Third, we assume that the algorithm used to solve (3) has bounded generalization risk such that for some parameter ,


Under these conditions, we make the following statement about the accuracy of our estimates, which is a simplified version of a theorem that is detailed in the appendix.

Theorem 1.

Suppose that we run data programming, solving the problems in (2) and (3) using stochastic gradient descent to produce and . Suppose further that our setup satisfies the conditions (4), (5), and (6), and suppose that . Then for any , if the number of labeling functions and the size of the input dataset are large enough that

then our expected parameter error and generalization risk can be bounded by

We select to simplify the statement of the theorem and give the reader a feel for how scales with respect to . The full theorem with scaling in each parameter (and for arbitrary ) is presented in the appendix. This result establishes that to achieve both expected loss and parameter estimate error , it suffices to have only labeling functions and training examples, which is the same asymptotic scaling exhibited by methods that use labeled data. This means that data programming achieves the same learning rate as methods that use labeled data, while requiring asymptotically less work from its users, who need to specify labeling functions rather than manually label examples. In contrast, in the crowdsourcing setting [17], the number of workers

tends to infinity while here it is constant while the dataset grows. These results provide some explanation of why our experimental results suggest that a small number of rules with a large unlabeled training set can be effective at even complex natural language processing tasks.

4 Handling Dependencies

lambda_1(x) = f(x.word)
lambda_2(x) = f(x.lemma)
Similar(lambda_1, lambda_2)

lambda_1(x) = f(’.*cause.*’)
lambda_2(x) = f(’.*notcause.*’)
lambda_3(x) = f(’.*cause.*’)
Fixes(lambda_1, lambda_2)
Reinforces(lambda_1, lambda_3)

lambda_1(x) = x in DISEASES_A
lambda_2(x) = x in DISEASES_B
Excludes(lambda_1, lambda_2)
Figure 2: Examples of labeling function dependency predicates.

In our experience with data programming, we have found that users often write labeling functions that have clear dependencies among them. As more labeling functions are added as the system is developed, an implicit dependency structure arises naturally amongst the labeling functions: modeling these dependencies can in some cases improve accuracy. We describe a method by which the user can specify this dependency knowledge as a dependency graph, and show how the system can use it to produce better parameter estimates.

Label Function Dependency Graph

To support the injection of dependency information into the model, we augment the data programming specification with a label function dependency graph, , which is a directed graph over the labeling functions, each of the edges of which is associated with a dependency type from a class of dependencies appropriate to the domain. From our experience with practitioners, we identified four commonly-occurring types of dependencies as illustrative examples: similar, fixing, reinforcing, and exclusive (see Figure 2).

For example, suppose that we have two functions and , and typically labels only when (i) also labels, (ii) and disagree in their labeling, and (iii) is actually correct. We call this a fixing dependency, since fixes mistakes made by . If and were to typically agree rather than disagree, this would be a reinforcing dependency, since reinforces a subset of the labels of .

Modeling Dependencies

The presence of dependency information means that we can no longer model our labels using the simple Bayesian network in (

1). Instead, we model our distribution as a factor graph. This standard technique lets us describe the family of generative distributions in terms of a known factor function (in which each entry represents a factor), and an unknown parameter as

where is the partition function which ensures that is a distribution. Next, we will describe how we define using information from the dependency graph.

To construct , we will start with some base factors, which we inherit from (1), and then augment them with additional factors representing dependencies. For all , we let

These factors alone are sufficient to describe any distribution for which the labels are mutually independent, given the class: this includes the independent family in (1).

We now proceed by adding additional factors to , which model the dependencies encoded in . For each dependency edge , we add one or more factors to as follows. For a near-duplicate dependency on , we add a single factor

, which increases our prior probability that the labels will agree. For a fixing dependency, we add two factors,

and , which encode the idea that labels only when does, and that fixes errors made by . The factors for a reinforcing dependency are the same, except that . Finally, for an exclusive dependency, we have a single factor .

Learning with Dependencies

We can again solve a maximum likelihood problem like (2) to learn the parameter . Using the results, we can continue on to find the noise-aware empirical loss minimizer by solving the problem in (3). In order to solve these problems in the dependent case, we typically invoke stochastic gradient descent, using Gibbs sampling to sample from the distributions used in the gradient update. Under conditions similar to those in Section 3, we can again provide a bound on the accuracy of these results. We define these conditions now. First, there must be some set that we know our parameter lies in. This is analogous to the assumptions on and we made in Section 3, and we can state the following analogue of (4):


Second, for any , it must be possible to accurately learn from full (i.e. labeled) samples of

. More specifically, there exists an unbiased estimator

that is a function of some dataset of independent samples from such that, for some and for all ,


Third, for any two feasible models and ,


That is, we’ll usually be reasonably sure in our guess for the value of , even if we guess using distribution while the the labeling functions were actually sampled from (the possibly totally different) . We can now prove the following result about the accuracy of our estimates.

Theorem 2.

Suppose that we run stochastic gradient descent to produce and , and that our setup satisfies the conditions (5)-(9). Then for any , if the input dataset is large enough that

then our expected parameter error and generalization risk can be bounded by

As in the independent case, this shows that we need only unlabeled training examples to achieve error , which is the same asymptotic scaling as supervised learning methods. This suggests that while we pay a computational penalty for richer dependency structures, we are no less statistically efficient. In the appendix, we provide more details, including an explicit description of the algorithm and the step size used to achieve this result.

5 Experiments

KBP (News) Genomics Pharmacogenomics
Features Method Prec. Rec. F1 Prec. Rec. F1 Prec. Rec. F1
Hand-tuned ITR 51.15 26.72 35.10 83.76 41.67 55.65 68.16 49.32 57.23
DP 50.52 29.21 37.02 83.90 43.43 57.24 68.36 54.80 60.83
LSTM ITR 37.68 28.81 32.66 69.07 50.76 58.52 32.35 43.84 37.23
DP 47.47 27.88 35.78 75.48 48.48 58.99 37.63 47.95 42.17
Table 1: Precision/Recall/F1 scores using data programming (DP), as compared to distant supervision ITR approach, with both hand-tuned and LSTM-generated features.

We seek to experimentally validate three claims about our approach. Our first claim is that data programming can be an effective paradigm for building high quality machine learning systems, which we test across three real-world relation extraction applications. Our second claim is that data programming can be used successfully in conjunction with automatic feature generation methods, such as LSTM models. Finally, our third claim is that data programming is an intuitive and productive framework for domain-expert users, and we report on our initial user studies.

Relation Mention Extraction Tasks

In the relation mention extraction task, our objects are relation mention candidates , which are pairs of entity mentions in unstructured text, and our goal is to learn a model that classifies each candidate as either a true textual assertion of the relation or not. We examine a news application from the 2014 TAC-KBP Slot Filling challenge222, where we extract relations between real-world entities from articles [2]; a clinical genomics application, where we extract causal relations between genetic mutations and phenotypes from the scientific literature333; and a pharmacogenomics application where we extract interactions between genes, also from the scientific literature [21]; further details are included in the Appendix.

For each application, we or our collaborators originally built a system where a training set was programmatically generated by ordering the labeling functions as a sequence of if-then-return statements, and for each candidate, taking the first label emitted by this script as the training label. We refer to this as the if-then-return (ITR) approach, and note that it often required significant domain expert development time to tune (weeks or more). For this set of experiments, we then used the same labeling function sets within the framework of data programming. For all experiments, we evaluated on a blind hand-labeled evaluation set. In Table 1, we see that we achieve consistent improvements: on average by 2.34 points in F1 score, including what would have been a winning score on the 2014 TAC-KBP challenge [30].

We observed these performance gains across applications with very different labeling function sets. We describe the labeling function summary statistics—coverage is the percentage of objects that had at least one label, overlap is the percentage of objects with more than one label, and conflict is the percentage of objects with conflicting labels—and see in Table 2 that even in scenarios where is small, and conflict and overlap is relatively less common, we still realize performance gains. Additionally, on a disease mention extraction task (see Usability Study), which was written from scratch within the data programming paradigm, allowing developers to supply dependencies of the basic types outlined in Sec. 4 led to a 2.3 point F1 score boost.

Application # of LFs Coverage Overlap Conflict F1 Score Improvement
KBP (News) 40 29.39 2.03M 1.38 0.15 1.92 3.12
Genomics 146 53.61 256K 26.71 2.05 1.59 0.47
Pharmacogenomics 7 7.70 129K 0.35 0.32 3.60 4.94
Diseases 12 53.32 418K 31.81 0.98 N/A N/A
Table 2: Labeling function (LF) summary statistics, sizes of generated training sets (only counting non-zero labels), and relative F1 score improvement over baseline IRT methods for hand-tuned (HT) and LSTM-generated (LSTM) feature sets.
Automatically-generated Features

We additionally compare both hand-tuned and automatically-generated features, where the latter are learned via an LSTM recurrent neural network (RNN) 

[14]. Conventional wisdom states that deep learning methods such as RNNs are prone to overfitting to the biases of the imperfect rules used for programmatic supervision. In our experiments, however, we find that using data programming to denoise the labels can mitigate this issue, and we report a 9.79 point boost to precision and a 3.12 point F1 score improvement on the benchmark 2014 TAC-KBP (News) task, over the baseline if-then-return approach. Additionally for comparison, our approach is a 5.98 point F1 score improvement over a state-of-the-art LSTM approach [32].

Usability Study

One of our hopes is that a user without expertise in ML will be more productive iterating on labeling functions than on features. To test this, we arranged a hackathon involving a handful of bioinformatics researchers, using our open-source information extraction framework (formerly DDLite). Their goal was to build a disease tagging system which is a common and important challenge in the bioinformatics domain [11]. The hackathon participants did not have access to a labeled training set nor did they perform any feature engineering. The entire effort was restricted to iterative labeling function development and the setup of candidates to be classified. In under eight hours, they had created a training set that led to a model which scored within 10 points of F1 of the supervised baseline; the gap was mainly due to recall issue in the candidate extraction phase. This suggests data programming may be a promising way to build high quality extractors, quickly.

6 Conclusion and Future Work

We introduced data programming, a new approach to generating large labeled training sets. We demonstrated that our approach can be used with automatic feature generation techniques to achieve high quality results. We also provided anecdotal evidence that our methods may be easier for domain experts to use. We hope to explore the limits of our approach on other machine learning tasks that have been held back by the lack of high-quality supervised datasets, including those in other domains such imaging and structured prediction.


Thanks to Theodoros Rekatsinas, Manas Joglekar, Henry Ehrenberg, Jason Fries, Percy Liang, the DeepDive and DDLite users and many others for their helpful conversations. The authors acknowledge the support of: DARPA FA8750-12-2-0335; NSF IIS-1247701; NSFCCF-1111943; DOE 108845; NSF CCF-1337375; DARPA FA8750-13-2-0039; NSF IIS-1353606;ONR N000141210041 and N000141310129; NIH U54EB020405; DARPA’s SIMPLEX program; Oracle; NVIDIA; Huawei; SAP Labs; Sloan Research Fellowship; Moore Foundation; American Family Insurance; Google; and Toshiba. The views and conclusions expressed in this material are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of DARPA, AFRL, NSF, ONR, NIH, or the U.S. Government.


  • [1] E. Alfonseca, K. Filippova, J.-Y. Delort, and G. Garrido. Pattern learning for relation extraction with a hierarchical topic model. In Proceedings of the ACL.
  • [2] G. Angeli, S. Gupta, M. Jose, C. D. Manning, C. Ré, J. Tibshirani, J. Y. Wu, S. Wu, and C. Zhang. Stanford’s 2014 slot filling systems. TAC KBP, 695, 2014.
  • [3] A. Balsubramani and Y. Freund. Scalable semi-supervised aggregation of classifiers. In Advances in Neural Information Processing Systems, pages 1351–1359, 2015.
  • [4] D. Berend and A. Kontorovich. Consistency of weighted majority votes. In NIPS 2014.
  • [5] A. Blum and T. Mitchell. Combining labeled and unlabeled data with co-training. In

    Proceedings of the eleventh annual conference on Computational learning theory

    , pages 92–100. ACM, 1998.
  • [6] J. Bootkrajang and A. Kabán. Label-noise robust logistic regression and its applications. In Machine Learning and Knowledge Discovery in Databases, pages 143–158. Springer, 2012.
  • [7] R. Bunescu and R. Mooney. Learning to extract relations from the web using minimal supervision. In Annual meeting-association for Computational Linguistics, volume 45, page 576, 2007.
  • [8] M. Craven, J. Kumlien, et al. Constructing biological knowledge bases by extracting information from text sources. In ISMB, volume 1999, pages 77–86, 1999.
  • [9] N. Dalvi, A. Dasgupta, R. Kumar, and V. Rastogi. Aggregating crowdsourced binary ratings. In Proceedings of the 22Nd International Conference on World Wide Web, WWW ’13, pages 285–294, 2013.
  • [10] A. P. Dawid and A. M. Skene. Maximum likelihood estimation of observer error-rates using the em algorithm. Applied statistics, pages 20–28, 1979.
  • [11] R. I. Doğan and Z. Lu. An improved corpus of disease mentions in pubmed citations. In Proceedings of the 2012 workshop on biomedical natural language processing.
  • [12] H. R. Ehrenberg, J. Shin, A. J. Ratner, J. A. Fries, and C. Ré. Data programming with ddlite: putting humans in a different part of the loop. In HILDA@ SIGMOD, page 13, 2016.
  • [13] H. Gao, G. Barbier, R. Goolsby, and D. Zeng. Harnessing the crowdsourcing power of social media for disaster relief. Technical report, DTIC Document, 2011.
  • [14] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997.
  • [15] R. Hoffmann, C. Zhang, X. Ling, L. Zettlemoyer, and D. S. Weld. Knowledge-based weak supervision for information extraction of overlapping relations. In Proceedings of the ACL.
  • [16] M. Joglekar, H. Garcia-Molina, and A. Parameswaran. Comprehensive and reliable crowd assessment algorithms. In Data Engineering (ICDE), 2015 IEEE 31st International Conference on.
  • [17] D. R. Karger, S. Oh, and D. Shah. Iterative learning for reliable crowdsourcing systems. In Advances in neural information processing systems, pages 1953–1961, 2011.
  • [18] R. Krishna, Y. Zhu, O. Groth, J. Johnson, K. Hata, J. Kravitz, S. Chen, Y. Kalantidis, L.-J. Li, D. A. Shamma, et al. Visual genome: Connecting language and vision using crowdsourced dense image annotations. arXiv preprint arXiv:1602.07332, 2016.
  • [19] M.-A. Krogel and T. Scheffer.

    Multi-relational learning, text mining, and semi-supervised learning for functional genomics.

    Machine Learning, 57(1-2):61–81, 2004.
  • [20] G. Lugosi. Learning with an unreliable teacher. Pattern Recognition, 25(1):79 – 87, 1992.
  • [21] E. K. Mallory, C. Zhang, C. Ré, and R. B. Altman. Large-scale extraction of gene interactions from full-text literature using deepdive. Bioinformatics, 2015.
  • [22] M. Mintz, S. Bills, R. Snow, and D. Jurafsky. Distant supervision for relation extraction without labeled data. In Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL, 2009.
  • [23] N. Natarajan, I. S. Dhillon, P. K. Ravikumar, and A. Tewari. Learning with noisy labels. In Advances in Neural Information Processing Systems 26.
  • [24] F. Parisi, F. Strino, B. Nadler, and Y. Kluger. Ranking and combining multiple predictors without labeled data. Proceedings of the National Academy of Sciences, 111(4):1253–1258, 2014.
  • [25] S. Riedel, L. Yao, and A. McCallum. Modeling relations and their mentions without labeled text. In Machine Learning and Knowledge Discovery in Databases, pages 148–163. Springer, 2010.
  • [26] B. Roth and D. Klakow. Feature-based models for improving the quality of noisy training data for relation extraction. In Proceedings of the 22nd ACM Conference on Knowledge management.
  • [27] B. Roth and D. Klakow. Combining generative and discriminative model scores for distant supervision. In EMNLP, pages 24–29, 2013.
  • [28] R. E. Schapire and Y. Freund. Boosting: Foundations and algorithms. MIT press, 2012.
  • [29] J. Shin, S. Wu, F. Wang, C. De Sa, C. Zhang, and C. Ré. Incremental knowledge base construction using deepdive. Proceedings of the VLDB Endowment, 8(11):1310–1321, 2015.
  • [30] M. Surdeanu and H. Ji. Overview of the english slot filling track at the tac2014 knowledge base population evaluation. In Proc. Text Analysis Conference (TAC2014), 2014.
  • [31] S. Takamatsu, I. Sato, and H. Nakagawa. Reducing wrong labels in distant supervision for relation extraction. In Proceedings of the ACL.
  • [32] P. Verga, D. Belanger, E. Strubell, B. Roth, and A. McCallum. Multilingual relation extraction using compositional universal schema. arXiv preprint arXiv:1511.06396, 2015.
  • [33] Y. Zhang, X. Chen, D. Zhou, and M. I. Jordan. Spectral methods meet em: A provably optimal algorithm for crowdsourcing. In Advances in Neural Information Processing Systems 27, pages 1260–1268. 2014.

Appendix A General Theoretical Results

In this section, we will state the full form of the theoretical results we alluded to in the body of the paper. First, we restate, in long form, our setup and assumptions.

We assume that, for some function of sufficient statistics, we are concerned with learning distributions, over the set , of the form


where is a parameter, and is the partition function that makes this a distribution. We assume that we are given, i.e. can derive from the data programming specification, some set of feasible parameters. This set must have the following two properties.

First, for any , learning the parameter from (full) samples from is possible, at least in some sense. More specifically, there exists an unbiased estimator that is a function of some number samples from (and is unbiased for all ) such that, for all and for some ,


Second, for any ,


That is, we’ll always be reasonably certain in our guess for the value of , even if we are totally wrong about the true parameter .

On the other hand, we are also concerned with a distribution which ranges over the set , and represents the distribution of training and test examples we are using to learn. These objects are associated with a labeling function and a feature function . We make three assumptions about this distribution. First, we assume that, given , the class label is independent of the features given the labels . That is,


Second, we assume that we can describe the relationship between and in terms of our family in (10) above. That is, for some parameter ,


Third, we assume that the features themselves are bounded; for all ,


Our goal is twofold. First, we want to recover some estimate of the true parameter . Second, we want to produce a parameter that minimizes the regularized logistic loss

We actually accomplish this by minimizing a noise-aware loss function, given our recovered parameter ,

In fact we can’t even minimize this; rather, we will be minimizing the empirical noise-aware loss function, which is only this in expectation. Since the analysis of logistic regression is not itself interesting, we assume that we are able to run some algorithm that produces an estimate which satisfies, for some ,


The algorithm chosen can be anything, but in practice, we use stochastic gradient descent.

We learn and by running the following algorithm.

0:  Step size , dataset , and initial parameter .
  for all  do
     Independently sample from , and from conditionally given .
         Here, denotes orthogonal projection onto .
  end for
  Compute using the algorithm described in (15)
  return  .
Algorithm 1 Data Programming

Under these assumptions, we are able to prove the following theorem about the behavior of Algorithm 1.

Theorem A.1.

Suppose that we run Algorithm 1 on a data programming specification that satisfies conditions (11), (12), (13), (14), (15), and (16). Suppose further that, for some parameter , we use step size

and our dataset is of a size that satisfies

Then, we can bound the expected parameter error with

and the expected risk with

This theorem’s conclusions and assumptions can readily be seen to be identical to those of Theorem 2 in the main body of the paper, except that they apply to the slightly more general case of arbitrary , rather than of the explicit form described in the body. Therefore, in order to prove Theorem 2, it suffices to prove Theorem A.1, which we will do in Section C.

Appendix B Theoretical Results for Independent Model

For the independent model, we can obtain a more specific version of Theorem A.1. In the independent model, the variables are, as before, and . The sufficient statistics are and .

To produce results that make intuitive sense, we also define the alternate parameterization

In comparison to the parameters used in the body of the paper, we have

Now, we are concerned with models that are feasible. For a model to be feasible (i.e. for ), we require that it satisfy, for some constants , , and ,

For and .

For this model, we can prove the following corollary to Theorem A.1

Corollary B.1.

Suppose that we run Algorithm 1 on an independent data programming specification that satisfies conditions (13), (14), (15), and (16). Furthermore, assume that the number of labeling functions we use satisfies

Suppose further that, for some parameter , we use step size

and our dataset is of a size that satisfies

Then, we can bound the expected parameter error with

and the expected risk with

We can see that if, as stated in the body of the paper, and (which is equivalent to ), then

This means that, as stated in the paper, is sufficient for this corollary to hold with

Thus, proving Corollary B.1 is sufficient to prove Theorem 1 from the body of the paper. We will prove Corollary B.1 in Section E

Appendix C Proof of Theorem a.1

First, we state some lemmas that will be useful in the proof to come.

rlemmalemmaMLEDerivatives Given a family of maximum-entropy distributions

for some function of sufficient statistics , if we let be the maximum log-likelihood objective for some event ,

then its gradient is

and its Hessian is

rlemmalemmaHessianBound Suppose that we are looking at a distribution from a data programming label model. That is, our maximum-entropy distribution can now be written in terms of two variables, the labeling function values and the class , as

where we assume without loss of generality that for some , and . If we let be the maximum expected log-likelihood objective, under another distribution , for the event associated with the observed labeling function values ,

then its Hessian can be bounded with

where is the Fisher information.

rlemmalemmaSuffCondConvex Suppose that we are looking at a data programming distribution, as described in the text of Lemma C. Suppose further that we are concerned with some feasible set of parameters , such that the any model with parameters in this space satisfies the following two conditions.

First, for any , learning the parameter from (full) samples from is possible, at least in some sense. More specifically, there exists an unbiased estimator that is a function of some number samples from (and is unbiased for all ) such that, for all and for some ,

Second, for any ,

That is, we’ll always be reasonably certain in our guess for the value of , even if we are totally wrong about the true parameter .

Under these conditions, the function is strongly concave on with parameter of strong convexity .

rlemmalemmaSGDConvex Suppose that we are looking at a data programming maximum likelihood estimation problem, as described in the text of Lemma C. Suppose further that the objective function is strongly concave with parameter .

If we run stochastic gradient descent on objective , using unbiased samples from a true distribution , where , then if we use step size

and run (using a fresh sample at each iteration) for steps, where

then we can bound the expected parameter estimation error with

rlemmalemmaExpectedLoss Assume in our model that, without loss of generality, for all , and that in our true model , the class is independent of the features given the labels .

Suppose that we now want to solve the expected loss minimization problem wherein we minimize the objective

We actually accomplish this by minimizing our noise-aware loss function, given our chosen parameter ,

In fact we can’t even minimize this; rather, we will be minimizing the empirical noise-aware loss function, which is only this in expectation. Suppose that doing so produces an estimate which satisfies, for some ,

(Here, the expectation is taken with respect to only the random variable

.) Then, we can bound the expected risk with

Now, we restate and prove our main theorem.

See A.1


The bounds on the expected parameter estimation error follow directly from Lemma C, and the remainder of the theorem follows directly from Lemma C. ∎

Appendix D Proofs of Lemmas


For the gradient,

And for the Hessian,


From the result of Lemma C, we have that


We start byu defining and such that

This allows us to reduce (17) to

On the other hand, the Fisher information of this model at is

Therefore, we can write the second derivative of as

If we apply the fact that

then we can reduce this to

This is the desired result. ∎


From the Cramér-Rao bound, we know in general that the variance of any unbiased estimator is bounded by the reciprocal of the Fisher information