Monthly Archives: June 2026

The ghost in the machine: Why do we need to peek inside AI’s black box?

By Mark Anthony Camilleri | 1st June 2026

A quiet revolution is taking place in a world that is increasingly run by algorithms. You might not see it, but Artificial intelligence (AI) is becoming deeply embedded in our society and is almost influencing every aspect of our life.

For example, the landing pages and main screens of your social media platforms and apps like Netflix, Spotify and YouTube aren’t just static lists of popular content.Their algorithms analyse your past viewing activity and browsing history, how many seconds you paused on specific thumbnails, what time of day you were active and what people with similar preferences liked and appreciated, et cetera. Their apps construct an entirely personalised media feed just for you.

When you shop on Amazon or look for airline tickets, the price you see can change from hour to hour. Algorithms monitor your browsing history, your device type and how many times you’ve viewed an item. They also follow competitor pricing to dynamically adjust prices in order to maximise the likelihood of a sale at the highest possible margin.

AI systems often evaluate the online resumes of job candidates before a human recruiter ever sees them. These systems scan specific keywords, educational background and work experience, among other aspects, to determine whether a candidate matches the requirements of a job posting. While this technology helps employers process large numbers of applications in an efficient manner, it can also unfairly filter out qualified candidates whose resumes fail to meet strict algorithmic criteria. As a result, applicants may be rejected not because they lack the necessary skills, but because their resumes do not align with what the system has been trained to recognise.

These examples raise an important question: How do these systems actually make their decisions? In many cases, even the engineers and data scientists who design such algorithms cannot fully explain why an AI system approves one person while rejecting another.

The danger of the unknown

Whilst early computer programmes were predictable, as they followed strict “if-then” rules written by humans, modern AI uses “machine learning”. AI developers train computers by using millions of data points. This enables the systems to identify patterns and to learn from the provided information on their own. Although this is incredibly powerful, these systems often operate in ways that are difficult to understand or explain.

In recent years, we have seen AI systems show clear biases. Some models have been found to be less accurate when identifying the faces of people of colour or more likely to deny loans to women, simply because the historical data they were trained on contained human prejudices.

This often happens because of what experts call a “distribution shift”. Imagine training an AI system to recognise umbrellas only by showing it images of people using them during rainy, winter days in London. If the same system were used in Malta, the AI could become confused. In Malta, umbrellas are more commonly seen on sunny beaches during the summer months. This clearly differs from the data the system was originally trained on.

When real-world conditions do not match the system’s training environment, the AI may produce inaccurate results or false assumptions. Experts refer to these errors as “hallucinations” or erroneous outputs, where the system makes incorrect predictions as it encounters situations it was not properly trained to understand.

Opening the black box

This is where Explainable AI (XAI) comes in. XAI is a field of AI focused on making machine learning systems more transparent, understandable and accountable. XAI is a set of tools and principles designed to strip away the mystery. Instead of just giving an answer, an XAI system shows its modus operandi. It moves us away from “black box” models toward transparent “glass box” models.

Researchers are now using clever tools to do this. One popular method is called SHapley Additive exPlanations (SHAP). In plain words, it borrows a concept from game theory to figure out which specific piece of information “scored the goal” for a decision. If an AI denies a loan, SHAP can tell the bank manager exactly how much weight was given to the applicant’s income rather than to their home address. Another tool, called Local Interpretable Model-agnostic Explanations (LIME), works by testing the AI with small changes to see how the result flips. This technique is helping us understand the logic behind a single specific prediction.

Why transparency is the new safety

Raising awareness about XAI isn’t just for tech geeks; it’s for everyone. Transparency is the foundation of trust. If doctors use an AI to help diagnose a patient, they shouldn’t just follow the computer blindly. They need to see why the AI reached its conclusion so they can use their own medical expertise to verify it. This approach is commonly known as the “Human-in-the-Loop” (HITL) framework, based on the principle that AI systems should assist human decision-making instead of fully replacing human judgment.

Furthermore, accountability is a major factor. For instance, if a self-driving car causes an accident, or an automated hiring system discriminates against a job seeker, who is responsible? Without XAI, companies can hide behind the excuse of “the computer did it”. With XAI, we can hold developers accountable for the logic inside their machines.

Regulators are increasingly acknowledging the risks associated with opaque AI systems. New laws are being discussed globally. Their aim is to give citizens the “right to an explanation”. This means that if an algorithm makes a decision that affects your life, you have a legal right to know why.

AI developers are increasingly moving toward a “responsible implementation” framework. This involves continuously monitoring for “model drift” to ensure that AI systems do not become outdated, inaccurate or biased as real-world conditions change.

Another important development in XAI is the use of “counterfactual explanations.” These explanations help users understand how different factors could have influenced an AI-driven decision. For example, an AI system might explain the rationale behind its decision to deny a loan application. By providing clear and understandable feedback, counterfactual explanations make AI systems appear less like supportive tools that users can understand and learn from.

The bottom line

AI  has the potential to address some of the world’s most significant challenges, from improving healthcare to helping manage climate change. However, for AI to truly benefit society, its decisions cannot remain hidden behind a “black box”. Machine learning systems must be transparent, fair and accountable!


Prof. Mark Anthony Camilleri has extensively researched and published on the intersection of Explainable AI (XAI), sustainable business practices and the future of digital transformation. His publications can be accessed through ResearchGate, Academia.edu and SSRN.

Leave a comment

Filed under AI, artificial intelligence, ethics, Explainable AI