Improving LLM Final Representations with Inter-Layer Geometry
Tom Ulanovski, Eyal Blyachman, Maya Bechler-Speicher
NeurIPS page · OpenReview · Open on the map
Category: Efficient LLM Inference & Training › Mixture-of-Experts Data Mixing · Type: new method · Keywords: LLM representation aggregation, graph neural network, Cayley graph, few-shot learning, parameter-efficient inference
Areas: Model Architectures & Sequence Modeling › Language Model Architectures › Latent Reasoning; Graph Learning › Graph Analysis Methods › Graph Neural Network Architectures
Summary
Cayley-Encoder uses a graph neural network over a Cayley graph of LLM layers to improve final representations, achieving up to 40 percentage points higher accuracy with minimal extra parameters.
Explained to a 5-year-old
Big computer brains called large language models are trained to understand and generate text. When we use them for a new task, we usually take the last layer of information they produce. However, earlier layers also contain useful clues about the task. We connect all those layers together like a network to share information. This helps the final output be more accurate without changing the brain.
Explained to a 5-year-old, longer
Big computer brains called large language models (LLMs) are trained to understand and generate text. When we use them for a new task, we usually take the last layer of information they produce. However, earlier layers also contain useful clues about the task. Existing ways to combine these layers are either complicated or use a lot of computer power. This paper shows that a simple network that connects all layers together can work better. By arranging the connections in a special pattern, the network stays simple and efficient. This helps the final output be more accurate without needing to change the original model. It also works well when we have very little training data. The new method can even beat other popular techniques while using almost no extra memory. In practice, this means we can get better results from large models without expensive training. The approach also helps us understand which layers contribute to the final answer.
For a technical reader
The paper addresses the limitation of using only the final transformer layer for downstream tasks by aggregating information from multiple layers. It proposes a graph neural network that connects all LLM layers, first using a fully connected graph and then a sparse Cayley graph for efficiency. This graph structure provides a mathematically sound topology that reduces overfitting and keeps communication across layers effective. Experiments across 13 tasks and 9 models show up to 40 pp accuracy gains with negligible extra parameters, and the method works well in few-shot scenarios. The approach also outperforms LoRA fine-tuning while operating on a frozen model, offering a parameter-efficient alternative.
Problem
Using only the final-layer representation of LLMs often discards useful signals present in intermediate layers, and existing inter-layer aggregation methods are either task-specific or computationally expensive.
Method
The approach constructs a fully connected graph of LLM layers and applies a lightweight graph neural network to aggregate layer representations, then replaces the graph with a Cayley graph over SL(2, Z_n) to provide a sparse, regular topology that improves efficiency and reduces overfitting.
Results
The approach achieves improvements of up to 40 percentage points in accuracy across tasks, while adding at most 0.1% extra parameters, and performs well in few-shot settings.
Contributions
It shows that a lightweight graph neural network over a mathematically grounded Cayley graph can effectively aggregate LLM layer representations, outperforming existing inter-layer aggregation and LoRA fine-tuning on frozen models.
Practical relevance
It enables more accurate and parameter-efficient inference from large language models without requiring fine-tuning, making advanced performance accessible on modest hardware.
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction