Artificial intelligence has become a universal technology that every person can easily use in his life. Especially, Deep Neural Networks (DNNs) are a well-known artificial intelligence process. However, DNNs have unique software characteristics that are rarely found in general processes. The main characteristics of DNNs are as follows: Enormous data size, Matrix and vector-shaped multi-dimensional datatypes, Repeated multiplication and accumulation (MAC) operations, Datatype quantization for reducing computational overheads, Reliability and security issues caused by multiple anonymous accesses to DNN system. Thus, conventional general-purpose systems have several efficiency and security problems when they utilize the DNN process. To solve these problems, it is inevitable to observe data characteristics in DNNs and design hardware architectures by reflecting the observation. In this dissertation, we propose several designs to improve the efficiency and security of DNN-based systems.
First, we try to solve low system efficiency caused by frequent memory access and bandwidth bottlenecks. For fast computation and large parallelism, most DNN-based systems use isolated devices such as graphic processing units (GPUs) or neural processing units (NPUs). However, because DNN data are stored in a main memory, they have to be transferred to devices. In this situation, memory access latency and bandwidth bottleneck problems are occurred. As a solution, we propose a data compression algorithm that compresses weights and partial outputs in DNNs. The proposed compression algorithm is based on the characteristics of quantized DNN data. We observe that DNN data quantized to 4 or 8-bit integers have high zero and narrow-width value ratios. Based on this observation, we design a compression algorithm to compress and decompress contiguous zero and narrow-width values efficiently. Moreover, we implement a hardware compressor and decompressor that can be installed in neural processing units (NPUs). They can solve a bandwidth problem by automatically compressing and decompressing DNN data between main memory and NPUs.
Second, we focus on reliability and security issues in multi-tenant large language model (LLM) inference systems. When multiple anonymous users access the systems, there can be malicious attacks that target trained LLMs. The systems have to protect trained LLMs for a reliable inference process. However, applying conventional security techniques to all trained LLM data requires severe overheads because of the large LLM size. In LLMs, character strings are tokenized and transferred to embedding vectors before inserting them into computation layers because characters cannot be mathematically calculated through LMM layers. Embedding vectors have semantic information about character tokens, thus their faults or crashes can cause inference failure. In this dissertation, we observe that there are few numbers of embedding vectors that affect most of the accuracy. We define them and related tokens as critical embedding vectors and critical tokens. If the systems protect these critical tokens, they can maintain reasonable accuracy with less overheads. Based on our observation, we propose a platform that classifies critical tokens from a dataset during training and prioritizes them based on their effects on accuracy. Our platform can help the systems to secure appropriate tokens to prevent future attacks.
DNN data possess unique characteristics that differ from data in general-purpose processes. These characteristics should be reflected in architectural designs. Therefore, system design driven by data characteristics is an important approach to DNN-based system architecture research.
심층 인공신경망 (Deep Neural Networks, DNNs)으로 대표되는 인공지능은 누구나 언제 어디서든 사용할 수 있는 보편적인 기술이 되었다. 하지만 심층 인공신경망은 기존의 시스템에서 고려하던 프로세스와는 다른 특징들을 가지고 있어 실제 운용에 어려움이 발생한다. 심층 인공신경망 기반 시스템이 가지는 주요 특징으로는 방대한 양의 데이터 저장 및 관리, 행렬 및 벡터 (Vector) 형태의 다차원 데이터 구조와 반복적인 곱셈 및 누적 (Multiplication and Accumulation, MAC) 연산, 연산 부하 감소를 위한 데이터 자료형의 양자화 (Quantization), 다수의 익명 사용자의 공동 접근에 대한 신뢰성 및 안전성 문제 등이 있다. 때문에 기존의 시스템 아키텍처는 심층 인공신경망을 운용함에 있어 효율성 및 안전성 문제를 필수적으로 고려하여야 한다. 이를 해결하기 위해서는 심층 인공신경망이라는 새로운 프로세스가 내부적으로 보유하고 있는 데이터의 특성을 분석하고, 이를 반영한 형태의 새로운 하드웨어 아키텍처 설계가 필요하다. 본 논문에서는 심층 인공신경망 기반의 시스템의 효율성 및 안전성 향상을 위하여 다음과 같은 기법들을 제안한다.
먼저, 심층 인공신경망에서 발생하는 잦은 데이터 이동에 의한 메모리 접근 부하와 이에 따른 시스템 효율성 저하를 해결하기 위하여 심층 인공신경망의 가중치 (Weights)와 부분 출력 (Partial outputs)를 압축하는 기법을 제안한다. 제안한 압축기법은 양자화된 심층 인공신경망의 데이터가 가지는 특성을 바탕으로 설계한다. 8-bit 혹은 4-bit의 정수형으로 양자화된 심층 인공신경망의 데이터는 0 값 (Zero values)과 좁은 너비 값 (Narrow-width values)의 비율이 높다는 점을 관찰하였으며, 이를 바탕으로 다수의 0 값과 좁은 너비 값을 효율적으로 압축 및 압축 해제 할 수 있는 기법을 제안한다. 추가적으로 압축 기법을 처리하는 압축기 (Compressor)와 해제기 (Decompressor)를 설계하여 신경망 가속기 (Neural Processing Units, NPUs) 상에 삽입함으로써, 메인 메모리 (Main memory)와 신경망 가속기 간의 데이터 전송 과정에서 발생하는 대역폭 문제를 해결한다.
다음으로는 자연언어처리 (Natural Language Processing, NLP) 분야에서 주로 사용되는 대형 언어 모델 (Large Language Model, LLM) 상의 임베딩 벡터 (Embedding vector)를 분석하여, 추론 과정에서 정확도 (Accuracy)에 주된 영향을 주는 핵심 토큰 (Critical tokens)을 구분하는 플랫폼 (Platform)을 제안한다. 자연언어처리 과정에서는 수학적 연산이 불가능한 문자열 데이터를 수치화하고자 임베딩 벡터 형태로 문자열을 치환한다. 이 과정에서 심층 인공신경망으로 해결하려는 문제에 따라 특정한 임베딩 벡터와 그에 대한 문자열 토큰이 집중적으로 학습이 되는 경향을 보인다. 이러한 핵심 토큰은 전체 토큰 대비 매우 적은 비율을 보이나, 해당 토큰의 임베딩 벡터 값이 악의적인 공격에 의하여 위변조 될 경우에 심각한 정확도 저하가 발생하게 된다. 이 같은 심각한 심층 인공신경망 기반의 시스템에 대한 안전성 저하 문제를 해결하기 위하여, 학습 과정에서 사전에 핵심 토큰을 분류하는 시스템 수준의 플랫폼을 제안한다. 제안 플랫폼은 학습 데이터 상에서 발생한 핵심 토큰을 분류할 뿐만 아니라, 분류된 핵심 토큰을 바탕으로 학습 데이터 상에 존재하지 않더라도 정확도에 큰 영향을 줄 것으로 예상되는 토큰도 선별할 수 있다. 제안 플랫폼을 통해 분류된 핵심 토큰을 적절한 방법으로 보호 및 관리한다면, 적은 수준의 시스템 부하 (Overheads)만으로도 합리적인 정확도 유지가 가능하다.
본 논문의 연구 대상인 심층 인공신경망은 기존의 프로세스와는 다른 독자적인 데이터 특성을 보인다. 이러한 특성을 분석하고 이를 바탕으로 적절한 형태의 하드웨어를 제안하는 방식의 설계는 심층 인공신경망 기반 아키텍처 연구에서 매우 중요한 연구 방향이라고 할 수 있다.