Semantic Quantum Correlations in Hate Speeches: Francesco Galofaro
Semantic Quantum Correlations in Hate Speeches: Francesco Galofaro
DOI: 10.4396/SFL2019ES08
__________________________________________________________________________________
Francesco Galofaro
Università degli Studi di Torino - DFE Dipartimento di Filosofia e scienze dell’educazione
francesco.galofaro@unito.it
Zeno Toffano
CentraleSupélec, Laboratoire des signaux et systems
zeno.toffano@centralesupelec.fr
Abstract The intervention shows the first results of a research conducted on a corpus
of 7000 posts collected on the Reddit social network during the 2016 American
presidential campaign. The research is the result of a collaboration between Berkeley D-
Lab, who shared the corpus, LSI - CentraleSupélec and CUBE. Thanks to funding from
the Anti-Defamation League, the corpus has been labeled to apply Machine Learning
techniques: 400 posts have been labeled as “hate speech” by human analysts. Galofaro,
Toffano and Doan applied to both sub-corpora (hate and non-hate speeches) an
analysis technique inspired by Greimas’s structural semantics, Eco’s semiotics, and
Quantum Information Retrieval (van Rijsbergen).
Each text was formalized as a semantic network using the HAL technique. We then
measured the semantic similarity between two key words formalized as two word-
vectors with the classical measure of cosine-similarity and then compared it with the
degree of quantum correlation between them measured with the Born rule. This
correlation, linked to the co-occurrence of the word vectors in the same contexts,
extracts from the latter useful information to characterize the considered semantic
relationships (“presence of correlation”, “absence of correlation” or “presence of anti-
correlation”). In this way, the new technique allows to overcome some critical aspects of
the Machine Learning techniques currently in use, being based on the meaning of the
text and not on the way in which the human analyst labels the corpus.
370
RIFL (2019) SFL: 370-383
DOI: 10.4396/SFL2019ES08
__________________________________________________________________________________
1.2 Problems
The increasingly widespread use of neural networks and machine learning techniques in
the legal field raises ethical questions. It is a commonplace that machines are immune
from human biases; on the contrary, machines absorb biases from their corpus. Thus,
human responsibility is always questioned, as well as the possibility of manipulating
algorithms to reach ideological goals, presenting the decision of the machine as
‘objective’, using it to limit freedom and to delegitimise the political opponent’s point of
view.
A second threat is represented by ‘ethical outsourcing’. A characteristic of our time is to
delegate philosophy to machines. In fact, automatic ethical judgment is only the final
step after the success of aesthetic and ontological algorithms:
371
RIFL (2019) SFL: 370-383
DOI: 10.4396/SFL2019ES08
__________________________________________________________________________________
That’s probably because 30 years ago they were not bashing black or women. Well,
women only got bashed if they mouthed off.
In our corpus, this text has been labeled as non-hate speech. It contains the words black
(B) and women (W), and it does not contain the word ‘white’.
372
RIFL (2019) SFL: 370-383
DOI: 10.4396/SFL2019ES08
__________________________________________________________________________________
obtain this we apply a stemmer, a standard library of the python programming language
capable of reducing each word to a specific stem, similar to – but not coincident with –
the linguistic notion of root (e.g. black, blacks, blackness)1. There is a risk of
oversimplification, but every model has to renounce, in principle, to some information
to focus on structural phenomena.
Fig. 1 represents the semantic space of the document. Each lexeme is represented as a
row and a column vector. In the figure we underlined two word-vectors (women and
black). The vectors represents the relations between these two lexemes and all the other
lexemes of the document, in each context provided by the document. They tell us
something (information) on the distribution of their meaning along the textual space. In
other terms, each of them represents an isotopy, defined as coherent semantic layers (cf.
Greimas 1966). As Guido Ferraro notices (2019: 66) the isotopic effect derives from the
structural oppositions on which it is actually based: every narration needs to oppose
values. For example, in a first document, black women can be considered the opposite
of white women; in a second speech black women can be considered as a subset of
black people. Thus, the semiotic square provides the basic oppositions we can find
between two textual isotopies: contradiction, implication, antonymy, sub-contrariety –
see Greimas and Rastier (1968). However, since we are interested in the isotopic
dissemination starting from any two lexemes, we are interesting in measuring the strength of
the considered opposition.
1 After different attempts we opted for Lancaster stemmer. Less aggressive libraries such as the Porter
stemmer still distinguish between singular and plural. We also eliminated every information manifested by
morphology, syntax, and punctuation.
373
RIFL (2019) SFL: 370-383
DOI: 10.4396/SFL2019ES08
__________________________________________________________________________________
the weight of this relation. Second, we are interested in the type of semantic relation
between the two isotopies: are ‘black’ and ‘women’ opposed, as they were antomyms?
Does the text give them a similar meaning, as they were synonyms? Does the first
presuppose the second (or vice-versa)? Finally: where to find information to typify the
semantic relation?
The use of the term ‘antonym’ we made above might leave puzzled: ‘black’ and ‘women’
are not registered as antonyms in the dictionary. As we will make it clear, the text
constructs their opposition. This has been explained by Rastier (2009) as a transfer of
semantic values not belonging to the functional system of the language, but to other
systems, such as social or idiolectal norms (afferents semes). In our case, these values are
proper to specific political and sub-cultural groups.
Fig. 2 – The same document |𝞧> can be expressed in the two different bases provided by the
keywords we are interested in (women Vs. black)
In fig. 2 we can see the same document-vector (|𝞧>) expressed in terms of its
respective projections on two different bases by the theorem of Pythagoras. The first
base is provided by the word-vector ‘black’ (|wA>) an by its orthogonal vector (|wA⟂>).
the second one is provided by the word-vector ‘woman’ (|wB⟂>) and by its orthogonal
vector.
2.6 Semantic interpretation of orthogonality
It has to be noticed how, when the ‘black’ component is at the maximum (when the
|𝞧> vector is parallel to the |wA> base), the value of the projection on (|wA⟂>) is 0
and vice versa. The same can be said about the base provided by the world-vector
‘woman’ and its orthogonal vector. Thus, we can interpret the orthogonal vector as
‘absence’ of semantic value (respectively: absence of ‘woman’, absence of ‘black’). This
374
RIFL (2019) SFL: 370-383
DOI: 10.4396/SFL2019ES08
__________________________________________________________________________________
▪ the Bx operator, which inverts the black-related meanings in the document vector;
▪ the Wx operator, which inverts the women-related meanings in the document vector;
For example, in fig. 3, we represent how the Bx operator transforms the document-
vector, switching the α and the β component.
Fig. 3 - How the X operator transforms all the semantic values associated to the black-lexeme
by rotating the document vector
The construction of this space that we need will therefore coincide with the
theory itself, that is to say with all the constituent categories that are organized
in a structured system. Here, the structure is above all the organization of the
conditions of possibility of the phenomena, but it is revealed immediately [...]
as the scientific form of their description, the controlled form, by inter-
definition, of the necessary practice (and thus universal) which consists in
paraphrasing, repeating, transforming the given meaning into a new meaning
(Marsciani 2014).
375
RIFL (2019) SFL: 370-383
DOI: 10.4396/SFL2019ES08
__________________________________________________________________________________
3.1 Expectations
What happens when we apply the two operators on the document at the same time?
There are three interesting scenarios:
1) Every time the first operator changes a lexeme (+1) the second operator changes the
same lexeme (+1). Every time the first machine leaves unchanged a lexeme (-1) the
second machine leaves it unchanged (-1). If we multiply the two outcomes (+1,+1) or (-
1,-1) we have an expectation value of +1: the two meanings /black/ and /women/ are
correlated in the document.
2) Every time the first machine changes a lexeme (+1) the second machine leaves it
lexeme unchanged (-1). Every time the first machine leaves unchanged a lexeme (-1) the
second machine changes it (+1). If we multiply the two outcomes (+1,-1) or (-1,+1) we
have an expectation value of -1: the two meanings /black/ and /women/ are anti-
correlated in the document.
3) The changes can be concomitant in some context while in others they are not
concomitant not (+1,+1); (+1,-1); (-1;+1). Their average is (0). Interpretation: the the
two meanings /black/ and /women/ are not correlated in the document.
Obviously, all the values between -1 and +1 are a measure of a stronger or a weaker
semantic (anti-)correlation. The expectation value is helpful to typify the semantic
relation we are interested in. It is possible to calculate it applying the Born rule:
〈𝞧|BxWx|𝞧〉
4. Findings
As we wrote above, the correlation value allows us to typify the semantic correlation
between the two isotopies we are interested in, whereas the Bell value allows us to
distinguish between classical an quantum correlations. Basing on these two values, we
can distinguish four kinds of relations between isotopies in the considered hate
speeches:
376
RIFL (2019) SFL: 370-383
DOI: 10.4396/SFL2019ES08
__________________________________________________________________________________
1 – Reciprocal presupposition. The two isotopies can be considered as one isotopy. The hate
speeches are featured by a weak, classic correlation (0 < C < 0.5, 0 < S < 1.4).
2 – Dominance. The presupposition is unidirectional (one of the two lexemes is
incidental). The hate speeches are featured by no correlation or a weak, classic
anticorrelation (-0.5 < C < 0, 0 < S < 1.4).
3 – Distinctiveness. The two isotopies are well individuated, and they do not overlap in the
considered hate speech. The hate speeches are featured by a strong, classic
anticorrelation (-0.7 < C < 0.5, 1.4 < S < 2).
4 – Allotopy. The two lexemes are allotopic: they simply do not share the same contexts.
They are strongly opposed. The hate speeches are featured by a strong, quantum
anticorrelation (-1 < C < 0.7, 2 < S < 2.8).
Interestingly, we found a link between the correlation value and the bell value, so that
only some strong anticorrelations violate the Bell inequality. This point will be discussed
below.
The correlation value indicates the presence of a weak correlation between the two
terms. They are not used as synonyms; rather, there is a presuppositions in terms of
Greimas’ square. For example, the considered hate speech oppose black men to black
women, subdividing the presupposed black set in two presupposing subsets.
4.2 Dominance
The second discursive subset (fig. 5) corresponds to the absence of correlation or to the
presence of a weak anticorrelation between the two isotopies. The Bell value is still
classical and weak (S < 1.4). This corresponds to a general topic of the hate speech
where the one of the two lexeme dominates the other, which is used incidentally.
377
RIFL (2019) SFL: 370-383
DOI: 10.4396/SFL2019ES08
__________________________________________________________________________________
Fig. 5 - second discursive subset of the hate speeches: dominance (in the example: White and
Women)
4.3 Distinctiveness
The correlation value indicates the presence of a strong anticorrelation between the two
terms (Fig. 6). The Bell Value is higher than in the previous subsets, but it is still
classical (S < 2). There is no intersections between the two isotopies: they are well
individuated and kept distinct. For example, the considered hate speech accuses liberals
of partisanship about women and about black people speaks about women.
4.4 Allotopy
The last, very interesting case, is represented by the presence of the strongest
anticorrelation and a quantum Bell Value
>>>But there is the equally likely scenario where the woman gets drunk, and a man steps in to
“take care of her”. Separates her from her friends, says he’ll walk her home.
378
RIFL (2019) SFL: 370-383
DOI: 10.4396/SFL2019ES08
__________________________________________________________________________________
The example is very interesting too, since the writer ‘quotes’ the discourse of the
interlocutor. The first focus on hate (‘take your hate elsewere’, ‘man hater here’, while
the second focus on women and men). The lexemes ‘women’ and ‘hate’ are allotopic:
they do not share the same contexts.
5. Discussion
The particular link we found between correlation and bell value probably depends on
the features of the textual genre we analyzed: hate speeches are indeed short, lexically
poor, violently opposing two or three terms. Thus, further research is needed to fully
understand whether the typology we individuated is complete and relevant to other
textual genres. For example, strong positive correlations are not present in the corpus;
this does not mean that they are not possible. Furthermore, a comparison between hate
and non-hate speeches could lead to a better understanding of the difference between
them.
a better understanding of the difference hate/non hate speeches;
An interesting point concerns Quantum anticorrelations, because they suggest that
formal semantic models should be weaker than classical logic. In fact, comparison to
ordinary logic, quantum logic is an extended system (Von Neumann 1932:253). For
example, let us see another hate speech, opposing white (men) to (feminist) women and
to Black (table 8):
a)
Let A = the ‘women’ isotopy, B = the ‘white’ isotopy, and C = the ‘Black’ isotopy.
Thus, “if (Women iff not White) and (White iff not Black) then (Women iff White)” is
always true. We could call this rule ‘the enemy of my enemy is my friend.’ In our case,
this would imply that women and black would be somehow correlated isotopies: this
does not happen in the considered texts, where the three lexemes are respectively
allotopic and /women/ and /black/ produce non overlapping isotopies. The reason of
the difference between quantum anti-correlation and classical logic consists in the
geometry of the considered space. In Galofaro, Toffano, and Doan (2018) we
demonstrated how anti-correlation is related to the angle between the base-vectors of
379
RIFL (2019) SFL: 370-383
DOI: 10.4396/SFL2019ES08
__________________________________________________________________________________
the query. Roughly speaking, “being anti-correlated” equals to “being orthogonal”, and
“being correlated” equals to “being parallel”. Let us interpret (a) in geometrical terms:
The sentence (b) would be true in a two-dimensional semantic space. In our space, each
vector of the document (white, women, black ...) lays in a different dimension, since
they are all orthogonal. Thus, if all the three base-vector are anti-correlated, we can
represent them as in Fig. 9.
6. Open questions
Why semantic space should be represented as the same space of quantum computation
and quantum physics? Jean Petitot formulated the problem in this way:
Many people are using quantum formalisms beyond physics but it is in general
difficult to justify the Hilbert structure (in particular complex coefficients with
phase factors necessary for interferences) (Petitot, personal communication, 2018).
The first answer could have been: whatever works. Or: mathematics is just a formal
model, the fact that a portion of semantics and physics can be formalized using the
same tools does not suggest any ontological relation between the two. To paraphrase
non-realist interpretations of quantum logic – see Wilce (2017) – quantum semantics is
a theory about the possible statistical distributions of lexemes in certain contexts, and its
non-classical “logic” simply reflects the fact that these distributions can not be present
simultaneously anywhere in the text. Because of this, the set of propositions on
isotopies is less rich than it would be in classical probability theory, and the set of
possible statistical distributions, accordingly, less tightly constrained, allowing cases as
the one we reported in the previous paragraph. That some “non-classical” probability
distributions allowed by this theory are actually manifested in nature is perhaps
surprising, but in no way requires any revision of the semantics of the language we use
to make reference to nature.
380
RIFL (2019) SFL: 370-383
DOI: 10.4396/SFL2019ES08
__________________________________________________________________________________
7. Conclusion
Quantum semantics tries to merge a structural notion of value as difference with a
phenomenological notion of value resulting from the intentional relation between
subject and object (inherence, cf. Marsciani 2014). In fact, the model foresees two levels
(Fig. 9):
References
381
RIFL (2019) SFL: 370-383
DOI: 10.4396/SFL2019ES08
__________________________________________________________________________________
Barros, Joao, Toffano, Zeno, Meguebli, Youssef, and Bich-Liên Doan (2014),
«Contextual Query Using Bell Tests», in Lecture Notes in Computer Science, Vol. 8369,
Springer, Berlin, pp. 110-121.
Dubois François, Toffano Zeno (2017) «Eigenlogic: A Quantum View for Multiple-
Valued and Fuzzy Systems», in Quantum Interaction. QI 2016. Lecture Notes in Computer
Science, Vol. 10106, Springer, Berlin, pp. 239-251.
Eco, Umberto (1962) Opera aperta, Bompiani, Milano 1976 (Open work, transl. by A.
Cancogni, Harvard University Press, Cambridge Mass. 1989)
Ferraro, Guido (2019) Semiotica 3.0: 50 idee chiave per un rilancio della scienza della
significazione, I saggi di Lexia 31, Roma, Aracne.
Galofaro, Francesco, Toffano, Zeno and Bich-Liên Doan (2018), «Quantum Semantic
Correlations in Hate and Non-Hate Speeches», in Electronic Proceedings in Theoretical
Computer Science, Vol. 283, pp. 62-74, from http://eptcs.web.cse.unsw.edu.au/content.cgi
?CAPNS2018
Greimas, Algirdas Algirdas J. (1966), Sémantique structurale, Paris, PUF 2002 (Structural
semantics: an attempt at a method, transl. by D. McDowell, R. Schleifer, A. Velie, University
of Nebraska Press, Lincoln NE 1984).
Greimas, Algirdas J., Rastier, François (1968), «The interaction of semiotic constraints»,
in Yale French Studies, 41, pp. 86-105.
Lund, Kevin and Burgess, Curt (1996), «Producing high-dimensional semantic spaces
from lexical co-occurrence», in Behavior Research Methods, Instruments, & Computers, Vol.
28, n. 2, pp. 203- 208.
Nockleby, John T. (2000), Hate Speech, in Levy, Leonard W., Karst, Kenneth L. et al.,
Encyclopedia of the American Constitution, Macmillan, New York, pp. 1277-1279.
Quillian, M. Ross (1968), Semantic Memory, in Minsky, Marvin (1968), Semantic Information
Processing, Cambridge Mass, MIT press.
382
RIFL (2019) SFL: 370-383
DOI: 10.4396/SFL2019ES08
__________________________________________________________________________________
Wilce, Alexander (2017), Quantum Logic and Probability Theory, in Edward N. Zalta (ed.),
The Stanford Encyclopedia of Philosophy, https://plato.stanford.edu/archives/spr2017/entrie
s/qt-quantlog/
Yanowski, Noson S. and Iannucci, Mirco A. (2008), Quantum Computing for Computer
Scientists, Cambridge University Press, Cambridge.
Ziqi Zhang & Lei Luo (2018), «Hate Speech Detection: A Solved Problem? The
Challenging Case of Long Tail on Twitter», in Semantic Web, in press (status: accepted)
from arXiv preprint arXiv:1803.03662.
383