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: deprecated: id my structure

Topic: Formal definition of fuzzy categories.


view this post on Zulip Simonas Tutlys (May 06 2023 at 06:57):

In my thinking about how to integrate fuzziness and categories side by side and not study the latter in terms of the former i've been coming up with definitions of fuzzy categories to use as a bacground to figure out what optimizing a commutative diagram (the commutativity of a pair of morphisms would be a number instead of a boolean) would mean.I have a definition but would like some suggestions for improvement and am inquiring wether this construction is already studied somewhere.I was aiming for generality so here goes:

Let C be a concrete category with U the underlying functor being the underlying set of an object and define a funtor Pair:C->Set = c -> U(c)xU(c) . An commutativity predicate is a morphism in the slice category of the image subcategory of Pair over R (the comma category [Pair,1->R]),the set of real numbers.A fuzzy category then is a concrete category C with a functor COM:C->[Pair,1->R].Diagramatically we coul imagine that now commutativity of a diagram is not a boolean but the maximum of all the values of the commutativity predicates for all pairs of arrows.

view this post on Zulip Simonas Tutlys (May 06 2023 at 08:49):

Fuzzy functors could be this:

A fuzzy functor between fuzzy categories fC and fD is a pair (F,f) of a functor between the underlying categories C and D and a natural transformation f of COM functors that agrees on objects with the functor F. f(c)=f:COM_C(c)->COM_D(F(c))

view this post on Zulip Morgan Rogers (he/him) (May 06 2023 at 10:29):

Wouldn't composition also be fuzzy? You might want to consider [[enriched category]] theory, although based on the start of your message you might be trying to avoid this because the most straightforward option is to enrich in (some variant of) fuzzy sets.

view this post on Zulip Simonas Tutlys (May 06 2023 at 11:34):

The proposed definition seems more natural for my end goal than enrichment cause the fuzzines depends on the output of a morphism.My goal is formally thinking about for example networks of neural networks or other optimizable models where optimization is based on output and loss functions.for example we have a "hidden" (another thing i'm trying to think about in a more formal way,things in categorical machinery you can't directly percieve/write down analytically,like categories of the states and transitions of an environment an agent can only see a part of.behavioural equivalancce based on categorical semantics of modal logics seems close) morphism of a supervised dataset g:X-Y (set of pairs of desired input-output) and we have some model/morphism that we want to fit to the dataset with the same (co)domain with respect to some loss function on Y like mean squared error l(f(X),g(x)) where X and Y are vector spaces . The thing I'm focusing on is the fuzziness of the equality of outputs of f and g.Maybe I'm not mathematically mature enough to see how to use enriched categories in this case since it looks like it adds structure to the homs without any regard to the outputs of the morphisms in them.Or maybe the word 'fuzzy' is misleading in this case.

view this post on Zulip Morgan Rogers (he/him) (May 06 2023 at 11:53):

Even though the distance is defined "on the codomain", the loss is a value that's associated to morphisms. The collection of morphisms from XX to YY acquires a metric in the way you just described, with distance from ff to gg being your favourite measure of the error (you'll probably need to allow the slight generalization of metric spaces where infinite distances are allowed) - note that there is not a canonical choice here.

view this post on Zulip Simonas Tutlys (May 06 2023 at 12:31):

The loss is dependent on the subsets of the data you give it though.for example,i have two morphisms d1,d2 from the terminal object in Set (datapoints) to X or monomorphisms into X seen as subsets and f,g:X->Y .the value of l(d1 * f,d1 * g) is different to l(d2 * f,d2 * g) in some fuzzy categories baset on Set. Maybe we're talking about different concepts here but I'm not sure - what you're talking about to me looks close to epsilon-commutativity of this paper where they use enrichment in metric spaces like you suggest.But I don't want a single number assigned to pairs of morphisms but instead a function based on what goes through them.Maybe I'm thinking of something stateful.This exercize is to try to see if there's some some formal grounding for my code where I just replace strict commutativity based on equality with a loss function.

view this post on Zulip Morgan Rogers (he/him) (May 06 2023 at 13:03):

Simonas Tutlys said:

The loss is dependent on the subsets of the data you give it though.for example,i have two morphisms d1,d2 from the terminal object in Set (datapoints) to X or monomorphisms into X seen as subsets and f,g:X->Y .the value of l(d1 * f,d1 * g) is different to l(d2 * f,d2 * g) in some fuzzy categories baset on Set.

The pair (fd1,gd1)(f \circ d1,g \circ d1) in your example is distinct from the pair (f,g)(f,g), so I don't see/understand the problem?

view this post on Zulip Morgan Rogers (he/him) (May 06 2023 at 13:10):

Okay right I see it, one might imagine that composition with morphisms at a distance of 0 apart would not change the values. My suggestion to "enrich in metric spaces" was ambiguous, since what this means depends on what morphisms one chooses for metric spaces; using distance-non-increasing functions rather than distance-preserving functions could work (since the loss over a subset is going to be bounded by the loss over the whole space)?

view this post on Zulip Morgan Rogers (he/him) (May 06 2023 at 13:11):

That suggestion could fail depending on the details of how the loss is calculated and/or normalized, though.

view this post on Zulip Simonas Tutlys (May 06 2023 at 13:32):

My mistake,didn't catch that the compositions are different from f,g :D I'm thinking of this as a way to plug models together.Good suggestion on non-increasing morphisms,I'll have something to think about.Thank you for the patience :)

view this post on Zulip Morgan Rogers (he/him) (May 06 2023 at 13:38):

No problem, it's a wild jungle of definitions out here! Please do come back if what I suggested doesn't work or your want to discuss it more. Sometimes a new definition really is needed (I haven't spent a lot of time analysing your original suggestion!), but it's good to see what's out there so that you can navigate connections with other work later.

view this post on Zulip Simonas Tutlys (May 09 2023 at 06:11):

I've been comparing these definitions and i think that while your definition wit non-expqnsive metric spaces is more aesthetic mine more general,since there's a faithful functor from Met to Pair/R by objects being products of underlying sets and reifying the metric.also,restricting Met/R to the image of this functor in my definition in my definition seems like gives equivalent definitions.its easier for me to think about this in my definition.now to define a fuzzy natural transformation :D

view this post on Zulip Todd Trimble (Jul 29 2023 at 17:43):

I'm not following the discussion in detail, but for what it's worth, the idea that the identity predicate should be fuzzified along with other items led to a worthwhile paper by Barr that compares fuzzy set theory to toposes of Heyting-valued sets.

view this post on Zulip Simonas Tutlys (Sep 20 2023 at 13:09):

@Todd Trimble Just saw your message,will be a fun read :)
Here's an attempt of a definition of a fuzzy natural transformation.This almost broke me.I will be editing this message if i see any mistakes.

A fuzzy natural transformation between fuzzy functors (F,f) and (G,g) is a natural transformation Q between the functors F and G and naturality squares q2_c between the components of f and g.

COMC(c)fcCOMD(F(c))Qc2QF(c)2COMC(c)gcCOMD(G(c))\begin{CD} COM_C{(c)} @>f_c>> COM_D(F(c)) \\ @VQ^2_cVV @VVQ^2_{F(c)}V \\ COM_C(c) @>>g_c> COM_D(G(c) ) \end{CD}

No interalations between Q and Q^2 are given to keep the definition liberal.

There's probably some n-category terminology that i don't know for whatever Q^2 is.3-morphism?

view this post on Zulip Simonas Tutlys (Sep 20 2023 at 13:37):

Q^2 can be for example a specific path a gradient descent-based algorithm takes in the tangent space if we assume the COM functor values are loss functions for each object.

view this post on Zulip Simonas Tutlys (Sep 24 2023 at 02:15):

I have an idea for a formal proof that the limit of an optimiziation algorithm expressed through the lens of these kinds of fuzzy categories leads to regular categories,inspired the paper @Todd Trimble mentioned.

Let's say we have a monoidal (the monoidal product is a regular functor) fuzzy category A (for agent) and which could be seen as a network of optimizable procedures whose outputs can be compared - for example ML models,some metaheuristic optimization algorithms etc - or a model of a single ML model (neurons and/or a NN modules are seen as a morphism from some some product RnR^n to R) start with a fuzzy endofunctor (maybe coming from adjunction which could be interpreted as an agent-environment relationship) O0O_0.If we have a sequence of (fuzzy) funtors and natural transformations

O0θ0=O1O1θ1=O2O2θ2=O3...O_0 \theta_0 = O_1 \rarr O_1 \theta_1 = O_2 \rarr O_2 \theta_2 = O_3 \rarr ...

And in the limit the COM functor of the image of OO_\infty assigns to some pairs of objects a functio the image of which has two values we can define a new category from the free graph of the underlyiong category of C with commutativity defined only with those pairs of arrows whose images are equal and satisfy this equation:
COMC(Im(f))=COMC(Im(g))=supCOMC(dom(f))COM_C(Im(f))=COM_C(Im(g))=\sup COM_C(dom(f))

view this post on Zulip Simonas Tutlys (Oct 03 2023 at 15:39):

I guess I defined the wrong thing from what I wanted - The COM funtors domain should be a product of the homset Hom(a,b) with itself.then the last prof would make more sense for optimizing the morphisms,seen as variables or paramterized by parameters.