Quantum Bayesian Networks

November 30, 2020

My Free Open Source Book “Bayesuvius” on Bayesian Networks and Causal Inference

Filed under: Uncategorized — rrtucci @ 3:08 pm

“Bayesuvius” by rrtucci (390 pages) https://github.com/rrtucci/Bayesuvius/raw/master/main.pdf

See also “Famous uses of Bayesian Networks

June 27, 2020

My Pinned Tweet at Twitter

Filed under: Uncategorized — rrtucci @ 9:28 pm

This is the pinned Tweet on my company’s (www.ar-tiste.xyz) Twitter account

June 8, 2021

Uplift Modeling for Trains

Filed under: Uncategorized — rrtucci @ 10:34 am

One of our company’s specialties is doing uplift modeling. Check us out http://www.ar-tiste.www

June 4, 2021

Causal Inference is secret sauce in UberEats

Filed under: Uncategorized — rrtucci @ 3:12 am

Uber was founded in 2008 and its subsidiary UberEats in 2014. They are almost as ubiquitous as God. According to Wikipedia:

Uber…has operations in over 900 metropolitan areas worldwide.

…in 69 countries

Uber is estimated to have over 93 million monthly active users worldwide.[6] In the United States, Uber has a 71% market share for ride-sharing[7] and a 22% market share for food delivery.[8]

Wikipedia also details how, in its 12 years of life, Uber has been uber controversial and widely mocked and criticized. Add to that the fact that they have never made a profit. Plenty of revenue but no profit. Yet since Uber IPO’ed in May 2019, its stock has held pretty well.

Not only does UberEats deliver mouth watering foodie fare; it also delivers MacDonald’s buggers with french fries and Coke. One suspects UberEats’s profit margins must be razor thin or negative. And now that the pandemic is ebbing in the USA, UberEats’s USA business could decline precipitously. So how do they do it? I leave that sort of speculation to others.


Is this DAG, taken from https://jungleworks.com/cost-to-make-app-like-ubereats/ correct or not? You be the judge.

What I find most interesting about Uber is that they have a top notch AI team. This is not too surprising since only extremely talented software engineers could execute successfully the mammoth, complex, logistics calculations that lie beneath the Uber and UberEats mobile apps.

But not only is Uber’s software engineering impressive for its mobile apps. The AI expertise that they developed in the pursuit of autonomous cars is equally impressive. That pursuit was abandoned on Dec 2020, but it bore some delicious fruit for Bayesian Networks and Causal Inference aficionados like me. Uber is the original author of  Pyro, an open source probabilistic adjuct to Pytorch. Pyro is still going strong at GitHub.

And today I learned that the Uber AI team has an impressive Causal Inference (CI) program too. I was vaguely aware that Uber had written an Uplift Modeling tool called CausalML, so I decided to search the web to investigate how extensive Uber’s involvement in CI is. I was pleasantly surprised to find that they have a very mature and sophisticated CI program. Here is a search of Uber’s blog for all articles with the word “causal” in them. Cool. Check it out.

In a previous blog post, I extolled about the virtues of Netflix’s CI program. But now that I realize the extent and sophistication of Uber’s CI program, I have to say that NetFlix’s CI program looks puny, tentative and narrowly focused by comparison. I think both Netflix and Uber are ideal test beds for CI, because they can make many “do” experiments in quick succession, and because they both handle HUGE amounts of data.

May 29, 2021

Xtreme Bayesian Networks for XGBoost, DOUBLE BAM

Filed under: Uncategorized — rrtucci @ 7:15 pm

Bayesian Network for XGBoost with 3 trees

I just finished a new chapter entitled “XGBoost” for my free, open source book “Bayesuvius” (390 pgs) about Bayesian Networks and Causal Inference. In case you don’t know,  XGBoost (Chen, Guestrin, 2016) is an algorithm for doing decision tree boosting that is optimized to handle very large data sets. An implementation of the XGBoost algorithm is available as open source. It is written in C++ with Python and R interfaces.

In writing this chapter on XGBoost, I benefited greatly from StatQuest’s 4 videos XGBoost Parts 1, 2, 3, 4. I think they are excellent and I highly recommend them to anyone interested in learning about XGBoost. Their author Josh Starmer is an excellent teacher, so his dumb jokes and his donkey-braying singing can be forgiven 🙂 DOUBLE BAM. 

Even though Bayesuvius is a book about Bayesian Networks (bnets), not about decision trees (dtrees), it now contains several dtree chapters. It has chapters entitled:

  1. Decision Trees,
  2. Random Forest and Bagging,
  3. AdaBoost,
  4. XGBoost
  5. Uplift Modeling (UM) (UM does not require dtrees but most UM implementations that I’ve seen use dtrees.)

There are several compelling reasons why I decided to include dtrees in Bayesuvius. 

  1. bnets and dtrees are closely related: As I show in the Bayesuvius chapter entitled “Decision Trees”, a dtree can be easily converted into a bnet with the same graph structure. So bnets and dtrees are very closely related. I am hoping to achieve in the future more cross fertilization between dtrees and bnets. For example, can XGBoost ideas be applied to bnets? Can the noniterpretable XGBoost output be recast as an interpretable partial bnet? (I say “partial” because XGBoost has a dataset as input, and it is well known that a dataset alone does not fully specify a causal model such as a bnet.)
  2. All roads lead to Bayesian Networks Rome: Most algorithms used to construct and apply dtrees can be visualized by means of a bnet. For instance, see the above picture, taken from Bayesuvius, for the XGBoost algorithm. Bayesian Networks are causal diagrams (computer programming flow charts are too). Causal diagrams are very intuitive to humans because they mimic closely how the human brain functions
  3.  UM is a subset of  Causal Inference. UM implementations often use dtrees.  I am looking for a job doing UM or some other type of Causal Inference. There is no doubt in my mind that Judea Pearl’s Causal Inference has a vast untapped potential, and will play a very prominent role in the near future of commercial and academic AI.

TALA, an inspiring Silicon Valley startup that applies Causal Inference to business

Filed under: Uncategorized — rrtucci @ 3:15 am


This picture by Steve Evans comes directly from the Wikipedia entry for “Tala”. The Wikipedia caption for this figure is “Tala refers to musical meter in classical Indian music. Above: a musician using small cymbals to set the tala.”

Recently, I mentioned to my kind friend Pahal Patangia that I am actively looking for a job doing Causal Inference, and he alerted me to the existence of a wonderful Silicon Valley startup called TALA.

  • TALA homepage
  • TALA doesn’t have a Wikipedia page, but here is their Crunchbase page. According to that page, TALA was founded on Oct 1, 2011. They have 500-1000 employees and their total amount of funding so far is $204M. Here is how they describe themselves:

    Tala is a mobile technology and data science company that is oriented around financial services in emerging markets. More than 2 million people have borrowed through Tala’s smartphone app, which provides instant credit scoring, lending, and other personalized financial services in emerging markets.

TALA uses Uplift Modeling (UM) extensively in its business. UM is a very cool application of Causal Inference to business. Pahal sent me a link to an excellent Medium article with accompanying Python code, in which a TALA data scientist (Steve Klosterman) explains how TALA uses UM. To implement UM, they use XGBoost. XGBoost (Chen, Guestrin, 2016) is an algorithm for doing decision tree boosting that is optimized to handle very large data sets. XGBoost is implemented as open source. It’s written in C++ with Python and R interfaces.  Shameless self-promotion: My free open source book “Bayesuvius” on Bayesian Networks and Causal Inference (390 pages) contains chapters on “Uplift Modeling”, “XGBoost”, and much, much more.

Here is the link to the TALA article. Remember, Medium articles can always be read for free if you open them in an incognito tab, or by creating a Tweet with the link and opening it from there.


May 26, 2021

SCAM Alert: Bessemer Ventures funding Canadian Theranos

Filed under: Uncategorized — rrtucci @ 2:22 pm


Today, the Wall Street Journal is reporting that BessemerVP (Bessemer Venture Partners) has signed up as lead investor in a $100M Series B funding round for a Canadian startup based in Toronto called XanaduAI. Omers Ventures was the lead investor in the previous funding round. I have been warning daily on Twitter for at least six months that XanaduAI is almost certainly another Theranos. Hence, BessemerVP managers cannot plead ignorance to  BessemerVP’s  limited partners when XanaduAI fails, which I believe is a near certainty. Please tell us your opinion about this on Reddit.

May 15, 2021

Pink Panther misinterprets cause and effect

Filed under: Uncategorized — rrtucci @ 11:53 am

May 9, 2021

Right-brain for DAG modeling/Left-brain for curve fitting

Filed under: Uncategorized — rrtucci @ 10:09 pm

Should Artificial Intelligence strive to understand and to emulate the well established fact that the human brain is divided into two halves that analyze observations very differently? I think so.

In two previous blog posts,

I stressed the separation that is fundamental in Judea Pearl’s Causal Inference, between DAG models and datasets. This separation seems to match the separation of the human brain into two halves which have very different approaches to analyzing observations. The right-brain excels at understanding causal patterns. The left-brain excels at performing  curve-fitting calculations, and pattern recognition, but, unlike the right-brain, it cannot fathom analogies, generalizations, and the big picture. Artificial Neural Networks are quintessential curve-fitters so they appear to simulate only left-brain functions. Below is a fascinating cartoon video based on a lecture by Iain McGilChrist entitled “The Divided Brain & the making of the Western World”. 

April 30, 2021

Famous Business/Economics Guru, Clayton Christensen, big fan of Causal Inference

Filed under: Uncategorized — rrtucci @ 8:03 am

Yesterday, Prof. Judea Pearl shared on Twitter the following quote by a guy named Clayton Christensen (CC). I had never heard of him before.


This quote made me curious to find out who CC was. I say “was” because, sadly,  I soon found out that CC passed away on Jan 2020 of cancer. From reading the Wikipedia article about him, and an obituary for him, I found out that CC was a  very influential, well respected, likable businessman, consultant, author of about 10 books,  Harvard Business School Professor and Mormon religious leader. He was widely admired, and his advice was much sought after, by famous businessmen such as Apple’s Steve Jobs, Amazon’s Jeff Bezos, Netflix’s Reed Hastings and Intel’s Andy Grove. He is famous for his economics theory of “Disruptive Innovation” which he first described in his book “The Innovators Dilemma”. I was curious to hear what he sounded like in person, so I looked for videos of him. I found this 1  hour video on YouTube in which he explains his theory of disruptive innovation.  I found that video so interesting that I ended up watching the whole thing, although my initial intention was to watch just a few minutes of it.

April 29, 2021

Goodness of Causal Fit (the movie)

Filed under: Uncategorized — rrtucci @ 4:56 pm

Not all DAGs are causally correct. Some DAGs seem more causally correct than others. This begs the  question, can one score the causal quality of a DAG?

In a previous blog post, I fantasized about a measure of Goodness of Causal Fit, and how it could cure cancer and avert a climate change catastrophe. Since then, I invented my own such measure, and decided to write a short paper about it. Here it is. 


(now available at arxiv)

Comments/criticism are welcomed. Such a measure is of course not unique, and others will no doubt come up with a better alternative.


Fitness Is Good 🙂

This is a photo of Johanna Quaas (b. 20 November 1925, Germany), oldest active gymnast in the world, according to Guinness Book of World Records



April 25, 2021

Transformer Networks used in NLP can be represented graphically as Dynamic Bayesian Networks

Filed under: Uncategorized — rrtucci @ 4:00 am


I just finished a new chapter entitled “Transformer Networks” for my free, open source book “Bayesuvius” about Bayesian Networks. (The new chapter is number 55 out of 60 chapters, page 324 out of 360 pages,  but that may change if I add new chapters.)

The goal of this new chapter is to show that Transformer Networks (TNs) can be represented graphically (and very intuitively and precisely, might I add) as a dynamic  Bayesian Network (bnet). The figure at the beginning of this article shows the dynamic bnet that I found, for a 3 word sentence.

So why is it useful to represent TNs as dynamic bnets? Because algorithms become very intuitive when expressed as causal diagrams. Furthermore, a bnet for an algorithm suggests possible ways of modifying and improving  the algorithm. I think this is especially true for the TN algorithm, which is ad-hoc (it doesn’t come from a minimization principle). Ad-hoc solutions to problems are sometimes sub-optimal and can be improved.

TNs have been taking the field of Natural Language Processing (NLP) by storm in recent years. They were introduced in 2017 and already are the basis of BERT (written by DeepMind, a Google Alphabet company) and GPT (written by OpenAI, competitor of DeepMind, funded by Elon Musk and Microsoft, among others). These two TN libraries have been trained with huge databases such as all of English Wikipedia (2,500M words).

TNs are quickly displacing Recurrent Neural Nets (RNNs), an older method, in NLP.  TNs are better than RNNs for doing NLP in several important ways. Whereas RNNs analyze the tokens (words) of a sentence sequentially (like a Kalman Filter), TNs analyze them in parallel, and thus are more amenable to parallel computing. Also, because RNNs analyze the words of a sentence sequentially, they tend to give more importance to the end of a sentence than to its beginning. That’s because RNNs start forgetting the beginning of a sentence by the time they reach its end, like a patient with Alzheimer’s. TNs do not suffer from this malady.

April 22, 2021

NetFlix Bullish about Causal Inference

Filed under: Uncategorized — rrtucci @ 11:23 am
netflix One can find several recent blog posts tagged “Causal Inference” in the Netflix corporate blog. I find this one in particular to be very revealing about the depth and width of their involvement and knowledge about Causal AI:
Computational Causal Inference at Netflix
They even have a white paper in arxiv detailing their achievements to date and  plans/hopes for the future.

April 20, 2021

Goodness of Causal Fit

Filed under: Uncategorized — rrtucci @ 11:04 pm

I recently asked the following question to Prof. Judea Pearl on Twitter: ‘What would be a good metric for “Goodness of Causal Fit”?’. I hope he or someone else can come up with a precisely defined metric. IMHO, this is a really important question to answer for the field of causal Inference to advance. Wouldn’t it be great if a big company or philanthropist would put a small monetary bounty on this question? The answer is not unique, but one could award the bounty to the best answer submitted. Besides answering this important question, such a contest would help to publicize the importance of Causal AI.

April 19, 2021

Academics awarding a prize to themselves

Filed under: Uncategorized — rrtucci @ 3:20 pm

Successful quantum computing academics have the same value system and ethical standards, as a North Korean general.


April 17, 2021

Bayesian Networks are angels second only to God

Filed under: Uncategorized — rrtucci @ 4:58 am

Recently, Prof. Judea Pearl stated on Twitter that Bayesian Networks (bnets) apply ONLY to the first 2 rungs of his CI (Causal Inference) Ladder. He stated that for his third rung, which is the only one that deals with counterfactual reasoning, bnets are insufficient and SCM (pronounced SCuM, hehe) are required. Structural Causal Models (SCM) are basically a bnet whose internal (i.e, non-root) nodes are deterministic and external (i.e., root) nodes are probabilistic. Even though I have the utmost respect Prof. Pearl, I disagree with this. I think all 3 rungs can be done with bnets.

One powerful reason why I believe in a bnet-third-rung (BTR, pronounced “better”) is because of Quantum Mechanics (QM). I believe that all 3 rungs of CI carry over, lock, stock and barrel, from classical physics to QM. (Here is my latest paper about this). Causality is far from being a classical-only phenomenon, and as Feynman famously said, “NATURE IS QUANTUM, dammit!”. Sure, you can have deterministic nodes in QM, but they are just a limiting case. QM abhors deterministic nodes, and tries to make them stochastic with every chance it gets. You give QM a third rung with deterministic nodes, and it will try really hard to turn those nodes stochastic. Unless there is some cosmic censorship rule preventing this, and in this case there isn’t.

A second reason why I believe in BTR is that, in my book Bayesuvius, in the chapter entitled “Potential Outcomes” (PO), I cover all of Rubin’s PO theory using bnets, not SCM, and PO uses counterfactuals galore. Anyhow, here is a Twitter thread where I explain BTR to Prof. Pearl.

April 7, 2021

Show Animation in PDF Latex

Filed under: Uncategorized — rrtucci @ 5:05 am

While writing my free open source book Bayesuvius, I have occasionally wanted to include one of the marvelous animated gifs that I have found in some Wikipedia articles. A very old Stackoverflow comment had led me to believe that this was not possible. But today I found a cool blogpost by someone called Binxu Wang, showing how to do it. I also found a website that converts a webpage to pdf. So I decided to try it out with Binxu’s blog post. Here is the result


Addendum: I found out that my Ubuntu system already contains convert so there is no  need to install imagemagick. Just do the following in the command line

convert -coalesce animated_gif.gif final_name.png

This will produce a bunch of files named “final_name-%d.png”, where %d is an integer.
Unfortunately, the animation doesn’t work when viewed in pdf format with the Chrome browser, but it does work when viewed with Adobe Acrobat.

Next Page »

Blog at WordPress.com.

%d bloggers like this: