SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.03624 · 2024

How to Correctly do Semantic Backpropagation on Language-based Agentic Systems

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 8 functions out of this paper's own repositories and ran 0 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
hishamalyahya/semantic_backprop canonical 0 of 8
FunctionStatusWhere it lives
add_indent Not yet run hishamalyahya/semantic_backprop/semantic_backprop/utils.py
code served (permissive licence) · get_code("0d63c9efe3b4310f")
aprocess_example Not yet run hishamalyahya/semantic_backprop/semantic_backprop/engine/solutions.py
code served (permissive licence) · get_code("3abb33733cf131f2")
arun_evaluate Not yet run hishamalyahya/semantic_backprop/semantic_backprop/engine/solutions.py
code served (permissive licence) · get_code("ce3d76ede3c858bf")
fdbk_prompt Not yet run hishamalyahya/semantic_backprop/semantic_backprop/prompt_tmp.py
code served (permissive licence) · get_code("4d97d0128f9547c9")
fdbk_prompt_no_sibling Not yet run hishamalyahya/semantic_backprop/semantic_backprop/prompt_tmp.py
code served (permissive licence) · get_code("410fde5d86d72617")
listing Not yet run hishamalyahya/semantic_backprop/semantic_backprop/utils.py
code served (permissive licence) · get_code("4fd607b064edf51f")
parse_tagged_text Not yet run hishamalyahya/semantic_backprop/semantic_backprop/utils.py
code served (permissive licence) · get_code("9cded598fbc7acf1")
sample_error_batch Not yet run hishamalyahya/semantic_backprop/semantic_backprop/engine/solutions.py
code served (permissive licence) · get_code("5cd43eb4afc2e19e")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Language-based agentic systems have shown great promise in recent years, transitioning from solving small-scale research problems to being deployed in challenging real-world tasks. However, optimizing these systems often requires substantial manual labor. Recent studies have demonstrated that these systems can be represented as computational graphs, enabling automatic optimization. Despite these advancements, most current efforts in Graph-based Agentic System Optimization (GASO) fail to properly assign feedback to the system's components given feedback on the system's output. To address this challenge, we formalize the concept of semantic backpropagation with semantic gradients -- a generalization that aligns several key optimization techniques, including reverse-mode automatic differentiation and the more recent TextGrad by exploiting the relationship among nodes with a common successor. This serves as a method for computing directional information about how changes to each component of an agentic system might improve the system's output. To use these gradients, we propose a method called semantic gradient descent which enables us to solve GASO effectively. Our results on both BIG-Bench Hard and GSM8K show that our approach outperforms existing state-of-the-art methods for solving GASO problems. A detailed ablation study on the LIAR dataset demonstrates the parsimonious nature of our method. A full copy of our implementation is publicly available at https://github.com/HishamAlyahya/semantic_backprop

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2412.03624")
get_code_for_paper("2412.03624")
have("2412.03624")

Connect an agent — have() is free.