8 ms·
The short version appears to be that the author has managed to replace standard linear algebra notation with an alternative (but mathematically equivalent) grap
by spekcular 6y ago
The short version appears to be that the author has managed to replace standard linear algebra notation with an alternative (but mathematically equivalent) graphical notation, which is harder to do computations and write programs in.
This submission is the latest in a trend of what I would classify as "math-lite" category theory and Haskell articles that reach the HN front page, which purport to explain something interesting but end up just rehashing standard mathematics in opaque ways.
I really wish this would stop. Fortunately (unfortunately?) I've been down this road a few times and know to avoid getting sucked in, but I can easily see a bright, curious person wasting a lot of time before realizing that the content is merely linguistic, not mathematical.
Is (for example) category theory a useful organizational tool in certain abstract branches of mathematics? Sure (those branches being, basically, algebraic topology and algebraic geometry). Is it a grand unified theory of math? No, it's just some useful vocabulary. Most mathematicians go their entire lives without writing a paper mentioning categories. Getting excited about category theory is like getting excited about matrix notation – useful, sure, but not where the meat is.
I also find any claims that category theory is relevant to the average working programmer to be dubious at best.
(And yes, I realize the graphical notation presented in this article is not category theory. I am making a broader point about certain kinds of articles I see, which also applies here.)
- siraben 6y agoThis graphical notation for linear algebra isn't like the usual diagram notation category theory at all. > Is category theory a useful organizational tool in certain abstract branches of mathematics? Yes. Abstracting math in a very general way lets you explore patterns and a result in category theory (e.g. Yoneda lemma) generalizes immediately to other instances of categories. > I also find any claims that category theory is relevant to the average working programmer to be dubious at best. I would say there is value in knowing some category theory, especially if the programmer is working in a strongly-typed functional language. Knowing what a functor is, what a catamorphism is and so on, can be useful ways to write more declarative code and teach about abstractions in the same way OOP uses Design Patterns to teach programmers about reusuable code.
- spekcular 6y agoI realize that, obviously, that the diagrams presented in this article are different from the ones found in category theory textbooks. Moreover, my later comments were not really aimed at this article so much as others that are posted here. The criticisms just happen to fit this article, too. Also, I don't really see how learning the abstract definition of a functor is going to help someone write better OCaml programs. But it is possible I am just not imaginative enough. Do you have a concrete example of this?
- siraben 6y ago> But it is possible I am just not imaginative enough. Do you have a concrete example of this? Well, in the case of functor it's not terribly interesting, but here's an example. A functor F has the property F g . F h = F (g . h), so this means that if you were writing map f (map g l) you could write map (f . g) l instead, (in Haskell the compiler optimizes it anyway) but if your compiler actually traversed the list twice, now it traverses the list once. I could list other things like how monoids, monads, etc. can help make programs more efficient (monoids allow exponentiation with squaring) or structure programs better (monads allow composition of partial/stateful/exceptional functions).
- ogogmad 6y agoYour example for the application of the "functor" concept is trivial enough that it doesn't need category theory. Monoids are very simple objects, and you don't need to use category theory to define them. Monads might be a more meaty example. But I'm not sure if knowing CT makes it easier to use monads in a programming context.
- siraben 6y agoThey're trivial constructions yes. But the difference is the shift in vocabulary, instead of understanding functor fusion in an ad-hoc way, the concept can be made more precise, also it can lead you to find other "non-trivial" functors for instance the Hom(a,-) covariant functor or the Hom(-,a), but equipped with the right vocabulary these things are easy to express. Sure, monoids are trivial, because they are, but once you're in the categorical setting you can begin to talk about the category of monoids, monoid homomorphisms and so on. This isn't to say that CT is the answer, but I'm pointing out that it provides a way to understand more complicated concepts. Functors are trivial, but if you take their fixpoint you get ADTs. Monoids are trivial, but if you apply them to the category of endofunctor you derive monads, and so on.
- jshholland 6y agoI kind of agree with you (especially on "math-lite category theory" being upvoted by people who read it and feel smart for understanding it), but I think the point has slightly been missed. The blog is a sort of side project, a popular treatment of the linear algebra stuff coming out of the "real research", which is applying the string diagrams to find graphical, compositional axiomatisations of concurrent systems. The programme has had some success with signal flow graphs (even making it onto the blog: https://graphicallinearalgebra.net/2016/09/07/31-fibonacci-and-sustainable-rabbit-farming/ https://graphicallinearalgebra.net/2016/09/07/31-fibonacci-a... ) and they were starting to look into Petri nets as my study was wrapping up. (source: I was a postgrad supervised by Pawel)
- spekcular 6y agoWhat "success" has this research program had with signal flow graphs? What problems has it helped solved? My impression is that it ends up being largely some kind of linguistic translation project, or abstraction for the sake of abstraction, but I'm happy to be corrected on this point.
- jshholland 6y agoWe have a way to write traditional SFGs as string diagrams and an isomorphism to behaviours which respects the kind of graphical reasoning used in the blog. So you can show that two SFGs are behaviourally equivalent, or, using some more recent work, that all the behaviours of one are also behaviours of another, i.e. inclusion of sets of behaviours. String diagrams are also more general than SFGs, but can still be mapped to behaviours, so you could have an "unimplementable" string diagram to serve as a specification, and use the axiomatisation of inclusion to show that a particular SFG is a valid implementation of that spec. As for whether anyone outside the research programme is actually doing that, I don't know. But in principle it's a useful formal methods type theory.
- guerrilla 6y ago> "math-lite" The series is intended for a general audience and starts by laying the groundwork necessary for exposition of this paper: [1]. Article 4 [2] explains why it is introduced this way. > end up just rehashing standard mathematics in opaque ways It's just an explanation of string diagrams [3][4], pretty transparent and standard. I find it funny that your response to this is so similar to that of the abacists to Fibonacci.[5] [1]. https://arxiv.org/abs/1403.7048 https://arxiv.org/abs/1403.7048 [2]. https://graphicallinearalgebra.net/2015/04/29/dumbing-down-magic-lego-and-the-rules-of-the-game-part-1/ https://graphicallinearalgebra.net/2015/04/29/dumbing-down-m... [3]. https://ncatlab.org/nlab/show/string+diagram https://ncatlab.org/nlab/show/string+diagram [4]. https://en.wikipedia.org/wiki/String_diagram https://en.wikipedia.org/wiki/String_diagram [5]. https://graphicallinearalgebra.net/2015/04/26/adding-part-1-and-mr-fibonacci/ https://graphicallinearalgebra.net/2015/04/26/adding-part-1-...
- imvetri 6y agoFunny thoughts have truth in them. Can you share what truth did you realise ?
- spekcular 6y agoI don't believe the exposition is written well (judged as either an exposition of linear algebra or just the graphical calculus the article develops). But this is perhaps a subjective point, and others here have already commented on this in detail. More importantly, I would like to remark that string diagrams are not standard. The vast majority of mathematicians have never read the definition of a string diagram (or even a monoidal category), precisely because it is not standard and not needed for most (any?) useful mathematical work. They also have obvious disadvantages when compared to the usual notation, as I pointed out earlier. When I read articles by category theory boosters, I get the sense (rightly or wrongly) that they think the world revolves around them and they have stumbled onto some deep and fundamental truths. This is not the case. It's a niche of a niche.
- graphlinalg 6y agoIt's interesting to suddenly get all these hits.. I haven't touched the blog in a long time. I'm sorry that you didn't find it well-written -- it wasn't written with you in mind. Originally I wanted to write about my research in a way that was understandable to a lay person, but I quickly abandoned that and went for the mythical "second year undergrad" level. You have pretty strong thoughts about what is "useful mathematical work". Are you the high priest and decider of the usefulness of mathematics? To be honest, it almost sounds like some category theorist was super mean to you... One more thing. Arguments like "niche of a niche" are sociological - just because something is niche doesn't mean it's not important (or, god forbid, fun!). Maths is one of the most conservative fields in this sense; what is and is not considered "standard" is extremely political.
- imvetri 6y ago> I really wish this would stop > Getting excited about category theory is like getting excited about matrix notation – useful, sure, but not where the meat is Patience. These kind of work is not worth for verbal readers, but for visual learners and visual creators this is very educative. It's a work of visual learner and these kind of work will not stop. > replace standard linear algebra notation with an alternative (but mathematically equivalent) graphical notation. Yes. Modern computation is based on AI which is based on matrices which runs on GPU which does computation on graphical input. This work is a masterpiece for simple solutions for complicated computations.
- da39a3ee 6y agoGood visual explanations are useful to all learners. I'm sorry, but the concept of "visual learner" when used in contradistinction to "verbal learner" is just "lacks attention span to concentrate on something hard".
- guerrilla 6y agoGod forbid we show any kindness to people with attention deficits.
- da39a3ee 6y agoWe should definitely be kind, to as many groups of people as humanly possible. But erecting artificial categories merely because someone thinks it will make some other subset of individuals feel better (a) is patronising to those people, and (b) introduces confusion for everyone.
- enriquto 6y ago> an alternative (but mathematically equivalent) graphical notation, which is harder to do computations and write programs in. But this does need to be the case. Sometimes a graphical notation is a great help. For example, many tensor computations in differential geometry become straightforward using Penrose's graphical notation. Is that the case here? It is difficult to say, as the authors fail to present that notation separately to the results.
- theaeolist 6y agoYes, it is the case here as well. Reducing terms can be tricky because of distributive laws. The graph-like representation makes reduction algorithmically easier.
- deleted 6y ago[deleted]
- deleted 6y ago[deleted]
- dmch-1 6y agoThese types of notations have been around for a long time. In fact they fist started to study geometric objects (such as knots and braids) with algebraic tools. The graphical notation does the opposite - represents algebraic objects by geometric ones. These may have some benefit for human eyes, but for machines they are quite useless indeed. Incidentally, I partially agree with you on category theory, especially on computer science. In abstract maths, however, category theory has more significance than pure language. It can serve more or less like an algebraic tool. There are abstract mathematicians who see deeper meaning in it too.
- to11mtm 6y ago> In abstract maths, however, category theory has more significance than pure language. It can serve more or less like an algebraic tool. There are abstract mathematicians who see deeper meaning in it too. One of the things that has made me very successful as a problem solver and software developer has been the ability to apply category theory abstractly to projects and work that comes in. IOW, Using category theory well in day-to-day software engineering isn't about which monad to pick, but which abstraction (or series of abstractions) are the best fit to a problem.
- chadcmulligan 6y agoHave you ever done much electronics? An electronic circuit diagram is a wonderful thing - a huge page of paper that abstracts the entire operation of a circuit that you can trace through. I'd be very excited to have something similar for mathematics, I don't know if this implementation is that, but its certainly worth striving for.
- longtimegoogler 6y agoAs someone who knows some Category Theory, Algebraic Topology, and a smidgen of Algebraic Geometry, I totally agree. Category Theory is a very useful and essential tool in those subjects. However, to me it reminds me of String Theory, in that it has been sold as Theory of Everything for Mathematics and adjacent fields. Category Theory might even be somewhat useful for language designers, but, I agree that it offers little benefit for programmers even with languages like Haskell. Even Bartosz said that Adjoints aren't that interesting in Haskell because every functor is an endofunctor.
- type_enthusiast 6y ago> Even Bartosz said that Adjoints aren't that interesting in Haskell because every functor is an endofunctor. Every functor (in the standard library) is an endofunctor, but is also a functor to a specific flavor of full subcategory in Hask. It might be useful to support other flavors of subcategory, and I think there's some ongoing work on this in the SubHask module.
- longtimegoogler 6y agoVery cool! I get excited about Category Theory just like the rest.
- wenc 6y agoI often go back to this post by John D Cook Category theory can be very useful, but you don’t use it the same way you use other kinds of math. You can apply optimization theory, for example, by noticing that a problem has a certain form, and therefore a certain algorithm will converge to a solution. Applications of category theory are usually more subtle. You’re not likely to quote some theorem from category theory that finishes off a problem the way the selecting an optimization algorithm does. and I had been skeptical of applications of category theory, and to some extent I still am. Many reported applications of category theory aren’t that applied, and they’re not so much applications as post hoc glosses. At the same time, I’ve seen real applications of categories, such as the design of LINQ mentioned above. I’ve been a part of projects where we used category theory to guide mathematical modeling and software development. Category theory can spot inconsistencies and errors similar to the way dimensional analysis does in engineering, or type checking in software development. It can help you ask the right questions. It can guide you to including the right things, and leaving the right things out. https://www.johndcook.com/blog/applied-category-theory/ https://www.johndcook.com/blog/applied-category-theory/
- 909832 6y agoHere are some other applications. Look at: http://zxcalculus.com/ http://zxcalculus.com/ & https://www.youtube.com/watch?v=iC-KVdB8pf0 https://www.youtube.com/watch?v=iC-KVdB8pf0
- auggierose 6y agoI think category theory is a language you need to learn at some point if you are serious about math or computer science. I've refused to do so for quite a long time, but there is just too much interesting material out there that uses this language. The biggest problem is not falling asleep while learning it :-) The most interesting part of category theory is topos theory, in my opinion. This is a generalisation of set theory, and can thus claim to be indeed useful for foundations.
- ianhorn 6y ago> ...the content is merely linguistic, not mathematical. I disagree with the "merely" here. Half of mathematical practice seems to be finding the right way to think about a thing. If the author were claiming this was a new grand theory, I'd be right there with you, but they seem to be claiming that it's just another way to look at things. I don't see any claims of importance. There's always room for new viewpoints that are content-wise equivalent to old viewpoints but different in how you work with, interpret, and think about them. > ...but end up just rehashing standard mathematics in opaque ways. I'd say it's rehashing standard mathematics in strange interesting ways, making it a very fitting curiosity for a site where things like a history of methods of communicating with submarines gets a ton of upvotes. It's a bit surprising to realist that it seems like we completely agree on what it is and what its contribution to existing standard material is, but for some reason I think it's interesting while you "wish it would stop."
- chobytes 6y agoYeah, I have to agree. It's frustrating because CT and these kinds of diagrams can actually be kind of interesting... They are just not nearly as grand or as useful as their proponents would have us believe. (My spicier opinion is that the machinery of CT is often completely unnecessary for many applications, and actually only serves to obfuscate simple concepts.)
- 909832 6y agoZX-calculus is a rigorous graphical language that has applications in quantum circuits.
- jabirali 6y ago> I can easily see a bright, curious person wasting a lot of time before realizing that the content is merely linguistic, not mathematical. While I rarely find graphical methods useful for performing calculations, I do appreciate visual interpretations of how mathematical concepts work. I personally find that whenever I have to learn a new topic in math, good visualizations help me form an intuition regarding how things fit together, and can often be useful when reasoning about how to attack a problem (back-of-the-envelope sketch before a more rigorous calculation). For actually solving the problem, on paper or in code, I agree that a symbolic approach is superior. I also think that purely linguistic improvements in math can have a positive effect: a mathematical notation that is easy to learn, understand, and use, will clearly make the math it represents more impactful. I can't find the exact quote at the moment, but I think it was Dirac who said something along the lines that "a good mathematical notation should make correct statements obvious and wrong statements impossible".
- microcolonel 6y ago> The short version appears to be that the author has managed to replace standard linear algebra notation with an alternative (but mathematically equivalent) graphical notation, which is harder to do computations and write programs in. > This submission is the latest in a trend of what I would classify as "math-lite" category theory and Haskell articles that reach the HN front page, which purport to explain something interesting but end up just rehashing standard mathematics in opaque ways. This is, coincidentally, the ambition of APL.
- da39a3ee 6y ago> This submission is the latest in a trend of what I would classify as "math-lite" category theory and Haskell articles that reach the HN front page, That's pretty arrogant and rude. This is some mathematicians' PhDs and research, not a blog put in front of overpaid programmers to provide them with category-theory porn. Admittedly, the dumbed down language of the blog is misleading and makes it very hard to read. https://dl.acm.org/doi/pdf/10.1145/3290338 https://dl.acm.org/doi/pdf/10.1145/3290338 https://www.sciencedirect.com/science/article/pii/S0890540116000390?via%3Dihub https://www.sciencedirect.com/science/article/pii/S089054011... Fabio Zanasi. 2015. Interacting Hopf Algebras: the theory of linear systems. Ph.D. Dissertation. Ecole Normale Supérieure de Lyon
- hansvm 6y agoWith the caveat that I learned this material the old-fashioned way and probably can't adequately put myself in the shoes of a new learner, this feels overly pessimistic. A few general points come to mind: (1) The human mind is pretty good at visual pattern recognition. For the same reason that people advocate for a big status monitor that every developer can see for your live service (since you can quickly spot anomalies your monitoring might miss) and for the same reason visualizing a data set is one of the first things you ought to do on your way to understanding it, creating a diagrammatic representation of linear algebra seems helpful for immediately getting a sense of where something feels "off" or for quickly grasping the intuition of a problem. (2) The right notation (pictures in this case -- not that the idea I'm about to highlight couldn't be presented textually) can help highlight the portions of a problem that matter. Thinking about matrices as boxes of elements that you can individually manipulate is IMO actively harmful to understanding them and puts you in a situation where you miss the forest for the trees. (2a) The matrix wiring diagram presented here naturally extends to higher order tensors, and for the life of me I can't find the source right now, but it was precisely that representation that made tensors click for me and gave me a foothold into other material about them. (3) I think the current consensus is that multiple representations of a problem (via some mechanism -- call it "magic") are actively beneficial for learning a topic. From that point of view alone a diagrammatic representation doesn't seem especially bad.