Original: A B AYESIAN -S YMBOLIC A PPROACH TO L EARNING AND R EASONING FOR I NTUITIVE P HYSICS
Revised: A B AYESIAN -S YMBOLIC A PPROACH TO L EARNING AND R EASONING FOR I NTUITIVE P HYSICS

Original: Anonymous authors
Revised: Anonymous authors

Original: Paper under double-blind review
Revised: Paper under double-blind review

Original: A BSTRACT
Revised: A BSTRACT

Original: Humans are capable of reasoning about physical phenomena by inferring laws of physics from a very limited set of observations.
Revised: Humans are capable of reasoning about physical phenomena by inferring laws of physics from a very limited set of observations.

Original: The inferred laws can potentially depend on unobserved properties, such as mass, texture, charge, etc.
Revised: The inferred laws can potentially depend on unobserved properties, such as mass, texture, charge, etc.

Original: This sampleefﬁcient physical reasoning is considered a core domain of human common-sense knowledge and hints at the existence of a physics engine in the head.
Revised: This sampleefﬁcient physical reasoning is considered a core domain of human common-sense knowledge and hints at the existence of a physics engine in the head.

Original: In this paper, we propose a Bayesian symbolic framework for learning sample-efﬁcient models of physical reasoning and prediction, which are of special interests in the ﬁeld of intuitive physics.
Revised: In this paper, we propose a Bayesian symbolic framework for learning sample-efﬁcient models of physical reasoning and prediction, which are of special interests in the ﬁeld of intuitive physics.

Original: In our framework, the environment is represented by a top-down generative model with a collection of entities with some known and unknown properties as latent variables to capture uncertainty.
Revised: In our framework, the environment is represented by a top-down generative model with a collection of entities with some known and unknown properties as latent variables to capture uncertainty.

Original: The physics engine depends on physical laws which are modeled as interpretable symbolic expressions and are assumed to be functions of the latent properties of the entities interacting under simple Newtonian physics.
Revised: The physics engine depends on physical laws which are modeled as interpretable symbolic expressions and are assumed to be functions of the latent properties of the entities interacting under simple Newtonian physics.

Original: As such, learning the laws is then reduced to symbolic regression and Bayesian inference methods are used to obtain the distribution of unobserved properties.
Revised: As such, learning the laws is then reduced to symbolic regression and Bayesian inference methods are used to obtain the distribution of unobserved properties.

Original: These inference and regression steps are performed in an iterative manner following the expectation–maximization algorithm to infer the unknown properties and use them to learn the laws from a very small set of observations.
Revised: These inference and regression steps are performed in an iterative manner following the expectation–maximization algorithm to infer the unknown properties and use them to learn the laws from a very small set of observations.

Original: We demonstrate that on three physics learning tasks that compared to the existing methods of learning physics, our proposed framework is more dataefﬁcient, accurate and makes joint reasoning and learning possible.
Revised: We demonstrate that on three physics learning tasks that compared to the existing methods of learning physics, our proposed framework is more dataefﬁcient, accurate and makes joint reasoning and learning possible.

Original:  I NTRODUCTION
Revised:  I NTRODUCTION

Original: Imagine a ball rolling down a ramp.
Revised: Imagine a ball rolling down a ramp.

Original: If asked to predict the trajectory of the ball, most of us will ﬁnd it fairly easy to make a reasonable prediction.
Revised: If asked to predict the trajectory of the ball, most of us will ﬁnd it fairly easy to make a reasonable prediction.

Original: Not only that, simply by observing a single trajectory people can make reasonable guesses about the material and weight of the ball and the ramp.
Revised: Not only that, simply by observing a single trajectory people can make reasonable guesses about the material and weight of the ball and the ramp.

Original: It is astonishing that while the exact answers to any of these prediction and reasoning tasks requires an indepth knowledge of Newtonian mechanics and solving of some intricate equations, yet an average human can perform such tasks without any formal training in physics.
Revised: It is astonishing that while the exact answers to any of these prediction and reasoning tasks requires an indepth knowledge of Newtonian mechanics and solving of some intricate equations, yet an average human can perform such tasks without any formal training in physics.

Original: Even from an early age, humans demonstrate an innate ability to quickly learn and discover the laws of physical interactions with very limited supervision.
Revised: Even from an early age, humans demonstrate an innate ability to quickly learn and discover the laws of physical interactions with very limited supervision.

Original: This allows them to efﬁciently reason and plan action about commonsense tasks even in absence of complete information (Spelke, 2000; Battaglia et al., 2013).
Revised: This allows them to efﬁciently reason and plan action about commonsense tasks even in absence of complete information (Spelke, 2000; Battaglia et al., 2013).

Original: Recent studies suggest that this ability of efﬁcient physical reasoning with limited supervision is driven by a noisy model of the exact Newtonian dynamics, referred as the intuitive physics engine (IPE; Bates et al., 2015; Gerstenberg et al., 2015; Sanborn et al., 2013; Lake et al., 2017; Battaglia et al., 2013).
Revised: Recent studies suggest that this ability of efﬁcient physical reasoning with limited supervision is driven by a noisy model of the exact Newtonian dynamics, referred as the intuitive physics engine (IPE; Bates et al., 2015; Gerstenberg et al., 2015; Sanborn et al., 2013; Lake et al., 2017; Battaglia et al., 2013).

Original: As sample-efﬁcient physical reasoning is recognized as a core domain of human common-sense knowledge (Spelke & Kinzler, 2007); therefore an important problem in artiﬁcial intelligence is to develop agents that not only learn faster but also generalize beyond the training data.
Revised: As sample-efﬁcient physical reasoning is recognized as a core domain of human common-sense knowledge (Spelke & Kinzler, 2007); therefore an important problem in artiﬁcial intelligence is to develop agents that not only learn faster but also generalize beyond the training data.

Original: This has lead to a surge in works aimed at developing agents with an IPE or a model of the environment dynamics (Amos et al., 2018;
Revised: This has lead to a surge in works aimed at developing agents with an IPE or a model of the environment dynamics (Amos et al., 2018;

Original: Chang et al., 2016; Grzeszczuk & Animator, 1998; Fragkiadaki et al., 2015;
Revised: Chang et al., 2016; Grzeszczuk & Animator, 1998; Fragkiadaki et al., 2015;

Original: Watters et al., 2017; Battaglia et al., 2016; Sanchez-Gonzalez et al., 2019;
Revised: Watters et al., 2017; Battaglia et al., 2016; Sanchez-Gonzalez et al., 2019;

Original: Ehrhardt et al., 2017;
Revised: Ehrhardt et al., 2017;

Original: Kipf et al., 2018; Seo et al., 2019; Baradel et al., 2020).
Revised: Kipf et al., 2018; Seo et al., 2019; Baradel et al., 2020).

Original: Among these, neural-network based learned models of physics (Breen et al., 2019; Battaglia et al., 2016; Sanchez-Gonzalez et al., 2019) tend to have good predictive accuracy but poor sample efﬁciency for learning.
Revised: Among these, neural-network based learned models of physics (Breen et al., 2019; Battaglia et al., 2016; Sanchez-Gonzalez et al., 2019) tend to have good predictive accuracy but poor sample efﬁciency for learning.

Original: On the other hand, symbolic models (Ullman et al., 2018; Smith et al., 2019; Sanborn et al., 2013; Bramley et al., 2018) are sample efﬁcient but fail to adapt or accommodate any deviation from their ﬁxed physics engine.
Revised: On the other hand, symbolic models (Ullman et al., 2018; Smith et al., 2019; Sanborn et al., 2013; Bramley et al., 2018) are sample efﬁcient but fail to adapt or accommodate any deviation from their ﬁxed physics engine.

Original: [Figure]
Revised: [Figure]

Original: Fixed
Revised: Fixed

Original: SymbolicForceLaws
Revised: SymbolicForceLaws

Original: Summation
Revised: Summation

Original: NewtonianDynamics
Revised: NewtonianDynamics

Original: Integrator
Revised: Integrator

Original: LearnableSymbolicForceLaws
Revised: LearnableSymbolicForceLaws

Original: Summation
Revised: Summation

Original: NewtonianDynamics
Revised: NewtonianDynamics

Original: Integrator
Revised: Integrator

Original: NeurallyLearnedInteraction
Revised: NeurallyLearnedInteraction

Original: Aggregation
Revised: Aggregation

Original: HamiltonianDynamics
Revised: HamiltonianDynamics

Original: Integrator
Revised: Integrator

Original: NeurallyLearnedInteraction
Revised: NeurallyLearnedInteraction

Original: Aggregation
Revised: Aggregation

Original: NeurallyLearnedDynamics
Revised: NeurallyLearnedDynamics

Original: DeepNeuralNetworks
Revised: DeepNeuralNetworks

Original: [Figure]
Revised: [Figure]

Original: Inspired by humans’ highly data-efﬁcient ability of learning and reasoning about their environment, we present Bayesian-symbolic physics (BSP), the ﬁrst fully Bayesian approach to symbolic intuitive physics that, by combining symbolic learning of physical force laws and statistical learning of unobserved properties of objects, enjoys the sample efﬁciency of symbolic methods with the accuracy and generalization of data-driven learned approaches.
Revised: Inspired by humans’ highly data-efﬁcient ability of learning and reasoning about their environment, we present Bayesian-symbolic physics (BSP), the ﬁrst fully Bayesian approach to symbolic intuitive physics that, by combining symbolic learning of physical force laws and statistical learning of unobserved properties of objects, enjoys the sample efﬁciency of symbolic methods with the accuracy and generalization of data-driven learned approaches.

Original: In BSP, we pose the evolution of the environment dynamics over time as a generative program of its objects interacting under Newtonian mechanics using forces, as shown in Figure 2.
Revised: In BSP, we pose the evolution of the environment dynamics over time as a generative program of its objects interacting under Newtonian mechanics using forces, as shown in ﬁgure 2.

Original: Being a fully Bayesian model, we treat objects and their properties such as mass, charge, etc.
Revised: Being a fully Bayesian model, we treat objects and their properties such as mass, charge, etc.

Original: as random variables.
Revised: as random variables.

Original: As force laws are simply functions of these properties under the Newtonian assumption, in BSP we replace data-hungry neural networks (NN) with symbolic regression (SR) to learn explicit force laws (in symbolic form) and then evolve them deterministically using equations of motion.
Revised: As force laws are simply functions of these properties under the Newtonian assumption, in BSP we replace data-hungry neural networks (NN) with symbolic regression (SR) to learn explicit force laws (in symbolic form) and then evolve them deterministically using equations of motion.

Original: But a naive SR implementation is not enough: a vanilla grammar that does not constrain the search space of the force-laws can potentially have far worse sample efﬁciency and accuracy than a neural network.
Revised: But a naive SR implementation is not enough: a vanilla grammar that does not constrain the search space of the force-laws can potentially have far worse sample efﬁciency and accuracy than a neural network.

Original: Therefore, we also introduce a grammar of Newtonian physics that leverages dimensional analysis to induce a physical unit system over the search space and then imposes physics-based constraints on the production rules, which help prune away any physically meaningless laws, thus drastically speeding up SR.
Revised: Therefore, we also introduce a grammar of Newtonian physics that leverages dimensional analysis to induce a physical unit system over the search space and then imposes physics-based constraints on the production rules, which help prune away any physically meaningless laws, thus drastically speeding up SR.

Original: Our main contributions are threefold:
Revised: Our main contributions are threefold:

Original: • We introduce a fully differentiable, top-down, Bayesian model for physical dynamics and an expectation-maximization (EM) based algorithm, which combines Markov chain Monte Carlo (MCMC) and SR, for maximum likelihood ﬁtting of the model.
Revised: • We introduce a fully differentiable, top-down, Bayesian model for physical dynamics and an expectation-maximization (EM) based algorithm, which combines Markov chain Monte Carlo (MCMC) and SR, for maximum likelihood ﬁtting of the model.

Original: • We introduce a grammar of Newtonian physics that appropriately constrains SR to allow data-efﬁcient physics learning.
Revised: • We introduce a grammar of Newtonian physics that appropriately constrains SR to allow data-efﬁcient physics learning.

Original: • Through empirical evaluations, we demonstrate that the BSP approach reaches human-like sample efﬁciency, often just requiring 1 to 5 observations to learn the exact force laws – usually more than 10x fewer than that of the closest neural alternatives.
Revised: • Through empirical evaluations, we demonstrate that the BSP approach reaches human-like sample efﬁciency, often just requiring 1 to 5 observations to learn the exact force laws – usually more than 10x fewer than that of the closest neural alternatives.

Original:  R ELATED W ORK
Revised:  R ELATED W ORK

Original: At a high level, the logic of physics engines can be decomposed into a dynamics module and a model of how the entities interact with each other depending on their mutual properties.
Revised: At a high level, the logic of physics engines can be decomposed into a dynamics module and a model of how the entities interact with each other depending on their mutual properties.

Original: These modules can be further divided into more components depending on how the module is realized.
Revised: These modules can be further divided into more components depending on how the module is realized.

Original: Using this break-down, we can categorize different models of physics based on what components of the model are learned.
Revised: Using this break-down, we can categorize different models of physics based on what components of the model are learned.

Original: In Figure 1, we compare some of the recent models of physics that are of closely related to our work.
Revised: In ﬁgure 1, we compare some of the recent models of physics that are of closely related to our work.

Original: Starting on the right end, we have fully learned, deep neuralnetwork approach used by Breen et al.
Revised: Starting on the right end, we have fully learned, deep neural-network approach used by Breen et al.

Original: (2019) that do not use any prior knowledge about physics and therefore learn to predict dynamics completely in purely data-driven way.
Revised: (2019) that do not use any prior knowledge about physics and therefore learn to predict dynamics completely in purely data-driven way.

Original: In the middle are hybrid models that introduce some prior knowledge about physical interaction or dynamics in their deep network based prection model.
Revised: In the middle are hybrid models that introduce some prior knowledge about physical interaction or dynamics in their deep network based prection model.

Original: These include interaction networks (INs; Battaglia et al., 2016), ODE graph networks (OGNs) and Hamiltonian ODE graph networks (HOGNs; Sanchez-Gonzalez et al., 2019).
Revised: These include interaction networks (INs; Battaglia et al., 2016), ODE graph networks (OGNs) and Hamiltonian ODE graph networks (HOGNs; Sanchez-Gonzalez et al., 2019).

Original: Since these approaches employ deep networks to learn, they tend to have very good predictive accuracy but extremely bad sample efﬁciency and therefore require orders of magnitude more data to train than humans (Ullman et al., 2018; Battaglia et al., 2016; Sanchez-Gonzalez et al., m 1 ,m 2 ,m 3 ∼ p m v 11 , v 21 , vp 11 , p 21 , p˜ p 11 , ˜ p 21 , ˜ p F f 11 , f 21 , fa 11 , a 21 , a Integrator v 12 , v 22 , vp 12 , p 22 , p˜ p 12 , ˜ p 22 , ˜ p
Revised: Since these approaches employ deep networks to learn, they tend to have very good predictive accuracy but extremely bad sample efﬁciency and therefore require orders of magnitude more data to train than humans (Ullman et al., 2018; Battaglia et al., 2016; Sanchez-Gonzalez et al., 2019).

Original: F f 12 , f 22 , fa 12 , a 22 , a Integrator ... + (cid:15) σ ∼ N (0 d , 1 d ) + (cid:15) σ ∼ N (0 d , 1 d ) On the other end of the spectrum (left) are the fully symbolic, rule-based physics models and engines (Smith et al., 2019; Allen et al., 2019; Wu et al., 2015; Ullman et al., 2018).
Revised: On al al

Original: While these methods are suitable for reasoning tasks, they lack the ﬂexibility of the data-driven, learned models as they cannot generalize or adapt to any changes in the environment that their ﬁxed physics engine simulates.
Revised: While these methods are suitable for reasoning tasks, they lack the ﬂexibility of the data-driven, learned models as they cannot generalize or adapt to any changes in the environment that their ﬁxed physics engine simulates.

Original: For example, in such ﬁxed models, inference can fail on physically implausible scenes and may require additional tricks to resolve such issues (Smith et al., 2019).
Revised: For example, in such ﬁxed models, inference can fail on physically implausible scenes and may require additional tricks to resolve such issues (Smith et al., 2019).

Revised: Symbolic regression has been used for general physics learning in many prior works ranging from

Revised: Schmidt & Lipson (2009) that used SR to discover force laws from experimental data to the more recent work of Cranmer et al.

Revised: (2020) on distilling symbolic forces from INs using genetic algorithms.

Revised: Even more recently, Udrescu & Tegmark (2020) proposed an interesting framework AI Feynman, which recursively simpliﬁes the SR problem using dimensional analysis and symmetries discovered by neural networks to discover the underlying physics equation that generated the data.

Revised: The focus of these prior work has been to discover the underlying physical equations that directly leads to the observed data but unlike our approach, they do not target to allow for reasoning in physical environments, that is common task of interest in intuitive physics studies.

Original:  B AYESIAN -S YMBOLIC P HYSICS
Revised:  B AYESIAN -S YMBOLIC P HYSICS

Original: Our framework, Bayesian-symbolic physics, combines symbolic learning of physical force laws with Bayesian statistical learning of object properties such as mass and charge.
Revised: Our framework, Bayesian-symbolic physics, combines symbolic learning of physical force laws with Bayesian statistical learning of object properties such as mass and charge.

Original: The environment is modelled by a probabilistic generative model governed by Newtonian dynamics.
Revised: The environment is modelled by a probabilistic generative model governed by Newtonian dynamics.

Original: Physical laws are learnable symbolic expressions that determine the force exerted on each object, based on the position and properties of other objects.
Revised: Physical laws are learnable symbolic expressions that determine the force exerted on each object, based on the position and properties of other objects.

Original: These properties might not be observed, so they are treated as latent variables and learned in a Bayesian fashion.
Revised: These properties might not be observed, so they are treated as latent variables and learned in a Bayesian fashion.

Original: The physical laws themselves have a prior distribution to organize the search space and discourage the model from learning physically meaningless laws; we call this distribution a grammar of Newtonian physics .
Revised: The physical laws themselves have a prior distribution to organize the search space and discourage the model from learning physically meaningless laws; we call this distribution a grammar of Newtonian physics .

Original: To learn with incomplete data, we are inspired by results from Ullman et al.
Revised: To learn with incomplete data, we are inspired by results from Ullman et al.

Original: (2018), humans are able to simultaneously predict the trajectory and update their inference about the properties of the object under new observation.
Revised: (2018), humans are able to simultaneously predict the trajectory and update their inference about the properties of the object under new observation.

Original: This motivates an EM-based learning and inference method to ﬁt
Revised: This motivates an EM-based learning and inference method to ﬁt

Original: BSP models.
Revised: BSP models.

Original: In the E-step, we obtain the distribution of entity properties by sampling from their posterior distribution using the current guess of force laws, and in the M-step, we use the samples from the E-step to perform SR to update the force functions.
Revised: In the E-step, we obtain the distribution of entity properties by sampling from their posterior distribution using the current guess of force laws, and in the M-step, we use the samples from the E-step to perform SR to update the force functions.

Original: This enables BSP models to learn and reason in environment with incomplete information.
Revised: This enables BSP models to learn and reason in environment with incomplete information.

Original: 3. G ENERATIVE M ODEL OF THE E NVIRONMENT
Revised: 3. G ENERATIVE M ODEL OF THE E NVIRONMENT

Original: We represent each entity i ∈ { 1 . . .
Revised: We represent each entity i ∈ { 1 . . .

Original: N } by a vector of properties z i , such as mass, charge, coefﬁcient of friction, and shape, some of which may be unobserved.
Revised: N } by a vector of properties z i , such as mass, charge, coefﬁcient of friction, and shape, some of which may be unobserved.

Original: At each time step t , a state vector s it =
Revised: At each time step t , a state vector s it =

Original: ( p it , v it ) is associated with each entity i , where p it ∈ R d and v it ∈
Revised: ( p it , v it ) is associated with each entity i , where p it ∈ R d and v it ∈

Original: R
Revised: R

Original: d are position and velocity vectors respectively and d is the dimensionality of the environment, typically 2 or 3 .
Revised: d are position and velocity vectors respectively and d is the dimensionality of the environment, typically 2 or 3 .

Original: Let { τ i } Ni =1 , where τ i = p i 1: T :=
Revised: Let { τ i } N i =1 , where τ i = p i 1: T :=

Original: ( p i 1 , . . .
Revised: ( p i 1 , . . .

Original: , p iT ) , be the set of observed trajectories from an environment with
Revised: , p iT ) , be the set of observed trajectories from an environment with

Original: N entities.
Revised: N entities.

Original: Together with a prior on z , the generative process of BSP deﬁnes a joint probability distribution p ( D , z ; F ) over the observed trajectory data D and latent properties
Revised: Together with a prior on z , the generative process of BSP deﬁnes a joint probability distribution p ( D , z ; F ) over the observed trajectory data D and latent properties

Original: z given the force function F . 

Revised: z given the force function F .

Original: An example of the generative process of a three-body problem is shown in Figure 2.
Revised: An example of the generative process of a three-body problem is shown in ﬁgure 2.

Original: The state transition of an entity in a Newtonian system depends not only on its properties and current state but also on its interaction with other entities in the environment.
Revised: The state transition of an entity in a Newtonian system depends not only on its properties and current state but also on its interaction with other entities in the environment.

Original: Therefore, we deﬁne a pairwise interaction function F ( z i , s i , z j , s j ) , where i, j ∈ { 1 . . .
Revised: Therefore, we deﬁne a pairwise interaction function F ( z i , s i , z j , s j ) , where i, j ∈ { 1 . . .

Original: N } ; we interpret F as the force applied to i due to its interaction with j .
Revised: N } ; we interpret F as the force applied to i due to its interaction with j .

Original: Then, the trajectory τ i of each entity is generated by a transition function T that consumes the current state and all of its interactions as
Revised: Then, the trajectory τ i of each entity is generated by a transition function T that consumes the current state and all of its interactions as

Original: [Equation]
Revised: [Equation]

Original: [Equation] [Figure] As forces are additive, forces on entity i can be easily summed to get the total force applied as f it = (cid:80) N j =1 F ( z i , s i t , z j , s jt ) .
Revised: As forces are additive, forces on entity i can be easily summed to get the total force applied as f it = (cid:80) Nj =1 F ( z i , s it , z j , s jt ) .

Original: Similar to Sanchez-Gonzalez et al.
Revised: Similar to Sanchez-Gonzalez et al.

Original: (2019), we use numerical integration to simulate the Newtonian dynamics, updating s with the acceleration obtained from f it .
Revised: (2019), we use numerical integration to simulate the Newtonian dynamics, updating s with the acceleration obtained from f it .

Revised: m 1 ,m 2 ,m 3 ∼ p m v 11 , v 21 , vp 11 , p 21 , p˜ p 11 , ˜ p 21 , ˜ p

Revised: F f 11 , f 21 , fa 11 , a 21 , a

Revised: Integrator v 12 , v 22 , vp 12 , p 22 , p˜ p 12 , ˜ p 22 , ˜ p

Original: Speciﬁcally, we choose the Euler integrator since its update rules correspond to the basic relations between position, velocity and acceleration.
Revised: F f 12 , f 22 , fa 12 , a 22 , a Integrator ... + (cid:15) σ ∼ N (0 d , 1 d ) + (cid:15) σ ∼ N (0 d , 1 d ) [Figure]

Revised: MeterSq

Revised: [Figure]

Revised: [Figure]

Revised: MeterSec → (cid:107) MeterSecVec (cid:107)

Revised: [Figure]

Revised: MeterSecSq → ( MeterSec

Revised: [Figure]

Revised: RefInvVec → MeterVec | MeterSecVec

Revised: UnitlessVec → normalize( RefInvVec ) | MeterVec

Revised: [Figure]

Revised: Meter | MeterSecVec

Revised: ÷ MeterSec

Revised: Meter → project( MeterVec , UnitlessVec )

Revised: MeterSec → project( MeterSecVec , UnitlessVec )

Revised: BaseCoeﬀ → Unitless | Kg | KgSq | KgSq ÷ Kg | Meter | MeterSq | Meter − Meter | Meter + Meter | MeterSec | MeterSecSq | MeterSecSq + MeterSecSq | MeterSecSq − MeterSecSq

Revised: Coeﬀ → BaseCoeﬀ | BaseCoeﬀ × BaseCoeﬀ | BaseCoeﬀ ÷ BaseCoeﬀ

Revised: BaseForce → Constant × Coeﬀ × UnitlessVec

Revised: Bool → isOn( p i ,s i , p j ,s j ) | doesCollide( p i ,s i , p j ,s j )

Revised: Force → BaseForce | BaseForce × Bool | Force + BaseForce

Revised: Speciﬁcally, we choose the Euler integrator since its update rules correspond to the basic relations between position, velocity and acceleration.

Original: With these speciﬁcations, equation 1 becomes
Revised: With these speciﬁcations, equation 1 becomes

Original: [Equation]
Revised: [Equation]

Original: where m i is the mass of the recipient of the force f it and ∆ t is the step size of the Euler integrator.
Revised: where m i is the mass of the recipient of the force f it and ∆ t is the step size of the Euler integrator.

Original: Finally, we add Gaussian noise to each trajectory { τ i } Ni =1 , that is, D :=
Revised: Finally, we add Gaussian noise to each trajectory { τ i } Ni =1 , that is, D :=

Original: { ˜ τ i } Ni =1 where ˜ τ i :=
Revised: { ˜ τ i } Ni =1 where ˜ τ i :=

Original: (˜ p i 1 , . . . , ˜ p iT ) , ˜ p it ∼ N ( p it , σ 2 ) and σ is the noise level.
Revised: (˜ p i 1 , . . . , ˜ p iT ) , ˜ p it ∼ N ( p it , σ 2 ) and σ is the noise level.

Revised: For clarity, Appendix A provides the complete generative process represented by a probabilistic program.

Original: 3. A GRAMMAR OF N EWTONIAN PHYSICS
Revised: 3. A GRAMMAR OF N EWTONIAN PHYSICS

Original: In order attain sample efﬁciency, we chose to learn F ( z i , s i , z j , s j ) using symbolic search, but this approach can be inefﬁcient if the search space of possible functions is too large, or inaccurate if the search space is too small.
Revised: In order attain sample efﬁciency, we chose to learn F ( z i , s i , z j , s j ) using symbolic search, but this approach can be inefﬁcient if the search space of possible functions is too large, or inaccurate if the search space is too small.

Original: Therefore, we constrain the function F to be a members of a context-free language called the grammar of Newtonian physics, G , which we now describe.
Revised: Therefore, we constrain the function F to be a members of a context-free language called the grammar of Newtonian physics, G , which we now describe.

Original: We consider the following terminal nodes in G : learnable constants c 1 , c 2 , c 3 , masses m i , m j , friction coefﬁcients µ i , µ j , shapes s i , s j , positions p
Revised: We consider the following terminal nodes in G : learnable constants c 1 , c 2 , c 3 , masses m i , m j , friction coefﬁcients µ i , µ j , shapes s i , s j , positions p

Original: i , p j , velocities v i , v j and the contact point c for a pair of entities.
Revised: i , p j , velocities v i , v j and the contact point c for a pair of entities.

Original: 2 and the following arithmetic expressions: ( · ) 2 (square), + , − , × , ÷ , (cid:107)·(cid:107) 2 (L2norm), normalise( · ) and project( · , · ) (project a vector to an unit vector).
Revised: 2 and the following arithmetic expressions: ( · ) 2 (square), + , − , × , ÷ , (cid:107)·(cid:107) 2 (L2norm), normalise( · ) and project( · , · ) (project a vector to an unit vector).

Original: However, naively supporting all possible arithmetic expressions for any combination of terminal nodes would make SR highly inefﬁcient and even lead to physically meaningless force laws.
Revised: However, naively supporting all possible arithmetic expressions for any combination of terminal nodes would make SR highly inefﬁcient and even lead to physically meaningless force laws.

Original: Therefore, in order to constrain expression search further, we introduce physics-inspired production rules, along with preterminals and nonterminals nodes, as shown in Figure 3.
Revised: Therefore, in order to constrain expression search further, we introduce physics-inspired production rules, along with preterminals and nonterminals nodes, as shown in Figure 3.

Original: We now discuss the design choice of our grammar.
Revised: We now discuss the design choice of our grammar.

Original: Motivated by dimensional analysis in natural sciences, in which the relations between different units of measurement are tracked (Brescia, 2012), we build the concept of units of measurement into the nonterminals of G .
Revised: Motivated by dimensional analysis in natural sciences, in which the relations between different units of measurement are tracked (Brescia, 2012), we build the concept of units of measurement into the nonterminals of G .

Original: That is, mass has the unit kilogram ( Kg ), unit meter ( Meter ) for distance and meter per second ( MeterSec ) for speed.
Revised: That is, mass has the unit kilogram ( Kg ), unit meter ( Meter ) for distance and meter per second ( MeterSec ) for speed.

Original: With this unit system in place, we only allow addition and subtraction of symbols with the same units, therefore pruning away physically meaningless expressions, e.g. Kg − Meter .
Revised: With this unit system in place, we only allow addition and subtraction of symbols with the same units, therefore pruning away physically meaningless expressions, e.g. Kg − Meter .

Original: Importantly, this leads to forces laws that have the unit of Newton.
Revised: Importantly, this leads to forces laws that have the unit of Newton.

Original: We also forbid the direct use of absolute positions p i , p j and c and only allow their differences.
Revised: We also forbid the direct use of absolute positions p i , p j and c and only allow their differences.

Original: This ensures that all force laws are reference-invariant , that is, independent on the choice of the reference frame.
Revised: This ensures that all force laws are reference-invariant , that is, independent on the choice of the reference frame.

Original: To be consistent with the unit system, we call vectors obtained from operations on positions vectors, meter vector ( MeterVec ) and those on velocities as meter per second vector ( MeterSecVec ).
Revised: To be consistent with the unit system, we call vectors obtained from operations on positions vectors, meter vector ( MeterVec ) and those on velocities as meter per second vector ( MeterSecVec ).

Original: These variables are all vectors thus we call them reference-invariant vectors 
Revised: These variables are all vectors thus we call them reference-invariant vectors ( RefInvVec ).

Original: // M-step starts

Original: ( RefInvVec ). When such vectors are normalised, or divided by their corresponding “scalar variables”, they becomes unit-less vectors ( UnitlessVec ) that can be used to describe a direction.
Revised: When such vectors are normalised, or divided by their corresponding “scalar variables”, they becomes unit-less vectors ( UnitlessVec ) that can be used to describe a direction.

Original: The start symbol of the grammar is Force .
Revised: The start symbol of the grammar is Force .

Original: We allow forces to be summed by right-branching or be conditioned on a Boolean expression.
Revised: We allow forces to be summed by right-branching or be conditioned on a Boolean expression.

Original: In order to support conditional forces , which are forces that only apply when a condition is true, such as collision force and friction .
Revised: In order to support conditional forces , which are forces that only apply when a condition is true, such as collision force and friction .

Original: Since the goal of our work is not perceptual learning, we provide perceptual primitives (collision detection as a function doesCollide and isOn to check if a disc is on a mat) in the grammar.
Revised: Since the goal of our work is not perceptual learning, we provide perceptual primitives (collision detection as a function doesCollide and isOn to check if a disc is on a mat) in the grammar.

Original: Collision is then handled by applying an extra force to the entity when doesCollide is true; the force must still be learned.
Revised: Collision is then handled by applying an extra force to the entity when doesCollide is true; the force must still be learned.

Original: Finally, some care is needed to ensure the grammar is unambiguous.
Revised: Finally, some care is needed to ensure the grammar is unambiguous.

Original: For example, if we used a rule like Coeﬀ → Coeﬀ × Coeﬀ , then the grammar could generate many expressions that redundantly represent the same function.
Revised: For example, if we used a rule like Coeﬀ → Coeﬀ × Coeﬀ , then the grammar could generate many expressions that redundantly represent the same function.

Original: This would make search much more expansive.
Revised: This would make search much more expansive.

Original: Instead, we represent this rule in a right-branching way by the introduction of BaseCoeﬀ and BaseForce as nonterminals.
Revised: Instead, we represent this rule in a right-branching way by the introduction of BaseCoeﬀ and BaseForce as nonterminals.

Original: Although the grammar puts basic constraints on plausible physical laws, it is still expressive.
Revised: Although the grammar puts basic constraints on plausible physical laws, it is still expressive.

Original: For example, there are more than 6 million possible trees of depth 6.
Revised: For example, there are more than 6 million possible trees of depth 6.

Original: 3. L EARNING ALGORITHM
Revised: 3. L EARNING ALGORITHM

Original: Following the EM approach, our learning method (Algorithm 1) alternates between an E-step, where object properties are estimated given the current forces (Section 3.3.2), and an M-step step, where forces are learned given object properties (Section 3.3.1).
Revised: Following the EM approach, our learning method (Algorithm 1) alternates between an E-step, where object properties are estimated given the current forces (Section 3.3.2), and an M-step step, where forces are learned given object properties (Section 3.3.1).

Original: See Appendix A.1 for hyperparameters.
Revised: See Appendix B.1 for hyperparameters.

Original: 3.3. S YMBOLIC REGRESSION WITH LEARNABLE CONSTANTS
Revised: 3.3. S YMBOLIC REGRESSION WITH LEARNABLE CONSTANTS

Original: Symbolic regression is function approximation that searches over the space of mathematical expressions that are speciﬁed by a user-provided context-free grammar (CFG; Koza, 1994).
Revised: Symbolic regression is function approximation that searches over the space of mathematical expressions that are speciﬁed by a user-provided context-free grammar (CFG; Koza, 1994).

Original: A CFG consists a start symbol, sets of nonterminal, preterminal and terminal symbols and a set of production rules.
Revised: A CFG consists a start symbol, sets of nonterminal, preterminal and terminal symbols and a set of production rules.

Original: If each production rule in the grammar is speciﬁed with a probability (with the probabilities for all rules summed to 1 ), such a grammar is called probabilistic context-free grammars (PCFGs), which effectively deﬁnes a distribution over possible expression trees.
Revised: If each production rule in the grammar is speciﬁed with a probability (with the probabilities for all rules summed to 1 ), such a grammar is called probabilistic context-free grammars (PCFGs), which effectively deﬁnes a distribution over possible expression trees.

Original: As such, one can sample from a PCFG and/or evaluate the probability of a given tree.
Revised: As such, one can sample from a PCFG and/or evaluate the probability of a given tree.

Original: In our work, we use the cross-entropy method for SR.
Revised: In our work, we use the cross-entropy method for SR.

Original: The method starts with PCFG of a given grammar that has equal probabilities of all production rules.
Revised: The method starts with PCFG of a given grammar that has equal probabilities of all production rules.

Original: At each iteration, it samples n number of trees (up-to a speciﬁed depth d ) from the current PCFG and evaluates their ﬁtness by a loss function L .
Revised: At each iteration, it samples n number of trees (up-to a speciﬁed depth d ) from the current PCFG and evaluates their ﬁtness by a loss function L .

Original: After this, trees with the top- k ﬁtness are seleted and used to ﬁt a PCFG, which will be used in the next iteration, via maximal likelihood. 
Revised: After this, trees with the top- k ﬁtness are seleted and used to ﬁt a PCFG, which will be used in the next iteration, via maximal likelihood. // Lower-level optimization

Original: To learn the force laws, we need to ﬁnd an expression e ∈ G and a setting for the learnable constants c
Revised: To learn the force laws, we need to ﬁnd an expression e ∈ G and a setting for the learnable constants c

Original: = [ c 1 , c 2 , c 3 ] that deﬁne the force function F e,c .
Revised: = [ c 1 , c 2 , c 3 ] that deﬁne the force function F e,c .

Original: The loss used by the cross-entropy method involves computing the log-likelihood of the generative model.
Revised: The loss used by the cross-entropy method involves computing the log-likelihood of the generative model.

Original: As the observed trajectory is generated sequentially given an initial state, the computation of the log-likelihood term cannot be parallelized and can be computationally expensive in practice.
Revised: As the observed trajectory is generated sequentially given an initial state, the computation of the log-likelihood term cannot be parallelized and can be computationally expensive in practice.

Original: Following the loss form of (Battaglia et al., 2016;
Revised: Following the loss form of (Battaglia et al., 2016;

Original: Sanchez-Gonzalez et al., 2019), we use a teacher-forced or vectorized version of the log-likelihood
Revised: Sanchez-Gonzalez et al., 2019), we use a teacher-forced or vectorized version of the log-likelihood

Original: LL ( e, c ; z, D ) =
Revised: LL ( e, c ; z, D ) =

Original: N (cid:88) i =
Revised: N (cid:88) i =

Original: T
Revised: [Equation] −

Original: [Equation]
Revised: [Equation]

Original: 1 (cid:88)
Revised: (cid:88)

Original: [Equation]
Revised: [Equation]

Original: // Lower-level where T follows equation 2 and ˜ s it :=
Revised: where T follows equation 2 and ˜ s it :

Original:  (˜ p it , ˜ v it ) .
Revised: = (˜ p it , ˜ v it ) .

Original: As such, we assume velocity is also available in the dataset D .
Revised: As such, we assume velocity is also available in the dataset D .

Original: Clearly, equation 3 differs from the sequential version, as the input for the integrator contains noise at each step.
Revised: Clearly, equation 3 differs from the sequential version, as the input for the integrator contains noise at each step.

Original: However, similar to previous works, we found it is not an issue when learning forces by regression and allows a speed-up of 10x in terms of computing the log-likelihood.
Revised: However, similar to previous works, we found it is not an issue when learning forces by regression and allows a speed-up of 10x in terms of computing the log-likelihood.

Original: In order to favor simpler trees, we add a regularization term, a weighted log-probability under a uniform PCFG prior of G , to the negative log-likelihood; our ﬁnal loss per trajectory
Revised: In order to favor simpler trees, we add a regularization term, a weighted log-probability under a uniform PCFG prior of G , to the negative log-likelihood; our ﬁnal loss per trajectory

Original: [Equation]
Revised: [Equation]

Original: Here P 0 is the uniform PCFG of G and λ is a hyper-parameter that controls the regularization.
Revised: Here P 0 is the uniform PCFG of G and λ is a hyper-parameter that controls the regularization.

Original: The loss for multiple trajectories is just a summation of L over individual trajectories.
Revised: The loss for multiple trajectories is just a summation of L over individual trajectories.

Original: Optimizing equation 4 can be seen as maximum a posterior (MAP) estimation.
Revised: Optimizing equation 4 can be seen as maximum a posterior (MAP) estimation.

Original: When using the cross-entropy method for symbolic regression, the continuous constants c =
Revised: When using the cross-entropy method for symbolic regression, the continuous constants c =

Original: [ c 1 , c 2 , c 3 ] require care as they can take any value.
Revised: [ c 1 , c 2 , c 3 ] require care as they can take any value.

Original: To handle this, we use bilevel optimization , where the upper-level is the original symbolic regression problem and the inner-level is an extra optimization for constants.
Revised: To handle this, we use bilevel optimization , where the upper-level is the original symbolic regression problem and the inner-level is an extra optimization for constants.

Original: Speciﬁcally, we use an L-BFGS step to optimize the constants before computing the loss of each candidate tree within the cross-entropy iterations.
Revised: Speciﬁcally, we use an L-BFGS step to optimize the constants before computing the loss of each candidate tree within the cross-entropy iterations.

Original: For cases where the constants are very small, e.g. the gravitational constant G = 6 .
Revised: For cases where the constants are very small, e.g. the gravitational constant G = 6 .

Original: 67 × 10 − 11 , we parameterize the constants as c × 10 − 9 to avoid numerical issues in the inner-level optimization.
Revised: 67 × 10 − 11 , we parameterize the constants as c × 10 − 9 to avoid numerical issues in the inner-level optimization.

Original: Traditionally, if such strategy is not used, constants are either randomly generated from a predeﬁned, ﬁxed integer set or a continuous interval, or for evolutionary algorithms, they can be mutated and combined during evolution to produce constants that ﬁt better; such constants are often referred as ephemeral constants (Davidson et al., 2001).
Revised: Traditionally, if such strategy is not used, constants are either randomly generated from a predeﬁned, ﬁxed integer set or a continuous interval, or for evolutionary algorithms, they can be mutated and combined during evolution to produce constants that ﬁt better; such constants are often referred as ephemeral constants (Davidson et al., 2001).

Original: Compared to these methods, the beneﬁt of our formulation is that the evaluation of each tree candidate depends on the symbolic form only as the constants are optimized-away , making the search more efﬁciently.
Revised: Compared to these methods, the beneﬁt of our formulation is that the evaluation of each tree candidate depends on the symbolic form only as the constants are optimized-away , making the search more efﬁciently.

Original: Note that although the literature has not explicitly considered our way of constant learning as bilevel optimization, such strategy is not new and is similar in spirit to (Cerny et al., 2008; Kommenda et al., 2013; Quade et al., 2016).
Revised: Note that although the literature has not explicitly considered our way of constant learning as bilevel optimization, such strategy is not new and is similar in spirit to (Cerny et al., 2008; Kommenda et al., 2013; Quade et al., 2016).

Original: In contrast to recent use of bilevel optimization in meta-learning, e.g. (Finn et al., 2017), our method is simpler: As our upper-level optimization is gradient-free, we do not need to pass gradient from the lower-level to the upper-level.
Revised: In contrast to recent use of bilevel optimization in meta-learning, e.g. (Finn et al., 2017), our method is simpler: As our upper-level optimization is gradient-free, we do not need to pass gradient from the lower-level to the upper-level.

Original: In practice, as the cross-entropy method itself is sensitive to random initializations, in order to robustify the M-step, we repeat it for r runs and pick the best optimizer.
Revised: In practice, as the cross-entropy method itself is sensitive to random initializations, in order to robustify the M-step, we repeat it for r runs and pick the best optimizer.

Original: We provide a complete description of cross-entropy method with learnable constants in Algorithm 2. 
Revised: We provide a complete description of cross-entropy method with learnable constants in Algorithm 2. [Figure] [Figure] [Figure]

Revised: R M S E / f r a m e

Revised: [Figure]

Original:  3.3. R EASONING ABOUT UNKNOWN PROPERTIES
Revised: ∗ [Figure] 3.3. R EASONING ABOUT UNKNOWN PROPERTIES

Original: With a force function F given, reasoning of unknown properties is reduced to posterior inference on z in the generative model speciﬁed in Section 3.1.
Revised: With a force function F given, reasoning of unknown properties is reduced to posterior inference on z in the generative model speciﬁed in Section 3.1.

Original: Since for a ﬁxed F , the model in our framework is end-to-end, piecewise differentiable with respect to properties z = ( m, µ ) , we perform inference by sampling using Hamiltonian Monte Carlo (HMC; Duane et al., 1987; Neal et al., 2011), which is more efﬁcient than particle-based alternatives like importance sampling and sequential Monte Carlo.
Revised: Since for a ﬁxed F , the model in our framework is end-to-end, piecewise differentiable with respect to properties, we perform inference by sampling using Hamiltonian Monte Carlo (HMC; Duane et al., 1987; Neal et al., 2011). Other particle-based alternatives like importance sampling and sequential Monte Carlo are possible but are less efﬁcient.

Original: In order to draw k samples from the posterior robustly in the E-step, we ﬁrst run k + k (cid:48) independent
Revised: In order to draw k samples from the posterior robustly in the E-step, we ﬁrst run k + k (cid:48) independent

Original: HMC chains by the no-U-turn sampler (NUTS; Hoffman & Gelman, 2011) for a reasonably large number of iterations, where k (cid:48) is also a hyper-parameter to choose.After this, we remove k (cid:48) chains [Figure] [Figure]
Revised: HMC chains by the no-U-turn sampler (NUTS; Hoffman & Gelman, 2011) for a reasonably large number of iterations, where k (cid:48) is also a hyper-parameter to choose.

Original: [Figure] S E / f r a m e [Figure] with the smallest effective sample size (ESS).
Revised: After this, we remove k (cid:48) chains with the smallest effective sample size (ESS).

Original: This reduces the chance of using samples from chains that mixed poorly or got stuck in bad region due to random initialization.
Revised: This reduces the chance of using samples from chains that mixed poorly or got stuck in bad region due to random initialization.

Original: Finally, we pick the last sample from each chain as the samples returned by the E-step { z 1 , . . .
Revised: Finally, we pick the last sample from each chain as the samples returned by the E-step { z 1 , . . .

Original: , z k } .
Revised: , z k } .

Original:  E XPERIMENTS
Revised:  E XPERIMENTS

Original: In this section, we present a battery of empirical evaluations of the symbolic M-step and demonstrate how our complete EM algorithm is capable of joint reasoning and learning.
Revised: In this section, we present a battery of empirical evaluations of the symbolic M-step and demonstrate how our complete EM algorithm is capable of joint reasoning and learning.

Original: Datasets.
Revised: Datasets.

Original: We consider three simulated datasets for our evaluation.
Revised: We consider three simulated datasets for our evaluation.

Original: These three datasets, if combined together, correspond to the dataset used in Ullman et al.
Revised: These three datasets, if combined together, correspond to the dataset used in Ullman et al.

Original: (2018) for assessing physics learning and reasoning in humans.
Revised: (2018) for assessing physics learning and reasoning in humans.

Original: The ﬁrst dataset, NBODY (n-body simulation with 4 bodies), is populated by placing a heavy body with large mass and no velocity at [0 , 0] and three other bodies at random positions with random velocities such that, they would orbit the heavy body in the middle in the absence of the other two bodies.
Revised: The ﬁrst dataset, NBODY (n-body simulation with 4 bodies), is populated by placing a heavy body with large mass and no velocity at [0 , 0] and three other bodies at random positions with random velocities such that, they would orbit the heavy body in the middle in the absence of the other two bodies.

Original: The gravitational constant is set such that the system is stable within the duration of the simulation.
Revised: The gravitational constant is set such that the system is stable within the duration of the simulation.

Original: The ground truth force to learn is the gravitational force between the bodies.
Revised: The ground truth force to learn is the gravitational force between the bodies.

Original: The second dataset, BOUNCE, is generated by simulating elastic collision between a set of discs and the box that they are contained within.
Revised: The second dataset, BOUNCE, is generated by simulating elastic collision between a set of discs and the box that they are contained within.

Original: The gravitational constant is set small such that the gravitational force is ignorable and the ground truth force to learn is the collision resolution force.
Revised: The gravitational constant is set small such that the gravitational force is ignorable and the ground truth force to learn is the collision resolution force.

Original: The last dataset, MAT, simulates the friction-based interaction of discs and a mat.
Revised: The last dataset, MAT, simulates the friction-based interaction of discs and a mat.

Original: We populate this data by rolling discs with different initial states over mats with random sizes and positions and applying friction when they come in contact.
Revised: We populate this data by rolling discs with different initial states over mats with random sizes and positions and applying friction when they come in contact.

Original: The ground truth force to learn is this friction.
Revised: The ground truth force to learn is this friction.

Original: Each dataset consists of 100 scenes, 20 of which are held-out for testing.
Revised: Each dataset consists of 100 scenes, 20 of which are held-out for testing.

Original: All scenes are simulated using a physics engine with a discretization of 0.02, for 50 frames; see Figure 4 for an example of each dataset and Appendix A.2 for the ground truth force expressions under our grammar. 
Revised: All scenes are simulated using a physics engine with a discretization of 0.02, for 50 frames; see ﬁgure 4 for an example of each dataset and Appendix B.2 for the ground truth force expressions under our grammar. [Figure]

Original: Baselines Being most closely related to our work, we use a speciﬁc instantiation of the OGN model (Sanchez-Gonzalez et al., 2019) as the neural baseline.
Revised: Baselines Being most closely related to our work, we use a speciﬁc instantiation of the OGN model (Sanchez-Gonzalez et al., 2019) as the neural baseline.

Original: The original OGN model does not assume any particular Hamiltonian dynamics and thus outputs the partial derivatives of both position and momentum variables to integrate the dynamics.
Revised: The original OGN model does not assume any particular Hamiltonian dynamics and thus outputs the partial derivatives of both position and momentum variables to integrate the dynamics.

Original: In our speciﬁc realization, we only make it to output the partial derivative of the velocity variable since under the Newtonian dynamics, the partial derivative of the position variable is analytically known as the velocity.
Revised: In our speciﬁc realization, we only make it to output the partial derivative of the velocity variable since under the Newtonian dynamics, the partial derivative of the position variable is analytically known as the velocity.

Original: Since OGN (and other neural methods, such as IN) is designed to learn with all properties given, we assume all the properties are fully observed and compare our symbolic force model against OGN.
Revised: Since OGN (and other neural methods, such as IN) is designed to learn with all properties given, we assume all the properties are fully observed and compare our symbolic force model against OGN.

Original: See Appendix A.3 for details of the neural architecture, training and parameterization setup for OGN.[Figure]
Revised: See Appendix B.3 for details of the neural architecture, training and parameterization setup for OGN.

Original: [Figure] [Figure] [Figure] SYMBOLIC 
Revised: 4. D ATA - EFFICIENCY : SYMBOLIC VS NEURAL

Original: [Figure] We now compare the symbolic M-step of BSP against the OGN-based neural baselines in terms of data-efﬁciency.
Revised: We now compare the symbolic M-step of BSP against the OGN-based neural baselines in terms of data-efﬁciency.

Original: Speciﬁcally, we check how accurate the per-frame predictions of these models are on held-out data and how their accuracies change with the amount of training data.
Revised: Speciﬁcally, we check how accurate the per-frame predictions of these models are on held-out data, and how their accuracies change with the amount of training data.

Original: We use a noise-free version of the trajectory in this evaluation and provide all the properties as observed data since the neural baselines cannot be trained if the properties are not fully observed.
Revised: We use a noise-free version of the trajectory in this evaluation and provide all the properties as observed data since the neural baselines cannot be trained if the properties are not fully observed.

Original: For each dataset, holding out 20 scenes for evaluation, we randomly shufﬂe the remaining 80 scenes for training and use the ﬁrst k scenes to ﬁt the model.
Revised: For each dataset, holding out 20 scenes for evaluation, we randomly shufﬂe the remaining 80 scenes for training and use the ﬁrst k scenes to ﬁt the model.

Original: Because an average human can perform such learning tasks with about 5 scenes (Ullman et al., 2018), we only vary k from 1 to 10 in our experiments.
Revised: Because an average human can perform such learning tasks with about 5 scenes (Ullman et al., 2018), we only vary k from 1 to 10 in our experiments.

Original: We use the root mean squared error (RMSE) per frame as the performance metric, repeat each of the experiments ﬁve times with different training set and ﬁnally report the mean, maximum and minimum performance for all the methods, as shown in Figure 5.
Revised: We use the root mean squared error (RMSE) per frame as the performance metric, repeat each of the experiments ﬁve times with different training set and ﬁnally report the mean, maximum and minimum performance for all the methods, as shown in ﬁgure 5.

Original: As reference, we include the performance of F = 0 , a zero-force baseline, corresponding to the constant velocity baseline in (Battaglia et al., 2016).
Revised: As reference, we include the performance of F = 0 , a zero-force baseline, corresponding to the constant velocity baseline in (Battaglia et al., 2016).

Original: We also include the performance of the ground truth force F ∗ , which has an RMSE per frame of 0 .
Revised: We also include the performance of the ground truth force F ∗ , which has an RMSE per frame of 0 .

Original: As it can be seen, the symbolic M-step is more sample-efﬁcient than the neural baseline for all datasets within this limited data regime.
Revised: As it can be seen, the symbolic M-step is more sample-efﬁcient than the neural baseline for all datasets within this limited data regime.

Original: For NBODY and MAT, BSP can ﬁnd the ground truth force function with 1 scene and 4 scenes respectively.
Revised: For NBODY and MAT, BSP can ﬁnd the ground truth force function with 1 scene and 4 scenes respectively.

Original: For BOUNCE, the neural baseline cannot reach the performance of F = 0 even after 10 scenes for training.
Revised: For BOUNCE, the neural baseline cannot reach the performance of F = 0 even after 10 scenes for training.

Original: This is a known issue with neural network approaches when learning collision as the inherently sparse nature of the collision interaction does not provide enough training signal (Battaglia et al., 2016).
Revised: This is a known issue with neural network approaches when learning collision as the inherently sparse nature of the collision interaction does not provide enough training signal (Battaglia et al., 2016).

Revised: As BOUNCE is the only case where our method fails to ﬁnd the true law within 10 scenes, we include the typical inferred law in Appendix C as well the predicated trajectories of some selected scenes for inspection.

Original: 4. L EARNING WITH U NOBSERVED P ROPERTIES
Revised: 4. G ENERALIZATION

Revised: It is worth checking how the laws learned in Section 4.1 generalize to new scenes beyond the training data. In cases where the true law is successfully recovered, the expression will generalize to novel scenes undoubtedly. Therefore, it is more interesting to inspect the generalization ability of an approximate law, that is a law which is not completely equivalent to the true law but is close.

Revised: The emerged law for the BOUNCE dataset is such an example as mentioned earlier.

Revised: It has an expression of F † =

Revised: c (cid:107) v

Revised: i − v j (cid:107)p i − c (cid:107) p i − c (cid:107) 2 doesCollide( p i , s i , p j , s j ) ; see ﬁgure 10 in Appendix C for the actual tree.

Revised: Although it is not identical to the true law, it is still a good approximation: it takes into accounts the velocity difference into consideration and ﬁnds the correct force direction.

Revised: We now consider applying this law to a completely new scene: a vertical-view world where the gravity is pointing in downward direction.

Revised: ﬁgure 6 shows the predicted trajectory with true and the approximate law with two different initial conditions.

Revised: As it can be seen, the approximate law successfully generalize this novel world.

Revised: For the ﬁrst condition, the projection is very close to the true one, while

Revised: [Figure]

Revised: [Figure]

Revised: in ﬁgure 7d

Revised: [Figure]

Revised: to ﬁgure 8c shows the posterior of friction coefﬁcient in Scene 2 with the corresponding force function during EM.

Revised: In ﬁgure 8b, the force function F † = − 22 .

Revised: 99 µ j v i (cid:107) v i (cid:107) 2 isOn( p i ,

Revised: s i , p j , s j ) .

Revised: The constant in ﬁgure 8d is c = − 8 .

Revised: for the second condition, the concept of bounce is also correctly transferred.

Revised: The corresponding animations for these plots can also be found in the supplementary material for further inspections.

Original: Now, we demonstrate how the joint learning and reasoning in the BSP method (Algorithm 1) can recover the true force law when some properties are unobserved.
Revised: Now, we demonstrate how the joint learning and reasoning in the BSP method (Algorithm 1) can recover the true force law when some properties are unobserved.

Original: We use three scenes from the (noisy) NBODY dataset (with four entities per scene) in this evaluation, such that if the true masses are given, the M-step can successfully learn the true force law.
Revised: As the ﬁrst experiment, we use three scenes from the (noisy) NBODY dataset (with four entities per scene), such that if the true masses are given, the M-step can successfully learn the true force law.

Original: Next, we assume that the masses of the three light entities are unknown with a uniform prior U (0 .
Revised: Next, we assume that the masses of the three light entities are unknown with a uniform prior U (0 .

Original: 02 , 9) and the mass of the heavy entity is known.
Revised: 02 , 9) and the mass of the heavy entity is known.

Original: We use Algorithm 1 to ﬁt the same generative model that simulates the data using BSP.
Revised: We use Algorithm 1 to ﬁt the same generative model that simulates the data using BSP.

Original: Figure 6 shows the posterior distribution over mass and the force function at initialization (6a), middle (6b) and convergence (6c) of the algorithm.
Revised: ﬁgure 7 shows the posterior distribution over mass and the force function at initialization (ﬁgure 7a), middle (ﬁgure 7b) and convergence (ﬁgure 7c).

Original: In this run, after 5 iterations, ourthe algorithm successfully recovers the true force function.
Revised: In this run, after 3 iterations, our algorithm successfully recovers the true force function.

Original: We repeat this experiment ten times with randomly sampled scenes and for eight of them, BSP successfully recovers the true force law.
Revised: We repeat this experiment ten times with randomly sampled scenes and for eight of them, BSP successfully recovers the true force law.

Original: Note that because the intermediate learned force law F † is incorrect, the variance of the posterior  is larger than the one from the true force law (our Bayesian approach in Figure 6c).
Revised: Note that because the intermediate learned force law F † is incorrect, the variance of the posterior (in ﬁgure 7b) is larger than the one from the true force law (in ﬁgure 7c). Compared the expression at convergence in ﬁgure 8d with the true law, the algorithm replaces p i − p j with p i − c and a scaled constant. This is valid as the contact point is deﬁned as c = ( p i + p j ) / 2 when there is no contact.

Revised: For the second experiment, we use ﬁve scenes from the (noisy) MAT dataset.

Original: D ISCUSSION AND C ONCLUSION
Revised: We assume that the only unknown is the friction coefﬁcient of the mat with a truncated Gaussian prior T runcated ( N ( µ 0 , 2 2 ) , 0 , 5) (truncated between 0 and 5 ), where µ 0 is the true coefﬁcient, Note that the variance 2 2 is large enough to be uncertain, justifying a fair choice of the prior. Similarly, we use Algorithm 1 to ﬁt the same generative model that simulates the data using BSP. ﬁgure 8 shows the posterior distribution over mass and the force function at initialization (8a), middle (8b) and convergence (8c) of the algorithm.

Revised: Compared the expression at convergence with the true law, the algorithm learns v i − v j instead of v i as the mat velocity is zero, i.e. v j = 0 , in all scenes,

Revised:  D ISCUSSION AND C ONCLUSION

Original: We present BSP, the ﬁrst fully Bayesian approach to symbolic intuitive physics by combining symbolic learning of physical force laws and statistical learning of unobserved properties.
Revised: We present BSP, the ﬁrst fully Bayesian approach to symbolic intuitive physics by combining symbolic learning of physical force laws and statistical learning of unobserved properties.

Original: Our work paves the way for using learnable, data-efﬁcient IPEs in intuitive physics by providing a computational framework to study how humans’ iterative reasoning-learning is mentally performed. 
Revised: Our work paves the way for using learnable, data-efﬁcient IPEs in intuitive physics by providing a computational framework to study how humans’ iterative reasoning-learning is mentally performed. A C OMPLETE GENERATIVE PROCESS

Revised: Section 3 describes the top-down generative model piece by piece, to improve the clarity of the EM framework, we provide the complete generative process of the observation given force function F , which corresponds to the E-step in our method, as a probabilistic program in Algorithm 3.

Revised: In this probabilistic program, we use the keyword ASSUME and OBSERVE for sampling latent variables and observations separately, following the notations from Wood et al.

Original: A E XPERIMENTAL DETAILS A. H YPER - PARAMETERS FOR A LGORITHM
Revised: B E XPERIMENTAL DETAILS B. H YPER - PARAMETERS FOR A LGORITHM

Original: For the E-step, we use k = 3 and k (cid:48)
Revised: For the E-step, we use k = 3 and k (cid:48)

Original: = 2 and the hyper-parameters for NUTS are: 150 adaptation steps, 150 HMC iterations, a maximum tree depth of 4 and a target acceptance ratio of 0 .
Revised: = 2 and the hyper-parameters for NUTS are: 150 adaptation steps, 150 HMC iterations, a maximum tree depth of 4 and a target acceptance ratio of 0 .

Original: For the M-step, we repeat r = 2 runs and the hyper-parameters for the cross-entropy method are: 1 ,total populations, 500 selected populations, 4 iterations and a maximum depth of 8 .
Revised: For the M-step, we repeat r = 2 runs and the hyper-parameters for the cross-entropy method are: 1 ,total populations, 500 selected populations, 4 iterations and a maximum depth of 8 .

Original: The weighting parameter for the PCFG prior are 1 for the NBODY and BOUNCE datasets and 1 × 10 − 4 for the
Revised: The weighting parameter for the PCFG prior are 1 for the NBODY and BOUNCE datasets and 1 × 10 − 4 for the

Original: MAT dataset.
Revised: MAT dataset.

Original: A. G ROUND TRUTH FORCES
Revised: B. G ROUND TRUTH FORCES

Original: The symbolic tress of ground truth forces that are used to generated the datasets used in Sectionare given in Figure 7.
Revised: The symbolic tress of ground truth forces that are used to generated the datasets used in Sectionare given in ﬁgure 9.

Original: A. T RAINING SETUP OF OGN S
Revised: B. T RAINING SETUP OF OGN S

Original: For the OGN baseline, we use a multilayer perceptron (MLP) of d in → 50 → 50 where the activation function is the rectiﬁed linear unit (ReLU) for the node model and use a MLP of (50 + 50) → 50 → 50 → 50 → d out as the edge model.
Revised: For the OGN baseline, we use a multilayer perceptron (MLP) of d in → 50 → 50 where the activation function is the rectiﬁed linear unit (ReLU) for the node model and use a MLP of (50 + 50) → 50 → 50 → 50 → d out as the edge model.

Original: For training, we use the ADAM optimizer (Kingma & Ba, 2014) with a learning rate of 5 × 10 − 3 for a total number of 10,000 passes of scenes for the NBODY and MAT datasets and a total number of 20,000 passes of scenes for the BOUNCE dataset.
Revised: For training, we use the ADAM optimizer (Kingma & Ba, 2014) with a learning rate of 5 × 10 − 3 for a total number of 10,000 passes of scenes for the NBODY and MAT datasets and a total number of 20,000 passes of scenes for the BOUNCE dataset.

Original: For example, if 5 scenes are used, the total number of pass of the dataset would be 10000 / 5 , for the NBODY dataset.
Revised: For example, if 5 scenes are used, the total number of pass of the dataset would be 10000 / 5 , for the NBODY dataset.

Original: This makes sure that the training time for all experiments are ﬁxed.
Revised: This makes sure that the training time for all experiments are ﬁxed.

Original: In addition, we found that we need provide additional prior knowledge on how forces are related to the mass and acceleration by parameterzing them as F e ( · ) =
Revised: In addition, we found that we need provide additional prior knowledge on how forces are related to the mass and acceleration by parameterzing them as F e ( · ) =

Original: m a θ ( · ) , where θ is NN parameters, otherwise they fail to learn.
Revised: m a θ ( · ) , where θ is NN parameters, otherwise they fail to learn.

Original: This parameterization is fact consistent with (Sanchez-Gonzalez et al., 2019) in which NNs output partial derivatives of the Hamiltonian system. 
Revised: This parameterization is fact consistent with (Sanchez-Gonzalez et al., 2019) in which NNs output partial derivatives of the Hamiltonian system. C T HE LEARNED BOUNCE LAW

Original: Force
Revised: As mentioned in Section 4.1 and discussed in Section 4.2, the only case in which BSP fails to infer the true law (within 10 scenes) is of special interest for further inspection. A typical approximate law learned in Section 4.1 is shown in ﬁgure 10; see Section 4.2 for discussion on how this law differs from the true one. To highlight, there are basically two mismatches between the true law and the learned law. First, there is no projection operation that correctly calculates the effect of speed.

Revised: Second, the mass-based coefﬁcient is missing.

Revised: To assist inspection, we also provide some visualizations in ﬁgure 11 using initial conditions from the training set for inspection.

Revised: The corresponding animations can be found in the supplementary material.

Original:  BaseForce
Revised: Force BaseForce

Original: Constant c
Revised: Constant c

Original: Coeﬀ
Revised: Coeﬀ

Original: BaseCoeﬀ ÷ BaseCoeﬀ
Revised: BaseCoeﬀ ÷ BaseCoeﬀ

Original: KgSq m [Equation] × m
Revised: KgSq m 1 × m

Original: MeterSq
Revised: MeterSq

Original: Meter(cid:107)
Revised: Meter(cid:107)

Original: MeterVec (cid:107)p i − p
Revised: MeterVec (cid:107)p i − p

Original: j
Revised: j

Original: UnitlessVec normalize( RefInvVec )
Revised: UnitlessVec normalize( RefInvVec )

Original: MeterVec p i − p j (a) Gravitational force (depth 7); c 1 = 8 .
Revised: MeterVec p i − p j (a) Gravitational force (depth 7); c 1 = 8 .

Original: 17 × 

Revised: 17 ×

Original: Force
Revised: Force

Original: BaseForce
Revised: BaseForce

Original: Constant
Revised: Constant

Original: [Equation]
Revised: [Equation]

Original: Meter project( MeterSecVec ,
Revised: Meter project( MeterSecVec ,

Original: [Equation]
Revised: [Equation]

Original: normalize( RefInvVec )
Revised: normalize( RefInvVec )

Original: MeterVec p i − c
Revised: MeterVec p i − c

Original: UnitlessVec normalize( RefInvVec )
Revised: UnitlessVec normalize( RefInvVec )

Original: MeterVec p i − c
Revised: MeterVec p i − c

Original: Bool doesCollide( p i , s i , p j , s j )
Revised: Bool doesCollide( p i , s i , p j , s j )

Original: [Figure]
Revised: [Figure]

Original: Force
Revised: Force

Original: BaseForce
Revised: BaseForce

Original: Constant
Revised: Constant

Original: [Equation]
Revised: [Equation]

Original: µ
Revised: µ

Original: UnitlessVec normalize( RefInvVec )
Revised: UnitlessVec normalize( RefInvVec )

Original: MeterSecVec v i
Revised: MeterSecVec v i

Original: Bool isOn( p i , s i , p
Revised: Bool isOn( p i , s i , p

Original: [Equation] [Equation]
Revised: [Equation] [Equation]

Original: j )
Revised: j )

Original: [Figure]
Revised: [Figure]

Revised: [Figure]

Revised: [Figure]