Peer Review History

Original SubmissionJanuary 31, 2023
Decision Letter - Ulrik R. Beierholm, Editor, Marieke Karlijn van Vugt, Editor

Dear student Ichikawa,

Thank you very much for submitting your manuscript "Bayesian inference is facilitated by modular neural networks with different time scales" for consideration at PLOS Computational Biology.

As with all papers reviewed by the journal, your manuscript was reviewed by members of the editorial board and by several independent reviewers. In light of the reviews (below this email), we would like to invite the resubmission of a significantly-revised version that takes into account the reviewers' comments.

Note especially that some of the reviewers highlighted issues with the clarity of the writing.

We cannot make any decision about publication until we have seen the revised manuscript and your response to the reviewers' comments. Your revised manuscript is also likely to be sent to reviewers for further evaluation.

When you are ready to resubmit, please upload the following:

[1] A letter containing a detailed list of your responses to the review comments and a description of the changes you have made in the manuscript. Please note while forming your response, if your article is accepted, you may have the opportunity to make the peer review history publicly available. The record will include editor decision letters (with reviews) and your responses to reviewer comments. If eligible, we will contact you to opt in or out.

[2] Two versions of the revised manuscript: one with either highlights or tracked changes denoting where the text has been changed; the other a clean version (uploaded as the manuscript file).

Important additional instructions are given below your reviewer comments.

Please prepare and submit your revised manuscript within 60 days. If you anticipate any delay, please let us know the expected resubmission date by replying to this email. Please note that revised manuscripts received after the 60-day due date may require evaluation and peer review similar to newly submitted manuscripts.

Thank you again for your submission. We hope that our editorial process has been constructive so far, and we welcome your feedback at any time. Please don't hesitate to contact us if you have any questions or comments.

Sincerely,

Ulrik R. Beierholm

Academic Editor

PLOS Computational Biology

Marieke van Vugt

Section Editor

PLOS Computational Biology

***********************

Reviewer's Responses to Questions

Comments to the Authors:

Please note here if the review is uploaded as an attachment.

Reviewer #1: The authors present computational work showing that RNN can learn to represent prior and likelihood information in a close-to-optimal manner by obeying Bayes rule, and that this is accomplished by separated submodules that specialize to represent the prior with slow neurons and the likelihood with fast neurons. Overall, the paper is interesting and provide some novel results.

The introduction can be improved. It does not make justice to the interesting results that follow in the Results section. Also, in general the quality of English can be improved.

I wonder what would be the optimal architecture in the limit where p_t (the transition probability) goes to zero. I would assume that in this limit no modular architecture is needed, as the prior is fix and does not change over time (and it can be stored in the weights of the network). Could the author perform simulations of this case, and compare to the limit of p_t going to zero, as in Fig. 3b?

More details describing the learning method is needed. It is unclear how learning works when the prior distribution is changed over time with probability p_t. Is the prior relearn at each step? Or one uses all the data to train the network? For how long episodes? If yes, the network will naturally adapt to the time scale of the changes, but more discussion is needed.

The authors claim in the discussion that in the brain different subnetworks are in charge of encoding priors and likelihoods. I think that the authors are right that generally speaking slow, high level variables are encoding in higher brain areas than fast, low level variables. However, there are some exceptions. For instance, in the work by Mochol et al, Current Biology, 2021, it is shown that prefrontal cortex encodes both priors and likelihoods in the same brain area. Therefore, I would rewrite the discussion and being more cautious about this.

In Fig. 8, I would not use transparent colors to display the distributions.

Line 3: animal brain -> animal brains

Line 83: are the noise terms assumed to be independent

Line 88-89: ‘and’ in cursive

Line 208: unclear why y depends explicitly on s. I thought that it would depend only on x_m explicitly.

Reviewer #2: When performing Bayesian inference, the "prior" often changes abruptly, and for inference to be accurate these changes must be tracked. Here the authors investigate a modular network with both slow and fast timescales. They find an optimal timescale in the slow network. And, they also show that the timescale, and modular structure, can be learned, something that is very important.

Overall, this is an interesting paper that, I think, should be published. However, I got pretty lost in places, and the authors should clarify things before it's released to the public. The following comments should clarify my confusion (and also point out other issues, which were more minor).

1. Larger font on figures would be greatly appreciated -- some were _very_ hard to read (because I'm old ;)).

2. l 80, typo, I think: "= 0" --> "= z".

3. Fig. 3: the y-axes should start at zero, to make it easy to see how big the effect is.

4. Fig. 3 (especially blue points in panel b): why not do more runs to decrease the error bars?

5. l 168: Fig. 2b should be Fig. 3b, I think.

6. l 195-232: Here I got very lost. You talk about setting mu_g and sigma_g for each module. But you can't do that, right? Instead, all you can do is determine how the input is generated. So the analysis doesn't make sense to me.

7. l 264: I got somewhat confused here as well. It seems to me that mu_p and sigma_p are internal values that are not directly accessible. If so, how can you find a transformation from x to mu_p (l 272)?

That said, the result of this analysis -- that alpha_s=0.1 uses more past information than alpha_s=1 -- is not surprising. But it doesn't explain why alpha_s=0.1 is better for rapid switches. Maybe that explanation was where I got lost?

Reviewer #3: # Paper synopsis

In the paper *Bayesian inference is facilitated by modular neural networks with different time scales*, Kohei Ichikawa and Kunihiko Kaneko explore how recurrent neural networks capture short and long timescales effects in a dynamic Bayesian inference problem. In particular, they study how a modular RNN architecture with different timescales for their respective neural activity dynamics can better predict a noisy stimulus than an RNN with a simpler architecture. The paper quantitatively assesses numerous features of the modular architecture, and overall demonstrates that the modular RNN learns to represent long-time scale, prior information in the slow timescale submodule, whereas the fast timescale module learns to focus on the immediate problem of identifying the noisy stimulus.

# Review and general recommendations

Overall I did like aspects of this paper, and I think the questions the authors raise about the role of timescales in inference are quite interesting. Moreover, the simulations they perform take some steps towards answering them. Nevertheless, the paper in its present form has fundamental issues:

(i) Overall the paper feels underdeveloped. Although particular explanations are written well enough, a lot of the text feels meandering, incomplete, and hard to follow. The figures also suffer from often conveying relatively little information, and with poor formatting and hard to read text. As such, this is a frustrating paper to review, because although I think some of the content is good, I feel like it's conveyed quite poorly. I feel the authors sent off this manuscript prematurely.

(ii) Similarly, the simulations presented in the paper are extremely limited both in breadth and quantity. As a neural network paper where the simulations are presumably not compute-intensive, I would like to see much broader testing of the hyper parameters of the network, from timescales, to number of neurons, to switching probabilities. Can the authors provide cases where the modularity of the network is *not* necessary? If the authors wish to support their claims with simulations rather than analysis, then the simulations must be to a much higher standard.

Overall, based on the current amount of content, it feels like a tightly written version of this paper could fit into 5 pages. I apologize that such a comment does not provide the authors with much guidance, but in its present form the paper feels too underdeveloped to identify exactly where to fill it in. These issues prevent me from recommending the paper for publication, and the authors will have to undertake major revisions to prepare it for publication.

# Local comments

(2023-04-07, 10:45:14 a.m.)

“when performing Bayesian inference by the brain.” (p. 1) redundant

“uncertainty” (p. 2) please cite Sokoloski in Neural Computation, 2017

“the” (p. 3) a

“the results to be discussed are 76 not altered as long as both the numbers are sufficient (say 100 vs. 50, 150 vs. 150 for 77 fast and slow neurons)” (p. 4) a bit more detail

“xmandxs” (p. 4) typo

“αmandαs” (p. 4) typo

“Then” (p. 5) this connecting word is confusing. Does this sentence follow from the previous?

“the ease of firing” (p. 5) tuning curve width?

“Therefore, training was performed to minimize the mean squared error (MSE) between the neural network output y(t) and the true value ytrue(t)” (p. 5) this is a unrealistic assumption and should be justified more.

“Hyperparameters” (p. 6) the amount of detail here is excessive. Focus on the key parameters

“pt” (p. 6) Why isn't this variable on the other side?

“Fig 4.” (p. 8) This figure only provides a weak demonstration of the point

“The network with αs = 1 could not follow rapid input changes, whereas that with αs = 0.1 could estimate the input prior effectively.” (p. 8) it would be nice to have some kind of explanation of how the alpha s timescale compared with the timescale of the switching. Is there an optimal alpha s that depends on switch speed?

“Fig 6” (p. 10) Labels and text are tool small in figures. Normalize text sizes across all figures.

“SI for the case” (p. 11) supplementary information? Please improve reference

“Effects of different time scales” (p. 11) This section seems far harder to read than it should be, given the simplicity of the point the authors are trying to make

“To examine the impact of αs differences on Bayesian inference accuracy in detail, we 258 considered how each model with αs = 1 and αs = 0.1 represents prior as a function of 259 the input signal.” (p. 11) At some point I would like to see key model hyperparameters thoroughly grid searched

“ak defined by Eq.14 is plotted against t, for the model with αs = 1 and αs = 0.1 using 3000 data points.” (p. 12) Figure text is unhelpful. It should be possible to have some understanding of the figure based on the caption

“Then,” (p. 12) You mean to say this is what this section is going to be about? This makes it sound like you've already done it

“normal RNN” (p. 12) reference earlier equations?

“In summary, a modular structure, shown in Fig.1(b), 315 emerged through learning alone.” (p. 12) The way this section is set up, it feels like it trivializes the earlier results of the paper. You could (and maybe should) simply start the paper with this section, show that 0.1 is optimal, and then analyze the results throughout the rest of the paper. I spent a lot of time in this paper trying to guess why the authors chose particular settings for various hyperparameters.

“Future research should investigate 342 how this optimal time scale depends on the time scale of environmental changes.” (p. 13) I think this research needs to be in this study

**********

Have the authors made all data and (if applicable) computational code underlying the findings in their manuscript fully available?

The PLOS Data policy requires authors to make all data and code underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data and code should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data or code —e.g. participant privacy or use of data from a third party—those must be specified.

Reviewer #1: Yes

Reviewer #2: Yes

Reviewer #3: Yes

**********

PLOS authors have the option to publish the peer review history of their article (what does this mean?). If published, this will include your full peer review and any attached files.

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Do you want your identity to be public for this peer review? For information about this choice, including consent withdrawal, please see our Privacy Policy.

Reviewer #1: No

Reviewer #2: No

Reviewer #3: Yes: Sacha Sokoloski

Figure Files:

While revising your submission, please upload your figure files to the Preflight Analysis and Conversion Engine (PACE) digital diagnostic tool, https://pacev2.apexcovantage.com. PACE helps ensure that figures meet PLOS requirements. To use PACE, you must first register as a user. Then, login and navigate to the UPLOAD tab, where you will find detailed instructions on how to use the tool. If you encounter any issues or have any questions when using PACE, please email us at figures@plos.org.

Data Requirements:

Please note that, as a condition of publication, PLOS' data policy requires that you make available all data used to draw the conclusions outlined in your manuscript. Data must be deposited in an appropriate repository, included within the body of the manuscript, or uploaded as supporting information. This includes all numerical values that were used to generate graphs, histograms etc.. For an example in PLOS Biology see here: http://www.plosbiology.org/article/info%3Adoi%2F10.1371%2Fjournal.pbio.1001908#s5.

Reproducibility:

To enhance the reproducibility of your results, we recommend that you deposit your laboratory protocols in protocols.io, where a protocol can be assigned its own identifier (DOI) such that it can be cited independently in the future. Additionally, PLOS ONE offers an option to publish peer-reviewed clinical study protocols. Read more information on sharing protocols at https://plos.org/protocols?utm_medium=editorial-email&utm_source=authorletters&utm_campaign=protocols

Revision 1

Attachments
Attachment
Submitted filename: reply_to_referee_report.pdf
Decision Letter - Ulrik R. Beierholm, Editor, Marieke Karlijn van Vugt, Editor

Dear student Ichikawa,

Thank you very much for submitting your manuscript "Bayesian inference is facilitated by modular neural networks with different time scales" for consideration at PLOS Computational Biology. As with all papers reviewed by the journal, your manuscript was reviewed by members of the editorial board and by several independent reviewers. The reviewers appreciated the attention to an important topic. Based on the reviews, we are likely to accept this manuscript for publication, providing that you modify the manuscript according to the review recommendations.

Please prepare and submit your revised manuscript within 30 days. If you anticipate any delay, please let us know the expected resubmission date by replying to this email.

When you are ready to resubmit, please upload the following:

[1] A letter containing a detailed list of your responses to all review comments, and a description of the changes you have made in the manuscript. Please note while forming your response, if your article is accepted, you may have the opportunity to make the peer review history publicly available. The record will include editor decision letters (with reviews) and your responses to reviewer comments. If eligible, we will contact you to opt in or out

[2] Two versions of the revised manuscript: one with either highlights or tracked changes denoting where the text has been changed; the other a clean version (uploaded as the manuscript file).

Important additional instructions are given below your reviewer comments.

Thank you again for your submission to our journal. We hope that our editorial process has been constructive so far, and we welcome your feedback at any time. Please don't hesitate to contact us if you have any questions or comments.

Sincerely,

Ulrik R. Beierholm

Academic Editor

PLOS Computational Biology

Marieke van Vugt

Section Editor

PLOS Computational Biology

***********************

A link appears below if there are any accompanying review attachments. If you believe any reviews to be missing, please contact ploscompbiol@plos.org immediately:

Reviewer's Responses to Questions

Comments to the Authors:

Please note here if the review is uploaded as an attachment.

Reviewer #1: Thanks for the improvements in the paper.

Reviewer #2: I still like this paper, and it's better, but it's also still confusing in places. Comments follow, more or less in order of appearance.

1. Typo in Eq. 2: should be N_m < i, not N_m \\le i.

2. How can you run with alpha=1? In that regime doesn't x diffuse off to infinity?

3. How often is u sampled? Every time step? Or only when things change?

4. p_t is introduced on line 221, but I don't think you ever told us what it is.

6. Lines 238-9, "When a(t) is close to 1, the model’s prior is closer to generator B, and when a(t) is close to -1, it is closer to prior A." Shouldn't it be 0 and 1, not 1 and -1?

7. Fig. 2 is a bit unsatisfying. What we would like to see is a plot of y versus s for different values of mu_g and sigma_g. Along with a summary statistic.

8. The mu_p explanation was confusing. As far as I can tell, you fit a matrix to mu_g = W_{mu_p} x, and then declared that mu_p = W_{mu_p} x? Is that correct? If so, you should say so; if not, I'm lost.

9. Lines 362-4: "Here, note that the findings that the modular structure with slow/fast time scales works better for Bayesian inference do not necessarily imply that the structure can be achievable just by learning." I believe you're just saying that it's not clear that alpha can be learned. If so, you should say that. If not, I'm lost.

Reviewer #3: This article is much improved, and the authors have addressed the bulk of my

concerns. Here are some additional comments to help further improve the manuscript.

p. 3, l. 44: "...corresponds to the higher layer in the brain." This statement

needs to be rephrased and made more precise.

p. 3, l. 59: "...the prior more appropriately than regular RNN." explain what

you mean by this.

p. 3, Eq. 1: Make sure to introduce all variables in the equation, even if you

can only fully define them later in the text.

p. 4, l. 153: You should state somewhere here exactly which parameters of the

neural network you're optimizing.

p. 10, l. 279: "...strongly reflects the difference in the prior distribution to

the difference in output, respectively." This sentence is unclear.

**********

Have the authors made all data and (if applicable) computational code underlying the findings in their manuscript fully available?

The PLOS Data policy requires authors to make all data and code underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data and code should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data or code —e.g. participant privacy or use of data from a third party—those must be specified.

Reviewer #1: Yes

Reviewer #2: Yes

Reviewer #3: Yes

**********

PLOS authors have the option to publish the peer review history of their article (what does this mean?). If published, this will include your full peer review and any attached files.

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Do you want your identity to be public for this peer review? For information about this choice, including consent withdrawal, please see our Privacy Policy.

Reviewer #1: No

Reviewer #2: No

Reviewer #3: No

Figure Files:

While revising your submission, please upload your figure files to the Preflight Analysis and Conversion Engine (PACE) digital diagnostic tool, https://pacev2.apexcovantage.com. PACE helps ensure that figures meet PLOS requirements. To use PACE, you must first register as a user. Then, login and navigate to the UPLOAD tab, where you will find detailed instructions on how to use the tool. If you encounter any issues or have any questions when using PACE, please email us at figures@plos.org.

Data Requirements:

Please note that, as a condition of publication, PLOS' data policy requires that you make available all data used to draw the conclusions outlined in your manuscript. Data must be deposited in an appropriate repository, included within the body of the manuscript, or uploaded as supporting information. This includes all numerical values that were used to generate graphs, histograms etc.. For an example in PLOS Biology see here: http://www.plosbiology.org/article/info%3Adoi%2F10.1371%2Fjournal.pbio.1001908#s5.

Reproducibility:

To enhance the reproducibility of your results, we recommend that you deposit your laboratory protocols in protocols.io, where a protocol can be assigned its own identifier (DOI) such that it can be cited independently in the future. Additionally, PLOS ONE offers an option to publish peer-reviewed clinical study protocols. Read more information on sharing protocols at https://plos.org/protocols?utm_medium=editorial-email&utm_source=authorletters&utm_campaign=protocols

References:

Review your reference list to ensure that it is complete and correct. If you have cited papers that have been retracted, please include the rationale for doing so in the manuscript text, or remove these references and replace them with relevant current references. Any changes to the reference list should be mentioned in the rebuttal letter that accompanies your revised manuscript.

If you need to cite a retracted article, indicate the article’s retracted status in the References list and also include a citation and full reference for the retraction notice.

Revision 2

Attachments
Attachment
Submitted filename: reply_to_referee_report.pdf
Decision Letter - Thomas Serre, Editor

Dear student Ichikawa,

We are pleased to inform you that your manuscript 'Bayesian inference is facilitated by modular neural networks with different time scales' has been provisionally accepted for publication in PLOS Computational Biology.

Before your manuscript can be formally accepted you will need to complete some formatting changes, which you will receive in a follow up email. A member of our team will be in touch with a set of requests.

Please note that your manuscript will not be scheduled for publication until you have made the required changes, so a swift response is appreciated.

IMPORTANT: The editorial review process is now complete. PLOS will only permit corrections to spelling, formatting or significant scientific errors from this point onwards. Requests for major changes, or any which affect the scientific understanding of your work, will cause delays to the publication date of your manuscript.

Should you, your institution's press office or the journal office choose to press release your paper, you will automatically be opted out of early publication. We ask that you notify us now if you or your institution is planning to press release the article. All press must be co-ordinated with PLOS.

Thank you again for supporting Open Access publishing; we are looking forward to publishing your work in PLOS Computational Biology. 

Best regards,

Thomas Serre

Section Editor

PLOS Computational Biology

Marieke van Vugt

Section Editor

PLOS Computational Biology

***********************************************************

Reviewer's Responses to Questions

Comments to the Authors:

Please note here if the review is uploaded as an attachment.

Reviewer #2: I'm happy with the revisions.

I do, however, have one more comment. The first few times I looked at Eq. 1, I thought that I was the identity matrix and alpha was a diagonal matrix. However, I just noticed that I and alpha are are vectors. That's fine, but if so you need to make it clear that you're using element-wise multiplication; e.g., alpha x is a vector whose i^th component is alpha_i x_i. Alternatively, you could make this standard and change I to the identity matrix and alpha to a diagonal matrix.

Either is fine with me, and I definitely don't need to see the paper again.

**********

Have the authors made all data and (if applicable) computational code underlying the findings in their manuscript fully available?

The PLOS Data policy requires authors to make all data and code underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data and code should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data or code —e.g. participant privacy or use of data from a third party—those must be specified.

Reviewer #2: Yes

**********

PLOS authors have the option to publish the peer review history of their article (what does this mean?). If published, this will include your full peer review and any attached files.

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Do you want your identity to be public for this peer review? For information about this choice, including consent withdrawal, please see our Privacy Policy.

Reviewer #2: No

Formally Accepted
Acceptance Letter - Thomas Serre, Editor

PCOMPBIOL-D-23-00148R2

Bayesian inference is facilitated by modular neural networks with different time scales

Dear Dr Ichikawa,

I am pleased to inform you that your manuscript has been formally accepted for publication in PLOS Computational Biology. Your manuscript is now with our production department and you will be notified of the publication date in due course.

The corresponding author will soon be receiving a typeset proof for review, to ensure errors have not been introduced during production. Please review the PDF proof of your manuscript carefully, as this is the last chance to correct any errors. Please note that major changes, or those which affect the scientific understanding of the work, will likely cause delays to the publication date of your manuscript.

Soon after your final files are uploaded, unless you have opted out, the early version of your manuscript will be published online. The date of the early version will be your article's publication date. The final article will be published to the same URL, and all versions of the paper will be accessible to readers.

Thank you again for supporting PLOS Computational Biology and open-access publishing. We are looking forward to publishing your work!

With kind regards,

Zsofia Freund

PLOS Computational Biology | Carlyle House, Carlyle Road, Cambridge CB4 3DN | United Kingdom ploscompbiol@plos.org | Phone +44 (0) 1223-442824 | ploscompbiol.org | @PLOSCompBiol

Open letter on the publication of peer review reports

PLOS recognizes the benefits of transparency in the peer review process. Therefore, we enable the publication of all of the content of peer review and author responses alongside final, published articles. Reviewers remain anonymous, unless they choose to reveal their names.

We encourage other journals to join us in this initiative. We hope that our action inspires the community, including researchers, research funders, and research institutions, to recognize the benefits of published peer review reports for all parts of the research system.

Learn more at ASAPbio .