Alfred: A System for Prompted Weak Supervision

Peilin Yu, Stephen Bach


Abstract
Alfred is the first system for programmatic weak supervision (PWS) that creates training data for machine learning by prompting. In contrast to typical PWS systems where weak supervision sources are programs coded by experts, Alfred enables users to encode their subject matter expertise via natural language prompts for language and vision-language models. Alfred provides a simple Python interface for the key steps of this emerging paradigm, with a high-throughput backend for large-scale data labeling. Users can quickly create, evaluate, and refine their prompt-based weak supervision sources; map the results to weak labels; and resolve their disagreements with a label model. Alfred enables a seamless local development experience backed by models served from self-managed computing clusters. It automatically optimizes the execution of prompts with optimized batching mechanisms. We find that this optimization improves query throughput by 2.9x versus a naive approach. We present two example use cases demonstrating Alfred on YouTube comment spam detection and pet breeds classification. Alfred is open source, available at https://github.com/BatsResearch/alfred.
Anthology ID:
2023.acl-demo.46
Volume:
Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 3: System Demonstrations)
Month:
July
Year:
2023
Address:
Toronto, Canada
Editors:
Danushka Bollegala, Ruihong Huang, Alan Ritter
Venue:
ACL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
479–488
Language:
URL:
https://aclanthology.org/2023.acl-demo.46
DOI:
10.18653/v1/2023.acl-demo.46
Bibkey:
Cite (ACL):
Peilin Yu and Stephen Bach. 2023. Alfred: A System for Prompted Weak Supervision. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 3: System Demonstrations), pages 479–488, Toronto, Canada. Association for Computational Linguistics.
Cite (Informal):
Alfred: A System for Prompted Weak Supervision (Yu & Bach, ACL 2023)
Copy Citation:
PDF:
https://aclanthology.org/2023.acl-demo.46.pdf
Video:
 https://aclanthology.org/2023.acl-demo.46.mp4