AI4Finance-Foundation / RLSolver

Solvers for NP-hard and NP-complete problems with an emphasis on high-performance GPU computing.
https://ai4finance.org
MIT License
138 stars 32 forks source link

Tensor Chain Contraction Demo: REINFORCE and Brute Force #5

Open shixun404 opened 1 year ago

shixun404 commented 1 year ago

We have developed a training demo that utilizes REINFORCE and a brute force baseline to find the best contraction order for a tensor chain. We welcome any suggestions or feedback on this demo and environment!

Update Jan 10, 2023, Extend the environment design from tensor train to tensor networks.

@spicywei Wei, @Yonv1943 Jiahao, and Shixun extend the formulation of the tensor train environment to the tensor network. classical_simulation_01102023.pptx

Update Jan 09, 2023

Update Jan 06, 2023

ZhangAIPI commented 1 year ago

We should confirm the formulation of the tensor chain ... It makes me confused about the difference between the implementation of this demo and the order file @spicywei provided with me. ( In the order file, we can see the tensor contraction between tensors that are not adjacent, while only the adjacent tensors are contracted in this demo......)

spicywei commented 1 year ago

We currently address the optimal contraction order solution for tensor networks in the form of tensor-train, where contraction is performed only between adjacent tensors, and we will subsequently implement large-scale complex networks. @XiaoYangLiu-FinRL @ZhangAIPI @shixun404 image

ZhangAIPI commented 1 year ago

okok !!! It means that I make some mistakes in my implementations...I will fix it...

shixun404 commented 1 year ago

@spicywei Would you please test the tensor train demo for cases with 6, 8, and 10 tensors?

spicywei commented 1 year ago

@shixun404 Okay! ! I will test it on a tensor train containing 6, 8, and 10 as soon as possible!

shixun404 commented 1 year ago

@Yonv1943 Thank Jiahao for his dedicated efforts in creating the parallel setup for or_gym. This REINFORCE demo for the tensor train task may be beneficial for your development.

Yonv1943 commented 1 year ago

I have developed a training demo that utilizes REINFORCE and a brute force baseline to find the best contraction order for a tensor chain. I would greatly appreciate it if you could check the code and provide any comments. @ZhangAIPI @spicywei

Update Jan 10, 2023

@spicywei Wei, @Yonv1943 Jiahao, and Shixun extend the formulation of the tensor train environment to the tensor network. classical_simulation_01102023.pptx

Update Jan 09, 2023

Update Jan 06, 2023

I can download the "01032023_classical_simulation.pptx"