Small batch deep reinforcement learning

In value-based deep reinforcement learning with replay memories, the batch size parameter specifies how many transitions to sample for each gradient update. Although critical to the learning process, this value is typically not adjusted when proposing new algorithms. In this work we present a broad empirical study that suggests {\em reducing} the batch size can result in a number of significant performance gains; this is surprising, as the general tendency when training neural networks is towards larger batch sizes for improved performance. We complement our experimental findings with a set of empirical analyses towards better understanding this phenomenon.

Paper

References (60)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer vSto7/10 · confidence 4/52023-06-09

Summary

The paper demonstrates the advantages of employing smaller batch sizes in value-based RL algorithms. It reveals that utilizing a smaller batch size can moderately or significantly enhance performance across several value-based RL algorithms, with the exception of DQN, where there are no improvements. Nonetheless, the paper reveals that incorporating a deeper network or employing n-step returns can restore the benefits of smaller batch sizes in the case of DQN. To examine the underlying reasons behind the benefits of smaller batch sizes, the paper conducts a comprehensive set of experiments. These experiments investigate various factors, such as increased update variance, reduced representation norm, and improved network expressivity, shedding light on how smaller batch sizes can help performance.

Strengths

- The paper presents a comprehensive and robust series of experiments, providing evidence for the effectiveness of smaller batch sizes in various value-based RL algorithms. - The analysis conducted in the paper offers clear insights into the reasons why smaller batch sizes yield improvements in performance. - The paper also delves into an in-depth investigation to understand why smaller batch sizes do not yield benefits in the case of DQN, providing valuable insights and explanations for this observed phenomenon.

Weaknesses

While the result may not be technically novel, I agree that a comprehensive study on the topic of the benefits of smaller batch sizes is still highly valuable to the research community. Although some researchers are aware that smaller batch sizes can be beneficial, as seen in certain implementations of existing algorithms, such as IMPALA (e.g., https://github.com/facebookresearch/torchbeast uses a default batch size of 8), there is a lack of thorough analysis on this matter. Thus, the paper fills this gap and provides valuable insights and understanding of the issue. I appreciate the significance and value that the paper brings to the field.

Questions

I suggest explaining the intuition on how the n-step return interplays with the batch size. My guess is the n-step return has a larger variance than a single-step return, and a smaller batch size can somehow further magnify this variance.

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

4 excellent

Presentation

4 excellent

Contribution

3 good

Limitations

I don't see any clear limitations in this study.

Reviewer scQb7/10 · confidence 4/52023-07-04

Summary

This work studies the effect of reducing the batch size in value-based deep RL algorithms. Surprisingly, the authors find that smaller batch sizes generally improve learning performance and speed up training in terms of wall-clock time. Towards understand this "small batch effect", they empirically investigate how batch size relates to e.g. multistep learning, variance of gradient updates, network capacity, network plasticity, etc.

Strengths

1. Overall, the writing is extremely clear and well-organized. While reading, I found myself asking questions that the authors then answered in later section of the paper (e.g. Lines 125-129 prompted questions on how batch size relates to plasticity and network capacity) 2. The empirical evaluation is thorough; the authors consider a wide range of Atari tasks and investigate how batch size relates to a variety of learning factors. 3. The relationships uncovered in this work relate to many RL research areas (e.g. exploration, continual learning), and I believe they will spur interesting future research.

Weaknesses

1. The study only considers visual tasks with discrete actions. Does a small batch size improve data efficiency if you use the non-visual RAM observations in a few representative tasks? Do the same trends observed in Fig. 11 still hold? Since the paper is scoped to focused on value-based algorithms, I believe it is sufficient to state the discrete action limitation in the conclusion. 2. Since a smaller batch size seems to come with a variety of benefits (e.g. smaller gradient norms), it isn't clear to me if the observed benefits in Fig. 6 are due to improved exploration via higher variance gradient updates. Since it is likely not feasible to isolate exploration, can the authors instead clarify how these figures show improved exploration? **Minor comments:** 2. Lines 59-60: "r" -> "r_t" 3. I believe line 265 should say "**decreasing** the batch size should increase variance" 3. Lines 266-268: "That it's effect..." This sentence is difficult to read and would benefit from rephrasing.

Questions

1. Fig. 1: Can the authors provide any intuition on why 22/60 tasks performed worse with a smaller batch size with QR-DQN? 2. In Fig. 8, a larger batch size improves performance only for learning rate = 5e-06. Can the authors provide explanation?

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

4 excellent

Presentation

4 excellent

Contribution

3 good

Limitations

See Weaknesses

Reviewer oeF67/10 · confidence 5/52023-07-06

Summary

The work investigates the influence of replay batch size in experience replay for online reinforcement learning. The key finding is that reducing the batch size can be more beneficial, which contradicts common knowledge about regular deep learning.

Strengths

The paper expands the analysis of an underinvestigated observation that can potentially change the default settings for experience replay and reduce the computational cost of further experiments. The authors provide new insights into the computational impact of batch size in experience replay and analyze network optimization dynamics. One of the strengths of the paper is its extensive experiments conducted with different settings and architectures.

Weaknesses

Experience replay is also used in continual learning. It is surprising that the authors missed the paper that already drew the same conclusion [1], but kept it underinvestigated. Nonetheless, it should be mentioned in the related work section. [1] Wołczyk, M., & Krutsylo, A. (2021). Remember More by Recalling Less: Investigating the Role of Batch Size in Continual Learning with Experience Replay (Student Abstract). AAAI Conference on Artificial Intelligence.

Questions

-

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

5: You are absolutely certain about your assessment. You are very familiar with the related work and checked the math/other details carefully.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

Not applicable

Reviewer KbLx4/10 · confidence 4/52023-07-07

Summary

The authors study how batch size affects RL performance, and argue that a reduced batch size might (quite surprisingly) bring better performance improvement in a number of settings, in particular for QR-DQN, a smaller batch can lead to much better performance (almost doubling the performance). Different batch sizes are tested in Atari environments together with other hyperparameter changes. The authors also point out a benefit of using a smaller batch size is the reduction in wall clock time. The paper focus on empirical study and analysis, and provide a list of interesting findings.

Strengths

**originality** - the paper dedicates to bring a better understanding of effect of smaller batch sizes with extensive empirical studies, although there are already past works that study the effect of batch sizes, the results in this paper bring some new findings and observations and can be considered novel contribution. **quality** - overall presentation is good, but some arguments can be improved. - extensive experiments and ablations are great **clarity** - Overall paper is clear to read. And the structure is easy to follow. **significance** - the observations presented in the paper can be interesting to the research community and help us better understand the effect of different batch size settings - the authors argue that a smaller batch size can bring wall-clock time reduction and given the results they also have potential to bring better performance, which is a result that can be helpful towards better algorithms

Weaknesses

Major concerns: **related work** - the authors claim "Surprisingly, to the best of our knowledge there have been no studies exploring the impact of the choice of batch size in deep RL." well, there are indeed some works that touch on this issue, for example to list a few: - Accelerated Methods for Deep Reinforcement Learning by Adam Stooke and Pieter Abbeel. - Reproducibility of Benchmarked Deep Reinforcement Learning Tasks for Continuous Control by Islam et al. - Shallow updates for deep reinforcement learning by Levine et al. - An Empirical Model of Large-Batch Training by McCandlish et al. - these are older papers, please do some search on google scholar and have a better discussion of related works. Some of these works found larger batch size to be more beneficial. The authors need to spend a bit more effort in looking at related work and try to explain the discrepancy. **Arguments and conclusions made in the paper** - Some of the arguments can be improved, for example line 95: "In Figure 3 we can observe that, in general, reduced batch size results in improved performance." I don't think this is true, in Figure 3 there are 8 curves in 4 figures that have lower batch sizes than default, and 4 out of these 8 curves have weaker performance than the default, while the other 4 one can argue they are stronger or slightly stronger than default. One can argue in QR-DQN batch size of 8 is really good, but from this figure alone I don't see how it's a general trend. - Line 226 Figure 11 (third column), I am not convinced there is a clear correlation between batch size and gradient norm. The variance is high, and for Asteroids and SpaceInvaders it seems in late stage of training they start to get higher gradient norms. - Line 242 authors argue that " it is possible that the network is better able to adapt to an earlier rank collapse than to a later one." I am not sure how this argument is made, figure 11 col 5 shows that Srank does not positively correlate with performance at all. It seems this collapse has no negative effect on the training or even indicates stronger performance, which is again kind of going against what has been argued in previous literature. And the argument that "Smaller batch sizes seem to result in networks that are both more expressive and with greater plasticity." seems to be entirely wrong to me, as figure 11 shows on SpaceInvaders, small batch size of 8 has lowest srank and highest percentage of dormant neurons. - Overall, I found a number of the points made in paper to be only supported by very weak evidence and they are not convincing. The authors might want to either modify the arguments into more accurate ones, or try to find better evidence to support the arguments. If the evidence is weak, the conclusion might not hold at all and it could be really coming from randomness or because of excessive fine-tuning on a particular algorithm on some particular environments. The paper is currently lacking in these 2 aspects, but can be a good paper if these concerns are properly addressed. Minor concerns: - **originality** the novelty of the work is reduced by the fact that it is focused on studying existing methods, but mitigated by the novel empirical results, ablations and analysis.

Questions

Suggestions as discussed in weakness section: - spend more effort on related work and explain discrepancies from conclusions in the previous literature. After looking at these previous findings, why do you think your results are different from these findings that mostly say larger batch sizes are better? - go through the arguments made in the paper, modify them to be more accurate or bring in better evidence to support them.

Rating

4: Borderline reject: Technically solid paper where reasons to reject, e.g., limited evaluation, outweigh reasons to accept, e.g., good evaluation. Please use sparingly.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

2 fair

Presentation

3 good

Contribution

3 good

Limitations

N/A

Reviewer vSto2023-08-10

Thank you for your response. I suggest expanding more on the different types of variance in the revised paper and how the two variance interplay. My understanding is that the gradient update is the average of m iid random variables, and n-step return increases the variance by increasing individual variance, while a smaller batch size increases the variance by reducing m. This may explain how n-step return is needed for a small batch size to show effects, as the two sources of variance are multiplied together. I have no additional questions and will stand by my initial score.

Authorsrebuttal2023-08-18

Expanding discussion on different types of variance

Thank you for your suggestion. We agree with your interpretation of the two types of variance and agree that it would be worthwhile to expand on this in our revised paper!

Reviewer scQb2023-08-16

Thank you for your response. All of my comments have been addressed, and I maintain my score. When I asked why smaller batch sizes decrease performance in 22/60 games, I should've been more specific. I meant to ask if these 22 games had anything in common that might explain why small batch sizes don't help? For instance, Fedus et. al [1] noted that most tasks saw an increase in performance when the replay buffer contained "younger" data (i.e data form more recent policies), though hard exploration tasks saw a significant drop in performance. [1] Revisiting Fundamentals of Experience Replay. Fedus et. al. ICML 2020.

Authorsrebuttal2023-08-18

Commonality between 22 games

Thank you for clarifying your point about the 22 games, which is a good question to raise. While we don't observe any clear game characteristic that would be indicative of whether it would benefit from smaller batch sizes, we do observe some commonality between some of the algorithms we considered. For example, in both YarsRevenge and JamesBond a batch size of 8 does the worst for QR-DQN (see Figure 15 in the appendix), which is also the case for IQN (see Figure 19 in the appendix). We are generating per-game plots for some of the other figures generated in the main paper and include them in the appendix, as these per-game results can prove useful for investigating commonalities across games, as you suggest. We will expand our discussion to include these points, thank you for suggesting it!

Authorsrebuttal2023-08-18

Are your concerns addressed?

Dear reviewer, Given that the discussion period with authors is almost over, we wanted to reach out to see if there were any of your concerns you felt were not properly addressed, so that we may have time to respond to them if so. If all your concerns have been addressed, we would invite you to revise your score accordingly. Once again, thank you for the careful review of our paper!

Reviewer KbLx2023-08-21

Thank you for the rebuttal

I thank the authors for the rebuttal. There are definitely a lot of improvements, it's good to have some potential explanation for the discrepancy between this work and previous works, and it is great to make the arguments more accurate in some cases. I think the paper is quite interesting, but I'm still a little unsure whether the paper at this point is fully ready for publication, but I will take these into consideration in the reviewer discussion phase.

Program Chairsdecision2023-09-21

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC