A New Algorithm for Generating Situation-Specific Bayesian Networks Using Bayes-Ball Method La´ ecio L. Santos 1 , Rommel N. Carvalho 1,2 , Marcelo Ladeira 1 , and Li Weigang 1 1 Department of Computer Science, University of Bras´ ılia (UnB) Bras´ ılia, DF, Brazil laecio@gmail.com,{rommelnc,mladeira,weigang}@unb.br 2 Department of Research and Strategic Information, Brazilian Office of the Comptroller General (CGU), Bras´ ılia, DF, Brazil rommel.carvalho@cgu.gov.br Abstract. Multi-Entity Bayesian Network (MEBN) is an expressive first-order probabilistic logic that represents the domain using parameterized fragments of Bayesian networks. Probabilistic-OWL (PR-OWL) uses MEBN to add uncer- tainty support to OWL, the main language of the Semantic Web. The reason- ing in MEBN is made by the construction of a Situation-Specific Bayesian Net- work (SSBN), a minimal Bayesian network sufficient to compute the response to queries. A Bottom-Up algorithm has been proposed for generating SSBNs in MEBN. However, this approach presents scalability problems since the algorithm starts from all the query and evidence nodes, which can be a very large set in real domains. To address this problem, we present a new scalable algorithm for generating SSBNs based on the Bayes-Ball method, a well-known and efficient algorithm for discovering d-separated nodes of target sets in Bayesian networks. The novel SSBN algorithm used together with Resource Description Framework (RDF) databases and PR-OWL 2 RL, an amenable version of PR-OWL, allows reasoning with probabilistic ontologies containing large assertive bases, offering a scalable approach for the treatment of uncertainty in the Semantic Web. 1 Introduction Uncertainty can occur in a variety of forms in several types of domains, which en- couraged the proposition of various new formalisms. Bayesian networks are one of the probabilistic methodologies most widely studied and used when working with uncer- tainty due to their power of representation, and the well-known algorithms that make inference to them. Multi-Entity Bayesian Network (MEBN) [9] is an expressive first-order probabilis- tic logic that represents the domain using parameterized fragments of Bayesian net- works (BNs). MEBN is the base for the Probabilistic-OWL (PR-OWL) language [4]. PR-OWL adds uncertainty support to Web Ontology Language (OWL), the main lan- guage of the Semantic Web, allowing the construction of probabilistic ontologies. PR- OWL 2 [2] extends the original language allowing a better integration with the OWL semantics, where the modeler can define uncertainty starting with an existent OWL on- tology. PR-OWL 2 RL [13] maps PR-OWL 2 language to be represented in OWL 2