tsukuba-websci / MPS-TOM-Urnmodel

Iwahashi, Okabe and Suda's experiments for MPS-TOM 2023
MIT License
2 stars 0 forks source link

[Feature]: QDのパラメータをチューニングする #60

Closed krmr73 closed 1 year ago

krmr73 commented 1 year ago

Feature description

突然変異パラメータ, graph2vecにより生成されるベクトルのサイズ、ボロノイセルの数を最適化する。 試すパラメータが多いと実験時間の問題で厳しいため、デフォルト+2つずつにし、実データでも世代数は100までとする。

Motivation

査読コメントにGAだけでなく、QDのパラメータも最適化した方が良いのでは?という指摘があったため。

Additional context

ボロノイのセル数は実行時間に大きく影響するので、どのぐらいに設定するかは考える必要がある。 (試し段階の時にセル数100でやったのは確か微妙だった)

krmr73 commented 1 year ago

ターゲットデータによって最適なパラメータが変わるのか分からない。 実データでチューニングしてみて最適なパラメータが固定なら、合成データではチューニングすることなく、実データで得られた最適パラメータを使えば良いかもしれない。

krmr73 commented 1 year ago

使っているCMA-MEという手法ではグローバルな突然変異率は設定されず、個体によって突然変異率は変動するらしい。 個体群の分散行列と共分散行列を使用して、個体群の分布を更新する際に突然変異率が決定される。 https://arxiv.org/abs/1912.02400

人間が調節できるmutation powerというパラメータ(0.1~1.0の範囲で設定される)があるっぽいが、pyribsでどう設定するかよく分からない...

mizoka commented 1 year ago

そうすると、ベクトルの次元を変化させるだけでもいいかも?

2023年7月4日(火) 9:18 Nanami Iwahashi @.***>:

使っているCMA-MEという手法ではグローバルな突然変異率は設定されず、個体によって突然変異率は変動するらしい。 個体群の分散行列と共分散行列を使用して、個体群の分布を更新する際に突然変異率が決定される。 https://arxiv.org/abs/1912.02400

人間が調節できるmutation powerというパラメータ(0.1~1.0の範囲で設定される)があるっぽいが、pyribsでどう設定するかよく分からない...

— Reply to this email directly, view it on GitHub https://github.com/tsukuba-websci/MPS-TOM-Urnmodel/issues/60#issuecomment-1619285333, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBH5Z5T566XRW3NH35X3ZTXONOMPANCNFSM6AAAAAAZ33WFJE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Okabe-Junya commented 1 year ago

人間が調節できるmutation powerというパラメータ(0.1~1.0の範囲で設定される)があるっぽいが、pyribsでどう設定するかよく分からない...

この辺りのことは自分もきちんと把握していないですが、 ribs.archives.CVTArchive は learning_rate を設定できるらしく、これとか関係あるのですかね…??

(関係あったとしても実施するかは別問題ですが…)

https://docs.pyribs.org/en/stable/api/ribs.archives.CVTArchive.html#ribs.archives.CVTArchive

krmr73 commented 1 year ago

ribs.archives.CVTArchive は learning_rate を設定できるらしく、これとか関係あるのですかね…??

これは別問題な気もします...

とりあえずは先にベクトルの次元の方だけやってみます!

krmr73 commented 1 year ago

APSの結果 dim: distance 64: 0.4964 128: 0.4636 (default) 256: 0.4875

mizoka commented 1 year ago

へー。128が結構よかったのですね。結果はどう載せましょうかね。

2023年7月4日(火) 14:10 Nanami Iwahashi @.***>:

APSの結果 dim: distance 64: 0.4964 128: 0.4636 (default) 256: 0.4875

— Reply to this email directly, view it on GitHub https://github.com/tsukuba-websci/MPS-TOM-Urnmodel/issues/60#issuecomment-1619500751, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBH5Z3IHUWIOVGDB7BSHD3XOOQUXANCNFSM6AAAAAAZ33WFJE . You are receiving this because you commented.Message ID: @.***>

krmr73 commented 1 year ago

結果はどう載せましょうかね。

表か、QDだけの棒グラフとかですかね...?

mizoka commented 1 year ago

そうですね。それか、実データに対してのみ、learning curveがパラメータでどう違うかのグラフを見せるというのはどうですかね?

2023年7月4日(火) 14:39 Nanami Iwahashi @.***>:

表か、QDだけの棒グラフとかですかね...?

— Reply to this email directly, view it on GitHub https://github.com/tsukuba-websci/MPS-TOM-Urnmodel/issues/60#issuecomment-1619526530, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBH5ZZ5EH6NWPAJRPTKYB3XOOUAPANCNFSM6AAAAAAZ33WFJE . You are receiving this because you commented.Message ID: @.***>

krmr73 commented 1 year ago

なるほど。いいと思いますが、今のlearning curveのグラフに追加すると結構ごちゃごちゃしちゃいますかね?

krmr73 commented 1 year ago

TMNの結果 dim: distance 64: 0.7467 128: 0.7370 (default) 256: 0.7710 (twitterでも128が良さそう)

mizoka commented 1 year ago

そうですね.ごちゃごちゃすると思うので、もう一つ図は増やすのでいいかなと。

2023年7月4日(火) 15:27 Nanami Iwahashi @.***>:

TMNの結果 dim: distance 64: 0.7467 128: 0.7370 (default) 256: 0.7710 (twitterでも128が良さそう)

— Reply to this email directly, view it on GitHub https://github.com/tsukuba-websci/MPS-TOM-Urnmodel/issues/60#issuecomment-1619578714, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBH5Z6SPL5AKMDNBYATPDDXOOZWBANCNFSM6AAAAAAZ33WFJE . You are receiving this because you commented.Message ID: @.***>

krmr73 commented 1 year ago

@mizoka 一旦ターゲットごとでlearning curveを出してみました。 最良の個体だけにして、一つのグラフにまとめるのがいいですかね?

mizoka commented 1 year ago

へー。64次元の方がいいのもあるのですね。それぞれのグラフの方がみやすのいので、これでいきましょうか。

2023年7月4日(火) 16:25 Nanami Iwahashi @.***>:

@mizoka https://github.com/mizoka 一旦ターゲットごとでlearning curveを出してみました。 最良の個体だけにして、一つのグラフにまとめるのがいいですかね?

https://user-images.githubusercontent.com/88866882/250797474-0bb12f70-5807-49cd-a349-dfd77249a14d.png

https://user-images.githubusercontent.com/88866882/250797484-c172a584-06c7-46fe-98e7-bd003c64f598.png

— Reply to this email directly, view it on GitHub https://github.com/tsukuba-websci/MPS-TOM-Urnmodel/issues/60#issuecomment-1619665995, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBH5ZY3D3ZHG45BHOSTXPDXOPAMTANCNFSM6AAAAAAZ33WFJE . You are receiving this because you were mentioned.Message ID: @.***>

krmr73 commented 1 year ago

査読でセル数についても指摘されていたので、500->1000に変えて試してみたが、意外と結果は変わらなかった。 実行時間は倍になると思っていたが、占有しているセル数があまり変わらなくて、そのせいか実行時間もほぼ変わらなかった。占有しているセル数が増えないのは何でなんだろう...? 500世代まで回したら占有しているセル数も増えていくんだろうか

mizoka commented 1 year ago

世代数を増やすと占有するセルも増えるはずです。

2023年7月4日(火) 17:30 Nanami Iwahashi @.***>:

査読でセル数についても指摘されていたので、500->1000に変えて試してみたが、意外と結果は変わらなかった。 実行時間は倍になると思っていたが、占有しているセル数があまり変わらなくて、そのせいか実行時間もほぼ変わらなかった。占有しているセル数が増えないのは何でなんだろう...? 500世代まで回したら占有しているセル数も増えていくんだろうか

— Reply to this email directly, view it on GitHub https://github.com/tsukuba-websci/MPS-TOM-Urnmodel/issues/60#issuecomment-1619787741, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBH5ZZBEJMAG5FKOY6765DXOPIAXANCNFSM6AAAAAAZ33WFJE . You are receiving this because you were mentioned.Message ID: @.***>

btjanaka commented 1 year ago

Hi @mizoka @krmr73! I am the maintainer of pyribs, and I stumbled across this issue while looking through GitHub.

It seems you had questions about the CVTArchive and CMA-ME in pyribs, particularly learning rate. Regarding CMA-ME (https://arxiv.org/abs/1912.02400) and CMA-MAE (https://arxiv.org/abs/2205.10752), these algorithms use a CMA-ES instance to optimize for solutions that will improve the archive. Essentially, consider sampling solutions from a Gaussian distribution. Based on how the sampled solutions are inserted into the archive, we can update this Gaussian distribution, such that the next time we sample, we will be more likely to get solutions that are inserted into the archive. Regarding learning rate in CVTArchive, that is a part of the CMA-MAE algorithm.

If you are interested in learning more, I recommend taking a look at our tutorials here: https://docs.pyribs.org/en/stable/tutorials.html The first two tutorials talk about CMA-ME and CMA-MAE, respectively.

Hope this helps!

PS: I used Google to translate your comments as I don't speak Japanese; apologies if I misinterpreted your issue.

krmr73 commented 1 year ago

@btjanaka Thank you for telling us about it!