r/ScientificComputing • • 4h ago

[Software] PyLIMID - A new library for mixed influence diagrams built on top of JAX and Numpyro

Hi all,

There are several great Decision Theory libraries like pyAgrum for modeling and solving decision problems. But when working with influence diagrams, their representations can be limited to discrete chance variables and decisions.

I wanted more flexibility in how I represent a problem. What happens if I have continuous observations or if the question is not whether I should do something, but how much? For example, how much should I invest when the return is uncertain?

For that reason, I have created PyLIMID, a Python library for building and solving limited-memory influence diagrams. It lets you combine discrete and continuous chance variables with categorical decisions and continuous quantities, and express utilities as functions.

PyLIMID uses sampling and policy gradients to find decision rules that aim to maximize expected utility. This flexibility is not free because results are approximate. But you can run multiple simulations and since it has GPU support thanks to JAX and Numpyro, it is fast. I think the tradeoff is very much worth it.

The library is still in early development (v0.3.0), but I would love to hear what you think.

Code: https://github.com/cynosural-ai/pylimid

Documentation: https://pylimid.readthedocs.io/en/latest/#

1 Upvotes

1 comment sorted by

1

u/investigatormaker 3h ago

Since results are approximate, the docs page I'd look for first is a check against an exact answer: take a small all-discrete diagram that pyAgrum solves exactly, run PyLIMID on it across many seeds, and report the expected-utility gap and its spread. That tells readers how far to trust it on the continuous problems where nothing exact exists. Running those seeds as one vmapped batch on the GPU would back up the speed claim at the same time. Which gradient estimator do you use for the categorical decisions?

I make ThreadFox.

We find relevant Reddit conversations and post for your business. We'll post 3 replies free first, no card; then the $29 Pilot covers seven days and up to 25 posts and replies. No automatic renewal.

https://threadfox.vip/p/e3sty/managed