Racism in Technology

Combatting online racist remarks while upholding the freedom of opinion and expression in democratic societies.

Introduction

The amount of vilification, dehumanisation, demonisation, incitement, toxic misinformation, stereotyping, and genocide denial available online is overwhelming and appalling. How do we safeguard our intrinsic right to freedom of expression while avoiding the paths racism has taken countries in the past?

Disillusionment

Nationalistic authoritarian embers are fanned to flame by discontent, disillusionment, and fear. Fear of job loss. Fear of foreigners. Fear of difference. Fear from ignorance. Fear through intergenerational transmission of racist remarks. When such fears turn to hate, that hate seeks a target: immigrants, ethnic minorities, homosexuals, people with disabilities, prisoners of war, and others. Targets become high risk for humiliation, dehumanizing treatment, deportation, forced work, forced sterilization, lynching, massacres, and genocide.

Groups having common fears can gain sufficient following to form a political party. Once a political party is established, partnerships with right-wing politicians and elites can help bolster their cause. This power leads to dominating existing institutions followed by enacting radical reforms. Having cast away legal restraints through reformation, the party protects itself by placing oppressive limits on the freedom of expression and abandons democratic liberties in pursuit of redemptive violence. (See The Five Stages of Fascism by Robert Paxton.)

Irony is leveraging a cornerstone of civil liberty to collapse the democratic institution built upon it: spreading fear and hatred under the right to opine.

Civil liberties

The United Nations Universal Declaration of Human Rights astutely states that “freedom of opinion and expression” is a fundamental right for all. This liberty has been enshrined in the constitutions, covenants, charters, and bills of democratic nations. Here are a few excerpts:

Canada -- Everyone has the following fundamental freedoms: freedom of thought, belief, opinion and expression, including freedom of the press and other media of communication.

United States -- Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances.

United Nations -- Everyone has the right to freedom of opinion and expression; this right includes freedom to hold opinions without interference and to seek, receive and impart information and ideas through any media and regardless of frontiers.

Council of Europe -- Everyone has the right to freedom of expression. This right shall include freedom to hold opinions and to receive and impart information and ideas without interference by public authority and regardless of frontiers. This article shall not prevent States from requiring the licensing of broadcasting, television or cinema enterprises.

South Africa -- (1) Everyone has the right to freedom of expression, which includes: (a) freedom of the press and other media; (b) freedom to receive or impart information or ideas; (c) freedom of artistic creativity; and (d) academic freedom and freedom of scientific research.

Any limits placed on these freedoms must be reasonable and strictly necessary. And there are limits:

Canada -- Every one who, by communicating statements, other than in private conversation, wilfully promotes hatred against any identifiable group is guilty of (a) an indictable offence and is liable to imprisonment for a term not exceeding two years; or (b) an offence punishable on summary conviction.

United States -- Advocacy of force or criminal activity does not receive First Amendment protections if (1) the advocacy is directed to inciting or producing imminent lawless action, and (2) is likely to incite or produce such action.

United Nations -- States Parties condemn all propaganda and all organizations which are based on ideas or theories of superiority of one race or group of persons of one colour or ethnic origin, or which attempt to justify or promote racial hatred and discrimination in any form ...

Council of Europe -- When developing and implementing policies, legislation, strategies and action plans to prevent and combat hate speech, member States should balance the need to protect the rights of those targeted by hate speech with the right to freedom of expression.

South Africa -- (2) The right in subsection (1) does not extend to [...] advocacy of hatred that is based on race, ethnicity, gender or religion, and that constitutes incitement to cause harm.

From my point of view, the legal frameworks appear to assert the following: Hate speech that does not incite imminent lawless action (to cause harm), or takes place in private communications, is legal.

What then of public, online hate speech that does not incite?

Wildfires

Studying embers of nationalistic authoritarian regimes has provided insights into their ignition: disseminating misinformation, racist remarks, and hate speech. Divisive words (“othering”) provide a foothold for fear-targetting. Humans have finite resources to fight wildfires, just as we have finite time and resources to combat online hate speech.

“Bad men need nothing more to compass their ends, than that good men should look on and do nothing. [...] It depends on the habit of attending to and looking into public transactions, and on the degree of information and solid judgment respecting them that exists in the community, whether the conduct of the nation as a nation, both within itself and towards others, shall be selfish, corrupt, and tyrannical, or rational and enlightened, just and noble.” ~ John Stuart Mill, Inaugural address to the University of St. Andrews, 1867

Mill could hardly have imagined the reach individuals would have in sharing their opinions with the world. (The first transcontinental telegraph line was only built six years before his inaugural address.) Even if everyone who was interested in reporting online hate speech were to do so, the amount of false information and racist vitriol being generated would outpace our ability to report it. Further, we can only report what comes across our plate. And to salt this wound, reporting hate speech is an egregious Byzantine time sink.

Setting reporting procedures aside, how do we know what we may report?

The 1966 International Convention on the Elimination of all Forms of Racial Discrimination provides some direction, while Ayako Hatano’s article, Regulating Online Hate Speech through the Prism of Human Rights Law: The Potential of Localised Content Moderation provides deep insights into defining hate speech and issues surrounding its detection in online spheres. Nonetheless, countries that ratified the convention shall, “declare an offence punishable by law all dissemination of ideas based on racial superiority.”

To discern claims of racial superiority, let us turn to facts.

Facts

What are facts and why do facts matter?

“Without facts, you can’t have truth. Without truth, you can’t have trust. Without these, we have no shared reality, no democracy, and it becomes impossible to deal with our world’s existential problems.” ~ Maria Ressa, Nobel Peace Prize lecture, 2021

In science, a fact is an observation that has been repeatedly confirmed and accepted as true. Yet facts accepted as true today may be modified or even discarded if contradicted by new evidence. Generally, facts are independent of belief, knowledge, or opinion.

Ember

In a video posted on September 19, 2024, the presenter states (around the 11-minute mark) that Black Africans “are low IQ; they are born with a low IQ; they are born with an average IQ of 67.” Presumably, he was citing the 2005 paper, Thirty years of research on race differences in cognitive ability.

The findings have been debunked in No support for the hereditarian hypothesis of the Black–White achievement gap using polygenic scores and tests for divergent selection (2021), The cognitive ability of blacks raised by non-blacks (2020), Here’s Why the Black-White IQ Gap Is Almost Certainly Environmental (2019), and Has the Black-White IQ Gap in the United States Narrowed? A Literature Review (2018). An online comment provides more information on this topic.

These papers were published years before the video’s publication date. Did the presenter knowingly disseminate the demonstrably false idea that Black Africans are somehow intellectually inferior?

The content of the video waxes divisive rhetoric, a strategy known as the thin edge of the wedge: a tool found in authoritarian toolboxes. Even though he cherry picked a debunked paper for his wedge, his overall goal is division (“othering”), so the source of his racist comments aren’t terribly important---he could have lit any incendiary to support his goal. Let’s give him the benefit of the doubt. Maybe he didn’t hear about the other papers. Maybe he didn’t think to research opposing arguments in the 800+ citations of a 20-year-old paper. Or maybe scientific knowledge is changing too quickly for him to stay informed.

Reporting this one video is not the point. Every step I took to identify the video were actions that, in time, a machine will be able to do. Numerous social media platforms already use some level of artificial intelligence to assist with detecting hate speech.

Autodetection

Performing a literature review of scientific research for a particular subject is daunting, especially as the depth and breadth of knowledge expands. Large language models (LLMs) can use retrieval augmented generation (RAG), which is a way of providing context for search results. One such LLM, Galactica, was seeded with a treasure trove of scientific knowledge.

Here is how I discovered the video in question:

  1. Learn about a group promoting hate (e.g., from the news).
  2. Find the social media accounts for the leaders of the hate group.
  3. Sift through the social media accounts for public videos.
  4. Look for a video that likely contains racist remarks.
  5. Scrub through the video in search of racist comments.
  6. Decide whether the comments were hate speech.
  7. Report the video to the site owner.

None of these steps are insurmountable with respect to automation, in light of LLMs. We’ll focus on the last three steps because social media platforms can analyse videos uploaded to their servers, prior to publication.

We do not have an enshrined right to publicly broadcast speech, hate-laden or otherwise. Companies may remove content that violates their terms and conditions of use, such as, “You may not post or transmit any message which is abusive, inciting violence, harassing, harmful, hateful, anti-semitic, racist or threatening.”

Scrub

Instead of scrubbing through audio to find racist remarks, a computer can extract the audio and convert it to text quicky and relatively easily. The steps are along the following lines:

  1. Install ffmpeg.
  2. Install Whisper.
  3. Extract the video’s audio:
    ffmpeg -i video.avi -q:a 0 -map a audio.mp3
    
  4. Transcribe the audio to text:
    whisper "audio.mp3" \
      --model medium.en \
      --language English \
      --output_format txt
    

This produces a transcription of the video as a plain text file.

Decide

Feed the transcription into a large language model to analyse the text:

  1. Install llamafile.
  2. Download an uncensored large language model (see HateTinyLLM).
  3. Create the prompt template, prompt.txt, defined by the model.
    {system_message}
    ### Instruction:
    {prompt}
    ### Response:
    
  4. Fill out the prompt template file.
    You are a hate speech detection system.
    ### Instruction:
    Does the following transcription contain hate speech?
    Only output 1 for yes or 0 for no.
        
    <paste transcription here>
        
    ### Response:
    
  5. Perform the analysis, such as:
    readonly INSTRUCT=$(cat prompt.txt)
        
    (
      echo ${INSTRUCT}
    ) | ./llamafile \
      -m "mythomax-l2-13b.Q4_K_M.gguf" \
      -e \
      -f /dev/stdin \
      -n 1000 \
      -c ${#INSTRUCT} \
      --silent-prompt
    

Note that the transcription needs to be split into chunks because, at time of writing, most LLMs have tight memory constraints on the amount of information they can process.

Report

The output from the LLM (1 or 0) can be used to flag the content, in effect reporting the video for review.

Analysis

When asked whether the quotation was racist, online generative pre-trained transformers (GPTs) output the following results:

Preach.

Takeaways

The key ideas include:

Future

From my perspective, issues that need to be addressed include:

Related links:

Contact

About the Author

My career has spanned tele- and radio communications, enterprise-level e-commerce solutions, finance, transportation, modernization projects in both health and education, and much more.

Delighted to discuss opportunities to work with revolutionary companies combatting climate change.