Category theory is an extremely insightful subject but its generality, the plethora of structural heuristics it provides, as well as its apparent conceptual simplicity make it very prone to cargo-culting. And the Yoneda lemma, being one of the most prominent theorems in category theory and one a student encounters relatively early, is object of many misunderstandings.
One place were I've seen this recently was the 'Categories for consciousness science' (C4CS) workshop, where some people proposed using category theory, and in particular Yoneda, as a way to settle 'the problem of qualia' once for all. Let me stress here already that many talks in the workshop were legit and made interesting points about using categorical tools to approach consciousness science.
This problem of qualia is often introduced in the following specific form: how do I know the colours you perceive are the same I perceive? This is an extremely fascinating questions and, of course, extends to all the subjective conscious experiences, i.e. qualia.
Unfortunately, the categorical approach proposed to solve this (e.g. by Saigo, Tsuchiya, Maier) is not sound, and despite being happy to see category theory used as a mathematical compass in sciences, I think it's the duty of mathematicians (and scientists in general) to point out mistakes and correct misunderstandings, instead of ignoring them and let bad science (if in good faith!) poison the field.
Let's consider this talk (EDIT: Johannes Kleiner pointed out this talk isn't from the C4CS workshop, though there was a very similar one by Saigo or Tsuchiya). There, the proposal is to regard colours as the objects of a category. The morphisms of this category are 'relationships' between these colours. [0]
The speaker then claims that colours' qualia are uniquely determined by the rigidity implied by the unique relationship each has with all the other ones. The Yoneda embedding allows us to conclude this: unique relationships, unique isomorphism class.
Unfortunately, this line of reasoning is naive, and ultimately wrong.
A common pitfall for category theory beginners is holding on to the idea that objects are absolute (as in set theory) and morphisms are an afterthought. Thus when we see Yoneda we are impressed because it seems we can recover the 'absoluteness' of the objects from the mere data of morphisms. But this is false: in a category, objects are mere labels and all the relevant data is in the morphisms. So the statement of the Yoneda embedding theorem is a triviality: since objects are fully constructed from their morphisms, they can be fully probed with morphisms. In other words, once we define a category \( \mathcal {C} \) (say, of colours), then applying Yoneda to it can't possibly tell us more about the objects than what we already knew when we assembled \( \mathcal {C} \)…
This issue is fatal for the appeals to Yoneda in the aforementioned talk (or in this paper), since they start by assuming a specific category of 'qualia', or other things, and then they claim to be able to uniquely pin down the objects therein using isomorphism classes of representable presheaves over it. But this is circular: everything is determined by the choice of morphisms they make when defining the category at the start, so they can distinguish objects only insofar as they already assumed they could do so. [1]
Such an object-first attitude, together with a lack of clear definitions for morphisms, leads to a second fallacy that further undermines the ideas proposed at C4CS. The fallacy goes like this: one fixes some objects, then later adds morphisms to make this set (or class) into a category, and then assumes that we this category will reflect the nature of the objects they started with. This is false, again: by choosing morphisms we also choose how objects are determined, i.e. we choose which objects are considered isomorphic. Hence if we start with objects distinguished by some properties not salient to the morphisms we add we end up identifying objects we deemed different at the beginning. In other words, even if we start with a set of objects \( S \), what is relevant to cateory theory is the setoid \( (S, \cong ) \) determined by the morphisms we added later, and it may very well be that \( (S, =) \not \cong (S, \cong ) \).
A classic example is given by the category of metric spaces and continuous functions thereof versus the category of metric spaces and short maps thereof. The two categories have the same class of objects but have different notions of isomorphism: two metrics inducing the same topology will be considered isomorphic in the first category, but not necessarily in the second (e.g. the \( p \)-distances on \( \mathbb {R}^n \)). Thus it's misleading to call the objects of the first 'metric spaces' since the choice of metric there is not as relevant as one might think. In particular, looking at all continuous functions out of two metric spaces will not help in the slightest to determine whether they are equipped with 'the same' metric.
An interesting idea: presheaves as observations
There are some interesting ideas to be saved, however, with some interesting questions.
The first is that presheaves over a category correspond to 'observables'. This is akin to replacing a physical system with the algebra of observables for it, a maneuver which is ubiquitous in modern mathematical physics. [2]
Moreover, presheaves have a very rich structure, in particular they admit all limits and colimits of things in the original category (now considered as representables), even if they don't exist therein. In a sense, it tells us that even if some things don't exist in our domain of discourse, we can still 'talk about them', as 'virtual' objects that nonetheless behave very much like 'real' ones. [3]
Once we adopt this perspective, we realize the interesting thing is not to start with a 'category of things' and look at presheaves over it to learn about the things, but to go the other way around: if the only accessible parts of those things are observations we can make about them, then the true mathematical question is: how well can we reconstruct a category given its category of presheaves?
This question breaks down in two:
- Suppose \( \mathcal {O} \) is a 'category of observations', when is it the case \( \mathcal {O} \simeq \mathbf {Psh}(\mathcal {C}) \) for some 'category of real things' \( \mathcal {C} \)?
- If \( \mathbf {Psh}(\mathcal {C}) \simeq \mathbf {Psh}(\mathcal {C}') \), is it the case \( \mathcal {C} \simeq \mathcal {C'} \)?
I was very pleased to learn that question (1) was answered by Bunge already in 1969, and in much greater generality! In fact she answers this question in the enriched case (Theorem 4.16 there). Another characterization theorem is given by Carboni and Vitale in terms of exact completions. See this section on the nLab for both statements.
Question (2) has an answer too, this time in the negative. Two categories with the same category of presheaves are called Morita equivalent, echoing the terminology from commutative algebra. And like in algebra, in general, Morita equivalence is coarser than isomorphism.
Two categories are Morita equivalent when they have the same Cauchy completion since the Cauchy completion \( \bar {\mathcal {C}} \) of \( \mathcal {C} \) is maximal among the categories Morita equivalent to \( \mathcal {C} \). The completion \( \bar {\mathcal {C}} \) is given by the Karoubi envelope of \( \mathcal {C} \), which adds all the missing split idempotents. Doing so can substantially alter a category: for instance, when \( \mathcal {C} = \mathbf {Op} \), the full subcategory of \( \mathbf {Smooth} \) spanned by open subsets of Cartesian spaces, then its Karoubi envelope is the whole category of smooth manifolds, as observed by Lawvere.
The final question hence is: do split idempotents of qualia tell us something about the nature of consciousness?
Footnotes
[0] The elephant in the room of the workshop, and in papers such as this one, is that the objects they manipulate mathematically are hopelessly underspecified and vague to the point of uselessness. Mathematical reasoning is garbage in, garbage out: its results are only as universal and unappealable as the assumptions and definitions we start with.
[1] Sometimes this is subtle because they start with a category (often a metric space or a preorder, really) which is 'objectively determined' by physical properties of the perception. For instance, they arrange colours in the metric space of the gamut of perceivable colours. Then the error is thinking they can say anything about qualia from this category: whatever they do with presheaves over it is going to reflect the physical aspects they put in the base category instead of the subjective qualities relevant to qualia.
[2] That's why Saigo and Tsuchiya went to Yoneda, I guess: even if one can't access the 'category of qualia' itself, one seem to be able to observe it by taking measurement which are akin to presheaves. Hence the idea of using Yoneda as a way to tie the second to the first. However, this doesn't quite work: first, it's not obvious that what they deal with are presheaves and not just predicates or even functions (which would be, at best, enriched presheaves, a thing they mention but don't really embrace). Second, reconstructing the category some presheaves are over is not immediate even if we had access to the entirety of the category of presheaves, which we have not, because we can make only a finite amount of measurements.
[3] Here's an interesting point though: within the category of presheaves, one can distinguish representables by their property of being tiny. Thus we can tell if some universal object is real or fake, but only assuming we have enough presheaves around to test for 'tininess'.