CogAdapt: Cognition-informed Sparse Adaptation of Code LLMs

📅 2026-10-05
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
This study addresses the prohibitive fine-tuning costs of large code models and the coarse adaptation granularity of existing cognitive alignment methods by proposing a selective sparse adaptation approach grounded in human cognitive priors. Specifically, this work leverages EEG signals and eye-tracking attention data to learn cognitive priors, establishing for the first time a connection between human reading behavior and Mixture-of-Experts (MoE) architectures to guide the sparse selection of Transformer modules. This enables efficient parameter-efficient fine-tuning without requiring additional data acquisition during inference. Experimental results demonstrate that the proposed method achieves a 10.86 percentage point improvement on LiveCodeBench while reducing trainable parameters by over 86%, ultimately surpassing the performance of full-parameter fine-tuning.
📝 Abstract
Large language models (LLMs) have become increasingly capable of generating code. However, achieving stronger code-generation performance still often relies on costly model adaptation, i.e., fine-tuning pretrained model parameters. Prior studies have shown correspondence between human code processing and neural models' attention or internal computation. Human-aligned learning approaches use cognitive signals to guide training, but typically adapt a large portion of the model, leaving training costs largely unchanged. Human cognitive signals may indicate not only what the model must learn from, but also where adaptation is most useful. We investigate whether human responses during code reading correspond to code-model behavior and can guide selective adaptation without sacrificing performance. We present CogAdapt, a cognition-informed framework for task-dependent sparse adaptation of code models. CogAdapt first learns transferable program-level and token-level priors from human Electroencephalography (EEG) and attention data, then combines these priors with the frozen model's response to each coding task to determine how much adaptation to allocate and which transformer blocks should receive updates. During fine-tuning, only the selected blocks are updated, while no new human recordings are required for inference. Across Qwen and GLM, we find consistent correspondence between human reading behavior and Mixture-of-Experts (MoE) computation. CogAdapt achieves the best pass@1 across both LiveCodeBench and BigCodeBench, including gains of 10.86 and 6.29 percentage points over matched regular fine-tuning on LiveCodeBench, while reducing gradient-eligible adaptation parameters by 86.21-87.21%. These results suggest that human comprehension signals can provide useful guidance for making code-model adaptation both more selective and more effective.
Problem

Research questions and friction points this paper is trying to address.

Code LLMs
Sparse Adaptation
Cognitive Signals
Fine-tuning Efficiency
Code Generation
Innovation

Methods, ideas, or system contributions that make the work stand out.

Cognition-informed Adaptation
Sparse Fine-tuning
Code LLMs
EEG Signals
Mixture-of-Experts