Live data from Hacker News

Scallop – A Language for Neurosymbolic Programming

scallop-lang.org

41–50 of 68 posts

Re: Scallop – A Language for Neurosymbolic Programming

#41
I love its logo (the color scheme, too).

By the way I wish there were more real-life examples, both basic and advanced to show what it may be especially useful for, maybe even compare it to other languages like Prolog. I expected the tutorial to have examples for what "neurosymbolic" means, because I am not entirely sure what it means in practice.

Re: Scallop – A Language for Neurosymbolic Programming

#43
Love to see this! I’m a huge fan of Neurosymbolic methods, but more advanced examples might be needed to help convince folks to adopt or try Scallop. The three on the page feel very toy. An example rooted in NLP or working with an LLM front and centered might help

Very pleasant branding though. Great work! :)

Re: Scallop – A Language for Neurosymbolic Programming

#44
How does Scallop scale on large knowledge bases (KBs) for doing probabilistic reasoning? I'm currently working on large KB with ~ 12M facts and trying to do probabilistic inference on it. So far I've been using [cplint](https://friguzzi.github.io/cplint/_build/html/index.html) which is based on SWI-Prolog. It works fine for toy examples, however, it doesn't finish running for the large KB - even after waiting for it for more than a week. Does know any Probabilistic Logic Programming (PLP) libraries that are fast and scale to large KBs? Preferably in Prolog ecosystem, but not a hard requirement.

Re: Scallop – A Language for Neurosymbolic Programming

#45

The problem with scallop is that no one has ever shown a single program that wasn't easier to write without it. Their papers usually contain also no examples, and the ones that do are a heck of a lot more complicated than asking the model to do it directly. The programming languages world let's them get away with this because they're excited to be relevant in the LLM universe. But I wouldn't accept any of this work i…

I think you misunderstand what a neuro-symbolic programming language (like Scallop) is for.

It's not about performance, but safety.

Making safe decisions becomes exponentially more important as ML / agents evolve, to avoid "performant" but ultimately inefficient/dangerous/wasteful inferences.

Re: Scallop – A Language for Neurosymbolic Programming

#46
post #2

Ever since I learned about category theory and its relationship with symbolic reasoning I've suspected that AGI will come from elegantly combining symbolic reasoning and probabilistic reasoning. This is the first project I've seen that seems to be positioned that way. Very cool.

http://forestdb.org is quite old and includes some toy examples that IMHO elegantly combine symbolic and probabilistic reasoning.

Re: Scallop – A Language for Neurosymbolic Programming

#47

Earlier quoted context omitted.

Yes, this seems to be what the symbolists always forget. We don’t use symbolism like this, we just have very dense neural connections that emerge from scale and approximate it

So if inventing the airplane how long should one stick with a flapping bird wing design?

That is not a good analogy. Symbolism has given us lots of useful things, including SAT/SMT and theorem provers.

Re: Scallop – A Language for Neurosymbolic Programming

#48

Earlier quoted context omitted.

It's a combination of neural networks and symbolic reasoning. You can use a neurosymbolic approach by combining deep learning and logical reasoning: A neural network (PyTorch) detects objects and actions in the image, recognizing "Jim" and "eating a burger" with a confidence score. A symbolic reasoning system (Scallop) takes this detection along with past data (e.g., "Jim ate burgers 5 times last month") and applies…

Is the reasoning strictly downstream of the image recognition? Or can prior knowledge impact how objects are recognized? E.g. I'm driving on the road at night so the two incoming lights are probably a car.

In your specific example, time of day, weather (foggy, sunny, over-cast) along with images of cars with different colors, models, makes, from different angles will all be training parameters to begin with so the neural net can do this on its own without needing specific symbolic processing apriori or downstream. Training data input into neural nets is usually sanitized and transformed to some extent but whether this sanitization / preprocessing requires symbolic programming depends on the use case. For example, with the car example, you preprocess car images to color them differently, hide random sections of it, clip it in different ways so only partial sections are showing, turn them upside down, introduce fake fog, darken, lighten, add people, signs, fire, etc and use each of these images for training so that the neural net can recognize cars under different situations (even after accidents where they are upside down and on fire). Eventually the neural net will recognize a car in most circumstances without symbolic programming/intervention.

So when would you use symbolic programming? To generate quality data for the neural network. For example, maybe the neural net reports it read the speed limit to be 1000 km/h on a sign because of someone's shenanigans. A symbolic programming aid which knows potential legal limits will flag this data as potentially corrupt and pass it back to the network as such allowing the neural network to take more sensible decisions.

Re: Scallop – A Language for Neurosymbolic Programming

#49
post #47

Earlier quoted context omitted.

So if inventing the airplane how long should one stick with a flapping bird wing design?

That is not a good analogy. Symbolism has given us lots of useful things, including SAT/SMT and theorem provers.

The point is that while biology has been a great source of inspiration toward technical advances it’s only a guide, it can’t guarantee there isn’t a better way.

Re: Scallop – A Language for Neurosymbolic Programming

#50

I wish this website explained what neurosymbolic means.

It's a combination of neural networks and symbolic reasoning. You can use a neurosymbolic approach by combining deep learning and logical reasoning: A neural network (PyTorch) detects objects and actions in the image, recognizing "Jim" and "eating a burger" with a confidence score. A symbolic reasoning system (Scallop) takes this detection along with past data (e.g., "Jim ate burgers 5 times last month") and applies…

Is this really all they different from writing some functions in any language that use a neural net to make these predictions?

Why is this a language and not just some say, Java/Rust library?

It's interesting but doesnt seem like fundamentally anything new.

Post reply on HN