facebookresearch / facebookresearch/BenchMARL
Compatibility and hidden state handling of RNN with Off-Policy Algorithms
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 662
- Forks
- 137
- PR merge metrics
- No merged PRs in 30d
Description
Hi BenchMARL team,
First of all, thank you for this amazing and highly modular library!
I am currently working on a custom MARL environment where I need agents to process spatial topologies as well as retain temporal memory. To achieve this, I am combining a GNN and a GRU using the SequenceModelConfig alongside the Masac (Off-policy) algorithm.
My model configuration looks like this:
model_config = SequenceModelConfig( model_configs=[gnn_config, gru_config], intermediate_sizes=[256], )
since MASAC is an off-policy algorithm, I have a few theoretical and implementation questions regarding how it handles the replay buffer and optimization:
-
Replay Buffer Sampling & BPTT: When using an RNN (GRU/LSTM) in an off-policy setting like MASAC, does the BenchMARL replay buffer automatically sample intact trajectories/sequences instead of independent random transitions? If so, how is the sequence length (BPTT length) defined and controlled?
-
Hidden State Management during Training: During the off-policy _optimizer_loop, does the framework use the stale hidden states stored in the replay buffer, or does it perform a "burn-in" to recompute the hidden states using the most up-to-date network weights?
-
Out-of-the-box Compatibility: Is the combination of SequenceModelConfig(GNN, GRU) + Masac fully supported out-of-the-box? Are there any specific parameters I need to tweak in the ExperimentConfig (e.g., specific batching rules for off-policy RNNs) to ensure the recurrent gradients backpropagate correctly?
Any guidance or pointers to relevant parts of the codebase would be highly appreciated. Thanks again for your time and for maintaining this great project!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the named SequenceModelConfig, Masac off-policy optimizer loop, replay buffer, and ExperimentConfig entry points. Determine how sequence sampling, BPTT length, and hidden-state handling currently work, then document whether the GNN-plus-GRU configuration is supported and which settings are required; completion should answer all three questions with code references or identify the missing implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100