Neurosymbolic Programming for Science Jennifer J. Sun CaltechMegan Tjandrasuwita

2025-05-02 0 0 1.15MB 11 页 10玖币
侵权投诉
Neurosymbolic Programming for Science
Jennifer J. Sun
Caltech
Megan Tjandrasuwita
MIT CSAIL
Atharva Sehgal
UT Austin
Armando Solar-Lezama
MIT CSAIL
Swarat Chaudhuri
UT Austin
Yisong Yue
Caltech
Omar Costilla-Reyes
MIT CSAIL
Abstract
Neurosymbolic Programming (NP) techniques have the potential to accelerate
scientific discovery. These models combine neural and symbolic components to
learn complex patterns and representations from data, using high-level concepts or
known constraints. NP techniques can interface with symbolic domain knowledge
from scientists, such as prior knowledge and experimental context, to produce
interpretable outputs. We identify opportunities and challenges between current NP
models and scientific workflows, with real-world examples from behavior analysis
in science: to enable the use of NP broadly for workflows across the natural and
social sciences.
1 Introduction
One of the grand challenges in the artificial intelligence and scientific communities is to find an AI
scientist: an artificial agent that can automatically design, test, and infer scientific hypotheses from
data. This application poses several distinct challenges for existing learning techniques because of the
need to ensure that new theories are consistent with prior scientific knowledge, as well as to enable
scientists to reason about the implications of new hypotheses and experimental designs.
The distinct requirements of scientific discovery have pushed the community to explore expressive
yet symbolically interpretable techniques such as symbolic regression [Cranmer, 2020], interpretable
machine learning [Ustun and Rudin, 2017, Doshi-Velez and Kim, 2017, Kleinberg et al., 2018,
McGrath et al., 2021], as well as program synthesis [Koksal et al., 2013, Ellis et al., 2022]. These
techniques have helped the community make significant progress in a number of applications, such as
those discussed in Goodwin et al. [2022] and Sapoval et al. [2022], but we are still far from solving
the grand challenge.
We focus on the opportunities and challenges behind an important class of learning techniques based
on Neurosymbolic Programming (NP) [Chaudhuri et al., 2021]. These techniques combine neural and
symbolic reasoning to build expressive models that incorporate prior expert knowledge and strong
constraints on model behavior and structure. NP is capable of producing symbolic representations of
theories that can be analyzed and manipulated to answer rich counterfactuals.
NP empowers a new line of attack on the grand AI scientist challenge: represent scientific hypotheses
as programs in a Domain Specific Language (DSL) and use neurosymbolic program synthesis to
automatically discover these programs (Figure 1). Users can incorporate complex prior knowledge
(e.g., known features and constraints) into the design of the DSL. The NP learning algorithms can
then follow classic scientific reasoning principles to find predictive programs. Also, models learned
this way are often similar to code that human domain experts write during manual scientific modeling.
Equal contribution
Corresponding author: costilla@mit.edu
NeurIPS 2022 AI for Science Workshop.
arXiv:2210.05050v2 [cs.AI] 7 Nov 2022
Choose
Research
Question
Scientific Process
Generate
Hypothesis
Experimental
Setup /
Data Collection
Analysis Interpretation Report to
Community
NP Lifecycle
Data Curation
(Sec 3.1)
Encoding Domain
Knowledge
(Sec 3.2)
NP Model
Training
(Sec 3.3; 3.4)
Evaluation &
Interpretability
(Sec 3.5; Sec 3.6)
Deployment
(Sec 3.7)
Iterative
Iterative
Domain
Knowledge
World
Figure 1: Synergy between the scientific and neurosymbolic programming workflow.
Collectively, these characteristics enable a transparent and interactive process where an AI system
and a human expert collaborate on evidence-based reasoning and the discovery of new scientific facts.
Here, we use behavior analysis as a concrete, illustrative example. We start with an introduction to
NP (Section 2), then outline challenges and opportunities for future research (Section 3).
Behavior analysis as running example.
We chose behavior analysis as an example use case for
several reasons. Behavioral data is spatiotemporal, which is a common data type across the sciences.
Correspondingly, underlying challenges are shared in other domains, from monitoring vital signs to
modeling physical systems, to studying the dynamics of chemical reactions. Additionally, behavioral
data illustrate common challenges with scientific data. These datasets often contain rare behaviors
with noisy and imperfect data and can vary significantly in relevant time scales (e.g., milliseconds vs
hours). Datasets also vary across labs, organisms/systems, and experimental setups. Finally, automatic
behavior quantification is becoming increasingly crucial in many fields, such as neuroscience, ecology,
biology, and healthcare. As computational behavior analysis and neurosymbolic learning are both
developing research areas, there are many exciting opportunities to explore at their intersection.
Background on behavior analysis.
An important objective of behavior analysis is to quantify
behavior from video using continuous or discrete representations. We focus on the case of animal
behavior analysis in science [Anderson and Perona, 2014, Datta et al., 2019], where there are diverse
organisms and naturalistic behaviors. A common approach is first to perform animal pose tracking
from video [Mathis et al., 2018, Pereira et al., 2022], then categorize behaviors of interest from animal
pose [Segalin et al., 2021] (as discussed later in Figure 4). From an NP perspective, this approach can
be viewed as learning a symbolically interpretable intermediate representation (tracked keypoints).
Existing challenges in behavior analysis.
Similar to other scientific fields, data collection and
annotation are expensive for behavioral experiments. Analyzing data is also time-consuming and
expensive since specialized domain expertise is required for identifying behaviors of interest and
extracting knowledge. Models need to interface efficiently with scientists and data at both the inputs
and outputs from the scientific process (Figure 1). For NP models, leveraging domain expertise in the
form of behavioral attributes has been demonstrated to improve data efficiency [Sun et al., 2021] and
interpretability [Tjandrasuwita et al., 2021].
There is a variety of domain expertise that requires new algorithmic designs to integrate into the NP
workflow, such as experimental context, existing ethograms, and scientific spatiotemporal constraints.
Incorporating such domain knowledge has the potential to enable NP models to be more robust
to noisy and imperfect data, and enable new scientific inquiries that were too expensive to study
previously. Furthermore, when black-box models are used for studying behavior, it is difficult to
diagnose errors and explain model outputs [Rudin, 2019]. NP models have the potential to produce
symbolic descriptions of behavior (Figure 2), which enables experts to connect model interpretations
with other parts of the behavior analysis workflow, e.g., describing behavioral differences across
different strains of mice. Finally, to enable the use of NP models in real-world science workflows,
these models must be scalable and produce robustly reproducible interpretations.
2
(a) Example of a domain-specific language for neurosymbolic programming.
(b) A neurosymbolic program.
Figure 2: Examples of NP for learning programs in mouse social behavior [Shah et al., 2020].
2 Neurosymbolic Programming Techniques
Neurosymbolic programs incorporate latent representations from neural networks and symbols that
explicitly capture pre-existing human knowledge, and connect these elements using rich architectures
that mirror classic models of computation. The programs, assumed to belong to a DSL, are learned
using a combination of gradient-based optimization, probabilistic methods, and symbolic techniques.
Anatomy of a Neurosymbolic Program.
In general, a neurosymbolic program comprises its discrete
architecture and continuous parameters. Consider the neurosymbolic program in Figure 2b, obtained
from DSL 2a, which comprises logical symbolic operations such as “if” statements, as well as
functions with continuous parameters. The architecture includes all the discrete symbolic choices that
form the structure of the program (such as whether to have an “if” statement and where to place it
relative to other operations), and “programming” this architecture is analogous to architecture design
in neural networks (e.g., whether to use convolutions, recurrent units, attention, etc.).
Space of Neurosymbolic Programs.
The range of NP methods varies in the degree to which they use
neural versus symbolic reasoning (Figure 3). The two ends of the spectrum correspond to purely neural
(a 1D convolutional network) and purely symbolic (a human-written program) models, respectively.
The techniques close to the center are neurosymbolic: the model in the center-left is a neurosymbolic
encoder [Zhan et al., 2021], while the model in the center-right is a program with differentiable
parameters for behavior analysis [Tjandrasuwita et al., 2021]. From a definitional perspective, purely
neural and purely symbolic programs can be considered special cases of neurosymbolic programs,
although we typically do not refer to those as neurosymbolic programs for practical purposes.
To illustrate the strengths and weaknesses of each model in Figure 3, assume that we have a scientific
hypothesis to test on a dataset. On the right side, the fully symbolic model would involve an expert-
written program that encodes the hypothesis in a general programming language. This program
requires no learnable parameters, is fully interpretable and, if needed, can be iteratively improved.
However, this method is also brittle, and the program must be engineered to handle all the dynamics
of the dataset. This is intractable for models with complex dynamics. On the left side, the purely
neural model would model the hypothesis directly using the dataset. Such models fit well to the
dataset but offer limited interpretability and control over the generated hypothesis, which can make
def is_attacking(fly, tgt):
f2t_angle = atan((tgt.y-fly.y) / (tgt.x - fly.x))
rel_angle = |fly.abs_angle - f2t_angle|
return fly.speed > 2 and rel_angle < 0.1
Neural Symbolic
Black-box,
many parameters
Interpretable via visualizations,
few parameters
Interpretable,
no parameters
Interpretable via visualizations,
few parameters (symbolic),
many parameters (neural)
Properties
Visualization
Name 1D Convolutional Network Neurosymbolic Encoder Differentiable Program Human-written Program
Symbolic
Neural
Input
Encoding
Feature Weights
Channel 1 Channel 2
Figure 3: Space of neurosymbolic programming models in behavior analysis, including purely neural
(left), purely symbolic (right), and neurosymbolic (two in middle)
3
摘要:

NeurosymbolicProgrammingforScienceJenniferJ.SunCaltechMeganTjandrasuwitaMITCSAILAtharvaSehgalUTAustinArmandoSolar-LezamaMITCSAILSwaratChaudhuriUTAustinYisongYueCaltechOmarCostilla-ReyesyMITCSAILAbstractNeurosymbolicProgramming(NP)techniqueshavethepotentialtoacceleratescienticdiscovery.Thesemodel...

展开>> 收起<<
Neurosymbolic Programming for Science Jennifer J. Sun CaltechMegan Tjandrasuwita.pdf

共11页,预览3页

还剩页未读, 继续阅读

声明:本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。玖贝云文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知玖贝云文库,我们立即给予删除!
分类:图书资源 价格:10玖币 属性:11 页 大小:1.15MB 格式:PDF 时间:2025-05-02

开通VIP享超值会员特权

  • 多端同步记录
  • 高速下载文档
  • 免费文档工具
  • 分享文档赚钱
  • 每日登录抽奖
  • 优质衍生服务
/ 11
客服
关注