어텐션 신경망을 해석 가능한 하드 로직 술어 회로로 바꾸는 방법: 테세우스의 배 방식 교체 하에서의 진리표 술어 추출과 상태 기계 병합
How to Turn an Attention Neural Network into an Interpretable Hard-Logic Predicate Circuit: Truth-Table Predicate Extraction and State-Machine Merging under Ship-of-Theseus Replacement
한국어 초록
우리는 학습된 어텐션 네트워크를 어텐션을 포함해 통째로, 그 자리에서 동작하는 하드 로직 술어 회로로 변환한다. 회로의 모든 단위는 토큰에 대한 0/1 술어이며, 술어 사이의 모든 사상은 최소화된 진리표이다. 질의 코드와 키 코드의 곱과 같은 짧은 표는 정확하게 최소화하고, 넓은 특징 간 전이는 잡음에 강한 최소화를 통해 함의 규칙이 된다. 블록은 테세우스의 배 방식으로 출력단부터 하나씩 교체되며, 각 교체 후 나머지 소프트 부분은 고정된 회로에 맞추어 재적응한다. 어텐션 선택은 정수 점수의 행 단위 비교(순서 선택)와 학습된 규칙(규칙 선택)의 두 형태를 취한다. 둘 다 일반 학습 세트만으로, 그리고 교사 모델이 올바르게 분류한 예제에서만 적합되므로, 회로는 교사가 옳은 곳에서 교사를 모방한다. TweetEval-emotion에서 DistilGPT2의 완전한 회로는 세 시드에 대해 순서 선택으로 66.5 $\pm$ 1.3%, 규칙 선택으로 57.4 $\pm$ 2.5%의 테스트 정답 정확도에 도달하며, 이는 교사의 74.7%, 동일한 트윗에 적합한 단어 조각 가방 모델의 64.0%와 비교된다. BERT-base의 회로는 순서 선택으로 70.0 $\pm$ 0.5%, 규칙 선택으로 63.7 $\pm$ 1.2%에 도달하며 교사는 77.8%이다. 이 회로는 곱셈기와 가중치 트래픽이 필요 없으며, 내보낸 하드웨어 기술은 이를 비트 단위로 동일하게 재현한다. 합성 기반 추정에 따르면 FPGA 카드에서 트윗 하나를 약 1-2 $\mu$s(DistilGPT2) 및 3-5 $\mu$s(BERT)에, 모듈 소비 전력이 7.5-15 W인 손바닥 크기 보드에서 5-9 $\mu$s에 분류하며, 이는 배치 1의 GPU에서 네트워크를 실행하는 것(최적화된 CUDA 그래프 베이스라인을 포함한 DistilGPT2의 경우 실측 0.9-2.6 ms)보다 두세 자릿수 빠르다. 그 대가로 합성된 시드 0 회로의 정답 정확도는 8.5점(DistilGPT2), 8.6점(BERT) 낮아진다.
원문 초록
We convert a trained attention network as a whole, attention included, into a hard-logic predicate circuit that runs in its place. Every unit of the circuit is a 0/1 predicate on tokens, and every map between predicates is a minimised truth table. Short tables, such as the product of a query code and a key code, are minimised exactly, and wide feature-to-feature transitions become implication rules by noise-tolerant minimisation. Blocks are replaced one at a time from the output down, in the manner of the Ship of Theseus, and after each replacement the remaining soft part re-adapts to the frozen circuit. Attention selection takes two forms, a row-wise comparison of integer scores (order selection) and a learned rule (rule selection). Both are fitted on the ordinary training set alone, and only on the examples that the teacher classifies correctly, so that the circuit imitates the teacher where the teacher is right. On TweetEval-emotion, the complete circuit of DistilGPT2 reaches a test gold accuracy of 66.5 $\pm$ 1.3% with order selection and 57.4 $\pm$ 2.5% with rule selection over three seeds, against 74.7% for the teacher and 64.0% for a bag of word pieces fitted on the same tweets, and that of BERT-base reaches 70.0 $\pm$ 0.5% with order selection and 63.7 $\pm$ 1.2% with rule selection against 77.8%. The circuit needs no multiplier and no weight traffic, and its exported hardware description reproduces it bit for bit. By a synthesis-based estimate it classifies one tweet in about 1-2 $\mu$s (DistilGPT2) and 3-5 $\mu$s (BERT) on an FPGA card and in 5-9 $\mu$s on a palm-sized board whose module draws 7.5-15 W, two to three orders of magnitude faster than the network on a GPU at batch 1 (measured, 0.9-2.6 ms for DistilGPT2 including an optimised CUDA-graph baseline), at a cost of 8.5 (DistilGPT2) and 8.6 (BERT) points of gold accuracy for the synthesised seed-0 circuits.
제출 이력
확인된 버전만 표시합니다. 전체 제출 이력은 arXiv 원문에서 확인하세요.
- arXiv:2611.24381v1제출 시각 미확인
함께 살펴볼 논문
공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.
공통 태그로 연결된 공개 논문이 아직 없습니다.
토론
이 논문과 연결된 포럼 글이 아직 없습니다.