Category Theory
Zulip Server
Archive

You're reading the public-facing archive of the Category Theory Zulip server.
To join the server you need an invite. Anybody can get an invite by contacting Matteo Capucci at name dot surname at gmail dot com.
For all things related to this archive refer to the same person.


Stream: theory: applied category theory

Topic: properties of objects (in context of imaging)


view this post on Zulip David Egolf (Jan 03 2022 at 21:51):

I wanted to share some of my recent thoughts on talking about "properties" in the context of imaging using category theory. This is in the hopes that:

  1. Someone might find them useful, or
  2. Someone might be interested in sharing/discussing related ideas, perhaps from a more general/abstract context.

In the context of imaging, we are often content to observe some properties of an object, when observing everything about an object isn't possible or necessary. So, having a clear notion of "property" in categorical language is probably important for talking about imaging using categories.

One way to think about a "property" is as an equivalence relationship. If pp is an equivalence relationship on some objects, we can say that two objects have the same property value with respect to pp if they are in the same equivalence class. Many statements about properties can be rephrased into the language of equivalence relationships - for example "The mass of this stone is 15 kg" can be rephrased to "This stone and this reference object labelled with '15 kg' have the same property value - fall in the same equivalence class - with respect to an equivalence relationship we call 'mass'." This description of "property" is nice in that it ignores some non-essential differences in language or notation. For example, two people using different languages would be able to agree which objects have the same mass, even if the name they give to "mass" is different.

I want to describe this concept of a "property" of some objects in terms of a category containing those objects. The discussion above suggests that using an equivalence relationship might be reasonable. Let us start with a discrete category C\mathsf{C}. Let us put an equivalence relationship pp on the objects of C\mathsf{C}, which we think of as describing a property these objects have. For example, if the objects in C\mathsf{C} are points (x,y)(x,y) in the plane R2\mathbb{R^2}, then pp could place two points in the same equivalence class if they have the same xx-coordinate. We can form a new category Cp\mathsf{C}_p, I think, as follows: if objects aa and bb are in the same equivalence class with respect to pp, then create a pair of morphisms - one going from aa to bb and one going from bb to aa. Each morphism can just be an ordered pair (a,b)(a,b) or (b,a)(b,a). In each such pair of morphisms, we require the morphisms to be isomorphisms, and to be the inverse of each other. In the category Cp\mathsf{C}_p, I think we have aba \cong b exactly when aa and bb lie in the same equivalence class with respect to pp. So, we have created a new category that describes a property on its objects, in terms of its isomorphisms.

I am hoping this perspective can be helpful when designing or analyzing an observation process on the objects of C\mathsf{C}. Notice that if an observation process FF is a functor F:CpDF: \mathsf{C}_p \to D, then if F(a)F(a) and F(b)F(b) are not isomorphic in DD, then aa and bb are not isomorphic in Cp\mathsf{C}_p and so they have different values of the property pp. This is a way of talking about how our observations inform us about the properties of the objects we are observing. Notice also, that by designing the category Cp\mathsf{C}_p and asking our observation from Cp\mathsf{C}_p to be functorial, we put constraints on the nature of the observation process, including the category it maps to.

Any thoughts are welcome! A related question would be: How to model the fact that objects generally have more than one property?

view this post on Zulip Jason Erbele (Feb 08 2023 at 07:51):

David Egolf said:

I am hoping this perspective can be helpful when designing or analyzing an observation process on the objects of C\mathsf{C}. Notice that if an observation process FF is a functor F:CpDF: \mathsf{C}_p \to D, then if F(a)F(a) and F(b)F(b) are not isomorphic in DD, then aa and bb are not isomorphic in Cp\mathsf{C}_p and so they have different values of the property pp.

I assume DD is the category of "values" that property pp can take on, where "value" is whatever is the meaningful in measuring pp. I'm not sure what you gain from taking FF to be a functor F ⁣:CpDF \colon \mathsf C_p \to D rather than F ⁣:CDF \colon \mathsf C \to D, where you can use the fiber of FF on the observed value of pp to get the collection of objects in CC that have that observed value of the property when using that observation process. Using the fiber approach, you can still directly access the objects of inquiry.
Moreover, if your measurements of pp have any margin of error, equivalence classes might be too "sharp" to be useful. I.e., you could have two objects that can be distinguished as having clearly different values of pp that end up in the same equivalence class because there is a sequence of indistinguishables between them. In the (very likely) extreme case, all your equivalence classes would collapse into a single equivalence class.

As a possible alternative, you could say two objects aa and bb are "the same" when measured by property pp, as observed by process FF, if there is a reference object cc such that you get a cospan acba \to c \leftarrow b. You can build something like an equivalence class of all objects that can form a cospan using a particular reference object. A key difference with these equivalence-class-like things is there can be overlap between two of them. So there still may be sequences of indistinguishable objects between two objects that can be distinguished, but the reference object would have to vary along the way, breaking the "sameness", avoiding the issue noted above. Hopefully you can get some mileage out of these thoughts if I haven't misunderstood you too badly.

A related question would be: How to model the fact that objects generally have more than one property?

For conciseness, I will write p(X)=ap(X) = a for "the value of XX when measured according to (some observation process that measures) property pp is aa." Then for the two-property case we are looking at p(X)=ap(X) = a AND q(X)=bq(X) = b. That AND immediately makes me think there should be some kind of product going on, and my intuition would point to the "reference objects" in the cospans. But the arrows clash between the simplest kind of products and cospans – a binary product with its projection maps has the form of a span: AA×BBA \leftarrow A \times B \to B. So maybe spans would work better than cospans in the previous paragraph? Another issue is the possibility for extraneous cospans to appear (one side coming from pp, the other side from qq, i.e. the same reference object is used for both properties). Maybe a fancier product works better? Or maybe some fancier cospan-based gadgets can deal with it? I'm too tired to work out any more details tonight.

Neither here nor there, I think it would have been fitting (or at least amusing) if "The mass of this stone is 6.35 kg" had been used instead of 15 kg.

view this post on Zulip David Egolf (Feb 08 2023 at 15:55):

Thanks for sharing your thoughts @Jason Erbele !
Looking back, it feels like the thoughts I wrote up here are very rough. I am glad you found some interest in going through them at least.

I'm trying to recall my motivation for talking about Cp\mathsf{C}_p. I think part of the idea was to try and create a category that models the property of interest. However, you are right to point out that much the same information is contained in a map that just labels each object of C\mathsf{C} directly. I think by talking about a functor from Cp\mathsf{C}_p to D\mathsf{D} I was hoping to make it easy to talk about structure in the observations made (in D\mathsf{D}) that relate to figuring out the values of the property for an unknown object. I think I was trying to model categorically - in terms of morphisms - the property of interest in Cp\mathsf{C}_p.

I agree there are problems with working with equivalence classes in the context of e.g. noise. Although I'm not sure I understand what you are saying about a "sequence of indistinguishables" though.

Thinking in terms of cospans with respect to different reference objects is very interesting! I suppose the case where we are considering an equivalence class generated by isomorphisms between the objects is a special case of this: if aba \cong b, then we have a cospan aaba \to a \leftarrow b provided by the isomorphism.

If I understand the idea, the reference object can provide a sort of "local" reference useful for measuring a certain kind of similarity. For example, imagine we have a category where the objects are length 10 vectors of real numbers, and we put a morphism aca \to c if ac\|a-c\| is small enough (hmmm, although maybe this doesn't define a category - the composite of two morphisms might not always exist... hopefully the intuition expressed here is still relevant). Then a cospan acba \to c \leftarrow b says that aa and bb are both close enough to cc, and therefore are somewhat close to eachother. In this case, the equivalence-class-like-things are spheres of vectors, and they can overlap (unlike actual equivalence classes) because a given vector can be in many spheres.

view this post on Zulip David Egolf (Feb 08 2023 at 16:08):

While I'm thinking about this, I had another complaint about the modelling approach I used above. I talked about creating a category where we put a pair of isomorphisms between two objects aa and bb if aa and bb have the same value of some property. This results in pretty boring morphisms, distinguished entirely by their source and target. It feels like we are not using the fact that we can have more interesting morphisms between objects.

We can try and take more seriously the idea that an object is determined by its relationship to all others in our modelling. There is still a relationship between two objects with different values of a property, provided that the property has some kind of structure.

For example, say our property pp takes on values that naturally form a group. Then if object AA has value pAp_A and object BB has value pBp_B, then there is some kind of equation pA=pBqp_A = p_B \circ q in the group corresponding to the property. To describe this relationship between AA and BB in terms of the property pp, we might try creating a category where there is a morphism from AA to BB labelled by qq. So we keep track of the difference in the property values between the objects, under this modelling approach.

Maybe this could be combined with the cospan approach above?
Anyways, it's fun to think about this again, a little!

view this post on Zulip David Egolf (Feb 08 2023 at 16:13):

I guess my overall thought on this at the moment is that it's hard to assess how good a given approach for modelling is without some specific test cases. I'm also unsure how I would assess a given modelling approach even if I picked out a specific thing I wanted to model. I suppose these are some of the challenges of trying to apply math, and I assume I would need to learn a lot more to get anywhere with this! Still, it's fun to think about.

view this post on Zulip Jason Erbele (Feb 08 2023 at 18:20):

Sorry about my vague "sequence of indistinguishables" comment. To give a concrete example of what I had in mind, suppose you can measure lengths with (for simplicity) a constant noise level of 0.01 units. Then an object that is observed to be 3 units long is clearly distinct from an object that is observed to be 4 units long. But you could find a sequence of objects that are observed to be 3.005, 3.01, 3.015, ..., 3.995 units long. Because of the noise level, consecutive observed objects in the sequence could not be distinguished as having different lengths. If we were using equivalence classes, 33.0053.013.0153.99543 \cong 3.005 \cong 3.01 \cong 3.015 \cong \dots \cong 3.995 \cong 4 when we should have 3≇43 \not\cong 4.

If I understand the idea, the reference object can provide a sort of "local" reference useful for measuring a certain kind of similarity. For example, imagine we have a category where the objects are length 10 vectors of real numbers, and we put a morphism aca \to c if ac\|a-c\| is small enough (hmmm, although maybe this doesn't define a category - the composite of two morphisms might not always exist... hopefully the intuition expressed here is still relevant). Then a cospan acba \to c \leftarrow b says that aa and bb are both close enough to cc, and therefore are somewhat close to eachother. In this case, the equivalence-class-like-things are spheres of vectors, and they can overlap (unlike actual equivalence classes) because a given vector can be in many spheres.

If you think of the reference objects as being some kind of Platonic ideal, they should only have arrows going to them, not going out (or maybe vice versa?). That was the intuition that motivated my cospan comments. I can see with your example here that we might run into problems if we treat real objects as Platonic ideals (with maybe some very limited exceptions, like the standard kilogram). So here's a very rough idea: let C\mathsf C be your discrete category of observable objects. Freely add "Platonic ideal objects" for property pp to get the objects of Cp\mathsf C_p (here we would distinguish the vector (6,8) from the Platonic ideal of (6,8), for instance). If aa is an observable object, cc is a Platonic ideal object, and F ⁣:CCpF \colon \mathsf C \to \mathsf C_p is an observation process that observes pp, then aca \to c is an arrow in Cp\mathsf C_p if F(a)c\|F(a) - c \| is smaller than the noise signal. Since the only nontrivial arrows in Cp\mathsf C_p are the ones pointing to Platonic ideal objects (and there are no arrows between different Platonic ideal objects), the composite of two morphisms is still a morphism. So Cp\mathsf C_p still defines a category.

This idea is still rough, but I think it can be fleshed out to deal with multiple properties and even with multiple observation methods that observe the same property, like measuring someone's height to the nearest centimeter and to the nearest inch to get more precision than either measurement alone. For noisy data, you might even assign probabilities to each arrow. I think an ambitious application along those lines might be to determine the likelihood that two CCTV images several hours apart depict the same individual.

view this post on Zulip David Egolf (Feb 08 2023 at 19:06):

Oh, I see - by only having arrows to the reference objects ("Platonic ideal objects" if you prefer), we avoid having to compose these arrows with one another. That enables us to introduce these arrows to model similarity to reference objects in terms of cospans, as we wanted above - and to get a category in the process. Very cool!

And thank you for clarifying your comment on sequences of indistinguishables. That makes a lot of sense!

view this post on Zulip John Baez (Feb 08 2023 at 19:21):

David Egolf said:

While I'm thinking about this, I had another complaint about the modelling approach I used above. I talked about creating a category where we put a pair of isomorphisms between two objects aa and bb if aa and bb have the same value of some property. This results in pretty boring morphisms, distinguished entirely by their source and target.

By the way, a category where all the morphisms are isomorphisms and there's at most one isomorphism from any object to any other is just the same as equivalence relation.

A category where all the morphisms are isomorphisms is called a [[groupoid]].

A category where there's at most one morphism from any object to any other object is called a [[preorder]].

So, a groupoid that's a preorder is an [[equivalence relation]].

view this post on Zulip John Baez (Feb 08 2023 at 19:21):

These are indeed a bit dull as categories go! Most people who use equivalence relations don't even bother to treat them as categories. But it can be useful to do so!