Pylon: A PyTorch Framework for Learning with Constraints

11Citations
Citations of this article
17Readers
Mendeley users who have this article in their library.

Abstract

Deep learning excels at learning low-level task information from large amounts of data, but struggles with learning high-level domain knowledge, which can often be directly and succinctly expressed. In this work, we introduce Pylon, a neuro-symbolic training framework that builds on PyTorch to augment procedurally trained neural networks with declaratively specified knowledge. Pylon allows users to programmatically specify constraints as PyTorch functions, and compiles them into a differentiable loss, thus training predictive models that fit the data whilst satisfying the specified constraints. Pylon includes both exact as well as approximate compilers to efficiently compute the loss, employing fuzzy logic, sampling methods, and circuits, ensuring scalability even to complex models and constraints. A guiding principle in designing Pylon has been the ease with which any existing deep learning codebase can be extended to learn from constraints using only a few lines: a function expressing the constraint and a single line of code to compile it into a loss. We include case studies from natural language processing, computer vision, logical games, and knowledge graphs, that can be interactively trained, and highlights Pylon’s usage.

References Powered by Scopus

Simple Statistical Gradient-Following Algorithms for Connectionist Reinforcement Learning

6302Citations
N/AReaders
Get full text

Harnessing deep neural networks with logic rules

333Citations
N/AReaders
Get full text

The importance of syntactic parsing and inference in semantic role labeling

314Citations
N/AReaders
Get full text

Cited by Powered by Scopus

Optimizing Performance in Federated Person Re-Identification through Benchmark Evaluation for Blockchain-Integrated Smart UAV Delivery Systems

12Citations
N/AReaders
Get full text

Document-Level Event Argument Extraction With A Chain Reasoning Paradigm

11Citations
N/AReaders
Get full text

GLUECons: A Generic Benchmark for Learning under Constraints

5Citations
N/AReaders
Get full text

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Cite

CITATION STYLE

APA

Ahmed, K., Li, T., Ton, T., Guo, Q., Chang, K. W., Kordjamshidi, P., … Singh, S. (2022). Pylon: A PyTorch Framework for Learning with Constraints. In Proceedings of Machine Learning Research (Vol. 176, pp. 319–324). ML Research Press. https://doi.org/10.1609/aaai.v36i11.21711

Readers' Seniority

Tooltip

PhD / Post grad / Masters / Doc 4

50%

Researcher 3

38%

Professor / Associate Prof. 1

13%

Readers' Discipline

Tooltip

Computer Science 5

63%

Engineering 3

38%

Save time finding and organizing research with Mendeley

Sign up for free