paper-with-me

Papers

LLMs Process Lists With General Filter Heads

2025-10-30 · Arnab Sen Sharma, Giordano Rogers, Natalie Shapira, David Bau arxiv

We investigate the mechanisms underlying a range of list-processing tasks in LLMs, and we find that LLMs have learned to encode a compact, causal representation of a general filtering operation that mirrors the generic "filter" function of functional programming. Using causal mediation analysis on a diverse set of list-processing tasks, we find that a small number of attention heads, which we dub filter heads, encode a compact representation of the filtering predicate in their query states at certain tokens. We demonstrate that this predicate representation is general and portable: it can be extracted and reapplied to execute the same filtering operation on different collections, presented in different formats, languages, or even in tasks. However, we also identify situations where transformer LMs can exploit a different strategy for filtering: eagerly evaluating if an item satisfies the predicate and storing this intermediate result as a flag directly in the item representations. Our results reveal that transformer LMs can develop human-interpretable implementations of abstract computational operations that generalize in ways that are surprisingly similar to strategies used in traditional functional programming patterns.

📄 PDF Abstract BibTeX arXiv:2510.26784

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

The Anxiety of Influence: Bloom Filters in Transformer Attention Heads

2026-02-19 · Peter Balogh arxiv

Some transformer attention heads appear to function as membership testers, dedicating themselves to answering the question "has this token appeared before in the context?" We identify these heads across four language mod…

A Hybrid Approach to Music Playlist Continuation Based on Playlist-Song Membership

2018-05-24 · Vall Andreu, Dorfer Matthias, Schedl Markus, Widmer Gerhard

Automated music playlist continuation is a common task of music recommender systems, that generally consists in providing a fitting extension to a given playlist. Collaborative filtering models, that extract abstract pat…

Collaborative FilteringRecommendation Systems

LongHeads: Multi-Head Attention is Secretly a Long Context Processor

2024-02-16 · Yi Lu, Xin Zhou, wei he, Jun Zhao 외

Large language models (LLMs) have achieved impressive performance in numerous domains but often struggle to process lengthy inputs effectively and efficiently due to limited length generalization and attention's quadrati…

Sentence

SPICED: Syntactical Bug and Trojan Pattern Identification in A/MS Circuits using LLM-Enhanced Detection

2024-08-25 · Jayeeta Chaudhuri, Dhruv Thapar, Arjun Chaudhuri, Farshad Firouzi 외

Analog and mixed-signal (A/MS) integrated circuits (ICs) are crucial in modern electronics, playing key roles in signal processing, amplification, sensing, and power management. Many IC companies outsource manufacturing …

Anomaly DetectionLanguage ModellingLarge Language Model

Consensus Learning from Heterogeneous Objectives for One-Class Collaborative Filtering

2022-02-26 · SeongKu Kang, Dongha Lee, Wonbin Kweon, Junyoung Hwang 외

Over the past decades, for One-Class Collaborative Filtering (OCCF), many learning objectives have been researched based on a variety of underlying probabilistic models. From our analysis, we observe that models trained …

Collaborative Filtering