Recurrent Structural Policy Gradient for Partially Observable Mean Field Games
Authors: Clarisse Wibault, Johannes Forkel, Sebastian Towers, Tiphaine Wibault, Juan Duque, George Whittle, Andreas Schaab, Yucheng Yang, Chiyuan Wang, Maike Osborne, Benjamin Moll, Jakob Foerster
Organizations: FLAIR, University of Oxford · MLRG, University of Oxford · ifo Institute, LMU Munich · Mila, Québec AI Institute · UC Berkeley · University of Zurich · Peking University · London School of Economics
Mean Field Games (MFGs) provide a principled framework for modelling interactions in large population systems. However, algorithmic progress has been limited since model-free methods are high variance and exact methods scale poorly. Recent Hybrid Structural Methods (HSMs) reduce variance while maintaining tractability by leveraging low-dimensional individual state and action spaces and known transition dynamics to compute the exact expected return conditioned on Monte Carlo rollouts of common noise. However, HSMs have not been extended to partially observable settings. We propose Recurrent Structural Policy Gradient (RSPG), the first history-aware HSM for MFGs with public partial information. RSPG achieves an order-of-magnitude faster convergence than model-free RL methods while learning history-aware behaviour, unlike current HSMs. To facilitate research into MFGs, we also introduce MFAX, our JAX-based framework for MFGs that supports both analytic and sample-based mean-field updates. MFAX and usage examples can be found at https://clarisse-wibault.github.io/rspg/.
Figures & tables
Figure 1: Top left : analytic mean-field updates compute exact expectations over next states. Bottom left : sample-based mean-field updates re-approximate the mean-field at each step. Right : RSPG architecture.
Figure 2Figure 3Figure 4Figure 5Figure 6Figure 7
Mean-Field Update
Transition Dynamics
Features
Library
Analytic
Sample
White-Box
Black-Box
Part. Observable
Common Noise
Multiple μ0
MFAX
Y
Y
Y
Y
Y
Y
Y
OpenSpiel
Y
N
N
Y
N
N
N
MFGLib
Y
N
N
Y
N
N
N
Table 1: Comparison of Open-Source MFG libraries .
Library
Language
Mean-Field Update (sec)
MFAX
Python
Analytic: 2.98\times10−4
Sample: 4.35\times10−4
OpenSpiel
C++
5.44\times10−3
MFGLib
Python
3.58\times10−1
Table 2: Time for one mean-field update of the Linear Quadratic environment (100 states and 7 actions ( Wu et al., 2025 ) ). Experiments averaged over 90 updates after 10 warm-up steps (excluding compilation time) and conducted on NVIDIA L40S GPUs (48 GB).
Figure 2: Exploitability versus training wall-clock time for partially observable Linear Quadratic , Beach Bar , and Macroeconomics environments. Experiments conducted on NVIDIA L40S GPUs (48 GB). SPG and RSPG are HSMs; IPPO, RIPPO and M-OMD are RL-based methods. 95% confidence intervals over 10 seeds.
Figure 3: Heatmaps: mean-field distribution ( income on y-axis and wealth on x-axis) at specific timesteps during the episode for Macroeconomics environment (total episode length of 128 steps). Interest rates ( first column ) and wages ( second column ) are determined by the mean-field distribution.
Figure 4: Mean-field distribution (y-axis) versus time (x-axis) for the Beach Bar environment. Agents are rewarded for being next to the bar when it is open, and penalised for being directly next to the bar at closure time, which can occur halfway through the episode (white-line).
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
Features
Spatial Dimensions
Environment
Partially Observable
Common Noise
Multiple μ0
∣S∣
∣A∣
∣Z∣
Linear Quadratic
Y
Y
N
100
7
2
Beach Bar
Y
Y
Y
100
11
2
Macroeconomics
Y
Y
N
1000
∞
∞
Appendix
Table 3: Overview and comparison of the features and spatial dimensions of the Linear Quadratic, Beach Bar and Macroeconomics test environments.
Parameter
Description
Value
σ
Idiosyncratic Noise Std
1.0
ρ
Noise Parameter
0.5
ca
Reward Action Cost
0.5
cterm
Reward Terminal Cost
1.0
q
Reward Action Direction Parameter
0.1
κ
Reward Distance Penalty
0.5
Appendix
Table 4: Parameters used for the Linear-Quadratic environment.
Parameter
Description
Value
H
Time Horizon
30
∣S∣
Number of States
100
∣A∣
Number of Actions
11
∣Z∣
Number of Common Noise Realisations
2
Appendix
Table 5: Parameters used for the Beach-Bar environment.
Parameter
Description
Value
α
Cobb-Douglas: Capital Share
0.36
γ
Discount factor
0.95
σ
Coefficient of relative risk aversion
2
ρz
Persistence of AR(1) for z
0.9
νz
Volatility of AR(1) for z
0.03
H
Time Horizon
128
Appendix
Table 6: Parameters used for the Macroeconomics environment.
Figure 5: Mean-field distribution (y-axis) versus time (x-axis) for the Beach Bar environment ( top ). Learned policy ( middle ) versus best response policy ( bottom ). Agents are rewarded for being next to the bar when it is open, and penalised for being directly next to the bar when it is closed, or just before it closes, which can occur halfway through the episode (white-line). Here the bar stays open, which is why agents move back towards the bar.
Figure 6: Mean-field distribution (y-axis) versus time (x-axis) for the Beach Bar environment ( top ). Learned policy ( middle ) versus best response policy ( bottom ). Agents are rewarded for being next to the bar when it is open, and penalised for being directly next to the bar when it is closed, or just before it closes, which can occur halfway through the episode (white-line). Here the bar stays closed, which is why agents move away from the bar.
Figure 7: Mean-field distribution (y-axis) versus time (x-axis) for the Linear Quadratic environment ( top ). Learned policy ( middle ) versus best response policy ( bottom ). Agents are subject to one of two realisations of common noise, pushing the entire population downwards or upwards.
Figure 8: Heatmaps: mean-field distribution ( income on y-axis and wealth on x-axis) at specific timesteps during the episode for the Macroeconomics environment (with total episode length of 128 steps). Interest rates ( first column ) and wages ( second column ) are determined by the mean-field distribution. The environment is implemented as a finite horizon: with RSPG and RIPPO, we see that agents learn anticipatory behaviour, spending more wealth just before the end of the episode, pushing interest rates up and wages down. This is not the case for the memoryless policies.
Figure 9: Learned actions ( top ) and best response actions ( middle ) and ( difference ) between the two ( bottom ) for the Macroeconomics environment. For M-OMD, the learned policy is much coarser, which we attribute to the fact that it is not parameterised by an underlying continuous action distribution.
Figure 10: Underlying continuous actions ( second row ), and their associated continuous consumptions ( third row ), rewards ( final row ) and cumulative discounted rewards ( top row ) over the entire episode for the Macroeconomics environment. We include these plots for macroeconomics interest. M-OMD is omitted, since it does not have an underlying continuous action distribution.
HSMs
RL
Hyperparameter
SPG
RSPG
IPPO
RIPPO
M-OMD
Max Grad Norm
1.0
1.0
1.0
1.0
1.0
Num Steps
–
–
64
64
–
Num Epochs
–
–
1
1
–
Num Minibatches
–
–
8
8
–
GAE Lambda
–
–
0.95
0.95
–
Appendix
Table 7: Hyperparameters used for our algorithmic implementations. Remaining hyperparameters were swept over (see Table 8 ).
Hyperparameter
Sweep Values
Learning Rate
[0.0001, 0.001, 0.01]
Number of Updates per Mean Field Sequence Rollout Step
[50, 100, 200]
Number of Single Agents per Environment
[8, 128, 1024]
Entropy Coef
[0.001, 0.01, 0.1]
Tau
[0.05, 5, 10]
Alpha
[0.9, 0.95, 0.99]
Appendix
Table 8: Hyperparameter Sweep Values.
Environment
Number of Parallelised Environments
Linear Quadratic
8
Beach Bar
128
Macroeconomics
8
Appendix
Table 9: Number of Parallelised Environments (same for all algorithms).
Figure 11: Exploitability versus training wall-clock time for partially observable Macroeconomics environment with ordinal versus categorical policies. Experiments were run on NVIDIA A40 GPUs. Having an underlying continuous distribution ( Ordinal ) consistently outperforms the underlying categorical distribution ( Discrete ), which does not encode information about the ordinal nature of the action space.