Causal Inference for Human-Language Model Collaboration (2024)

Abstract: In this paper, we examine the collaborative dynamics between humansand language models (LMs), where the interactions typically involveLMs proposing text segments and humans editing or responding to theseproposals. Productive engagement with LMs in such scenarios necessitates that humans discern effective text-based interaction strategies, such as editing and response styles, from historical human-LM interactions. This objective is inherently causal, driven by the counterfactual ‘what-if’ question: how would the outcome of collaboration change if humans employed a different text editing/refinement strategy? A key challenge in answering this causal inference question is formulating an appropriate causal estimand: the conventional average treatment effect (ATE) estimand is inapplicable to text-based treatments due to their high dimensionality. To address this concern, we introduce a new causal estimand– *Incremental Stylistic Effect (ISE)*, which characterizes the average impact of infinitesimally shifting a text towards a specific style, such as increasing formality. We establish the conditions for the non-parametric identification of ISE. Building on this, we develop *CausalCollab*, an algorithm designed to estimate the ISE of various interaction strategies in dynamic human-LM collaborations. Our empirical investigations across three distinct human-LM collaboration scenarios reveal that *CausalCollab* effectively reduces confounding and significantly improves counterfactual estimation over a set of competitive baselines.

## introduction dialog agents like chatgpt and claude, built on pretrained language models (lms), have significantly transformed the landscape of text generation, showcasing extraordinary performance improvements across a wide range of tasks @xcite @xcite . this shift has heralded a new era in interaction design, particularly in dialog systems. as illustrated in figure 1 , these systems are designed for interactive human collaboration, involving sequential actions such as editing, rephrasing, or revising text @xcite . this innovative design has empowered users to augment their own capabilities in various fields, including data analysis, customer support, and social media strategy formulation @xcite @xcite . consequently, it has become crucial for users to learn how to adeptly collaborate with these lms to fully harness their potential. this paper investigates how users can optimize their collaboration with lms by drawing on insights from historical human-lm interactions. we primarily seek to identify effective collaboration strategies from past dialogues, with the goal of enhancing the synergy between human intuition and machine intelligence in these sophisticated dialog systems. improving human-lm collaboration by having humans learn from past human-lm interactions is an inherently causal problem. applying editing strategies from past successful collaborations may not always be effective, since the success of these strategies could be confounded by specific prompt setups. for instance, editing strategies such as "increasing the level of politeness in the generated text" may prove beneficial when collaborating on customer support responses, as it helps to build rapport and maintain a positive relationship with the customer. however, the same strategy may not be as effective when working on a scientific research paper, where a neutral and objective tone is often preferred to convey the findings accurately. similarly, "adjusting the text to use more confident language" may be advantageous when crafting persuasive arguments in an editorial piece, but it could be less appropriate when generating content for a balanced news article, where impartiality is key. these examples illustrate how editing strategies (increasing politeness and adjusting language confidence) can have varying levels of effectiveness depending on the specific collaboration context (customer support, scientific writing, editorials, and news articles). they underscore the importance of understanding the causal impact of such strategies across different situations to determine their overall usefulness in enhancing human-lm collaboration and bring us to the key counterfactual question: how would the collaboration outcome change if we implemented an alternative text editing strategy? 1 answering such questions will provide insights into editing strategies that reliably improve human-lm collaboration versus those that only work in certain situational contexts. this causal inference problem, however, is challenging since it is unclear what constitutes a suitable causal estimand for human-lm collaboration. the traditional causal estimand, average treatment effect (ate) @xcite , faces limitations in this context due to the high-dimensional nature of text-based treatments, which violate the "positivity" assumption. positivity requires that all possible word sequences occur with non-zero probability in all editing strategies. this condition is readily met in binary treatment situations, where treatments are categorized as either 'treated' or 'control.' however, it becomes problematic for textbased treatments. numerous word sequences either fail to form coherent sentences or are implausible as human edits, resulting in some configurations having a zero probability of occurring. hence, the question arises: what is an appropriate causal estimand for human-lm collaboration? this causal estimand must account for the distinctive characteristics of text as a treatment, particularly its high-dimensional and non-binary nature. in this paper, we propose a novel causal estimand for human-lm collaboration-incremental stylis-tic effect (ise). ise is based on the key insight that instead of focusing on the effect of specific edits (e.g., insertion/deletion/rephrasing of words) as effective collaboration (text refinement) strategies, we should instead focus on the implications of these edits on text style. for instance, consider a financial analyst collaborating with an lm to write a quarterly report for clients. multiple edits could make the writing more formal, e.g., removing contractions ('can't' → 'cannot') or replacing phrasal verbs with more precise terms. in this case, the ise of "formalizing" text would measure the cumulative incremental effect of systematically enhancing formality through any such edits. if the analyst finds that increasing formality improves client evaluations (outcome), they learn that a more formal writing style is effective and can implement appropriate edits in future reports to increase formality (the exact wording changes don't matter). ise is also more practical to communicate and is actionable. instead of recommending specific edits, which may not always be applicable, it advises users on broader stylistic changes that are likely to enhance collaboration outcomes. finally, the universal applicability of these stylistic changes meets the positivity condition in causal inference, as there is always the possibility to make any text more formal (in our stylized example). next, we present an algorithm causalcollab, to evaluate the effectiveness of human-lm collaboration strategies over time, using the incremental stylistic effect (ise) as its guiding estimand. this algorithm operates by identifying and analyzing prevalent stylistic changes in past human-lm interactions. it then evaluates the impact of these changes in various dynamic human-lm collaboration contexts. our empirical studies, encompassing three distinct scenarios of human-lm collaboration, demonstrate that causalcollab is effective in mitigating confounding factors and enhancing counterfactual estimation and provides valuable in-sights for humans to improve their collaboration strategies with lms. contributions: this paper makes the following contributions: our work is related to two strands of prior work. ## causal inference for human-lm collaboration we begin with framing human-lm collaboration as a causal inference problem. ## conclusion in conclusion, our work introduces the incremental stylistic effect (ise) as a novel causal estimand for human-lm collaboration, addressing the challenges posed by high-dimensional text-based treatments in causal inference. we establish the conditions for the non-parametric identification of ise, providing a solid theoretical foundation for our approach. building upon this, we propose the causal-collab algorithm, which leverages g-estimation for time-varying text variables and conditional variational autoencoders (cvae) to extract human strategies, enabling the estimation of ise in practice. our research makes significant contributions to the field of human-lm collaboration by offering a fresh perspective on understanding the dynamics of these interactions through a causal lens. by focusing on the stylistic implications of text edits rather than specific wording changes, ise provides a more practical and actionable approach to identifying effective collaboration strategies. the universal applicability of stylistic changes also ensures that the positivity condition in causal inference is met, overcoming the limitations of traditional causal estimands like average treatment effect (ate). we demonstrate the effectiveness of our approach through extensive empirical studies on three diverse human-lm collaboration datasets. the results validate that causalcollab significantly narrows the gap between observational and counterfactual evaluations, highlighting its ability to accurately estimate the causal impact of interaction strategies. this has important implications for enhancing human-lm collaboration, as it enables users to make informed decisions about their editing strategies based on a deeper understanding of their causal effects. in summary, our work introduces a novel causal estimand, establishes its theoretical properties, proposes a practical algorithm for its estimation, and validates its effectiveness through empirical studies. we believe that our contributions provide a valuable foundation for further research in this area and have the potential to significantly improve the dynamics of human-lm collaboration. as language models continue to advance and become more integrated into various domains, understanding and optimizing the interaction between humans and these models will be crucial. our work takes an important step in this direction, and we hope it inspires further exploration of causal approaches to human-lm collaboration.