Assimilation and Accommodation: Task-Adaptive Hierarchical Abstraction for Solving Web Tasks (2025)

Abstract: Web tasks, which involve processing data from online resources, challenge agents to generalize beyond fixed knowledge to unseen task contexts. Learning from experience, the ability to derive reusable patterns from past tasks, is crucial for improving generalization. However, existing methods focus on summarizing workflows, i.e., common sub-routines, which may introduce excessive low-level details that distract models. Additionally, the absence of task-specific objectives can lead to inconsistencies between workflows and future task queries, hindering reasoning performance. This paper seeks to mitigate these issues by proposing A^2 , a framework that derives task-adaptive hierarchical abstraction to enhance web task reasoning. Our approach first extracts general-purpose semantic abstraction from past task-solution pairs. Combined with the next task query, this abstraction forms a task-adaptive episodic abstraction that guides subsequent reasoning. Experiments show that A^2 achieves superior performance with competitive cost-efficiency, improving success rates by 0.7% on Mind2web and 4.6% on Webarena.

## introduction large language models (llms) have demonstrated remarkable capabilities across a wide range of natural language reasoning tasks @xcite @xcite . despite the promising performance, state-of-the-art llms still struggle with web tasks @xcite , which involve processing dynamic online information. the primary difficulty arises from the evolving nature of web content. such variability often exceeds the static knowledge stored in pre-trained models, posing significant challenges for generalization. one approach to addressing these challenges is learning from experience, i.e., identifying reusable patterns shared across similar tasks and generalizing them to novel environments. prior efforts have explored to learn from experience by summarizing workflows @xcite , as illustrated in fig. 1 . these works derive common subroutines from experiential data, capturing the execution logic of each step to assist further reasoning. however, summarizing workflow is not universally effective, primarily due to two issues. (1) as experiential data grows, workflow memory expands, escalating computational costs and potentially exceeding context window limits @xcite . the accumulation of irrelevant details distracts the model, hindering key insight extraction. consequently, reasoning performance deteriorates as the model becomes overwhelmed by nonessential information. for instance, irrelevant workflows (gray) in fig. 1 may obscure critical ones (green), leading to incorrect solutions. (2) the absence of a specific target task during workflow summarization may yield content misaligned with subsequent tasks, leading to suboptimal or even erroneous outcomes. as shown in fig. 1 , misleading workflows (red) may make models incorrectly prioritize first class over economy. a key distinction between llms and human reasoning lies in the ability to form task-adaptive hierarchical abstraction from experience. as demonstrated in fig. 1 , it involves organizing experiential data into structured layers, where higher-level concepts build upon lower-level details. when faced with novel environments, general-purpose abstraction transitions into task-adaptive abstraction, enabling context-specific guidance. humans naturally develop this ability early, enabling them to adapt prior knowledge to solve novel challenges @xcite . compared to workflowbased approaches, it provides a more structured approach to distill key patterns and guide effective reasoning. despite its potential, task-adaptive hierarchical abstraction remains unexplored in llms. in this paper, we propose to enhance llms' web task reasoning capability by developing task-adaptive hierarchical abstraction from experience (sec. 4). we introduce assimilation and accommodation (a 2 ), consisting of three key steps. extensive experiments show that a 2 achieves superior performance with remarkable cost-efficiency. on webarena @xcite , a web task benchmark, it improves success rate by 4.6% w.r.t. baselines using gpt-4o-mini. on mind2web @xcite , a web navigation dataset, it outperforms state-of-the-art methods with a 4.5% gain in step success rate and a 0.7% increase in overall success rate. further analysis confirms our method's robustness, indispensability, and lower token cost, highlighting its potential for web task resolution. ## related work web tasks, as the research focus of this work, refer to reasoning tasks that involve web data, such as retrieving or processing information from online sources. current representative methods to addressing web tasks tend to prompt llms @xcite , or train agents by reinforcement learning @xcite . various web task benchmarks have been introduced to evaluate the performance of these approaches @xcite @xcite . web tasks pose unique challenges compared to other reasoning problems, characterized by dynamic data dependencies and the need for multi-step action sequences. these requirements demand both generalization from prior knowledge and continuous adaptation. in this work, we address these challenges through a task-adaptive hierarchical abstraction framework, offering a robust and scalable solution for web-based reasoning. inductive reasoning seeks to derive common principles from specific instances. typically, llms are provided with 2-5 input-output pairs that adhere to a pre-defined rule and are then expected to deduce the underlying rule and solve a corresponding test problem. existing research mainly focus on prompt-based strategies @xcite @xcite , with dedicated benchmarks assessing these capabilities @xcite . however, such works are limited by the reliance on artificial, context-specific rules derived from minimal examples, hindering real-world applicability. our approach addresses this by leveraging task-adaptive hierarchical abstraction to enhance generalization, enabling llms to tackle practical challenges beyond constrained example-based scenarios. ## task definition in this section, we build upon representative works @xcite to formally define web tasks as tasks that necessitate interaction with web-based environments, including retrieving, processing, and reasoning over data from online resources. agents generate action sequences as solutions based on task queries and the dynamic states of websites. the inclusion of numerous and constantly evolving html elements presents significant challenges for existing methods. web task benchmarks generally follow a sequential task order, requiring methods to adopt an online approach, solving tasks one by one. due to the significant differences between websites, tasks are typically grouped by website, with all tasks for a given website completed before proceeding to the next one. as shown in fig. 3 , given a task query q and an initial state @xmath0, the agent first gathers an initial observation o 0 from the environment e. using the observation o 0 , the current state s, and the task query q, the agent predicts an action a 0 = f (q, s, o 0 ). after executing a 0 , the state is updated to @xmath1, a 0 )}, and a new observation o 1 = h(e, s) is collected from the environment, where h represents the environment update function. this process repeats until q is satisfactorily resolved or a pre-defined maximum step limit m is attained. the final solution is represented as a sequence of executed actions, denoted by @xmath2, a i , . . . , a n )}. for a given website, the set of tasks @xmath3, q 1 , . . . , q k } is solved sequentially, ensuring that all tasks for one website are completed before proceeding to the next website. experience and adapt to novel environments. as illustrated in fig. 2 , a 2 is built on the design principles of discovery and utilization, i.e., (i) assimilation: dynamically extracting generalpurpose hierarchical semantic abstraction from experiential data (sec. 4.2); (ii) accommodation: adapting semantic abstraction to new queries, generating task-adaptive episodic abstraction as reasoning guidance (sec. 4.3); and (iii) utilization: applying episodic abstraction to steer problem-solving process (sec. 4.4). details are provided below. existing approaches generally follow a sequential procedure for each website @xcite , as shown in fig. 3(b) . given a set of previously solved query-solution pairs for a new task query q i , the model generates a solution s @xmath4, a 1 , ..., a n i } guided by w , where each a j represents an action (detailed in sec. 3). the new query-solution pair (q i , s i ) is added to update solved tasks p ′ = p ∪ {(q i , s i )}, and workflows are updated. this process repeats until all tasks for the current website are completed. ## experiments this section presents a comprehensive evaluation of a 2 with representative baselines on several web task datasets. firstly, we introduce several critical parts of the experimental setups (in sec. 5.1). secondly, we provide a comprehensive analysis (in sec. 5.2). lastly, we conduct extensive analysis studies to deeply understand the task-adaptive hierarchical abstraction (in sec. 5.3 to sec. 5.5). ## conclusion in this paper, we propose a 2 , a novel reasoning framework that integrates task-adaptive hierarchical abstraction from experience to enhance web task reasoning. our approach extracts generalpurpose semantic abstraction from experience and dynamically adapts it into episodic abstraction based on the next task query. by leveraging episodic abstraction to guide reasoning, our method effectively filters out irrelevant details and misleading knowledge, improving both accuracy and efficiency. a 2 achieves state-of-the-art performance while maintaining high cost-effectiveness. we encourage further research on abstraction-based reasoning to advance the effectiveness of llms in successfully learning abstraction knowledge from experiential data to fit in dynamic task contexts.