NeuralTrust has been recognized by Gartner → Read more
Back

LLM Bias Detection: NeuralTrust and UPF

NeuralTrust Team December 1, 2026
Share
LLM Bias Detection: NeuralTrust and UPF

NeuralTrust and Universitat Pompeu Fabra (UPF), with funding from Spain's State Research Agency (AEI), are building a platform that measures ten types of bias in large language model responses and corrects them before they reach the user.

Picture a chatbot that books appointments for a public health service. Nobody programmed it to discriminate. Yet patients of one race find it harder than others to get an appointment with a doctor.

That is the problem behind a research project NeuralTrust has led with UPF since 2024. The bias in large language models, the systems behind ChatGPT, Claude and Gemini, is rarely a choice made by the company that deploys them. It ships with the model.

Where the bias comes from

"The bias comes from the training data that large language models learn from," says Rodrigo Fernández, CMO at NeuralTrust. These models learn from huge amounts of internet text, and they absorb the stereotypes in it.

The figures in the project's funding proposal show the scale. In healthcare settings, 56% of model responses contained harmful conclusions based on race. The proposal also found harmful speech against LGBTQ+ people in 13% of responses and gender bias in 15%. At least 3% of what the models generated was false.

Those findings were the basis for a public-private collaboration grant from the AEI (CPP2023-010780), awarded to NeuralTrust and UPF.

How one AI audits another

The project, Enabling responsible and inclusive language models, runs from 2024 to 2027. Its goal is a platform that measures, audits and improves how language models behave.

The team defined ten bias metrics: gender, age, stereotypes, religion, occupation, sexual orientation, political position, ableism, racism and general toxicity. The platform scores each model response against them and limits the most harmful ones.

Bias rarely shows up in an obvious form. "These biases live in very small nuances of language," Fernández says. For decades, people talked to machines through numbers and code. Now they talk to them in natural language, and that is where prejudice hides.

To catch it, the team is training its own language models. These models are not built to hold a conversation. They read a sentence and estimate the risk that it is racist, sexist or toxic. In practice, one AI watches another.

NeuralTrust and UPF researchers behind the LLM bias detection project

Martí Jordà (ML Engineer, NeuralTrust), Miquel Cornudella (ML Engineer, NeuralTrust), Horacio Saggion (Professor of Computer Science and Artificial Intelligence and head of the TALN group, UPF), Carlos (ChaTo) Castillo (ICREA Research Professor, UPF), Akio Hayakawa (PhD candidate) and Dinesh Ayyappan (PhD candidate).

Who does what

NeuralTrust coordinates the consortium, builds the platform and handles the project's protection and dissemination. UPF leads the research through two groups in its School of Engineering.

  • The Social and Responsible Computing group, led by Carlos Castillo, works on algorithmic fairness and discriminatory bias.
  • The Natural Language Processing group (TALN), led by Horacio Saggion, produces versions of text that are easier to understand and free of errors. "We have developed techniques to adapt complex vocabulary and to turn sentences with complex grammar into simpler equivalents," Saggion explains.

The public funding paid mostly for people. It allowed the consortium to hire PhDs and engineers who work full time on these algorithms, at NeuralTrust and at UPF. "For a private company, it is very hard to sustain roles like these full time," Fernández says.

From the lab to real customers

The research has already left the lab. NeuralTrust is integrating the results into its platform, where real customers are testing them.

One customer had launched a public customer service chatbot. The system found inappropriate responses in it and stopped them before they reached end users. Those responses were unintentional. A company that deploys a chatbot inherits the model's biases without knowing it, so they have to be caught before they cause harm.

NeuralTrust and UPF researchers at work on the bias detection project

Researchers at work.

Built for European regulation

Europe and Spain trail the United States and China in generative AI market share and patents. They lead on regulation, with the EU AI Act and Spain's AI supervisory agency, AESIA.

The project aims to become the tool that checks whether models meet those requirements. NeuralTrust aligns its development with the AI Act and with data protection law. The consortium also works with AESIA, ONTSI, SEDIA and OBISAL.

Accessible by design

Language models are hard to use today for people with reading or learning difficulties, such as dyslexia or ADHD. The platform will adapt its responses to different reading levels, so that no one is shut out. The work plan includes validation with human participants, an area where the TALN group has long experience.

What comes next

The project runs until 2027. Within five years, Fernández says, "this technology will be everywhere." People will talk to AI agents at the doctor's office, at their insurer and at public offices. The project's aim is that none of them has to wonder whether the machine treats them the same as their neighbor.

Funding

This project (CPP2023-010780) is funded by Spain's State Research Agency (Agencia Estatal de Investigación, AEI) through its 2023 public-private collaboration call.

Subscribe to our newsletter

Share

Join the leaders securing the agent ecosystem

Get a Demo