Home  >  Article  >  Technology peripherals  >  An agent that can "evolve independently"? The first end-to-end agent symbolic training framework is open source

An agent that can "evolve independently"? The first end-to-end agent symbolic training framework is open source

王林
王林Original
2024-07-22 14:25:43319browse
An agent that can evolve independently? The first end-to-end agent symbolic training framework is open source
AIxivコラムは、当サイトが学術的・技術的な内容を掲載するコラムです。過去数年間で、このサイトの AIxiv コラムには 2,000 件を超えるレポートが寄せられ、世界中の主要な大学や企業のトップ研究室がカバーされ、学術交流と普及を効果的に促進しています。共有したい優れた作品がある場合は、お気軽に寄稿するか、報告のために当社までご連絡ください。提出電子メール: liyazhou@jiqizhixin.com; zhaoyunfeng@jiqizhixin.com

この記事の主な著者は、Waveform Intelligence、浙江大学、および北杭大学の出身です。この共同研究では、Waveform Intelligence の共同創設者兼最高技術責任者 (CTO) である周王春樹氏、浙江大学修士課程 2 年生の Ou Yixin 氏、北杭大学学部 4 年生の丁盛偉氏が共同研究を行っています。この記事の責任著者は Zhou Wang Chunshu 氏と Jiang Yuchen 氏であり、Waveform Intelligence の共同創設者兼 CEO です。

さまざまな大規模モデル API の反復と、さまざまな AI エージェント フレームワークのオープンソースにより、大規模モデルに基づくエージェントは、学術界や産業界で幅広い注目、研究、応用を獲得しています。

大規模モデルベースのエージェント (AI エージェント) は多くのシナリオで良好な結果を達成しており、一部のシナリオでは実際に適用可能ですが、AI エージェントの研究開発の進歩は依然として「専門家」中心に限定されています。 」、または「エンジニアリング中心」のパラダイム。言い換えれば、現在のエージェントの作成と調整のプロセスは依然として、エージェントのプロンプト、ツール、ワークフローを設計する人間の専門家 (アルゴリズム エンジニア) の人的資源と経験にほぼ完全に依存しています。このようなプロセスには時間と労力がかかり、エージェントのこれらの象徴的な要素を学習およびトレーニングするために大量のデータを使用することができない運命にあります。ほとんどのエージェントはクローズドソースの API 呼び出しに依存しており、大規模なモデル ベース自体を最適化することはできません。オープンソースの大規模モデルが使用されている場合でも、ほとんどの AI エージェント アプリケーション シナリオでは、モデル ベース自体の最適化はリソースによって制限されます。計算能力や安定性などの理由により、実際には実装されていません。したがって、現在のインテリジェントエージェントはまだ「エキスパートシステム」の発展段階にあります。

ご存知のとおり、ニューラル ネットワークが機械学習/人工知能の基本パラダイムとなった重要な理由は、複雑な構造や学習を手動で設計する必要がなく、トレーニングや最適化に大量のデータを効率的に使用できるためです。アルゴリズム。したがって、Waveform Intelligence の研究者は、AI エージェントの専門家中心からデータ中心への変革は、大規模なモデルに基づいたインテリジェント エージェントの重要な発展になると考えています。

この目標を達成するために、Waveform Intelligence の研究チームは、ニューラル ネットワークをトレーニングするためのコネクショニスト学習 (コネクショニスト学習) の基本的な方法、つまりバックプロパゲーションと勾配降下法を利用して、AI エージェントとニューラル ネットワークを類推し、テキストとラージ モデルを使用して損失関数、勾配、オプティマイザーをモデル化し、バックプロパゲーションと勾配降下法アルゴリズムをシミュレートし、エージェントのエンドツーエンドのシンボリック トレーニング アルゴリズムを実装し、AI エージェントのエンドツーエンドのトレーニング用のアルゴリズム セットを構築します。フレームワークとコードは GitHub でオープンソース化されています。

An agent that can evolve independently? The first end-to-end agent symbolic training framework is open source

  • 論文アドレス: https://arxiv.org/pdf/2406.18532
  • コードリポジトリ: https://github.com/aiwaves-cn/agents

同盟者は言ったチームはまず、大規模なモデルベースのエージェントを 3 つの主要な要素、つまりプロンプト、ツール、エージェント パイプライン (ワークフロー) に分解しました。次に、フレームワークでは、エージェント システムは「シンボリック」ニューラル ネットワークとみなされ、エージェント ワークフローの各ノードはネットワークのレイヤーとみなされ、各ノードのプロンプトとツールはこのようにみなされます。エージェントの層とワークフロー/パイプラインはネットワークの計算グラフとみなすことができます。このように、エージェント システムは、重みが数値/テンソル空間から離散記号空間 (テキストとコードは記号表現) に変化するニューラル ネットワークとみなすことができ、この種のネットワークのトレーニングでは、従来の最適化手法を自然に参照できます。ニューラル ネットワークの、つまりバックプロパゲーションと勾配降下法。

An agent that can evolve independently? The first end-to-end agent symbolic training framework is open source

️図 1: エージェントのシンボリック学習フレームワーク図
ゲーションと勾配降下法を使用してシンボリック重み空間を処理します。エージェントのシンボリック学習フレームワークは、テキストと大きなモデル + プロンプト ワードを使用します。このアプローチでは、損失がモデル化されます。損失関数、逆伝播プロセス、勾配、勾配ベースのオプティマイザー。具体的には、順伝播プロセス中に、フレームワークは各層の入力、重み、出力を計算グラフに保存します。次に、大規模モデル + プロンプトワードの方法により、現在のサンプルの入力、出力、タスク全体の説明がプロンプトワードに結合され、大規模言語モデルがタスク完了の評価と概要を出力します。現在のサンプルタスク。得られたテキスト形式の評価/要約は、ニューラルネットワークにおける損失と同様に、タスク完了の品質を測定するために使用されます。研究チームはこれを「テキスト形式の損失」、つまり言語ベースの損失と呼んでいます。
その後、研究では大規模な言語モデルと慎重に設計されたプロンプトワードエンジニアリングを使用して、エージェントプロセスの最後のノードで「リフレクション」を生成します。反映には、要件をよりよく満たすためにモデルの出力をどのように変更する必要があるか、出力をそのような方向に変更するためにプロンプ​​ト ワードやツール呼び出しをどのように最適化する必要があるかが含まれます。この内容は、ニューラル ネットワークの最適化における勾配の役割とまったく同じです。どちらにも、モデル全体の損失を最小限に抑えるためにパラメーターをどのように調整する必要があるかに関する情報が含まれています。そのため、研究チームはこの反映を「テキスト勾配」と呼んでいます。 、言語ベースのグラデーション。
次に行うことは、各層の後ろから前への勾配を取得することです。これはニューラル ネットワークの最適化にとって重要です。 Waveform Intelligence の研究者は、ニューラル ネットワークにおける連鎖ルールベースの式のバックプロパゲーションにインスピレーションを得て、テキストと大規模なモデルを通じて慎重に設計された一連のプロンプトを使用して、従来のニューラル ネットワーク最適化の連鎖ルールをシミュレートしました。具体的には、このプロンプトのセットにより、前の層の勾配情報 (つまり、前の層によって実行されたタスクの反映) と、この層の入力、出力、および重み (これらの入力は対応するバックプロパゲーション式のパラメーターと完全に一致し、現在のノードのプロンプト/ツールの使用状況、つまり現在のレイヤーの言語ベースの勾配に関する反映を出力します。このテキストベースの逆伝播スキームにより、この研究では、複数のノードと複雑なワークフローを含むエージェント内の各ノード/レイヤーのパラメーターの勾配を取得し、エージェント全体の各プロンプトとツールを直接最適化することができ、それによってパフォーマンスの役割を実現できます。エンドツーエンドの共同最適化を実現します。
最後に、各パラメーターセットの言語ベースの勾配を取得した後、フレームワークは、慎重に設計されたプロンプト、各レイヤーのプロンプトワードとツール呼び出し、およびテキストベースの勾配を使用して、大規模なモデルに基づくオプティマイザーを使用します。入力として、最適化されたプロンプトとツールが出力され、エージェントのパラメーターが更新されます。
さらに、このフレームワークはネットワーク構造、つまりエージェントのワークフローの最適化もサポートしています。具体的には、このフレームワークはエージェントのワークフローを特定のプログラミング言語で表現するため、エージェント ネットワークの「計算グラフ」も記号的な重みに処理されます。次に、個別に設計された大規模モデルベースのオプティマイザーを通じて、現在のエージェントのワークフローと、ワークフロー内の各ノードのテキスト形式のグラデーションを入力として使用して、エージェントのワークフローが更新されます。これは、ニューラル ネットワーク学習におけるネットワーク構造の自動探索に関する研究に例えることができます。図3大規模なモデル評価タスクに関する実験結果
                                                                                                                                                                                                    Figure 4 Experimental results of the agent-level evaluation task

Waveform Intelligence researchers evaluated the algorithm on a series of benchmarks for large models and agents, as shown in Figures 3 and 4 It shows that agent symbolic learning has significantly improved on various tasks compared to DSpy and traditional agent frameworks without learning capabilities. In some tasks, it can even use GPT-3.5 to compete with other agent frameworks. Performance is similar using GPT-4. However, simply using a local prompt word automatic optimization algorithm (AutoPE) based on a large language model for the prompt words in each node in the agent cannot achieve obvious results. In addition, as shown in Figure 5, in the creative writing task, the algorithm has independently evolved from an initial single-node agent that only writes based on one prompt word to a workflow that supports writing + editing, and the prompt word of the writing node Updated and optimized. S Figure 5 Agent Symbolic Learning framework Learning Effect Effects (take creative writing tasks as an example)

An agent that can evolve independently? The first end-to-end agent symbolic training framework is open source

The research team of waveform intelligence introduced the two application scenarios of Agent Symbolic Learning. First, the framework can be used by developers or researchers to create and tune agent systems. Like the training of neural networks, developers and researchers can collect (or use the automatic generation provided in the framework) a large number of samples for specified tasks, and then use the framework to complete the training of "data-centric" agents on large amounts of data. After training and optimization, just like the deployment of ordinary agents, the optimized agents are deployed in a static manner in the production environment.

In addition, another important application scenario of this framework is to support Agents that can evolve autonomously in the environment/interaction. Specifically, because the training framework itself only needs to call the ability of large models without complex GPU-based training and deployment, an Agent can use the training framework as a tool that it can call by exploring the environment. Or in the process of interacting with humans, it continuously collects new training samples, regularly or actively calls algorithm tools for agent training, and updates its own prompts, tools, and workflow. Waveform Intelligence also supports such deployment logic in the open source code base of AIWaves Agents, realizing the first agent system that can continue to evolve and iterate independently after being deployed to actual products and production environments.

The Agent Symbolic Learning framework treats AI Agent as a symbolic "neural network" connected by prompts and tools in complex workflows. By simulating backpropagation and gradient descent based on natural language, it enables large-scale model-based The agent can independently optimize its own "network parameters", that is, prompts and tools, and its "network structure", that is, agent workflow, thus achieving intelligence that can efficiently utilize large amounts of data and experience and perform "data-centric learning" The agent framework makes it possible for intelligent agent systems that can continue to evolve autonomously. Currently, this framework has played a role in multiple products and applications of Waveform Intelligence, solving the problem of difficult manual optimization and evaluation of Agents. In order to promote the development and research of "Data-centric Agent" and "Agent Learning", the research team of Waveform Intelligence has also open sourced all the codes of the algorithm. We look forward to the academic and industrial circles in the field of intelligent agents exploring more interesting algorithms and applications together. .

The above is the detailed content of An agent that can "evolve independently"? The first end-to-end agent symbolic training framework is open source. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn