Not All Context Is Created Equal: Measuring and Controlling Context Influence in Machine Learning
Abstract
Modern ML systems increasingly operate with context. Previous interactions, retrieved information, persistent memory, and user preferences can all affect the output of an ML model,particularly Large Language Models (LLMs) [1,2]. Having access to information does not necessarily mean that the information is appropriate to influence the output. Some context is highly relevant and should strongly influence the output while some may be relevant but subjective and therefore should only conditionally affect the model’s output. Irrelevant context meanwhile, should have little to no influence on the output. Persistent Memory provides a clear example: a dietary preference may provide useful personalization,a personal belief may be potentially relevant while an unrelated personal fact should not influence the output. Persistent memory enables both beneficial personalization as well as undesirable behaviours (sycophancy and inappropriate memory use)[3]. PersistBench provides a framework to evaluate these behaviours . Our investigation highlights an important distinction: memory can be relevant without being appropriate to treat as reliable evidence. While existing persistent memory evaluations measure consequences of memory use we additionally investigate how retrieved memories should influence model behaviour We first tested whether making the epistemic status of memories explicit would be enough, our pilot experiment showed that this was not reliable to prevent sycophantic behaviour. Therefore this motivated us to move from just representing memory type to controlling memory influence. To address this gap, we introduce a Context Influence Management system that separates what a model can access and what can influence its behaviour. Rather than just passing retrieved context to a model,the new architecture introduces a layer that evaluates each element along dimensions such as relevance,epistemic status and reliability. It assigns an influence policy based on whether the information should strongly influence, conditionally influence or be suppressed.This separates what context a model can access from how that context is permitted to affect its prediction or reasoning. We worked on the basis of this framework with LLMs, comparing raw memory, typed memory ,epistemic memory and influence control. Beyond persistent memory, this framework is a layer for managing diverse contextual inputs, from retrieved context and user provided information to model generated context. This provides a structure to study how contextual information influences model predictions and its effects on chain-of-thought (CoT) behavior. In our pilot of 10 samples consisting of seven sycophancy and three beneficial-personalization scenarios, our influence control system achieved the lowest average sycophancy ,reducing the score from 3.71 (with raw memory) to 3.00, while reducing the failure rate from 6/7 to 5/7. Epistemic status alone didn’t prevent sycophancy, while beneficial personalization showed zero failure across all conditions. The results motivate treating contextual influence as a distinct dimension of model behaviour with potential for understanding broader ML reasoning behaviour.