Replies: 12 comments
|
cc @Z-Denis (who is possibly on leave AFAIK) |
|
Hi @chroli1 ! I will need a bit more information to be able to pinpoint the origin of the issue. For what nonlinearity is this happening? The stability of the approach will crucially depend on the regime. In the superfluid regime (U/t << 18), you should not encounter any issue with Monte Carlo and your chains should thermalise pretty fast with very low tau corr. Close to the phase transition, the situation is much trickier since the state is roughly a Kronecker delta around the Mott state. This means that, unless you do some fancy importance sampling, your acceptance will dramatically drop and, depending on the number of samples, you might even encounter an ill-defined QGT, causing your preconditioned forces to blow up. Finally, in the Mott regime, standard VMC is expected to fail. I can list a few of the tricks I used in the paper:
This is all I can think of, but I am happy to help you if you provide more information. I can send you a job file, if you want. |
|
Forgot to mention it, but the optimisation curves in these Bose-Hubbard experiments (with residual connections) are probably the cleanest I have ever obtained with VMC so the slightest instability should be a strong signal that something is wrong with the hyperparameters. Also forgot to ask: how many chains, samples per chain? what is your sweep size and number of discarded samples? |
|
Thanks both! A bit more detail on the physics parameters of the model:
And on the methodology:
Your suggestions are really helpful. I was aware of some of this, which is reassuring! I think I am not doing this two-stage approach of training a bare Jastrow ansatz first, which might be the issue actually. I will try this out. Regardless, I think this is a more fundamental methodology issue and not just parameters - as you say, it shouldn't be that difficult. |
|
How do you initialise the chains? It is possible that the default |
|
Actually, having a look at the new constrained logic in NetKet, it seems to initialise the chains to the right thing (essentially the ideal superfluid): netket/netket/hilbert/random/fock.py Lines 77 to 109 in a8675bd It is very similar to the logic I used for the paper, if not identical. Another aspect that one might check is that the Jastrow weight matrix be positive and invertible, otherwise thermalising the chains will lead to exploding occupation variances (<n_i n_j> ~ [1/W]_{ij}) |
|
This is now working! The issue is that I misunderstood the vmc.py script: I thought the plain Jastrow calculation was independent of the other one for comparison purposes, and commented that out to simplify things. I therefore wasn't doing the plain Jastrow pre-training, and unsurprisingly the optimisation of just the NN backflow part failed. Pretty basic error on my part but there we are! One other general question: we are interested in looking into disorder in the Bose-Hubbard model. Do you expect that major changes will be needed to my code to do this? Perhaps changes to the sampler are needed? Thanks so much for your help! |
|
That's great news! Your project sounds interesting. I do think there are major changes to be considered. I depends a bit on the path you follow, but the model has been designed as to be translationally invariant. If you actually perform VMC for each realisation of the disorder, you will have to (at least) promote the Jastrow factor to a full dense symmetric matrix. Let me know if you want some data or any further help! |
|
Thanks! This makes sense - I suppose the translational invariance is baked in to the ResNet/convolutional neural network structure. Perhaps swapping to a different neural network entirely is needed? |
|
Before touching the backflow transformation, I would start breaking the translational invariance at the level of the Jastrow factor and by adding a spatial dependence to the final projection vector of the equivariant backflow features ( |
|
Thanks! This could be an interesting project in itself. If anything interesting comes of it I'll let you know. Thanks again for the help. |
|
To add to my previous comment: The CNN just makes the output equivariant, which is not necessarily bad in a disordered system. If you want to change the architecture of the backflow altogether you might try some vision transformer or whatever stable and scalable attention-based model you fancy. |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I have been playing with the code accompanying this paper for the ground state of the 2D square-lattice Bose-Hubbard model with fixed particle number. I have been struggling to get the parameters right for large systems (say, an 8x8 lattice).
In particular, I find that the energy and gradients for my initial wavefunction blow up, and the optimiser fails. The issue seems to be with the Monte Carlo sampler: if the Markov chains are poorly thermalised, states with vanishing amplitude are sampled, and the 1/\psi factor used when calculating expectation values and gradients diverges.
Is there any general advice/references on setting the MCMC parameters correctly? I think the main ones are:
All reactions