From Language to Pixels: Task Recognition and Task Learning in LLM s (2024)

Abstract: LLMs can perform unseen tasks by learning from a few in-context examples. How in-context learning works is still uncertain. We investigate the mechanisms of in-context learning on a challenging non-language task. The task requires the LLM to generate pixel matrices representing images of basic shapes. We introduce a framework to analyze if this task is solved by recognizing similar formats from the training data (task recognition) or by understanding the instructions and learning the skill de novo during inference (task learning). Our experiments demonstrate that LLMs generate meaningful pixel matrices with task recognition and fail to learn such tasks when encountering unfamiliar formats. Our findings offer insights into LLMs’ learning mechanisms and their generalization ability to guide future research on their seemingly human-like behavior.

## introduction the rapid development of llms increases the chance of misinterpreting their capabilities. it is crucial to explore the potential of llms and research their underlying mechanisms. this helps in interpreting llms outputs, guides future research to improve language models, and informs their use and regulation. since @xcite demonstrated the abilities of gpt-3, there has been a growing interest in researching llms' potential to generalize to other tasks. many studies demonstrated llms' abilities in solving reasoning tasks @xcite @xcite . contrary, it has been shown that llms still struggle to reason about seemingly simple tasks where humans perform superior @xcite @xcite . these findings demonstrate ambiguity in llms' general abilities and the need to further probe challenging tasks. in addition to the ambiguity about general capabilities, it is also unclear how and why llms benefit from in-context learning, i.e., how they can learn from instructions and demonstrations in the prompt. @xcite suggest that in-context learning could stem from genuinely learning new tasks, identifying tasks learned during training, or a mix of both approaches. however, the mechanisms of in-context learning remain uncertain. on one hand, the inner workings (e.g., attention patterns) are too vast and complex to analyze directly. on the other hand, finding a higher-level abstraction to describe the model's internal processes is challenging. it is crucial to differentiate llms' achievements from human-like comprehension and reasoning as their training misses critical contexts, such as communicative intent @xcite . especially terms like "learning" and "understanding" should be used cautiously @xcite . however, higher-level frameworks can help to explain llm behaviors and assess llms' potential @xcite . we adopt the abstraction level from @xcite and the terminology proposed by @xcite and distinguish between task learning (tl) and task recognition (tr). tr assesses how well llms can identify tasks through demonstrations and apply their pre-trained priors. tl describes the ability to learn new input-label mappings not encountered during training. building on this, we introduce a framework that involves breaking tasks into subtasks and analyzing each for tl and tr to thoroughly investigate in-context learning. we instruct a model to generate pixel art as 8×8 pixel matrices (see figure 1 ). the experiments solely use the model's inherent tokens without additional fine-tuning or incorporating image models. while investigating this task, we demonstrate unique capabilities, pinpoint where the pixel matrix task falls along the spectrum between tl and tr, and establish and validate a straightforward framework of breaking complex tasks into subtasks to clarify how llms achieve the observed capabilities. our main contributions are summarized as follows: others adhere closer to the llm architecture. koh et al. (2023) have used visual encoders to ground an llm in the visual domain, enabling image captioning and text-to-image tasks. similarly, pourreza et al. (2023) generates images represented as brush strokes. they add an image feature extractor and cross-attention blocks to provide visual feedback during stroke generation. these studies demonstrate that llms possess implicit knowledge about images and the visual domain. our task is distinct in that it generated images without extra image encoders or training. ## method our experimental setup aims to assess llms' general capabilities on the challenging pixel-matrix task and determine whether it is addressed through tr or tl. simultaneously, we demonstrate our framework's utility in explaining llms' capabilities and differentiating between tl and tr. we choose the pixel matrix task because it is particularly challenging. it requires the model to translate instructions and visual knowledge into a new format. the task's complexity helps to clearly distinguish between tr and tl and assess our framework. simpler tasks can be solved in many different ways, and the likelihood that the model recognizes or learns arbitrary parts increases, complicating the decision between tr and tl. by thoroughly examining a single task, we provide evidence contributing to a broader understanding of in-context learning and the differentiation between tr and tl. ## results this section presents the results of our experiments. the quantitative results are summarized in ## discussion in this section, we examine our experiment results. we discuss the overall performance in the pixel matrix task, assess if they tackle the task through tl or tr, and evaluate if breaking down the task into subtasks is a valid framework to explain llm abilities. ## conclusion our study demonstrates that llms can generate pixel matrices representing objects such as digits, letters, and simple real-world items. our experiments show evidence of strong task recognition and limited task learning ability. we argue that breaking down complex tasks into smaller subtasks is a useful framework for evaluating and explaining llm capabilities, preventing misleading conclusions when assessing the task's overall performance, and helping to distinguish between tl and tr. as llms improve their ability to recognize tasks, locate relevant training data, and break down complex tasks, distinguishing between task learning and task recognition becomes increasingly complex. although one might argue that this, at the core, represents task recognition of subtasks, future research is needed to explore how this process compares to human learning.