見出し画像

【Tree of Thoughts】英語解説を日本語で読む【2023年5月26日|@WorldofAI】

大規模言語モデル(LLM)を使用したTree of Thoughtsプロジェクトが紹介されます。Tree of Thoughtsは問題の解決経路や解決策を表す木構造を構築し、異なる枝を探索して有望な解決策を見つけます。このアプローチにより、より構造化された的確な応答を生成し、広い文脈を考慮した解決策を提供できます。フレームワークは自然言語処理、意思決定、計画、複雑な推論タスクなどの問題解決に適用できます。
公開日:2023年5月26日
※動画を再生してから読むのがオススメです。


Hey, what is up guys?

やあ、みんなどうしたんだい?

Welcome back to another YouTube video.

またまたYouTubeの動画へようこそ。

At the WorldofAI, in today's video, we're going to be showcasing a project which is called Tree of Thoughts.

WorldofAIでは、今日のビデオで、Tree of Thoughtsと呼ばれるプロジェクトを紹介する予定です。

Now, this is a framework designed to enhance problem-solving capabilities using large language models, and this is by employing a deliberate and systematic approach known as System 2.

これは、大規模な言語モデルを用いて問題解決能力を高めるために設計されたフレームワークで、システム2と呼ばれる意図的かつ体系的なアプローチを採用することで実現されています。

Now, this framework aims to unleash the potential of large language models which tackles complex and general problem-solving tasks.

このフレームワークは、複雑で一般的な問題解決タスクに取り組む大規模な言語モデルの潜在能力を引き出すことを目的としています。

Now, in cognitive psychology, System 2 refers to a model thinking characterized by consciousness, effortful as well as deliberate mental processing.

認知心理学では、システム2とは、意識的、努力的、意図的な精神的処理を特徴とするモデル思考を指します。

Now, this contrasts with System 1, which represents intuitive and automatic thinking.

これは、直感的で自動的な思考を表すシステム1と対照的である。

Now, the actual Tree of Thought framework leverages the power of large language models such as GPT-3 to engage in more deliberate problem-solving tasks, to basically akin force System 2 thinking.

実際のTree of Thoughtフレームワークは、GPT-3のような大規模な言語モデルの力を活用し、より意図的な問題解決タスクに取り組むことで、基本的にシステム2の思考に近づけることができます。

Now, the thought framework, I'm just gonna call it Dot because Tot involves constructing a tree-like structure which we can see over here, and it represents a possible path or solution to a given problem.

この思考フレームワークは、「ドット」と呼ぶことにします。「ドット」はツリー状の構造を構築し、与えられた問題に対する可能な経路や解決策を表します。

Now, each node, which we can see over here in the tree, represents a partial solution or an intermediate step forward to actually completing the overall goal, which we give it as an input.

このツリーの各ノードは、部分的な解決策や、入力として与えた全体的な目標を実際に達成するための中間ステップを表しています。

And this is by employing a systematic tree search.

そして、これは系統的なツリー検索を採用することで実現されています。

Now, the framework explores and evaluates different branches of a tree to find the most promising solutions, and this is how you're able to get the output.

フレームワークでは、木のさまざまな枝を探索して評価し、最も有望な解決策を見つけることで、出力を得ることができます。

Now, this deliberate approach allows that large language model to generate more of a structured and focused response, and basically considering a wider context and potentially providing more accurate and natural solutions.

このような意図的なアプローチにより、大規模な言語モデルは、より構造的で集中した応答を生成し、基本的に幅広い文脈を考慮し、より正確で自然なソリューションを提供できる可能性があります。

And potentially, you're able to see that the tree search process enables the LLM to consider different types of possibilities which we can see over here.

また、ツリー検索プロセスによって、LLMがさまざまな種類の可能性を考慮できることがおわかりいただけると思います。

You have many different nodes, but it can go through different paths to get you the best output.

多くの異なるノードがありますが、最適な出力を得るために異なる経路を通ることができるのです。

Now, the thought framework can be applied for various different problem-solving domains, including but not limited to natural language processing, understanding, and it's not also limited to decision-making, planning, and complex reasoning tasks.

さて、考えのフレームワークは、自然言語処理や理解を含むさまざまな問題解決ドメインに適用することができます。また、意思決定、計画、複雑な推論タスクに限定されません。

Now, by reasoning the power of large language models, you're able to combine it with the systematic search approach, and with Thought in particular, you're able to aim to push the boundaries of what a large language model can achieve in terms of problem-solving capabilities, as you're able to utilize this amazing powerful algorithm to help you go beyond the limits of a large language model.

大規模言語モデルの力を推論することによって、システマティックな探索アプローチと組み合わせることができます。特に「Thought」と共に使用することで、問題解決能力の観点で大規模言語モデルが達成できる範囲の境界を em><wbr>押し上げることができます。この素晴らしい強力なアルゴリズムを利用することで、大規模言語モデルの限界を超える助けを得ることができます。

And this is something that we're going to be showcasing in today's video.

本日のビデオでは、これを紹介します。

You have the code actually down here, which you can install.

コードはこの下にありますので、インストールしてください。

In today's video, I'm going to be more talking about, like, talking more about what the project is, as well as taking a look at some of the experiments as to what they've been able to do with this project.

今日のビデオでは、このプロジェクトがどのようなものなのか、また、このプロジェクトで何ができるようになったのか、いくつかの実験を見ていきたいと考えています。

But in case you wanted to install it, it's quite easy.

しかし、インストールはとても簡単です。

First things first, you're going to need to have Git, which is an application that will help you clone this repository.

まず最初に、Gitが必要です。Gitは、このリポジトリのクローンを作成するのに役立つアプリケーションです。

Secondly, you will need Python, and lastly, you will also need Visual Studio Code as your code editor.

次に、Pythonが必要です。そして最後に、コードエディターとしてVisual Studio Codeも必要です。

It's fairly easy.

やり方はとても簡単です。

You go into the command prompt, you can just go over here.

コマンドプロンプトに入り、ここに移動します。

What you want to do next is go click on the screen button over here, copy the link.

次にすることは、こちらのスクリーンボタンをクリックして、リンクをコピーすることです。

Once you're over here, you want to paste the link, but before you actually paste it, sorry, you want to write git clone and then paste the link.

リンクを貼り付けるのですが、貼り付ける前にgit cloneと書いてからリンクを貼り付けます。

And once you have done that, you just click enter.

そうしたら、Enterをクリックするだけです。

Then after that, it has finished initializing its installation onto your desktop.

そうすると、デスクトップへのインストールが初期化されます。

What you need to do next is type in CD3 of thoughts and put that type in into the actual command prompt and press enter.

次にすることは、CD3 of thoughtsと入力して、実際のコマンドプロンプトに入力し、Enterを押すことです。

Now, once you have done that, you can then start installing the repository.

これで、リポジトリのインストールを開始することができます。

It gives you a breakdown of what you can do as well as how you can install it and integrate it with your own custom large language model.

これは、あなたができることの内訳と、どのようにインストールし、あなた自身のカスタム大規模言語モデルと統合することができるかを教えてくれます。

So if you want to get more in-depth with this, make sure you follow each command as well as each prompt that is written on the repo, so you get a better idea.

もっと深く知りたい方は、リポジトリに書かれている各コマンドや各プロンプトを追って、より良いアイデアを得てください。

But in today's video, we're going to be focusing more on what the actual project is in terms of its research paper, so we can get a better idea.

しかし、今日のビデオでは、より良いアイデアを得るために、実際のプロジェクトがどのような研究論文であるかに焦点を当てるつもりです。

So with that thought, guys, before we actually get into the gist of it, it would mean the world to me if you guys can go follow my Twitter page, as I'm continuously posting the latest AI news over here.

それでは、皆さん、本題に入る前に、私のTwitterページをフォローしていただけるととても嬉しいです。そこでは最新のAIニュースを継続的に投稿しています。

So please give this a follow, and you'll be updated with the most latest AI news over here.

このページをフォローしていただければ、最新のAIニュースをお届けすることができます。

Now, if you guys haven't subscribed, guys, please do so.

もしまだ購読していないなら、ぜひ購読してください。

It would mean the whole world to me if you guys can like this video, subscribe, turn the notification bell, and if you guys haven't seen any of my previous videos, I would highly recommend that you do so because there's a lot of content and a lot of value that you will definitely benefit from.

もしこの動画が気に入っていただけると、私にとってはとても嬉しいです。高評価やチャンネル登録、通知ベルのオンにすることもお願いします。また、以前の動画をまだご覧になっていない方は、ぜひご覧いただきたいと思います。そこにはたくさんのコンテンツと価値があり、確実にお役に立てるでしょう。

So with that thought, let's get right into the video.

では、さっそくビデオに入りましょう。

Now, before we actually get into anything else, I want to show you the schematic.

さて、実際に何かを始める前に、回路図をお見せしたいと思います。

Now, it's presenting an illustration that is a different approach towards problem-solving using large language models.

大規模な言語モデルを使った問題解決への異なるアプローチとなる図解をお見せします。

Now, each rectangular-like box is a figure which represents a thought which we see over here, and this is coherent sequences of language that serves as an intermediate step towards solving the actual overall output.

長方形のような箱は、それぞれ思考を表す図形で、これは実際の全体的な出力を解決するための中間段階として機能する、首尾一貫した言語シーケンスです。

And the figure is basically suggesting that the problem-solving with large language models can be approached in various different ways, which you can see over here.

この図は、大規模な言語モデルによる問題解決は、様々な方法でアプローチできることを示唆しています(こちら)。

Now, to provide more of a comprehensive understanding of the problem-solving process with LMS, a concrete example of how dots are generated and evaluated and searched upon are presented in this figure.

さて、LMSによる問題解決のプロセスをより包括的に理解するために、ドットがどのように生成され、評価され、検索されるかの具体例をこの図に示しています。

And these figures are likely provided to show you like how each of an out, like how an input is able to get you an output through this algorithm of three of three of thoughts.

そして、この図は、この3つの思考のアルゴリズムを通して、それぞれのアウト、つまり入力がどのようにアウトプットを得ることができるかを示すために提供されているのでしょう。

Sorry, now the description of this figure also is able to see or also able to mention, sorry, that there's two important characteristics in the problem-solving process with large language models.

申し訳ありませんが、この図の説明でも、大規模言語モデルの問題解決プロセスには2つの重要な特徴があることを見ることができますし、言及することもできます。

Firstly, is that instead of actually using a simple picking of one choice, the process involves considering multiple choices or options.

まず1つ目は、単純に1つの選択肢を選ぶのではなく、複数の選択肢を検討することです。

This basically suggests that large language models can generate multiple different thoughts or potential solutions and explore different paths to get you the actual output.

つまり、大規模な言語モデルは、複数の異なる考えや潜在的な解決策を生成し、実際のアウトプットを得るために異なる経路を探索することができるということです。

Now, this is a great way for you to get a more comprehensive exploration of a problem-solving like output, which can be quite utilized in different ways where you're trying to get the best output for a complex answer.

これは、問題解決のための出力をより包括的に探索する素晴らしい方法であり、複雑な答えに対して最良の出力を得ようとする場合に、さまざまな方法で活用することができる。

Now, secondly, they also focus on the problem-solving process, which is actively evaluating the current state of the solution, and it currently looks ahead and backtracks to get more of a global decision.

さて、第二に、彼らは解決プロセスに焦点を当てています。これは、現在の解決策の状態を積極的に評価し、よりグローバルな決定を行うために先を見越し、戻ることを意味します。

This is quite amazing, guys, because it can go back a step and then go another way and then go back, get you the next possible output, and go, giving you the best output that is like correlated to your initial prompt that you give it.

これは非常に素晴らしいことです。一歩戻って別の方法を試し、また戻ることができます。次の可能な出力を取得し、初期のプロンプトに関連する最適な出力を提供してくれます。

And this implies that the LLM can assess the progress that is made, and it considers the potential outcome for different choices.

このことは、LLMが進捗状況を評価し、さまざまな選択肢に対する潜在的な結果を考慮することを意味しています。

And I definitely see this as a great way for you to get the best correlated answer using its algorithm.

LLMのアルゴリズムを使えば、相関性のあるベストな答えを導き出すことができるのです。

Now, research on human problem solving indicates that people navigate through a combinational problem-solving space, and this can be visualized through a tree structure.

さて、人間の問題解決に関する研究によると、人は組み合わせ型の問題解決空間をナビゲートすることが分かっています。

Now, in this tree, there you have nodes that represent partial solutions, and branches that represent operations or tasks that are modified through these actual solutions.

このツリーには、部分的な解決策を表すノードと、これらの実際の解決策を通して変更される操作やタスクを表すブランチが存在します。

Now, human problem solvers usually rely on a heuristic way to determine which branch to actually take and which guides them to the actual solution.

人間の問題解決者は通常、ヒューリスティックな方法で、実際にどの枝を取れば実際の解決につながるかを判断しています。

Now, when it actually comes to large language models, it's mostly used for general problem solving, and there are two key limitations that have been identified.

さて、大規模な言語モデルに関しては、一般的な問題解決に使われることがほとんどですが、2つの重要な限界があることが指摘されています。

Firstly, it's the existing approaches that often fail to explore different continuation options, and this is within the thought process.

まず、既存のアプローチでは、さまざまな継続的な選択肢を探ることができないことが多く、これは思考プロセスの中にあるものです。

Then, it basically means that they do not actually consider various branches of the tree.

それから、基本的に、彼らは実際に木の様々な枝を考慮しないことを意味します。

Secondly, they lack the ability to incorporate planning, which basically puts it behind as it's not able to look ahead or backtrack the techniques to evaluate different approaches and options comprehensively.

次に、プランニングを取り入れる能力がないため、様々なアプローチやオプションを包括的に評価するためのテクニックを先読みしたり、後戻りしたりすることができず、基本的に後手に回ってしまいます。

Now, such heuristic-guided search methods are commonly observed in human problem solving.

このようなヒューリスティックな探索方法は、人間の問題解決において一般的に観察される方法です。

Not to overcome this, what this application or research has been able to accomplish is that it utilizes the thought framework, which enables LMS to explore multiple reasoning paths within the thoughts.

これを克服するために、このアプリケーションや研究が達成できたのは、思考の枠組みを利用することで、LMSが思考の中で複数の推論経路を探索することを可能にしたことです。

Not in this framework, any problem that is framed as a research process over the tree structure.

このフレームワークでは、ツリー構造上の研究プロセスとしてフレームワーク化された問題はありません。

It does utilize the node in the tree to help you get the output, which we can see over here.

ツリーの中のノードを利用して、アウトプットを得ることができるのです。

It can go back, it can go forward, and it can reason through its thoughts to get you the best output.

遡ることも、進むこともでき、思考を推論して最良のアウトプットを得ることができるのです。

Now, to implement the framework, there are four key questions that need to be addressed.

さて、このフレームワークを実装するためには、4つの重要な問題に対処する必要があります。

Firstly, how to decompose the intermediate process into the steps, into the thought steps?

第一に、中間プロセスをどのようにステップに分解し、思考のステップに分解するか。

Secondly, how to generate potential thoughts from each other state?

第二に、それぞれの状態から潜在的な思考を生み出すにはどうしたらいいか?

And thirdly, how, realistically, you are able to evaluate the states?

そして第三に、現実的に、どのようにして状態を評価することができるのか?

And fourthly, what search algorithms should be used in the actual framework?

そして第四に、実際のフレームワークではどのような検索アルゴリズムを使うべきなのか?

Now, by answering these questions, what the actual framework can do is explore through different types of branches of the thought tree, and it generates irrelevant thoughts which can help you evaluate the states using heuristics and determine the appropriate search algorithm to get you the best output.

これらの質問に答えることで、実際のフレームワークができることは、思考ツリーのさまざまな種類の枝を通して探索し、ヒューリスティックを使って状態を評価し、最高の出力を得るために適切な検索アルゴリズムを決定するのに役立つ無関係な思考を生成することである。

Now, the researchers of this project were able to propose three challenging tasks that remain difficult for models such as GPT-4 or for prompting types of techniques such as a Chain of Thought, as well as I/O.

さて、このプロジェクトの研究者は、GPT-4のようなモデルや、Chain of Thoughtのようなプロンプトタイプの技術、そしてI/Oでは難しいままの3つの難題を提案することができました。

However, they were able to demonstrate that employing a deliberate search within the trees of thoughts led to more of an improved result, and more importantly, it introduced an exciting as well as a promising approach for utilizing language models in problem-solving scenarios, and this is something that we can see with this example of the game of 24.

しかし、彼らは考えの木内での意図的な探索を採用することで改善された結果を示すことができました。そしてさらに重要なことに、問題解決シナリオで言語モデルを利用するための興味深いおよび有望なアプローチを導入しました。これは、ゲーム「24」の例で確認できることです。

Now, for the people who do not know what the researchers applied in the tree of thought framework was, they experimented with the game of 24, which is basically the objective of this game is to use four given numbers in basic arithmetic operations such as multiplication, division, addition, and subtraction to arrive at the final result of 24.

さて、研究者が考えの木のフレームワークに適用したものは、ゲーム「24」で実験しました。このゲームの目的は、与えられた4つの数値を基本的な算術演算(乗算、除算、加算、減算)を使用して最終的な結果が24になるようにすることです。

So let me just zoom in a little bit so you get a better idea.

では、もう少しズームアップして、より良いアイデアを得てみましょう。

Now, to solve this game, obviously, it utilized the thought framework, and researchers basically formulated the problem as a search process within the tree.

このゲームを解くために、明らかに思考の枠組みを利用し、研究者は基本的にツリーの中の探索プロセスとして問題を定式化しました。

Now, each node, which we can see over here, represents a partial solution or an intermediate step towards reaching the desired output, which is 24.

各ノードは、ここに見えるように、目的の出力(24)に到達するための部分解または中間ステップを表しています。

Now, the branches of the tree corresponded to different arithmetic operations that can be performed.

ツリーの枝は、実行可能なさまざまな算術演算に対応しています。

In this case, it utilized subtraction, it utilized addition over here, multiplication to get to 24.

この場合、24に到達するために、引き算、足し算、掛け算を利用した。

Not by employing deliberate search techniques within the thought part space, what the researchers explored was they utilize different various paths or sequences for the operations to find a solution that led to the target of 24.

考えの一部空間内で意図的な探索技術を採用するのではなく、研究者たちは異なる経路や操作の順序を利用して解決策を見つけるための実験を行いました。それによって目標の「24」に到達する解決策を見つけることができました。

Now, they generated different thoughts and evaluated their progress using heuristic and made decisions based on the lookahead and backtracking methods of the tree of thought.

研究者たちは、さまざまな思考を生成し、ヒューリスティックにその進捗を評価し、思考の木のルックアヘッドとバックトラックの方法に基づいて決定を下しました。

Now, by leveraging the power of language models of GPT4 and the systematic search-up approach that is utilized with the trio thought framework, what the researchers were able to do is that they found improved and interesting like solutions of the game of 24 or, and this framework basically allowed the language models to consider multiple reasoning paths to evaluate different options, which resulted in a more effective problem-solving approach.

GPT4の言語モデルのパワーと、トリオ思考フレームワークで利用される系統的なサーチアップアプローチを活用することで、研究者ができたことは、24のゲームの解決策のように改善された興味深いものを見つけたことです。このフレームワークは、基本的に言語モデルが複数の推論経路を考慮してさまざまな選択肢を評価できるようにし、より効果的な問題解決アプローチを実現したのでした。

Now, if you were to compare this with the chain of thoughts approach or the input-output approach, you can see that it's not able to utilize the same effective way to get you the output, and this is something that we can see over here in this graph.

さて、考えの連鎖アプローチや入出力アプローチと比較すると、同じ効果的な方法を利用して出力を得ることができないことがわかります。これは、このグラフで確認できることです。

So, if you really want to get more in-depth with what is happening, I highly recommend that you check this paper out so you can get a better idea as well as a better idea of some of the experiments that they did to get a better use case of the framework.

もし、何が起こっているのかもっと深く知りたいのであれば、この論文をご覧になることを強くお勧めします。そうすれば、フレームワークのより良い使用例を得るために行ったいくつかの実験について、より良く理解することができます。

In this experiment, we can see that it utilized the game of 24.

この実験では、「24」のゲームを利用したことがわかります。

It also experimented using creative writing as well as crosswords.

また、クリエイティブ・ライティングやクロスワードを使った実験も行っています。

So, if you want to get more of an in-depth idea of these experiments, definitely check this out in the research paper because it created a creative writing aspect.

この実験では、クリエイティブ・ライティングの側面があるため、より深いアイデアを得たい場合は、研究論文でこの実験を確認してみてください。

It focused more on problem-solving tasks, which introduced the way of tackling creative writing and testing the language model's ability to generate coherent and imaginative like passages.

問題解決課題に重点を置き、クリエイティブ・ライティングに取り組む方法を紹介し、言語モデルが首尾一貫した想像力豊かな文章を生成する能力をテストしているのです。

So, if you want to get more of an idea for this type of writing as well as this approach for its experiments, definitely check this out because it's quite interesting as to what they were able to do with the trio thought.

もし、このような文章や実験のアプローチについてもっと理解を深めたい場合は、ぜひこれをチェックしてください。研究者たちが考えのトリオで何を実現できたかについて、非常に興味深い内容です。

Lastly, I just want to talk a little bit about the limitations and the future directions of this project.

最後に、このプロジェクトの限界と将来の方向性について少しお話したいと思います。

Now, in summary, the paper was able to recognize the need for better search and planning abilities in language models for this could be used for complex tasks, as well as for this acknowledgment of research limitation.

さて、要約すると、この論文は、言語モデルが複雑なタスクに使用できるように、より優れた検索能力と計画能力の必要性を認識することができたと同時に、研究の限界を認識することができたということです。

Now, what it also suggests is that they can slowly but surely explore different types of ways to fine-tune the approaches based on a high level of decision making as well as an approach towards improving problem-solving capabilities within the language model, and this is something that they're going to be focusing on as they tend to work towards improving this approach as well as working towards innovating the framework of the tree of thoughts.

そして、この論文は、言語モデルの問題解決能力を向上させるアプローチと同様に、高度な意思決定に基づくアプローチを微調整するためのさまざまな種類の方法をゆっくりと、しかし確実に探求できることを示唆しています。このアプローチは、思考の木の枠組みの革新に向けて取り組むと同時に、このアプローチの改善に取り組む傾向があるので、彼らはこれに注目することになるでしょう。

So, I hope you found this video quite helpful, guys.

このビデオがお役に立てたなら幸いです。

Thank you so much for watching.

ご覧いただき、ありがとうございました。

I'm definitely going to release more videos on this because I definitely see this as an amazing tool that could be used to help language models in a lot of different ways.

このビデオは、言語モデルをさまざまな方法で支援するために使用できる素晴らしいツールであると確信しているので、私は間違いなくもっとビデオを公開するつもりです。

So, I hope you found this video quite informative and you got something out of it.

このビデオが有益なものであり、何か得るものがあったなら幸いです。

And with that thought, guys, make sure you follow this Twitter page.

というわけで、このTwitterをぜひフォローしてください。

If you guys haven't subscribed, definitely do so.

まだ購読していない人は、ぜひ購読してください。

Turn on the notification bell.

通知ベルをオンにしてください。

Like this video, and I just want to end off by saying, have an amazing day, spread positivity, and I'll see you guys very shortly.

このビデオに「いいね!」して、最後に言いたいのは、素晴らしい一日を過ごしてください、ポジティブな気持ちを広めてください、そしてまたすぐに会いましょう、ということです。

Thank you so much for watching.

ご覧いただき、ありがとうございました。

I'll see you guys soon.

またすぐにお会いしましょう。

Peace out, fellas.

それでは、また。

この記事が気に入ったらサポートをしてみませんか?