Viewing a single comment thread. View all comments

Zondartul t1_ivju0j9 wrote

Can it do symbolic logic? How does it compare to SymPy?

5

gahaalt OP t1_ivjw8lx wrote

No, it has a different purpose than SymPy. As I understand SymPy is a library mainly for manipulating symbolic mathematical expressions.

Pytorch Symbolic uses symbolic variables to record (capture) the operations and later to replay them on arbitrary data. Under the hood, there's a graph with symbolic variables as nodes and transformations (e.g. layers) as edges.

Pytorch Symbolic can capture and replay arbitrary Python operations, but cannot display them in such neat notation as SymPy does.

6

Mefaso t1_ivn7lv2 wrote

The name is pretty confusing because symbolic already has two meanings in ML:

Symbolic computation, as in sympy, and symbolic AI, as in whatever Gary Marcus likes

This library does neither of the two

3

gahaalt OP t1_ivns08k wrote

Thanks for the opinion. Please look at the article: "What are Symbolic and Imperative APIs in TensorFlow 2.0?" by Josh Gordon linked here. It seems natural to him to describe this API as "Symbolic".

Basically if you google "Symbolic API" it seems to be commonly used to describe this very thing.

Also, a similar nomenclature is used in mxnet.

4

Mefaso t1_ivo2bk2 wrote

Interesting, i didn't know about that. Thanks for sharing the link!

2

metatron7471 t1_iwayuma wrote

The opposite of imperative isn't symbolic but declarative. The name symbolic is very confusing because I also tought it was about (neuro-)symbolic models.

1