Skip to main content
QUICK REVIEW

[논문 리뷰] Opening the AI black box: program synthesis via mechanistic interpretability

Eric J. Michaud, Isaac Liao|arXiv (Cornell University)|2024. 02. 07.
Evolutionary Algorithms and Applications인용 수 4
한 줄 요약

이 논문은 기계적 해석을 통해 신경망 정책을 해석 가능한 파이썬 코드로 역공학하는 완전 자동화된 프로그램 합성 방법인 MIPS를 소개한다. RNN의 은닉 상태를 이산 정수 또는 비트 표현으로 변환하고 기호적 회귀를 적용함으로써, 인간이 작성한 예시에 의존하지 않고 학습된 알고리즘을 압축한다. 이는 62개의 알고리즘 과제 중 32개를 해결하며, GPT-4가 해결하지 못한 13개의 과제도 포함한다. 이는 LLM 기반 코드 생성의 확장 가능하고 해석 가능한 대안임을 보여준다.

ABSTRACT

We present MIPS, a novel method for program synthesis based on automated mechanistic interpretability of neural networks trained to perform the desired task, auto-distilling the learned algorithm into Python code. We test MIPS on a benchmark of 62 algorithmic tasks that can be learned by an RNN and find it highly complementary to GPT-4: MIPS solves 32 of them, including 13 that are not solved by GPT-4 (which also solves 30). MIPS uses an integer autoencoder to convert the RNN into a finite state machine, then applies Boolean or integer symbolic regression to capture the learned algorithm. As opposed to large language models, this program synthesis technique makes no use of (and is therefore not limited by) human training data such as algorithms and code from GitHub. We discuss opportunities and challenges for scaling up this approach to make machine-learned models more interpretable and trustworthy.

연구 동기 및 목표

  • 학습된 신경망에서 기계적 해석 가능한 기호적 프로그램을 자동으로 추출하는 방법을 개발한다.
  • 대규모 언어 모델의 프로그램 합성에서의 한계를 극복하기 위해 인간이 작성한 코드나 예시에 의존하지 않는다.
  • 자동화된 기계적 해석을 통해 기계 학습 모델의 신뢰성과 해석 가능성 수준을 향상시킨다.
  • 자동화된 해석이 알고리즘 추론 과제에서 실용적인 프로그램 합성에 확장 가능한가를 테스트한다.
  • 암시적 신경망 정책의 검증 가능하고 기호적인 대안을 제공한다.

제안 방법

  • 알고리즘 과제를 해결하기 위해 피드포워드 업데이트 및 출력 함수를 갖춘 순환 신경망(RNN)을 훈련한다.
  • 은닉 상태의 이산적이고 유한 상태 표현을 추출하기 위해 정수 오토에인코드를 사용해 훈련된 RNN을 단순화한다.
  • 은닉 표현에서의 이산 상태 전이를 식별함으로써 단순화된 네트워크에서 유한 상태 기계를 추출한다.
  • 입력, 은닉 상태, 출력 간 정확한 수학적 또는 논리적 관계를 발견하기 위해 기호적 회귀(불리언 또는 정수)를 적용한다.
  • 기본 증명 도구인 Dafny를 사용해 정확성을 보장하면서도 인간이 읽을 수 있는 파이썬 코드를 생성한다.
  • 검색 기반 프로그램 합성 방식을 피하고, 신경망 훈련 기간 동안 알고리즘을 학습한 후 기계적 해석을 통해 추출하는 파ip라인을 사용한다.
Figure 1: The pipeline of our program synthesis method. MIPS relies on discovering integer representations and bit representations of hidden states, which enable regression methods to figure out the exact symbolic relations between input, hidden, and output states.
Figure 1: The pipeline of our program synthesis method. MIPS relies on discovering integer representations and bit representations of hidden states, which enable regression methods to figure out the exact symbolic relations between input, hidden, and output states.

실험 결과

연구 질문

  • RQ1기계적 해석을 완전히 자동화하여 신경망에서 기호적 프로그램을 추출할 수 있는가?
  • RQ2인간이 작성한 예시 없이도 이 자동화된 방법이 대규모 언어 모델보다 우월하거나 보완적인 성능을 낼 수 있는가?
  • RQ3RNN이 일반적으로 해결하는 알고리즘 과제 벤치마크에서 자동 프로그램 합성의 성능은 어떠한가?
  • RQ4기호적 회귀는 학습된 신경망 표현으로부터 진짜 알고리즘을 얼마나 효과적으로 복원하는가?
  • RQ5합성된 프로그램은 정식 검증을 통해 정확성을 입증할 수 있으며, 안전이 중요한 환경에서 신뢰성 있는가?

주요 결과

  • MIPS는 벤치마크의 62개 알고리즘 과제 중 32개에 대해 정확한 파이썬 코드를 성공적으로 합성하여 프로그램 합성에서 높은 효과성을 입증했다.
  • 이 32개 과제 중 13개는 GPT-4가 해결하지 못했으며, 이는 MIPS가 LLM 기반 접근법을 대체하기보다는 보완한다는 것을 시사한다.
  • RNN 은닉 상태를 이산 정수 및 비트 표현으로 변환함으로써 진짜 알고리즘을 높은 정밀도로 복원했다.
  • Dafny를 사용한 정식 검증을 통해 합성된 비트 덧셈 프로그램의 정확성이 입증되었으며, 모든 유효한 입력에 대해 기대 동작과 동치임을 증명했다.
  • 이 방법은 인간이 작성한 코드를 전혀 사용하지 않으며, 입력-출력 쌍과 신경망 훈련에만 의존하므로 확장 가능하고 신뢰할 수 있다.
  • 이산 표현에 대한 기호적 회귀는 모듈로 산술 및 반복적 물리 시뮬레이션과 같은 복잡한 논리의 정확한 복원을 가능하게 했다.
Figure 2: These hidden structures can be turned into discrete representations. Left: the hidden states for the bitstring addition task are seen to form four clusters, corresponding to 2 bits: the output bit and the carry bit. Right: the hidden states for the Sum_Last2 task are seen to form clusters
Figure 2: These hidden structures can be turned into discrete representations. Left: the hidden states for the bitstring addition task are seen to form four clusters, corresponding to 2 bits: the output bit and the carry bit. Right: the hidden states for the Sum_Last2 task are seen to form clusters

더 나은 연구,지금 바로 시작하세요

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.