How directed is a directed network?

The trophic levels of nodes in directed networks can reveal their functional properties. Moreover, the trophic coherence of a network, defined in terms of trophic levels, is related to properties such as cycle structure, stability and percolation. The standard definition of trophic levels, however, borrowed from ecology, suffers from drawbacks such as requiring basal nodes, which limit its applicability. Here we propose simple improved definitions of trophic levels and coherence that can be computed on any directed network. We demonstrate how the method can identify node function in examples including ecosystems, supply chain networks, gene expression and global language networks. We also explore how trophic levels and coherence relate to other topological properties, such as non-normality and cycle structure, and show that our method reveals the extent to which the edges in a directed network are aligned in a global direction.

I believe that the manuscript should be reconsidered for publication after a major revision.
There are a few points that I think are worth discussing and elaborating further on. Below I detail some of these.
p.2 eq (2.1): these quantities are extenstios of the cocept of "strength", introduced by Barrat et al. in [PNAS (2004), 101(11),3747-3752]. I would recommend that the authors refer to this manuscript (and subsequent generalization to digraphs, if any) and that they use the term "in/out-strength" or similar, in order to emphasize the relationship with the index introduced in 2004.
p.2, eqs (2.2)-(2.3): what is the rationale for calling these "weight" and "imbalance"? p.2. eq (2.4): this appears to be an extension to the weighted case of the a symmetrized graph Laplacian for digraphs (as can also be seen from equation (2.5)). This type of approach to the treatment of directed graphs is often criticised in the literature, as it completely changes the topology of the network (especially in the case of highly non-symmetric matrices W). Could the authors justify their approach and explain further why disregarding directionality of edges is the right thing to do in this context? In my opinion the justification is quite weak, as it stands. (This also links to the contents of page 9). p.3 eq (2.5): please specify who the vector u is.
p.3 l.10: here h is characterized as being *the* solution to \Lambda h = v (please add specification of who v is). However, in l. 14 the authors state that \Lambda h = v does not have a unique solution. Please change l.10 to state that h is *a* solution and fully characterize span{h: \Lambda h = v}.
p.3 l.14: Instead of considering the case of a disconnected network with several weakly connected components, it would be easier to just focus on the case of weakly connected networks; Then the matrix W+W^T is the (weighted) adjacency matrix of a connected undirected graph and therefore the vector of all ones spans the null space of W+W^T. The case of disconnected networks follows from, e.g., chapter 6.13.3 in "Networks: An Introduction" by M. Newman. (Let me clarify that I understand that the authors are doing this already, I am only suggesting what I consider a better way of presenting the result.) p.3 l. 15: instead of having the notion of weakly connected component as a footnote, please have it in the text. "Connected component" usually implies strongly, not weakly, therefore it is worth making clear what the authors are referring to in the text.
p.3 l.25 (and consequently appendix B): it is not straightforward do see the reason behind this choice of F_0. Why this and not an expression with ((h_n-h_m)^2 -1) in place of (h_n-h_m-1)^2 in the numerator? p.3 eq (2.8): in the definition of trophic confusion it may be worth using x instead of h, to avoid confusion with equation (2.7). Section 3 and 4: I believe that the manuscript would improve greatly if these two sections were swapped. p.5 l.56: What do he authors mean by "cyclic network"? p.7 l. 10: eigenvector centrality instead of eigenvalue centrality. p.7 l. 11: "Trophic analysis reveals that this network is strongly directional": what does directionality have to do with the value of F_0? The authors should try and keep their notation as consistent as possible throughout the manuscript. p.7 l.50: "et al." instead of "et al" p.10 ll. 37 ff: It is quite unclear the purpose of these paragraphs: please either expand further on these (by adding formulas as well, when appropriate) or remove these entirely.
Section 5: I understand what question the authors are trying to address, but it escapes me why this question should be of interest in the first place.
p. 11 ll. 53-56: "The term "normal" came from people who spent their lives with self-adjoint operators and unitary operators, both of which are normal, but people working in stability of ordinary differential equations are fully cognizant that most matrices are not normal." Please remove or rephrase this sentence.
p. 11 l 58: cut "imbalance vector" or rephrase as "implies that the imbalance vector is the zero vector: v=0". p. 12 l. 9: "When v = 0 we say that the network is balanced." p. 12 l.10: what is a normal network?
p.12 l. 17-18: The authors state the following: "if W is normal and has all eigenvalues real then F_0 = 1". Having previously noted that F_0=1 for symmetric matrices, the result is trivial. Indeed, a matrix is normal iff it is unitarly diagonalizable. Moreover, a unitarly diagonalizable matrix with real spectrum is Hermitian. Since the authors are assuming that W is real, "normal with all real eigenvalues" is a complicated way of saying "symmetric".
p.12 l.36: this statement (and the proof in the appendix) appears to be true only for networks without self-loops.
p.12 l.57: is r>1? p.15 l.8: "A cycle in a directed network is a closed walk in it. In contrast to some of the literature, we allow repeated edges and repeated nodes" Instead of improperly calling it cycle, the authors could refer to this object as a closed walk. Please also recall the definition of walk.

Review form: Reviewer 2
Is the manuscript scientifically sound in its present form? Yes

Recommendation?
Accept as is

Decision letter (RSOS-201138.R0)
We hope you are keeping well at this difficult and unusual time. We continue to value your support of the journal in these challenging circumstances. If Royal Society Open Science can assist you at all, please don't hesitate to let us know at the email address below.

Dear Dr MacKay
On behalf of the Editors, I am pleased to inform you that your Manuscript RSOS-201138 entitled "How directed is a directed network?" has been accepted for publication in Royal Society Open Science subject to minor revision in accordance with the referee suggestions. Please find the referees' comments at the end of this email.
The reviewers and handling editors have recommended publication, but also suggest some minor revisions to your manuscript. Therefore, I invite you to respond to the comments and revise your manuscript.
• Ethics statement If your study uses humans or animals please include details of the ethical approval received, including the name of the committee that granted approval. For human studies please also detail whether informed consent was obtained. For field studies on animals please include details of all permissions, licences and/or approvals granted to carry out the fieldwork.
• Data accessibility It is a condition of publication that all supporting data are made available either as supplementary information or preferably in a suitable permanent repository. The data accessibility section should state where the article's supporting data can be accessed. This section should also include details, where possible of where to access other relevant research materials such as statistical tools, protocols, software etc can be accessed. If the data has been deposited in an external repository this section should list the database, accession number and link to the DOI for all data from the article that has been made publicly available. Data sets that have been deposited in an external repository and have a DOI should also be appropriately cited in the manuscript and included in the reference list.
If you wish to submit your supporting data or code to Dryad (http://datadryad.org/), or modify your current submission to dryad, please use the following link: http://datadryad.org/submit?journalID=RSOS&manu=RSOS-201138 • Competing interests Please declare any financial or non-financial competing interests, or state that you have no competing interests.
• Authors' contributions All submissions, other than those with a single author, must include an Authors' Contributions section which individually lists the specific contribution of each author. The list of Authors should meet all of the following criteria; 1) substantial contributions to conception and design, or acquisition of data, or analysis and interpretation of data; 2) drafting the article or revising it critically for important intellectual content; and 3) final approval of the version to be published.
All contributors who do not meet all of these criteria should be included in the acknowledgements.
We suggest the following format: AB carried out the molecular lab work, participated in data analysis, carried out sequence alignments, participated in the design of the study and drafted the manuscript; CD carried out the statistical analyses; EF collected field data; GH conceived of the study, designed the study, coordinated the study and helped draft the manuscript. All authors gave final approval for publication.
• Acknowledgements Please acknowledge anyone who contributed to the study but did not meet the authorship criteria.
• Funding statement Please list the source of funding for each author.
Please ensure you have prepared your revision in accordance with the guidance at https://royalsociety.org/journals/authors/author-guidelines/ --please note that we cannot publish your manuscript without the end statements. We have included a screenshot example of the end statements for reference. If you feel that a given heading is not relevant to your paper, please nevertheless include the heading and explicitly state that it is not relevant to your work.
Because the schedule for publication is very tight, it is a condition of publication that you submit the revised version of your manuscript before 01-Aug-2020. Please note that the revision deadline will expire at 00.00am on this date. If you do not think you will be able to meet this date please let me know immediately.
To revise your manuscript, log into https://mc.manuscriptcentral.com/rsos and enter your Author Centre, where you will find your manuscript title listed under "Manuscripts with Decisions". Under "Actions," click on "Create a Revision." You will be unable to make your revisions on the originally submitted version of the manuscript. Instead, revise your manuscript and upload a new version through your Author Centre.
When submitting your revised manuscript, you will be able to respond to the comments made by the referees and upload a file "Response to Referees" in "Section 6 -File Upload". You can use this to document any changes you make to the original manuscript. In order to expedite the processing of the revised manuscript, please be as specific as possible in your response to the referees. We strongly recommend uploading two versions of your revised manuscript: 1) Identifying all the changes that have been made (for instance, in coloured highlight, in bold text, or tracked changes); 2) A 'clean' version of the new manuscript that incorporates the changes made, but does not highlight them.
When uploading your revised files please make sure that you have: 1) A text file of the manuscript (tex, txt, rtf, docx or doc), references, tables (including captions) and figure captions. Do not upload a PDF as your "Main Document"; 2) A separate electronic file of each figure (EPS or print-quality PDF preferred (either format should be produced directly from original creation package), or original software format); 3) Included a 100 word media summary of your paper when requested at submission. Please ensure you have entered correct contact details (email, institution and telephone) in your user account; 4) Included the raw data to support the claims made in your paper. You can either include your data as electronic supplementary material or upload to a repository and include the relevant doi within your manuscript. Make sure it is clear in your data accessibility statement how the data can be accessed; 5) All supplementary materials accompanying an accepted article will be treated as in their final form. Note that the Royal Society will neither edit nor typeset supplementary material and it will be hosted as provided. Please ensure that the supplementary material includes the paper details where possible (authors, article title, journal name).
Supplementary files will be published alongside the paper on the journal website and posted on the online figshare repository (https://rs.figshare.com/). The heading and legend provided for each supplementary file during the submission process will be used to create the figshare page, so please ensure these are accurate and informative so that your files can be found in searches. Files on figshare will be made available approximately one week before the accompanying article so that the supplementary material can be attributed a unique DOI.
Please note that Royal Society Open Science charge article processing charges for all new submissions that are accepted for publication. Charges will also apply to papers transferred to Royal Society Open Science from other Royal Society Publishing journals, as well as papers submitted as part of our collaboration with the Royal Society of Chemistry (https://royalsocietypublishing.org/rsos/chemistry).
If your manuscript is newly submitted and subsequently accepted for publication, you will be asked to pay the article processing charge, unless you request a waiver and this is approved by Royal Society Publishing. You can find out more about the charges at https://royalsocietypublishing.org/rsos/charges. Should you have any queries, please contact openscience@royalsociety.org.
Once again, thank you for submitting your manuscript to Royal Society Open Science and I look forward to receiving your revision. If you have any questions at all, please do not hesitate to get in touch. Comments to the Author: When making your revisions, please been sure to carefully address all of the detailed points raised by both reviewers.
In my opinion, authors should be largely free to choose their organisation and writing style, so I leave it up to you to decide if you want to take the advice of Referee 1 about these matters.
Reviewer comments to Author: Reviewer: 1 Comments to the Author(s) The manuscript is concerned with the introduction of a new measure of network incoherence which is based on a symmetrized graph Laplacian for weighted directed networks. The measure is tested on different real world data.
The manuscript is overall well written, but it is poorly organized and very wordy: it would benefit from reorganizing the material and incorporating in the text some of the results presented in the appendix. Moreover, many of the proofs could be carried out using formulas rather than words, and this simple switch would greatly improve readability. The comparison with other measures of incoherence should be carried out in a more thorough fashion, and it definitely deserve more space that it has been allocated in the manuscript. Disregarding directionality of edges is something that is usually best avoided, and I believe that the authors are not making a strong enough case for their decision to following this path in the manuscript.
I believe that the manuscript should be reconsidered for publication after a major revision.
There are a few points that I think are worth discussing and elaborating further on. Below I detail some of these.
p.2 eq (2.1): these quantities are extenstios of the cocept of "strength", introduced by Barrat et al. in [PNAS (2004), 101(11),3747-3752]. I would recommend that the authors refer to this manuscript (and subsequent generalization to digraphs, if any) and that they use the term "in/out-strength" or similar, in order to emphasize the relationship with the index introduced in 2004.

p.2, eqs (2.2)-(2.3)
: what is the rationale for calling these "weight" and "imbalance"? p.2. eq (2.4): this appears to be an extension to the weighted case of the a symmetrized graph Laplacian for digraphs (as can also be seen from equation (2.5)). This type of approach to the treatment of directed graphs is often criticised in the literature, as it completely changes the topology of the network (especially in the case of highly non-symmetric matrices W). Could the authors justify their approach and explain further why disregarding directionality of edges is the right thing to do in this context? In my opinion the justification is quite weak, as it stands. (This also links to the contents of page 9). p.3 eq (2.5): please specify who the vector u is.
p.3 l.10: here h is characterized as being *the* solution to \Lambda h = v (please add specification of who v is). However, in l. 14 the authors state that \Lambda h = v does not have a unique solution. Please change l.10 to state that h is *a* solution and fully characterize span{h: \Lambda h = v}.
p.3 l.14: Instead of considering the case of a disconnected network with several weakly connected components, it would be easier to just focus on the case of weakly connected networks; Then the matrix W+W^T is the (weighted) adjacency matrix of a connected undirected graph and therefore the vector of all ones spans the null space of W+W^T. The case of disconnected networks follows from, e.g., chapter 6.13.3 in "Networks  p.5 l.6: what does it mean for a network to be incoherent? Here the authors seem to back some known fact about IO networks with what they observe using F_0. However, shouldn't it be the other way around, with the values of F_0 leading the authors to derive that these networks are incoherent?
p.5 l.56: What do he authors mean by "cyclic network"? p.7 l. 10: eigenvector centrality instead of eigenvalue centrality. p.7 l. 11: "Trophic analysis reveals that this network is strongly directional": what does directionality have to do with the value of F_0? The authors should try and keep their notation as consistent as possible throughout the manuscript. p.7 l.50: "et al." instead of "et al" p.10 ll. 37 ff: It is quite unclear the purpose of these paragraphs: please either expand further on these (by adding formulas as well, when appropriate) or remove these entirely.
Section 5: I understand what question the authors are trying to address, but it escapes me why this question should be of interest in the first place.
p. 11 ll. 53-56: "The term "normal" came from people who spent their lives with self-adjoint operators and unitary operators, both of which are normal, but people working in stability of ordinary differential equations are fully cognizant that most matrices are not normal." Please remove or rephrase this sentence.
p. 11 l 58: cut "imbalance vector" or rephrase as "implies that the imbalance vector is the zero vector: v=0".
p. 12 l. 9: "When v = 0 we say that the network is balanced." p. 12 l.10: what is a normal network? p.12 l. 17-18: The authors state the following: "if W is normal and has all eigenvalues real then F_0 = 1". Having previously noted that F_0=1 for symmetric matrices, the result is trivial. Indeed, a matrix is normal iff it is unitarly diagonalizable. Moreover, a unitarly diagonalizable matrix with real spectrum is Hermitian. Since the authors are assuming that W is real, "normal with all real eigenvalues" is a complicated way of saying "symmetric".
p.12 l.36: this statement (and the proof in the appendix) appears to be true only for networks without self-loops.
p.12 l.57: is r>1? p.15 l.8: "A cycle in a directed network is a closed walk in it. In contrast to some of the literature, we allow repeated edges and repeated nodes" Instead of improperly calling it cycle, the authors could refer to this object as a closed walk. Please also recall the definition of walk.

Decision letter (RSOS-201138.R1)
We hope you are keeping well at this difficult and unusual time. We continue to value your support of the journal in these challenging circumstances. If Royal Society Open Science can assist you at all, please don't hesitate to let us know at the email address below.
Dear Dr MacKay, It is a pleasure to accept your manuscript entitled "How directed is a directed network?" in its current form for publication in Royal Society Open Science. The comments of the reviewer(s) who reviewed your manuscript are included at the foot of this letter.
Please ensure that you send to the editorial office an editable version of your accepted manuscript, and individual files for each figure and table included in your manuscript. You can send these in a zip folder if more convenient. Failure to provide these files may delay the processing of your proof. You may disregard this request if you have already provided these files to the editorial office.
You can expect to receive a proof of your article in the near future. Please contact the editorial office (openscience_proofs@royalsociety.org) and the production office (openscience@royalsociety.org) to let us know if you are likely to be away from e-mail contact --if you are going to be away, please nominate a co-author (if available) to manage the proofing process, and ensure they are copied into your email to the journal.
Due to rapid publication and an extremely tight schedule, if comments are not received, your paper may experience a delay in publication.
Please see the Royal Society Publishing guidance on how you may share your accepted author manuscript at https://royalsociety.org/journals/ethics-policies/media-embargo/.
Thank you for your fine contribution. On behalf of the Editors of Royal Society Open Science, we look forward to your continued contributions to the Journal. This work looks at concepts and algorithms for identifying and quantifying structure that may be hidden in pairwise interaction networks.
I found the submission to be well-written and novel, and I enjoyed reading it. The work is novel and elegant. It makes a clear contribution and is likely to have a wide impact. It combines ideas, analysis and well-chosen examples on real data sets.
I like the organization of the manuscript: getting the main point across first and discussing related work later.
I have just a couple of minor comments; these are not vital: • It is interesting (to me) that removing the −1 in (2.7) would reduce to the classical and widely used graph Laplacian/Fielder vector structure. Perhaps this could be mentioned somewhere.
• The figures are generally quite compelling, however it is not always easy to see all the edges and to identify their direction. Figure 4 is the most extreme example. Is there any way of dealing with this?
• The Discussion section undersells the material and finishes on a strange note. Given that many readers will go straight there, I would recommend a longer and more forceful description of the contributions.
In my opinion, authors should be largely free to choose their organisation and writing style, so I leave it up to you to decide if you want to take the advice of Referee 1 about these matters.
We are grateful for the reviewers' comments and for the freedom you are giving to us to decide about organisation of the paper and writing style. We chose the organisation deliberately: after an introduction which mentions the ways in which we've improved over previous methods, we present our method and give some illustrations; then we make a comparison with previous methods, followed by several significant connections to other network properties. We also chose to relegate most of the mathematics to appendices because we wanted to keep the paper accessible to less mathematically oriented readers, especially from social science, where we believe the paper can have big impact. We wish to keep to this organisation. On writing style, we feel the style we have adopted is appropriate; again, we chose it to attempt to keep on board readers of a less mathematically oriented background, so it is perforce more wordy than some papers.

Response to Reviewer 1
Reviewer comments to Author: Reviewer: 1 Appendix B Comments to the Author(s) The manuscript is concerned with the introduction of a new measure of network incoherence which is based on a symmetrized graph Laplacian for weighted directed networks. The measure is tested on different real world data.
The manuscript is overall well written, but it is poorly organized and very wordy: it would benefit from reorganizing the material and incorporating in the text some of the results presented in the appendix. We chose the organisation of the material deliberately, to present the method as early as possible, illustrate its use to attract the general reader's interest, and then discuss in detail comparisons with previous methods, followed by connecting to other network properties. We also chose deliberately to put most of the mathematical proofs into appendices, so that less mathematically inclined readers would not be put off, because we believe a major domain of impact for the method will be the social sciences. Furthermore, the other reviewer liked the organisation! Moreover, many of the proofs could be carried out using formulas rather than words, and this simple switch would greatly improve readability.
Most of the proofs are done by formulae. The other proofs are written so that a less mathematically inclined reader can follow them.
The comparison with other measures of incoherence should be carried out in a more thorough fashion, and it definitely deserve more space that it has been allocated in the manuscript. There is only one established other measure of incoherence of which we are aware and that is the one of [JDDM] which we cover thoroughly. We have expanded our comments on the notion used by [CHK]. We consider our comments on the notions in [T] and [LM] sufficient. We make the connection with `circularity' of [KIII]. Disregarding directionality of edges is something that is usually best avoided, and I believe that the authors are not making a strong enough case for their decision to following this path in the manuscript. It is a misunderstanding to say we have disregarded the directionality of edges.
The whole paper is about directed networks. Although the graph-Laplacian is symmetric, the imbalance vector is antisymmetric and that is where the directionality is encoded.
I believe that the manuscript should be reconsidered for publication after a major revision.
There are a few points that I think are worth discussing and elaborating further on. Below I detail some of these.