Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The clearest and most concise treatment I've come across on how Category Theory is used is Tai-Danae Bradley's "What is Applied Category Theory": https://arxiv.org/abs/1809.05923 (It's a 50 page PDF)

Unfortunately the examples aren't within CS, but at least for me personally, seeing it clearly applied in any context was the most important thing. It may be a good pre-req for looking at (or conjuring up your own) more detailed applications within CS specifically.

Also, if you like that, Tai-Danae Bradley has more writing at: https://www.math3ma.com/



I'm familiar with the applications here, and I've never found them compelling. They amount to taking things we already understand perfectly well (chemical reactions, written in terms of differential equations or visualized in terms of graphs) and draping huge amounts of formalism around them. The "theorems" they then prove do not provide any new insight -- they're only called theorems because the excess formalism makes completely trivial things hard to see!

For example, the main theorem of one of Baez's very long papers is:

> There is a symmetric monoidal functor from the category Petri to the category Dynam.

When you plug in the hundred relevant definitions, you find that this is literally just the statement that you can specify a chemical reaction network in terms of differential equations, or pictorially in terms of graphs where the edges represent reactions, which is a standard thing taught in ordinary chemistry classes. The language of categories is not achieving anything here but obfuscation.

Category theory is only good when there's a very rich preexisting mathematical structure, so that introducing it simplifies things. That usually isn't true in science.


I think you may be missing something here.

> The "theorems" they then prove do not provide any new insight

Knowing that you can model reaction networks using categorical concepts may not provide new insights IF you have no deep familiarity with those concepts—but if you do, then knowing there is a "symmetric monoidal functor from the category Petri to the category Dynam" is a richly useful piece of information. It's probably more accurate to say that the amount of new insight conferred is proportional to your familiarity with the categorical concepts.

And yes, it's true the concepts are 'just' being translated into a new language—but if this new language is extremely general, applicable to a wide range of domains, then:

1) You can build a set of skills and knowledge related to concepts in this general language, which become automatically applicable to a wide range of domains (when their concepts are imported into the language).

2) It's possible to build 'machinery' (i.e. theorems or software) which deals with / operates on (representations of) concepts from this very general language—so once again, if you can translate some concept from domain X into e.g a symmetric monoidal category, now your general machinery can operate on things from domain X (which it was built with no awareness of).

Additionally, at least in Bradley's paper, the point wasn't to prove new things about e.g. reaction networks; instead it was to illustrate a method. To be more specific she is showing how "functorial semantics" can be applied in this context, using Petri nets as the syntax and dynamical systems as the semantics. From there the categorical classification of these objects gives us guarantees on their behavior under composition (the utility of which I assume is clear).

I'm not sure in the context of reaction networks whether modeling the system with compositionality guarantees and a clean mapping between graph representation and differential equations gives scientists something new or not—but the illustration of this method is done clearly, and the generality of the method is enormous.

And maybe I'm also missing something. I'm not a mathematician, but that's how the situation looks to me.


> Knowing that you can model reaction networks using categorical concepts may not provide new insights IF you have no deep familiarity with those concepts—but if you do, then knowing there is a "symmetric monoidal functor from the category Petri to the category Dynam" is a richly useful piece of information.

Look, I completely agree with the general point. I love new ways of thinking about things. But blindly applying extremely complicated tools to domains where their power isn't helpful is not good.

What is happening here is like taking a 2-line program that adds together two numbers and dressing it up into thousands of lines of OOP, until you have AdditionObjectFactoryGetterSetter objects being created by AdditionObjectFactoryGetterSetterFactory objects. Then you can bring in powerful OOP tools, but the only things they help you with are understanding the excess complication you added in. Maybe the sheer scale of that structure is beautiful to someone, but we're discussing whether scientists should bother learning it.

> I'm not sure in the context of reaction networks whether modeling the system with compositionality guarantees and a clean mapping between graph representation and differential equations gives scientists something new or not

And I'm telling you, it really doesn't! There simply is not a rich enough formal structure present in chemical reaction networks for category theory to yield anything useful, like it did in parts of pure math. Adding a complicated structure on top of something simple does nobody any good. All of the "guarantees on compositionality" were not useful, in the sense that they went without saying in freshman-level courses, or worse, were problems solely created by the introduction of category theory.

> the illustration of this method is done clearly, and the generality of the method is enormous.

The fact that the technique is extremely general does not improve things. If a technique makes science harder to do, you can't make it up on volume.


> What is happening here is like taking a 2-line program that adds together two numbers and dressing it up into thousands of lines of OOP, until you have AdditionObjectFactoryGetterSetter objects being created by AdditionObjectFactoryGetterSetterFactory objects. Then you can bring in powerful OOP tools, but the only things they help you with are understanding the excess complication you added in. Maybe the sheer scale of that structure is beautiful to someone, but we're discussing whether scientists should bother learning it.

In my opinion, this severely misrepresents what's happening. Your example is simply adding extrinsic, incidental complexity and this is not what the categorical treatment of this is doing, in my opinion. The additional complexity introduced by the CT machinery is not a lot and most of the complexity is intrinsic to the problem.


Argh, I wrote this in an editor and accidentally posted only a partial response. I cannot edit anymore so I'm responding with the full comment:

> What is happening here is like taking a 2-line program that adds together two numbers and dressing it up into thousands of lines of OOP, until you have AdditionObjectFactoryGetterSetter objects being created by AdditionObjectFactoryGetterSetterFactory objects. Then you can bring in powerful OOP tools, but the only things they help you with are understanding the excess complication you added in. Maybe the sheer scale of that structure is beautiful to someone, but we're discussing whether scientists should bother learning it.

In my opinion, this severely misrepresents what's happening. Your example is simply adding extrinsic, incidental complexity and this is not what the categorical treatment of this is doing, in my opinion. The additional complexity introduced by the CT machinery is not a lot and most of the complexity is intrinsic to the problem.

What this does is to add rigor to something that you (or a chemist) may understand intuitively. To a person with a working, intuitive knowledge about a subject, that may seem a bit pointless, but it is nevertheless useful since an intuitive understanding might overlook reasoning holes or edge cases. Building upon this result may yield further useful insights.

Granted, this really may not be useful to a working chemist. The cost/benefit ratio of a chemist doing chemistry is more favourable than investing a lot of time in CT, hoping for a large breakthrough.


CT provides a language that allows us to talk about things without description of their inner workings. That allows us to see connections between seemingly different topics, which we wouldn't likely find within the domain specific language (DSL). DSLs have their purpose, but so has a meta language connecting DSLs.


General relativity doesn’t help anyone throw a basketball better, but that’s not what it’s for.

Category theory is rarely going to be the best way to do any kind of science, but it does nonetheless allow one to make statements which are true across many domains, without getting bogged down in the details of any particular subject.


> General relativity doesn’t help anyone throw a basketball better, but that’s not what it’s for.

Yes, of course! And as a physicist, I don't ask basketball players to use general relativity.

But I'm responding to a post claiming the category theory really is useful, directly, for science. And just like the basketball player, I'm saying that it really isn't.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: