L OGICAL VIEW ON FAIRNESS OF A BINARY CLASSIFICATION TASK
Anonymous authors
Paper under double-blind review
A BSTRACT
Ethical, Interpretable/Explainable, and Responsible AI are an active area of research and important social initiative.
Vendors offer solutions.
For instance,
Microsoft compiled a platform, Responsible AI.
Within the context, challenges of algorithmic fairness and trustworthiness of machine learning are paramount.
Furthermore, several authors argue that the emergence of algorithmically infused societies necessitates innovative approaches to measuring feasible information, e.g., collecting data shall follow a trustworthy social theory.
In this paper, we show that this approach is heuristic at best.
We prove that, with no regards to data, fairness and trustworthiness are algorithmically undecidable for a basic machine learning task, the binary classiﬁcation.
Therefore, even the approach based on not only improving but fully solving the three usually assumed issues – the insufﬁcient quality of measurements, the complex consequences of (mis)measurements, and the limits of existing social theories – is only heuristics.
We show that, effectively, the fairness of a classiﬁer is not even a (version of bias-variance) trade-off inasmuch as it is a logical phenomenon.
Namely, we reveal a language L and an L − theory T for binary classiﬁcation task such that the very notion of loss is not expressible in the ﬁrst-order logic formula in L .
I NTRODUCTION
Ethical, Interpretable/Explainable, and Responsible AI are an active area of research and important social initiative.
Vendors offer solutions.
For instance, Microsoft compiled a platform, Responsible
AI.
Within the context, challenges of algorithmic fairness and trustworthiness of machine learning are paramount.
Furthermore, several authors argue that the emergence of algorithmically infused societies necessitates innovative approaches to measuring feasible information, e.g., collecting data shall follow a trustworthy social theory [3].
In this paper, we show that this approach is heuristic at best.
We prove that, with no regards to data, fairness and trustworthiness are algorithmically undecidable for a binary classiﬁcation task (cf.
Therefore, even the approach based on not only improving but fully solving the three usually assumed issues – the insufﬁcient quality of measurements, the complex consequences of (mis)measurements, and the limits of existing social theories – is only heuristic.
We prove that, effectively, the fairness of a binary classiﬁer is not even a trade-off (e.g., a version of bias-variance/complexity etc.)
inasmuch as it is a logical phenomenon.
Namely, we reveal a language L and L − theory T for binary classiﬁcation task such that the very notion of loss is not expressible in the ﬁrst-order logic L -formula.
Throughout the paper, we consider the natural generalization of the binary classiﬁer for the inﬁnite domain.
Our goal is to introduce a purely logical view on loss for a binary classiﬁer on an inﬁnite domain.
It is achieved by introducing a general notion of classiﬁer loss based on an observation that any natural loss is a ﬁrst-order formula in a suitable structure.
The latter has a theory T represented by a tuple (cid:104) L, M (cid:105) where L is a language and M is model for L .
Next, we will show that the resulting ﬁrst-order theory T admits an extension RG ext on random graph structure such that a notion that a graph has an equal number of connected and unconnected nodes is not expressible in the RG ext -ﬁrst-order logic.
The binary classiﬁers’ structure is isomorphic (with probability 1 to T .
Therefore, if a ﬁrst-order sentence in one theory is deducible (i.e., can be proved) in that theory, the corresponding sentence is deducible in another.
Then, for two given classiﬁers, assuming that the classiﬁer loss is a ﬁrst-order logic formula, C 1 ≡ (cid:104) D, L c 1 (cid:105) and C 2 ≡ (cid:104) D, L c 2 (cid:105) , we can construct a ﬁrst-order expression L c 1 − L c 2 = 0 which is equivalent to an expression that the two classiﬁers have the same number of connected and unconnected nodes which leads to contradiction.
This effectively means that any loss function is not expressible in the RG ext -ﬁrst-order logic.
The rest of the paper is dealing with the proof of these statements.
It is interesting to compare this with a general undecidability of identities for wide class of functions in [1].
We conclude with discussion of losses expressible in second and higher logic theory and immediate implications for adopting them on fairness and interpretability (the extended version of the paper contains more information on each of these topics).
1. N OTATIONS AND DEFINITIONS
We will try to make this paper self-sufﬁcient and provide all necessary references to the reader who would like to invest more time into the mathematical foundations of machine learning and interpretablity.
We would need some information from model theory.
We assume that the reader is familiar with the concepts of domain, classiﬁer, and loss as well as the standard body of statistics and probability theory normally used in a supervised machine learning.
Notations are natural; N denotes the set of natural numbers, Z stands for integers, and R denotes reals.
R + would be positive reals.
L or l normally stands for a loss unless it is a space which is then deﬁned explicitly.
S ∼ D means a sample from a distribution D ; contextually, D can stand for a domain.
In general, we assume a inﬁnite countable domain.
Traditionally, given a hypotheses space H and domain Z , loss l is a non-negative real function l : H × Z
→ R + .
We denote L D ( h ) a standard expected loss of a binary classiﬁer h ∈ H over domain X where
H is a hypotheses space, with respect to a probability distribution D ; by deﬁnition: L D ( h ) =
E z ∼ D
[ l 0 − 1 ( h, z )] , and, since for 0-1 loss Z ranges over pairs, l 0 − 1 ( h,
[Equation]
x, y )) =
[Equation]
We also need some deﬁnitions from model theory and logic.
A ﬁlter α on the set of natural numbers
N is a collection of sets of natural numbers obeying the following axioms:
1) If E ⊂ F ⊂ N and E ∈ α then F ∈ α ; 2) If E ∈ α and F ∈ α then E ∩ F ∈ α ; 3) Empty set ∅ / ∈ α .
An ultraﬁlter α on the natural numbers is a ﬁlter which obeys an additional axiom:
If E ⊂ N then exactly one E or N \ E ∈ α .
A non-principal ultraﬁlter α is an ultraﬁlter that obeys one additional axiom yet:
No ﬁnite set belongs to α .
It easy to see that non-principal ultraﬁlters exist.
We can start with the ﬁlter of coﬁnite (i.e. complements of ﬁnite sets in N ), and applying Zorn lemma [3] to embed the ﬁlter into an ultraﬁlter.
We call an ultraﬁlter principal if it is not non-principal.
One can prove that every non-principal ultraﬁlter is of the form { E ⊂ N | n ∈ E } , where n is a natural number.
One fundamental property of binary classiﬁer µ : 2 N → { 0 , 1 } , if it maps σ -large sets to 1, and σ -small sets to 0, is that it is a ﬁnitely additive probability measure.
Moreover, every ﬁnitely additive probability measure has this form.
We also are going to use an important tool from model theory that is called ultraproduct (cid:81) i ∈ I
L i /U where L i are some algebraic structures indexed by
i ∈ I , and U is an ultraﬁlter.
Algebraic operations on the ultraproduct are deﬁned the same way as in a Cartesian product of L i and the ultraproduct is a quotient set with respect to relation (cid:5) which is deﬁned as follows: x (cid:5) y iff { i ∈ I | x i = y i } ∈ U .
Since we need some notions from lattice theory, we remind the fundamentals of it.
Lattice is a partially ordered set in which any two elements have a supremum and an inﬁmum.
Z l , l ∈ N is a lattice ( Z l , ≤ ) if we set a ∧ b = inf { a, b } and a ∨ b = sup { a, b } .
Then Z l is an algebra and a lattice.
For a lattice L , we put ↑ a = { b ∈ L | b ≥ a } and ↓ a = { b ∈ L | b ≤ a } .
If we ﬁx the domain, then a multi-class classiﬁer, as a structure, is deﬁned (by the lattice isomorphism) by the ordered set of values in Z l .
L D ( A ) denotes a standard 0-1 loss for a binary classiﬁer A .
Finally, we need to touch decidability.
Intuitively, it is the situation in ﬁrst-order logic theory when we can ﬁnd an effective algorithm that decides whether a well-deﬁned formula for the theory is true (in particular, it does not loop indeﬁnitely – the very reason why halting problem is undecidable).
The ﬁrst-order logic is a natural setting for the context, because the second order (and, in general, a higher order) logic only leads to difﬁculties in any formalization or contemporary understanding of interpretability.
The celebrated Gödel incompleteness theorem, for instance, deals with the second order formulas.
These deﬁnitions are sufﬁcient for our purposes.
We need only point out that these fundamental notions normally are essential for a non-standard analysis.
However, we deal with a standard context herein and just use them in some proofs.
1. R ANDOM G RAPH C LASSIFIERS
There is one interesting class of classiﬁers, similar in nature to binary classiﬁers, such that its ﬁrstorder theory is almost for sure decidable (in the sense of probability).
This class is associated with random graphs.
We would call those the random (binary) classiﬁers.
The class is deﬁned as follows.
Assume that domain is enumerated (countable).
Consider a graph with vertex set N of all natural numbers.
Pick a "random" binary classiﬁer A , that is the one that decides on every scoring randomly, with probability 12 . 1 .
Let RG be the resulting structure.
To decide whether there is an edge between x and y (with x (cid:54)
=
y), we check values A ( x ) and A ( y ) .
If they coincide, then, by deﬁnition, there is an edge, otherwise there isn’t.
Being viewed as a structure, the class of binary classiﬁers is a bounded lattice in case of a ﬁnite domain, and a left bounded lattice in case of inﬁnite domain.
The class of all graphs built this way forms the class of random graphs.
We show next that all these graphs are isomorphic (as graphs) with probability 1 (i.e., almost for sure).
Namely, consider two disjoint ﬁnite subsets of N , X and Y , with respected sizes n and m .
Consider now an element x ∈ N that is joined to every element of X and no element in Y ; we would call that a property P .
Given any vertex x , the probability it does not have the property P above is p = 1 − 2 − ( n + m ) .
So, for m different vertices, the probability that none of them has the desired property is p m .
Clearly, this would converge to zero if n is going to inﬁnity.
Thus, at least one x ∈ N will have the property, with probability 1.
Taking into account the fact that there are only countably many disjoint pairs ( X, Y ) of ﬁnite sets in N × N , with probability 1, for each pair ( X, Y ) we can ﬁnd a vertex that x is joined to every vertex in X and to no vertex in Y .
Let P be that property.
Denote the resulting structure by RG ext deﬁned by the property P .
Any binary classiﬁer
C ≡ (cid:104) D, L c (cid:105) may be viewed as an element in RG where each element of the domain is represented by a pair of vertices in RG .
Loss of the classiﬁer C is deﬁned accordingly and becomes a ﬁrst-order expression in the theory T ≡ L 0 Ext -theory where L
Ext is the extension of basic logical language
L 0 extended with the property P .
From that point, we can simply repeat the arguments from [2], Chapter IV.23, pp.645-646 and deduce that the ﬁrst order theory of random graphs is almost surely decidable, so the ﬁrst order logic theory of binary classiﬁers, associated with random graphs, is almost surely decidable too.
In particular, we can consider the extension RG ext for RG with additional property that with probability 1, for every pair ( A, B ) of disjoint subsets in our domain, there is a vertex v such that v joined to every vertex in A and no vertex in B .
Q.E.D.
Namely, we have the following
Proposition 1.1.
The theory L
Ext of random graph classiﬁers RG ext is almost surely decidable.
For completeness, we provide the proof based on an extension in the appendix.
M AIN R ESULT 2. I NEXPRESSIBILITY OF FAIRNESS
Let theory T be (as above) the L 0 Ext -theory of binary classiﬁers based on structure RG ext .
Despite of the fact that the theory is almost surely decidable, once cannot use any ﬁrst-order expression to compare two binary classiﬁers.
Namely, the following theorem holds:
Theorem 2.1.
Two binary classiﬁers cannot be compared fairly using any ﬁrst-order logic expression in T .
Proof.
Assume that the classiﬁer loss is expressible in L 0 Ext -ﬁrst-order logic of T .
By Marker’s theorem for almost sure theory of graphs (e.g., cf.
[2], p. 646), the theory T obeys a zero-one law which states that for any L 0 Ext -sentence φ the probability p N ( φ ) tends to zero or tends to 1 as
N → inf .
On the other hand, one can see that the probability that a random graph contains r ( Nr ) edges tends to 1 /r as N tends to inﬁnity for any integer r > 1 .
Translating this to classiﬁers in RG Ext , consider any non-trivial classiﬁer.
Its loss function then would tend to one or zero as we enumerate the elements of domain.
Thus, we witness a contradiction with the fact that the limit is between zero and one.
Q.E.D.
U NDECIDABILITY
Theorem 3.1.
Given a domain D , the class of binary classiﬁers over D (viewed as lower bounded lattices) is (ﬁrst-order logic) undecidable.
Proof.
The main idea is to show that the class is not closed under ultraproducts (or Cartesian products).
Then, the class is not axiomatizable.
As a consequence, being viewed as a structure, it is not decidable.
We ﬁrst consider the case of ﬁnite domain.
Strictly speaking, not every binary classiﬁer, viewed as a structure, is a lattice.
However, if it is, the immediate observation is that, up to a lattice isomorphism, such binary classiﬁer is bounded.
Namely, for a lattice L , a ∈ L consider set ↑ ( a ) = { b ∈ L | b ≥ a } .
A lattice homomorphism h : M → L is lower bounded if for any a ∈ L , set h − 1 ( ↑ ( a )) is either empty or has the least element.
A lattice is lower bounded, if any homomorphism from a ﬁnitely generated free lattice is lower bounded.
Dual deﬁnitions are established for the upper bounded lattices.
[Figure]
If lattice is lower and upper bounded, then it is called bounded.
Any binary classiﬁer is lower bounded as a lattice if it is representable as a lattice.
It is obvious for ﬁnite classiﬁers, since we can view classiﬁer as a lexicographically ordered sequence of pairs ( x i , y i ) , i ∈ N and thus it contains 0 (the lowest bound) .
Given a ﬁnite domain, it also contains 1; any homomorphism preserves 0s and 1s.
For an inﬁnite domain D , we assume it can be countably enumerated (thus, the order of the product
D × D is lexicographical).
Then, any classiﬁer on such domain is lower bounded, since D , as a lattice, would contain 0.
Any ﬁnite lattice L can be identiﬁed as a binary classiﬁer l : L × L → { 0 , 1 } that is associated with the lattice diagram in the following manner.
The lattice is represented, up to isomorphism, by its diagram which is a directed graph G = G ( V, E ) such that for every v ∈ V ⊂
L there is no x such that a > x > c for vertices a and c with edge e ( a, c ) (covering property).
The direction of the e is pointing towards a smaller element.
Then we simply set classiﬁer l value to 1 for the pair ( a, c ) .
If a pair ( x, y ) is not in the diagram, we set the value to zero.
It is not difﬁcult to check that the diagram can be restored from the classiﬁer only one way (cf.
ﬁgure 1 for the process, l(a,c) → 1 and l(c,a) → 0).
We need the following result from [6] .
Theorem 3.2.
There are ﬁnite lower bounded lattices L i , i ∈ I for Cauchy ﬁlter D such that (cid:81) i ∈
I L i /D is not lower bounded.
The theorem is stated there for just bounded lattices; however, it is valid for lower bounded lattices as well - for completeness, we present the proof in the appendix.
To prove our result, theorem 3.1, we only need to notice that, according to the theorem 3.2, the product is a lattice, but it is no longer a binary classiﬁer, that is, there are ﬁnite (lower bounded) binary classiﬁers such that their ultraproduct is not a binary classiﬁer.
Q.E.D.
C ONCLUSION
An elementary class (or axiomatizable class) consists of all structures satisfying a ﬁxed ﬁrst-order theory.
There are a few limitations of expressiveness of elementary classes.
Theorem 3.1 seems to be a reason to move to the second-order logic; however, with higher expressiveness, and some inheritance of the ﬁrst-order logic properties, there are important negative effects, associated with completeness and compactness theorems.
Discussion One may ask a natural question whether the second-order and higher order logic is more suitable for the modeling the machine learning tasks for formalization of fairness, because the ﬁrst-order logic has quantiﬁers’ scope "reduced" to elements, rather than sets.
Clearly, binary classiﬁcation task is only useful tool if we can verify the model at the individual level (e.g., the target "malignant/non-malignant" tumor in medicine).
Moreover, we would like our formalism be as simple as possible, that is, our expression of boolean target shall refer to individual prediction rather than subset of those, because the problem of deﬁning and selecting the subsets is likely (and, logically, will be) more complex than our task in the ﬁrst place, at least, for majority of practical problems.
By the same token, interpretability requires its scope to be at the individual elements.
In addition, one important consideration is due to formal veriﬁcation.
Many modern veriﬁers and theorem provers use a higher order logic since they are employ type theory.
However, the veriﬁcation and automatic proving are yet other research domains that are not being discussed in this paper. A CKNOWLEDGMENTS
The author thanks Prof. V.Pestov for his extremely useful comments.
In particular, he pointed out that the phenomenon of inexpressibility can be associated with nonmeasurability of the classiﬁer (the standard model just assumes Borel measurability).
That prompts an additional question about the classiﬁer such as what its Bayes loss is which we do not address in this paper since it is out of scope for the mass view approach on classiﬁcation that does not assume measurability
A. P ROOF OF P ROPOSITION 1.
Theorem A.1.
RG ext is almost surely decidable.
Proof.
This is a completion of the proof sketched in the main text.
We aim to construct an extension for the ﬁrst-order theory such that it is almost for sure decidable.
In the main text, we proved that, with probability 1, there is a countably many disjoint pairs ( X, Y ) of ﬁnite sets, for every such pair one can ﬁnd x ∈ X that is joined to every vertex in X and to no vertex in B .
That extension property formalization is as follows:
(i) ∀ x ∀
[Equation]
x ∼ y → y ∼ x ; (ii) ∀ x ¬ ( x ∼ x ) ; (iii) Φ n,m for n, m ≥
where Φ n,m is the formula:
∀
[Equation]
Consider the theory T for graph with the extension property (i)-(iii) holds for any pair of disjoint ﬁnite set of vertices.
By the argumentation above in the main text, with probability 1, random classiﬁers are models of T .
Moreover, any two countable models of T are isomorphic.
The isomorphism can be constructed as follows.
Induction.
Given model M 1 and M 2 , and enumerations a 0 , a 1 , ... of vertices in M 1 and b 0 , b 1 , ... of vertices in M 2 , let set f ( a 0 ) =
b 0 .
For a 1 , if a 1 is joined to a 0 , ﬁnd a vertex that is joined to b 0 , and in similar way, if not.
These are property Φ 1 , 0 and Φ 0 , 1 correspondingly.
Selecting alternatively an image for the ﬁrst a i that does not yet have an image, and preimage for the ﬁrst b j that does not yet have preimage, and a regular case of Φ i,j , we continue by induction.
The theory T is complete.
Moreover, there is an algorithm that decides whether any formula or its negation are true in very model of T .
That is a simple corollary from the previous considerations.
To prove completeness, assume that the opposite is true.
Then, by compactness theorem, there are two countable models M 1 , M 2 such that a formula is true in M 1 , but its negation is true in M 2 .
This would mean that there are two non-isomorphic models of T which is not the case.
Similarly, to prove that there is a deciding algorithm for T , for any formula, one would search the proofs for it or its negation.
By completeness theorem (Gödel, Henkin), syntactic and semantic consequence are equivalent for ﬁrst-order logic, so we will ﬁnd eventually a proof for the formula or its negation.
To prove almost for sure decidability for random graphs, we only need to notice that T provides the proof for a formula φ or its negation.
The proofs are ﬁnite, so the proof can use only ﬁnitely many statements Φ n,m .
Thus, there exists m ∈ N such that if M | = Φ m,m , then M | = φ .
As we saw before, the probability of M | =
Φ m,m tends to 1 when m → 0 , so is the probability of M | = φ .
This means that the ﬁrst order theory of random graphs is almost surely decidable.
Q.E.D.
A. P ROOF OF T HEOREM 3.
Proof .
That statement is the main result of [6].
Following the very construction of [6], we need only to build an ascending chain of elements in the free lattice that its image under natural embedding saves the order of elements.
Next, given a domain, we can identify classiﬁer with an embedding into an inverse limit of ﬁnite bounded lattices.
More speciﬁcally, let X will be a ﬁnite set with at least free elements (that is not a real restriction for binary classiﬁer case, because logically multinomial classiﬁer can be split into a sequence of binary ones), and let F ( X ) be a free lattice generated by X. It is known [8] that F ( X ) embeds into an inverse limit of ﬁnite bounded lattices.
Speciﬁcally, there are ﬁnite bounded lattices, L i , i < ω , and surjective lattice homomorphisms π ij : L j → L i , i ≤ j < ω
such that π ii = Id L i and π ik = π ij π jk for all i ≤ j ≤ k < ω , and an embedding φ : F ( X ) → (cid:81)
i<ω
L i for which π i φ =
π ij π j φ with any i ≤ j < ω where π k : (cid:81)
i<ω
L i → L k is the canonical projection for any n < ω .
Fix a ﬁlter Φ over ω , e.g., the ﬁlter of all coﬁnite subsets of ω .
Then the map ξ : F ( X ) → (cid:81)
i<ω
L i / Φ; ξ : a → φ ( a ) / Φ is a lattice homomorphism, by deﬁnition.
In fact, it is a lattice embedding.
Namely, suppose a (cid:54)
=
b in F ( X ) , then we have π i φ ( a ) (cid:54) =
π i φ ( b ) for some i < ω .
For the inverse limit, it means that π n φ ( a ) (cid:54) =
π n φ ( b ) for all n ≥ i .
Immediately, ξ ( a ) / Φ (cid:54) =
ξ ( b ) / Φ .
Next, consider t ∈
F ( X ) and an ascending chain { a i , i < ω } in F ( X ) .
Then { π n φ ( a n ) | n < ω } / Φ ≤ ξ ( t ) if and only if a n ≤ t for all n < ω .
We will prove now that homomorphism ξ is not lower bounded.
It is known (cf.
[8], Example 1.24,
Whitman) that F ( X ) contains an inﬁnite ascending chain { a n | n < ω } which does not have a least upper bound.
Consider a =
( π n φ ( a n ) | n < ω ) / Φ .
Since 1 F ( X ) ∈ ξ − 1 ( ↑ a) , it follows that the last set is non-empty.
Therefore, if we choose an arbitrary element t from the set, we have ξ ( t ) ≥↑ a .
As we saw before, it means we have t ≥ a n for all n ≤ ω .
Since t is not a least upper bound for the sequence { a n | n < ω } , there exists t 1 such that t > t 1 ≥ a n for all n < ω .
As usual, it means that ξ ( t 1 ) ≥↑ a and thus t 1 ∈ ξ − 1 ( ↑ a) .
Hence the set ξ − 1 ( ↑ a) does not have a least element, i.e., ξ is not lower bounded.
Q.E.D.
One variation of the proof for binary classiﬁers is based on the following consideration.
For ﬁnite and countably inﬁnite domains, binary classiﬁer is a distributive lattice over N if we set { a ∨ b, a ∧ b } = { a, b } ∀ a, b .
As is known, for very partial set (poset) C there exists a unique, up to isomorphism, free completed distributed lattice L over C with embedding φ : C
→ L such that for every distributed lattice M , and a monotone function f : C → M there exists a unique homomorphism f φ that the following diagram is commutative:
[Equation]
id
This allows us to uniquely identify a classiﬁer (as a distributive lattice) with a free distributed lattice embedding; more precisely, with its image under the embedding φ .
Since L is a free lattice generated by C , it, in turn, embeds into inverse limit of free ﬁnite bounded lattices [8] .
Next, it is sufﬁcient to prove that there are ﬁnite lower bounded lattices the embedding above, that are identiﬁed as binary classiﬁers, that for a non-principal ultraﬁlter D (e.g. ω ), the ultraproduct (cid:81) i ∈ I
L i /D is not lower bounded.
Then, we can ﬁnd an inﬁnite chain in the embedding directly, and the rest of the proof is as above.
A. F ORMAL DEFINITION FOR LANGUAGE L
Let L be a language (an extension of a basic formal logical language, L 0 ).
Deﬁnition
The set of L − terms is the smallest set L t such that contains all constant symbols of L , all variables, and if t 1 , t 2 , ..., t n are in L t then for any n-ary function symbol f , f ( t 1 , t 2 , ..., t n ) is also in L t .
Set L a of atomic formulas are represented by the properties:
(1) if t 1 and t 2 are terms then t
= t 2 is in L a , and (2) the corresponding n-ary function symbols are also in L a .
In other words, the set of all formulas in L (expressions, sentences - herein, we use these interchangeably) is the smallest set containing all atomic formulas and closed under logical connectives ∨ , ∧ , ¬ , → , ↔ , quantiﬁers ∃ , ∀ , equality symbol ” = ” , parenthesis ”(” and ”)” , and variables.