Proposed config file syntax for transdimensional MCMC
We will soon be adding support for doing transdimensional MCMC to epsie. A transdimensional MCMC is one in which the number of parameters (or models) is itself a variable parameter. To make use of this in pycbc, we need a config file syntax to specify transdimensional parameters and priors. Before implementing it, we thought we'd post it here for feedback.
The specific type of transdimensional MCMC we are implementing is a birth/death proposal. This means that every model that is added (birthed) or subtracted (killed) has the same number and type of parameters. For example, if you were performing a ringdown analysis in which the number of modes is a variable, birthing a new model means adding another damped sinusoid with a frequency, damping time, amplitude, and phase that will be inferred.
To easily and concisely specify all of the possible parameters, we propose adding a [transdimensional_params-{birth_param}] section that specifies the parameters each model has. The tag part {birth_param} in the section header specifies the name of the parameter used to control the number of models. It also helps separate different transdimensional models, in case you did an analysis with multiple different types of models. We would require that a special models argument be provided in the section that specifies how many models there will be and what their names are. These names are appended to each variable parameter for each model. For example, in a ringdown analysis in which you wanted to allow the 220, 210, and 330 modes to be possible QNMs, you would have:
[transdimensional_params-nmodes]
models = 220 210 330
f_ =
tau_ =
amp =
phi =
When the model class loads the config file, it would add each model name to the end of each variable name, then add the set to the list of variable_params. So, in this example, you'd have f_220, tau_220, amp220, phi220, f_210, tau_210, etc. added to the variable_params. The variable_params would specify global parameters that are common to all models. So, you might have:
[variable_params]
ra =
dec =
tc =
inclination =
You can specify standard priors to be used by all the models by adding prior sections for the unsuffixed parameters. Or, you could specify the prior for a specific model by explicitly setting the prior for that model. So, in the above example, you might have:
[prior-f_]
name = uniform
min-f_ = 20
max-f_ = 2048
[prior-f_330]
name = uniform
min-f_330 = 200
max-f_330 = 2048
Here, a uniform prior between 20 and 2048Hz is being used for all QNM frequencies except the 330 mode, which instead will use a prior uniform on 200 to 2048Hz.
You could set static parameters using similar syntax. For example, say you wanted the phase of all modes to be 0, except for the 210 mode which was 3.14. You would add:
[static_params]
phi = 0
phi210 = 3.14
These settings would require changes to the BaseModel class, and so would not be sampler specific; i.e., if we added another transdimensional sampler in the future, it would use the same syntax.
For epsie, you also need to specify jump proposals. To do this for a transdimensional analysis, we propose adding a type argument to the jump_proposal sections that specifies what the proposals are for. type could either be: (1) model to specify the proposal to use for the parameter that controls the number of models (in our example above, nmodes), or (2) transdimensional to indicate it is for the transdimensional parameters. For transdimensional parameters, you a models argument would be required that specifies what models the proposal applies to, similar to the [transdimensional_params] section. So in the above example you might have:
[jump_proposal-nmodes]
name = bounded_discrete
type = model
min-nmodes = 1
# this should match the number of nested_transdimensional.proposals.
# say we leave it empty for it to be inferred automatically: max-nmodes all
# proposals are active
;max-nmodes =
[jump_proposal-f_+tau_+amp]
name = normal
type = transdimensional
models = 220 210 330
Finally, you need to provide a distribution that is used to draw initial parameter values whenever a new model is added. This is specified by a birth_distributions section. For example:
[birth_distributions-f_]
name = uniform
min-f_ = 20
max-f_ = 2048
Currently, in epsie we only a support a uniform distribution, but we may increase that in the future.
With both the proposals and the birth distributions, you can use a different propopsal/birth for a specific model by explicitly setting a section for that parameter, similar to how the priors are set.
@cdcapano I'm finding the param names a bit confusing. Can me make it a bit more obvious that some kind of replication and fill in will occur? i.e.
[transdimensional_params-nmodes]
nmodes = 221 220
f_{} =
Then the param has the form of a substitution and it's a bit clear this will occur. It also means that it need not always be at the end, the replacement could be anywhere convenient.
I like that idea, but can you have curly braces in section names? That's needed for setting the prior... e.g., does this work?
[prior-f_{}]
name = uniform
min-f_{} = 20
max-f_{} = 2048