HƯỚNG DẪN KỸ THUẬT

Sự chồng chất và tính đa nghĩa trong khả năng diễn giải của AI

Sự chồng chất trong khả năng diễn giải của AI là cách các mạng thần kinh đóng gói nhiều tính năng vào các hướng chung, điều này làm cho các nơ-ron riêng lẻ trông có vẻ đa nghĩa và khó giải thích hơn.

Nghe hướng dẫn nàyAI thuật lại · ~8 min

Trên trang nàyđọc 9 phút
  1. Những điểm chính rút ra
  2. Lặn sâu
  3. Packing three features into two dimensions
  4. Triển khai trong thế giới thực
  5. Tương lai của sự chồng chất và tính đa ngữ nghĩa trong khả năng diễn giải AI
  6. Đưa nó vào thực tế
  7. Nguồn tham khảo và đọc thêm
  8. Tiếp tục khám phá
  9. Câu hỏi thường gặp

Những điểm chính rút ra

  1. A polysemantic neuron fires for several unrelated inputs, such as InceptionV1 neuron 4e:55 responding to cat faces, car fronts and cat legs.
  2. Superposition is the hypothesis that networks store more features than neurons by giving each feature a slightly overlapping direction in activation space.
  3. Anthropic's 2022 toy models showed superposition appears abruptly as features become sparser, with features forming shapes such as pentagons and tetrahedra.
  4. Sparse autoencoders rewrite activations as sparse combinations of many learned directions, recovering far more interpretable features than there are neurons.
  5. Anthropic trained sparse autoencoders with up to 34 million features on Claude 3 Sonnet in 2024 and steered behavior by clamping individual features.
  6. SAE features are approximations: reconstructions leave variance unexplained, many features can be dead, and labels for features can be wrong.

Lặn sâu

A neural network represents what it knows as activations, lists of numbers produced inside each layer. Interpretability researchers call the meaningful properties those numbers encode features: for example, the idea that a sentence is in French, that an image contains a curve, or that a piece of code has a security bug. The hope behind early interpretability work was that each neuron, one entry in a layer's activation list, would correspond to one feature. Sometimes that holds: vision models contain clean curve detectors. Often it does not. A polysemantic neuron is one that responds to several unrelated inputs. The 2020 Distill article Zoom In, by Chris Olah and colleagues then at OpenAI, gave a famous example: neuron 4e:55 in the image model InceptionV1 fires for cat faces, the fronts of cars and cat legs.

Superposition is the leading explanation for why this happens. The idea is that a model needs to track far more features than it has neurons, so it does not give each feature its own neuron. Instead, each feature gets a direction, a particular pattern across many neurons, and those directions are allowed to overlap a little. Two facts from mathematics make this workable. In a space with n dimensions only n directions can be exactly at right angles, but exponentially many can be almost at right angles, a result related to the Johnson-Lindenstrauss lemma. And compressed sensing shows that a vector squeezed into fewer dimensions can still be recovered if it is sparse, meaning most of its entries are zero. Real features are sparse: any given sentence mentions very few of the things a model knows about.

The cost of overlapping directions is interference. When feature A is active, a little of its signal leaks onto feature B's direction. If features rarely occur together, the leak is usually small and a nonlinearity such as ReLU, which zeros out negative values, can filter it away. Polysemanticity is what this looks like from the point of view of a single neuron: because each neuron participates in many feature directions, it lights up for all of those unrelated features. So superposition is a claim about how features are stored, and polysemanticity is the symptom seen when examining neurons one at a time.

The key evidence came from Toy Models of Superposition, published by Anthropic and Harvard researchers on 14 September 2022, with Nelson Elhage as a lead author and Olah as corresponding author. The team trained very small ReLU networks to compress synthetic inputs into fewer dimensions and reconstruct them. Each input feature had a sparsity, the probability of being zero, and an importance, a weight on its reconstruction error. With dense features, the model behaved like principal component analysis and simply kept the most important ones. As features became sparser, it switched abruptly to storing extra features in superposition, a transition the paper describes as a phase change. The stored features arranged themselves into regular geometric shapes such as pairs, triangles, pentagons and tetrahedra. The paper also showed that at least simple computation, an absolute value function, can be carried out while in superposition, and found preliminary links between superposition and adversarial examples.

If features are directions rather than neurons, the practical problem becomes finding those directions. The main method is dictionary learning with a sparse autoencoder (SAE): a separate small network trained to rewrite a model's activations as a sparse combination of many more learned directions than there are neurons. Anthropic's Towards Monosemanticity, published 4 October 2023, applied this to a one-layer transformer with a 512-neuron MLP layer. Trained on 8 billion activation samples, its dictionaries ranged from 512 to 131,072 features and found interpretable ones for DNA, base64, Hebrew and Arabic script. A monosemantic feature is one that responds to a single understandable concept. The paper also showed feature splitting: one feature in a small dictionary breaks into several finer features in a larger one.

The method then scaled to production models. Anthropic's Scaling Monosemanticity, published 21 May 2024, trained SAEs with about 1 million, 4 million and 34 million features on the middle layer of Claude 3 Sonnet. It found features for the Golden Gate Bridge, brain sciences and tourist attractions, as well as safety-relevant features for code backdoors, bias, deception, sycophancy and dangerous content, and showed that clamping a feature to a high value changed the model's behavior. In June 2024 OpenAI researchers reported a 16 million latent SAE trained on GPT-4 activations over 40 billion tokens, and in August 2024 Google DeepMind released Gemma Scope, open SAEs covering all layers of Gemma 2 2B and 9B.

Compared with alternatives, the superposition view explains why simply reading neurons, the approach of early feature visualization, hits a ceiling. The obvious fix, designing models that never use superposition, did not work out: the 2023 paper reports that forcing activation sparsity during training, even down to one active neuron at a time, removed superposition but still left polysemantic neurons, because a model can lower its loss by letting one neuron stand for several mutually exclusive features. Probing, training a small classifier to detect whether a known concept is present, still works but only finds concepts researchers already thought to look for. SAEs are unsupervised, so they can surface unexpected features.

The limits are real. Superposition is a hypothesis supported by toy models and indirect evidence, not a proven description of large models. SAE features are only an approximation: in Scaling Monosemanticity the reconstructions explained at least 65% of the variance of the activations, so a sizable remainder went unexplained, and about 65% of the features in the 34 million SAE were dead, meaning they never fired on a sample of 10 million tokens. The paper cautions that a feature about lying is not evidence that a model lies. Feature labels come from people or models reading examples, which can be wrong. And training SAEs is expensive: compute grows with the product of the number of features and the number of training tokens, so covering every layer of a frontier model is a large engineering project.

03Ví dụ hoạt động

Packing three features into two dimensions

  1. Take three features A, B and C and a layer with only two neurons, so there is room for just two exactly perpendicular directions.

  2. Assign each feature a unit-length direction 120 degrees apart, like the corners of a triangle; any two directions now have a dot product of minus 0.5.

  3. Activate only feature A with value 1: the two neurons hold A's direction, and reading back gives A = 1, B = minus 0.5 and C = minus 0.5.

  4. Apply a ReLU, which turns negative values into zero: the readout becomes A = 1, B = 0, C = 0, so the interference is filtered away.

  5. Now activate A and B together: reading back C gives minus 1 and the ReLU removes it, but A and B each read 0.5 instead of 1, so recovery is only partial.

  6. Look at one neuron alone: it carries part of all three features, so in isolation it seems to respond to three unrelated things.

Những gì nó cho thấy

A hand-built superposition of three features in two neurons. The check: single features decode exactly after the ReLU, overlapping features decode with error, and each neuron looks polysemantic. This mirrors why superposition only pays off when features are sparse.

Triển khai trong thế giới thực

InceptionV1 neuron 4e:55, described in the 2020 Distill article Zoom In, responds to cat faces, fronts of cars and cat legs, a textbook polysemantic neuron in an image classifier.

Anthropic's 2022 Toy Models of Superposition trained tiny ReLU networks on synthetic sparse data and watched five features pack into two dimensions as a regular pentagon.

Towards Monosemanticity (October 2023) used a sparse autoencoder to pull tens of thousands of interpretable features, such as DNA sequences, base64 text and Arabic script, out of a 512-neuron layer.

Scaling Monosemanticity (May 2024) trained sparse autoencoders with up to 34 million features on Claude 3 Sonnet and found a Golden Gate Bridge feature that could steer the model when clamped high.

Google DeepMind's Gemma Scope (August 2024) released open sparse autoencoders for every layer of Gemma 2 2B and 9B so outside researchers can study features without training their own.

Tương lai của sự chồng chất và tính đa ngữ nghĩa trong khả năng diễn giải AI

Open problems are mostly about whether SAE features are the right units. Anthropic's 2024 paper flags cross-layer superposition, where a feature is spread across several layers, as a reason it worked on the residual stream, and notes that a large share of model variance remains unexplained by its dictionaries. Feature splitting, reported in 2023, means the number of features depends on dictionary size, so there may be no single true list to recover. Researchers are also working on cheaper and better-behaved training, as shown by OpenAI's 2024 k-sparse autoencoders and DeepMind's JumpReLU SAEs in Gemma Scope, and on moving from isolated features to circuits that show how features combine to produce an answer. Whether these tools can reliably detect deception or other risky behavior in frontier models remains untested at scale. The 2022 toy models paper also left open whether superposition explains phenomena such as adversarial examples, which it linked only with preliminary evidence.

Đưa nó vào thực tế

Tại sao nó quan trọng

  • Chi phí và ngân sách. Các quyết định về kiến ​​trúc sẽ thúc đẩy hiệu suất và chi phí vận hành trong nhiều năm.
  • Quyết định rõ ràng hơn. Giáo dục kỹ thuật giúp các nhóm chọn nhóm phù hợp chứ không chỉ nhóm mới nhất.
  • Kiểm soát chất lượng. Lựa chọn kỹ thuật tốt hơn làm giảm sự cố về độ tin cậy trong sản xuất.

coi chừng

  • Tối ưu hóa một điểm chuẩn có thể che giấu những điểm yếu của hệ thống rộng hơn.
  • Chi phí cơ sở hạ tầng và bảo trì thường được đánh giá thấp.
  • Khoảng cách về bảo mật và khả năng quan sát có thể tăng lên khi hệ thống trở nên phức tạp hơn.

Các bước tiếp theo

  1. Xác định các mục tiêu về độ trễ, chất lượng và chi phí trước khi triển khai.
  2. Điểm chuẩn trong điều kiện tải và dữ liệu thực tế.
  3. Giám sát thiết bị về lỗi, độ lệch và tác động của người dùng.
  4. Chuẩn bị đường dẫn khôi phục và ứng phó sự cố trước khi mở rộng quy mô.

Nguồn tham khảo và đọc thêm

  1. Transformer Circuits Thread (Anthropic)Mô hình đồ chơi xếp chồng
  2. Transformer Circuits Thread (Anthropic)Towards Monosemanticity: Decomposing Language Models With Dictionary Learning
  3. Transformer Circuits Thread (Anthropic)Scaling Monosemanticity: Extracting Interpretable Features from Claude 3 Sonnet
  4. DistillZoom In: An Introduction to Circuits
  5. arXiv (OpenAI)Scaling and evaluating sparse autoencoders
  6. arXiv (Google DeepMind)Gemma Scope: Open Sparse Autoencoders Everywhere All At Once on Gemma 2

Tiếp tục khám phá

Bản tin miễn phí

Nhận bản tóm tắt AI hàng ngày

Ba câu chuyện AI đã được xác minh vào mỗi buổi sáng các ngày trong tuần, được viết bằng tiếng Anh đơn giản. Miễn phí mãi mãi, không có quảng cáo.

Một email mỗi ngày trong tuần. Hủy đăng ký trong một cú nhấp chuột. Chúng tôi không bao giờ bán hoặc chia sẻ địa chỉ của bạn.

Tự kiểm tra

Take the Superposition and Polysemanticity in AI Interpretability quiz

Phản hồi tức thì về mọi câu trả lời và chứng chỉ có thể chia sẻ với ID có thể xác minh sau khi bạn vượt qua khóa học.

Bắt đầu bài kiểm tra

Hỗ trợ giáo dục AI miễn phí. AI Understanding là tổ chức phi lợi nhuận 501(c)(3) — không bao giờ có quảng cáo, không có tường phí. Hãy quyên góp

Câu hỏi thường gặp

Sự chồng chất và tính đa nghĩa trong khả năng diễn giải AI là gì?

Sự chồng chất trong khả năng diễn giải của AI là cách các mạng thần kinh đóng gói nhiều tính năng vào các hướng chung, điều này làm cho các nơ-ron riêng lẻ trông có vẻ đa nghĩa và khó giải thích hơn.

'Chồng chất' đề cập đến điều gì trong mạng lưới thần kinh?

Sự chồng chất là chiến lược mã hóa nhiều tính năng khác biệt hơn kích thước bằng cách sử dụng các hướng chồng chéo, gần như trực giao trong không gian kích hoạt.

Điều kiện nào làm cho sự chồng chất hoạt động tốt bất chấp sự can thiệp của tính năng?

Bởi vì hầu hết các tính năng hiếm khi hoạt động cùng lúc nên ít xảy ra xung đột nên chi phí can thiệp vẫn ở mức thấp.

Tế bào thần kinh 'đa nghĩa' là gì?

Các tế bào thần kinh đa nghĩa kích hoạt nhiều đặc điểm không liên quan, đó là hệ quả có thể quan sát được của sự chồng chất.

Bài báo Anthropic nào đã giới thiệu nghiên cứu có kiểm soát về hiện tượng này vào năm 2022?

'Mô hình chồng chất đồ chơi' đã sử dụng các mạng nhỏ, có thể điều khiển được để chứng minh thời điểm và cách thức các tính năng được kết hợp với nhau.

Nếu một lớp phải lưu trữ nhiều tính năng hơn kích thước của nó thì điều gì không thể tránh khỏi về mặt hình học?

Bạn không thể khớp nhiều vectơ trực giao lẫn nhau hơn kích thước, do đó, các đối tượng sẽ có nhiều hướng gần như trực giao với một số chồng chéo.