Message Boards Message Boards

Wolfram has abandoned the Graphs and Networks functionality (??)

GROUPS:

This is a cautionary tale for those who choose Mathematica as the main tool for their work.

It is now clear to me that Wolfram has simply abandoned the Graphs and Networks functionality area and I am left high and dry. I have no recourse because Mathematica is closed source so there is only so much a user can do to fix or work around problems. Reporting bugs in this particular area has now clearly proven to be useless. Most simply do not get fixed, no matter how serious they are, or how great a hindrance they are to practical use. No new functionality has been added since version 10.0. My colleagues who use other tools (mostly Python and R packages) are more productive at this point, but I have a handicap with those systems because I made the mistake of investing most of my time into Mathematica, and stayed optimistic about it even in the face of the most obvious warning signs.

I am writing this post because those people who have not heavily invested in Mathematica, and in particular this functionality area of Mathematica, are not in a position to see this and may fall in the same trap I did. What if the same thing happens to the functionality area that is critical to your work?

Wolfram Research, of course, will not tell you that they gave up on Graph. Thus, after my experience, I think I owe it to the community to warn you about the situation.


Some might ask me what specifically is wrong. I have made many posts on this forum about Graph-bugs (you only have to search), and I reported many more to WRI. There is always a last straw—it would be pointless to show it. Those who know me will know that I am not writing this admittedly emotional post out of ill will towards WRI. I have betted on Mathematica more than most, and have been advocating for it throughout the years. I even have a network analysis package with ~250 functions. If I am forced to abandon Mathematica for this type of work, then the countless hours that went into this package will all have been in vain.

I admit that I am writing this public post partly out of desperation to try to get WRI to either fix the many serious Graph-problems, or otherwise publicly state that Graph is now abandoned so those of us who have been using it can stop wasting our time.

POSTED BY: Szabolcs Horvát
Answer
5 days ago

Hi Szabolcs,

My voting routine still uses the original Combinatorica package by Sriram V. Pemmaraju and Steven S. Skiena. This uses a somewhat other format, and I did not want to get lost in brackets. It is still included in Mathematica. If I recall it correctly, Mathematica's graphs & networks have been based upon Combinatorica, which might explain that WRI hasn't its heart on the issue as you suggest or show. I am not in graphs & networks as a topic myself, only such a user. I can only hope for you that there is such a community that would support you on this issue.

You might like my earler text "Beating the software jungle", now included here: https://zenodo.org/record/291974

Best regards, Thomas

POSTED BY: Thomas Colignatus
Answer
5 days ago

I find it odd the lack of evolution (or basic maintenance) of this functionality, as graphs seem to be used more and more in other fields being integrated in the WL. But I guess that the functionality is probably good enough for these applications (that are basically representation related?).

I think that I would also have fallen on your problem, as graphs functionality focus was considerable when it was presented (and I have the sensation that it never really stopped), with multiple blog posts talking of it. I even remembered a post on Spacetime that seemed to point to the need of considerable graph capabilities.

(for version 12, at the 30th anniversary, I would be very happy with just functionality polishing)

POSTED BY: Pedro Fonseca
Answer
4 days ago

I cannot not agree with you more. They should release 12 with all the bugs sorted (i mean all open issues on StackExchange) and should add more functionality for Graphs, ImageProcessing and ComputerVision. That would be a considerable considerable improvement.

POSTED BY: Ali Hashmi
Answer
1 day ago

Here are the at present 24 unresolved bugs I got via a quick-and-dirty query of the StackExchange API:

Some of these are rather inconsequential (but annoying), e.g. Graph3D - Double Arrow in 3rd Dimension, but some are absolutely fundamental and absolutely need to be fixed, e.g. GraphDistance gives incorrect result in weighted multigraph or Why equivalent Graph objects yield different results?

And keep in mind this list is just those left open, which is a fraction of the total number reported by Szabolcs (and possibly only partially fixed).

POSTED BY: b3m2a1 ​ 
Answer
4 days ago

Most of the issues cited here aren't in my area, and I'm not qualified to comment on them. But one is...the bug in export of BezierCurve to PDF. I can reproduce the problem in versions 10.0 to 11.1, but as of 11.2, it looks like that problem is resolved. I just added a comment to the SE post saying the same thing.

POSTED BY: John Fultz
Answer
4 days ago

Some of the biggest hindrances are bugs that are in fundamental functionality and impact almost every network analysis workflow.

For example, using VertexAdd/VertexDelete/EdgeAdd/EdgeDelete is like walking on eggshells. Unless one is extremely careful, they will silently break something in the internal representation of the graph and will prevent other functions from working several steps later. (This typically happens when properties are present.)

There are also instances of problems which have been reported as far back as v9, but are claimed not to be bugs, despite making practical work very inconvenient. For example, this takes ~30 seconds:

g = GridGraph[{50, 50, 50}];
NeighborhoodGraph[g, 123]; // AbsoluteTiming

This is equivalent, and it is instantaneous, as it should be:

AdjacencyList[g, 123]; // AbsoluteTiming

{0.000173, Null}

Subgraph[g, Append[AdjacencyList[g, 123], 123]]; // AbsoluteTiming

{0.000675, Null}

Why is NeighborhoodGraph so slow then? I cannot understand how this is not considered a bug.

Another example is Graph[KaryTree[5], VertexStyle -> Blue], which mysteriously doesn't evaluate. There's something wrong with the output of KaryTree. This works with almost any other graph. When I originally reported it, I was told that this is not a documented syntax of Graph, so not a bug. I had to point out that if I use Graph3D (explicitly used on graphs in the documentation) instead of Graph then the same thing happens ...

But the point is what makes practical work easy and possible and what makes it painful, not the precise phrasing in the documentation. Imagine working on a deadline and hitting these sorts of problems one after the other, always having to stop, backtrack, and find out what exactly went wrong.

Yet another practical hindrance is the bad state of import/export formats. When doing network analysis, it is important to have an exchange format that can encode edge and vertex properties. The two common formats that are also supported by Mathematica are GML and GraphML. Trying to export an edge-weighted graph to GML results in a flood of error messages. Edge weights are the single most commonly used property ... As for GraphML, its implementation is not standards compliant, so most other programs won't read files written by Mathematica (even if they would, properties are written in Wolfram Language syntax, and would need to be parsed... other programs won't understand 3.14` with the backtick at the end). Also, reading GraphML is very slow, and not feasible for as few as a few thousand vertices. All this means that I must always resort to workarounds like storing a single graph in multiple CSV files (not a graph specific format, so often a single file is not sufficient for one graph).

I think what is really missing, in addition to resuming development of this functionality area, is for developers to actually observe how people would want or need to use the system. See how people do network analysis in Python or R with packages like networkx or igraph. Is it possible to do the same task in Mathematica? Usually, it's painful, and it's not even because some graph algorithm is missing or buggy, but because the very basics are broken: import/export, data cleanup, property handling, trivial graph manipulations such adding or removing edges/vertices. Very basic operations such as directed/undirected conversion, reversing edges, taking subgraphs, etc. become unreasonably difficult for edge-weighted graphs, not to mention other stored properties. There isn't even a good way to check if a graph is edge weighted (!!) or quickly remove edge weights from a graph. These sorts of things are what take up the bulk of the time in everyday work.

Yet another complaint I have is that even though a lot of work went into implementing certain functions, they are not properly documented and therefore practically useless. Consider FindGraphCommunities. Community finding is not a mathematically well-defined problem. What the function does is basically defined by the algorithm it is using—but this is not documented at all. Results obtained with this function are unpublishable because we literally don't know how the function works. A few references and better documentation could go a long way. Compare functions like Integrate, which don't have this problem: I do not need to know how Integrate works to understand what an integral is, or to be able to verify that the result is correct. I do need to know how FindGraphCommunities works to be able to make any use of it.

The situation is disappointing because otherwise Mathematica contains a very competitive set of network analysis functions. Until recently it was not easy to find all these integrated into the same system. If the reason why development stopped is that people were not using Mathematica to work with networks, that's misguided. If people don't use it, it's because of the problems I described above, all of which are fixable with much less effort than what was required to develop Graph in the first place.

Finally, one of the biggest practical problems is that property handling for multigraphs is completely broken due to a fundamental design problem: edges are identified by their end vertices, which makes parallel edges indistinguishable. This is of course not going to be easy to fix.

POSTED BY: Szabolcs Horvát
Answer
4 days ago

It would be unfair if I did not mention that today I learned that two bugs of the type I describe above were fixed in 11.3.0, showing that this area does receive some relevant fixes.

Namely, EdgeAdd now works with certain graphs it used to fail with: EdgeAdd[RandomGraph[{2, 0}], {1 <-> 2}], and HighlightGraph now works on graphs whose vertex names are lists: HighlightGraph[Graph[{{1, 2} <-> {5, 6}}], {{1, 2}}]. Both of these failed in 11.2, and I am very happy about both fixes.

I still believe that the rate of fixes in this functionality area is lower than in other parts of Mathematica (and that it is not just my subjective impression that this is the case). I am hoping that in the future graphs will receive the same attention they did around version 10.0.

POSTED BY: Szabolcs Horvát
Answer
3 days ago

I am a user of the built-in Graph functionality (not a heavy user) but i am seriously concerned after what you have mentioned in your post. WRI has to fix the past bugs and catch up with R and python when it comes to Graphs

POSTED BY: Ali Hashmi
Answer
1 day ago

I even started with Mathematica just because the graph functionality. I'm not a very heavy user with special demands but Szabolcs work helped me out very often. I thinks graphs are a fundamental need in such frameworks and I have hope that wri will address the issues. We'll see but some support statements from wri would help.

POSTED BY: l van Veen
Answer
3 days ago

One point of concern is that over the entire set of those Live CEOing videos I’ve never seen one on Graph (although I haven’t seen every single one—just many). This suggests there might not be interest in this high up at WRI.

POSTED BY: b3m2a1 ​ 
Answer
3 days ago

The closest I've seen was on Tree Structures https://www.twitch.tv/videos/228665929

POSTED BY: Arno Bosse
Answer
3 days ago

i've been kicked off the forums before for making such a post as the original. Good luck!

Mathematica does try to "stay compatible" in my view - but they "dissed" PostScript for GL graphics and version 5, 6 took on a view of breaking scripts (.nb) HOWEVER afterward (perhaps they did some employee changing) they reverted to being very compatible (fewer broken scripts).

I do prefer ".m" releases (noting sometimes they've released ".m" after dis-continuing a library in the past).

I do agree they should better protect scripts to "not break". But I don't agree they are getting worse - at this time, yet.

POSTED BY: John Hendrickson
Answer
1 day ago

Group Abstract Group Abstract