- Home
- The Pulse
- The Pulse: Articles
- Thinking Outside The Black Box: Explainable Ai For Housing Policy Decisions
Thinking outside the black box: Explainable AI for housing policy decisions
Artificial intelligence and machine learning are often presented as ideal solutions. After all, they are built to turn mountains of data into accurate predictions, the kind that can shape key decisions on budgets, taxation and resource allocation. However, many AI models operate as "black boxes," producing results that are difficult to explain or challenge. In democratic contexts, where public trust and accountability are essential, this lack of transparency can limit their usefulness in shaping housing policy.
Manuel Leonelli of IE University believes Bayesian networks may offer a more compelling solution. Together with his student Álvaro García Murga, he analyzed 180,000 Spanish property listings using these probabilistic models, first developed in the 1980s. While Bayesian networks may not be as glamorous as more modern technologies, Leonelli believes they could be better suited to the inherent chaos of the housing market.
Unlike many contemporary AI systems, Bayesian networks are designed to make relationships between variables visible. They do not simply produce a price estimate. They map how different factors interact and influence one another. As Lionelli explains, “They provide a platform from which we can use data to understand the dynamics of the problem that we're trying to tackle.”
By combining analytical rigor with interpretability, Bayesian networks create space for more informed public debate. In doing so, they support a form of housing planning that is not only data-driven, but also transparent and democratic.
The holes beneath the surface of AI analysis
Of all Europe’s political riddles, housing is one of the most pressing. Some agencies estimate that more than 1.2 million people are currently sleeping rough across the continent, while house prices have surged by over 60% in the past 10 years. However, the same factors that have caused this crisis, including migration, economic fluctuation and shifting attitudes to accommodation, make it extremely difficult to decrypt.
How can we predict, for example, when the next tide of refugees will arrive? Or which will be the next ‘must-visit city’ where locals are squeezed out by tourists? Or how the current trends of co-living and digital nomad lifestyles (a major factor in sun-drenched southern Europe) will play out in the long term?
In their search for answers, researchers have tried a number of approaches based on AI and machine learning. These include decision trees, which learn a series of if–then rules from past data to guide future predictions, and random forests, which essentially expand on decision trees by finding the rules that apply most frequently across a number of trees.
These methods have several distinct advantages. They can pool large amounts of loosely related data points, both macro (like the state of the economy) and micro (like the number of bedrooms in a property), into realistic predictions. They allow for realistic scenario testing, they’re infinitely scalable and they allow for impartial analysis free of human bias.
However, there are holes below the surface. For one thing, contrary to popular belief, not all AI and machine learning models are programmed to continue learning: sometimes they are simply trained on historical data without any plan for further evolution. This poses an obvious challenge in the real estate market, which has many moving parts that are constantly evolving.
Then there are the deeper, structural issues. On one hand, machine learning models can struggle to absorb data beyond their own narrow confines, factoring out rogue events or occurrences because they disrupt the general pattern. On the other hand, machine learning can struggle when variables carry the same information (for example, if a house’s dimensions are measured in both yards and feet); in this situation, the model may struggle to determine which is more useful and jump between them arbitrarily, undermining the entire dataset.
The need for transparency in decision-making
Perhaps the biggest single drawback of AI and machine learning is its labyrinthine complexity, or what critics call 'the black box problem.'
Like an airplane’s black box, the inner workings of most models are impenetrable to anyone apart from their creators. This has led to a backlash in certain areas of adoption. In the health community, where machine learning algorithms are used extensively, some data scientists have even suggested that algorithms could be tainted by racial bias. And while ‘AI explainer’ tools like SHAP and LIME have gained popularity in recent years, they aren’t always able to translate complex algorithmic logic accurately.
In the real estate market, the protests against decisions rooted in black boxes could be incendiary. Spain and Germany, for example, have witnessed numerous protests against high taxation and soaring rental prices. What would happen if decision-makers simply referred people to a faceless algorithm built not by elected lawmakers but anonymous code builders? Housing decisions affect everyone, so they must be intelligible to anyone.
"It’s not just about obtaining insights, it’s also about defending them," Leonelli says. "This is particularly true in housing, where there are so many people and groups at stake. They need a platform that all players can understand."
"How could the government say, ‘OK, we’re implementing this policy because an AI model told us to and we have no idea why’? That’s not fair or sustainable, and it raises critical concerns. These are high-stakes decisions, and models need to be not just accurate but actionable, interpretable and conducive to good urban governance."
Information accessible to anyone
Bayesian networks, by contrast, reflect how real people reason about the world. They allow us to make predictions under uncertainty using cause-and-effect reasoning, and continually update our beliefs as new information crosses our path. And while they can be created with AI, Bayesian networks are often built the old-fashioned way: by mathematicians like Leonelli crunching the numbers.
At their simplest, Bayesian networks outline each of the relevant variables as nodes on a flowchart-style graph, with arrows (known as directed edges) between the nodes to indicate the direction of influence between them, creating what’s called a ‘parent-child’ relationship.
These graphs allow us to do two things. Firstly, we can calculate the probability of a variable (such as house prices or housing demand), given the values of its parents (such as employment rates, income levels or demographics). Secondly, we can analyze how each of the variables interact with one another and gauge their relative importance. As new evidence becomes available, the network updates the probabilities of each variable, which in turn affects the others.
"These models are transparent and easy to interpret," Leonelli says. By creating a simple, visual graph, they allow users to see at a glance how variables are connected. The obvious benefit is that you don’t need to understand complex mathematical calculations or advanced technological programming in order to grasp the analysis and predictions produced.
More than answers: understanding
In Leonelli’s study, he and his student analyzed house prices against three key variables: structural (the layout and facilities of the property), spatial (the nearby amenities) and typological (the type of property). By comparing each of these factors against the final property prices, they could work out which factors were most important: in Madrid, for example, the spatial variable was most important, while layout and facilities were more important in Barcelona.
The network built by Leonelli has its limitations. It focuses only on the ‘core elements’ of housing: where it is, what it has and what’s nearby. IT doesn’t incorporate more tangential or subjective factors, like the popularity of a particular area. What’s more, the data comes from a single year, 2018, and so it provides a one-time snapshot that may no longer be relevant today.
Leonelli points out that his model is aimed at gaining insights rather than merely predicting trends. If you simply want to know how much a specific property is going to be worth or how much an area is likely to go up in value, AI will give you a quicker answer. “But Bayesian models give you something deeper: they give you understanding. Once you have a better understanding, you may be able to make better predictions. That’s what matters here. It’s the context we have about the data.”
A universal and transparent system
Crucially, the essential simplicity of Bayesian networks also makes them universally applicable.
As Leonelli and his student have shown, the factors that influence people’s property preferences will differ sharply from one city to the next. And in all likelihood, they will also differ across time: economic headwinds, labor laws and government legislation are just some of the factors that will reframe what people look for in their homes and apartments. Bayesian networks have the advantage of being applicable anywhere, regardless of differences across time and place.
"In our study, we wanted to understand the dynamics of the specific cities we covered," Leonelli says. "But we also wanted to demonstrate that we could use this model to understand price dynamics at a more universal level."
In his opinion, their research succeeded in this goal. "We maximized our available resources and came up with clear conclusions supported by the data. We showed that if we have the data available, we could do this in Mallorca, we could do this in Málaga, we could do this in any city or region."
By combining universal interpretability with analytical rigor, Bayesian networks offer a transparent approach that can support democratic, evidence-based decision-making for urban planning.