Elamur Research

A^3: Accelerating Attention Mechanisms in Neural Networks with Approximation

Paper · 2020 · Tae Jun Ham, Sung Jun Jung, Seonghak Kim et al.

Summary

Attention lets a neural network retrieve information that matters to its current question. The difficulty is that finding a small amount of useful information can require examining everything available. A³ addresses this mismatch between what attention ultimately uses and what a conventional implementation computes. Its central proposal is to identify promising candidates cheaply, calculate complete similarity scores only for those candidates, and discard weak contributions before forming the final result. The paper combines this approximation strategy with a specialized hardware pipeline, treating the algorithm and its execution machinery as parts of the same design.

The starting point is attention understood as a search over vectors. A query represents the information currently sought; keys represent searchable items; values contain the information to retrieve. Conventional attention compares the query with every key, converts the resulting scores into normalized weights, and combines the values using those weights. The authors observe that many weights become very small. Computing all of them can therefore consume substantial time and energy while contributing little to the output. Their approximation attempts to recognize such cases before doing all the arithmetic.

A³ has a base design that processes the full attention operation and an extended design that reduces its workload. The base hardware contains separate stages for similarity scores, exponentials, and the weighted output. The approximate version adds a candidate selector before complete scoring and a second filter afterward. Candidate selection uses a preprocessed arrangement of the keys and examines unusually large positive and negative component contributions. A configurable iteration budget controls how much searching it performs. The later filter compares each completed score with the strongest score, retaining contributions according to a relative threshold rather than a fixed candidate count.

The evaluation covers MemN2N on bAbI question answering, KV-MemN2N on WikiMovies, and BERT on SQuAD v1.1. Attention accounts for over 35% of total inference time in every workload examined. When query-independent preparation is excluded, its share exceeds 70% for the memory-network workloads. The authors report that their conservative approximation setting produces an accuracy-metric degradation of around 1%, whereas the aggressive setting incurs around 8%. Quantizing inputs with 4 fractional bits causes less than 0.1% degradation across the evaluated workloads. These findings support a useful accuracy–cost tradeoff, while also showing that stronger approximation can remove information that the task needs.

The hardware results require several distinctions. Simulated A³ attention processing greatly outperforms the CPU baseline in the memory-network workloads, but a single A³ unit has lower BERT throughput than the GPU. The paper argues that 6-7 conservative approximate units can exceed that GPU throughput by exploiting independent attention work. It also reports energy-efficiency advantages exceeding 10⁴× against the CPU and 10³× against the GPU under its measurement assumptions. Those comparisons combine accelerator simulation and synthesis with conventional-device measurements and TDP-based power estimates. A scaled-down chip was fabricated and functionally checked, but the full performance claims come from the evaluated design instead of a complete set of measurements on that smaller prototype.

Interesting ideas

Search before exact scoring. A³ separates finding plausible items from evaluating them completely. This works when a cheap signal can identify a useful subset without reproducing the entire expensive computation. The reusable principle is to give each stage a narrower responsibility: the first stage protects recall, while the later stage calculates the score that actually determines the output. In another retrieval system, this could mean using an inexpensive index to propose candidates and a more expressive comparison to rank them. The important condition is that the proposal stage must be assessed by the useful items it misses, not just the work it avoids.

Organize data before the question arrives. Sorting key components is valuable because the keys may exist before the query. A³ moves work into that earlier interval, leaving less computation on the response path. The same reasoning applies wherever stored material changes less often than requests against it. An index can be worthwhile even when constructing it is expensive, provided enough queries reuse it or its construction occurs outside the latency-sensitive period. The paper also demonstrates the necessary qualification: preparation still counts when it delays the answer, and repeated use must actually amortize its cost.

Filter relative to the strongest result. A fixed number of retained items assumes that every query needs a similarly sized answer set. A³ instead uses the gap between a candidate’s score and the highest score. This accommodates a sharply concentrated result and a broader collection of similarly strong results. The idea can transfer to systems where score distributions vary substantially across requests. Its value comes from making the retained set depend on the current evidence. Its limitation is equally reusable: a threshold that protects each individual contribution does not automatically protect the combined contribution of everything discarded.

Expose approximation as a controlled choice. The iteration budget and the post-scoring threshold make the accuracy–efficiency tradeoff explicit. They allow a user to choose conservative behavior rather than accept an opaque approximation policy. This is useful in systems with different operating requirements, such as interactive requests and less time-sensitive batch work. The paper’s aggressive setting also shows why configurability needs evidence: a faster configuration can have enough quality loss to be mainly exploratory. A useful control should therefore be accompanied by measurements on the actual task, including which important candidates disappear.

Design around dependencies, not only operation counts. The candidate-search algorithm contains an iteration-to-iteration dependency that would limit a straightforward hardware implementation. A³ prepares upcoming component products in advance and buffers them, allowing later work to proceed while replacements are being computed. This principle applies beyond attention: identify the information that the next iteration will require, prepare a small supply of it, and keep the refill path busy. A shorter arithmetic expression is not necessarily a faster implementation if every step waits for its predecessor.

Track precision through the whole computation. Rather than assign one number format everywhere, the authors reason about the range and fractional precision needed at each stage. Multiplication, accumulation, exponentiation, and normalization have different requirements. This is useful wherever reduced precision is intended to save resources without introducing uncontrolled errors. It also encourages a clear separation between representational approximation and algorithmic approximation. In A³, quantization and candidate removal are evaluated separately, so the reader can distinguish a small numerical effect from the larger consequences of skipping information.

Deep dive: A^3: Accelerating Attention Mechanisms in Neural Networks with Approximation

How A³ combines approximate attention search with specialized hardware to reduce inference costs, and what its accuracy trade-offs show. · about 38 minutes to read

How Mova uses it

For Mova, a small transparent language system written in Rust, A³ offers a way to think about selective computation. The most directly transferable idea is the separation between proposing candidates and calculating their complete scores. A³ does not establish that Mova already contains such a mechanism. The connection is an engineering possibility: if Mova has a retrieval operation that compares a query with many stored vectors, it could investigate whether a preliminary search can reduce the number of complete comparisons.

Such an adaptation would begin with a clear reference computation. Given the same query and stored information, an exhaustive path would supply the output against which an approximate path is assessed. The approximate path could then expose which rows were considered, which survived full scoring, and which were removed by the final threshold. That visibility suits a transparent system because the approximation becomes an inspectable decision process. A candidate that never reaches complete scoring can be distinguished from one that receives a low complete score.

The preprocessing argument is especially relevant if Mova reuses a stable collection of searchable material. A Rust implementation could maintain sorted views of vector components together with identifiers linking them back to the original entries. The useful question would be whether repeated queries repay the sorting and storage costs. If the searchable collection changes frequently, maintaining these views could consume much of the saved work. A³’s favorable memory-network setting depends on preparation occurring before the response-sensitive period; that condition would need to hold in Mova’s own workload.

The threshold after scoring offers a simpler possible experiment than reproducing the entire accelerator-oriented search. A³’s relative threshold gives a comprehensible reason for retaining an item: its weight must be sufficiently close to the largest weight. For Mova, this could make selective retrieval easier to explain than an arbitrary fixed shortlist. However, this filter alone saves only the work after scoring. It does not avoid comparing the query with every candidate, so it should not be credited with the full benefit of the paper’s earlier search stage.

The separate controls also suggest a useful interface for experimentation. An iteration budget would govern how extensively the preliminary search examines evidence; a relative threshold would govern how broadly the final output draws on the scored candidates. Keeping these controls distinct would help diagnose failures. If a necessary item never enters the candidate set, relaxing the final threshold cannot recover it. If the item is scored but then discarded, expanding the search budget may add cost without fixing the relevant mistake.

The hardware results should remain separate from these software possibilities. A Rust implementation running on a general-purpose processor would not inherit A³’s comparator trees, dedicated multipliers, SRAM organization, or pipeline throughput. The software version of the search still has priority-queue costs, and its memory behavior would depend on the surrounding implementation. The paper therefore supplies a candidate algorithm and a way to evaluate selective retrieval, instead of a speedup figure that Mova could adopt directly.

There is also a useful lesson in when to stop. The authors find that approximation contributes less additional throughput on their smaller memory task. A small transparent system should first establish that candidate scoring is a substantial cost and that the searchable collection is large enough to justify an index. If exhaustive comparison is already cheap, simplicity may be the better engineering choice. A³ makes the strongest case for selective computation when much of the attention work is both expensive and ultimately assigned little weight.

The problem and its context

Attention creates a retrieval bottleneck

The paper places attention within a broader hardware problem. Neural networks demand substantial computation, and earlier accelerators had made important operations in convolutional and recurrent networks more efficient. The authors argue that attention deserves its own treatment because its role and execution pattern differ from those operations. Improving established components can leave a newer component responsible for a growing share of runtime.

Attention supplies access to information beyond what is immediately present in a network’s current state. Depending on the application, that information may consist of earlier states, explicit memory entries, or representations derived from an input sequence. The network needs a way to select relevant material from this collection. Similarity between a query and searchable representations provides that selection signal.

The authors discuss applications spanning machine translation, question answering, and summarization, alongside visual tasks and memory-based systems. These examples establish the breadth of the primitive, rather than the breadth of the evaluation. A³ is tested on question-answering workloads. Its possible application to other attention-based tasks follows from the shared operation, not from separate experimental demonstrations in every domain.

The paper’s simple question-answering example explains why this operation is useful. A system receives statements about people’s movements and a question asking where a particular person is. Only some statements matter. The network embeds the statements and the question as vectors, then uses attention to find the relevant statement representation. If answering requires several pieces of information, a retrieved result can help update the query before another attention step.

In that example, attention is doing a form of information retrieval, although its output is a weighted vector rather than necessarily a discrete document. This perspective motivates the entire design. A dense arithmetic implementation evaluates the complete collection, whereas a search implementation asks how to reach the useful part of that collection efficiently.

Why the cost grows

The searchable collection has a size and each entry has a dimensionality. The paper denotes these by n and d. Increasing n lets the system inspect more stored information or a longer sequence. Increasing d gives each representation more coordinates. Both increase the amount of work required by a straightforward attention operation.

Complete attention first calculates a dot product against every key. It then normalizes the resulting scores and combines the corresponding values. The beginning and end of this process both scale with the collection size and representation width. The middle also performs work for every score, including exponentials and normalization.

The authors give an additional reason for concern in self-attention. A collection can provide the queries as well as the searchable keys, so the same attention process is repeated across the sequence. The resulting attention cost can grow quadratically with sequence length. The paper does not claim that every attention application has this scaling. It distinguishes an individual query over a collection from the repeated-query structure found in self-attention.

Longer memory and richer access to past information are part of what make attention attractive. The difficulty is that the direct implementation charges for this capacity every time it examines the collection. The paper therefore treats computation as a possible limit on how much information a system can practically consult.

What conventional implementations do well

Implementing attention through matrix operations is a reasonable starting point. Existing software frameworks provide optimized numerical routines, and a dense representation is straightforward to execute. The first matrix–vector multiplication calculates similarities, while the later multiplication forms the weighted output. Softmax connects them by turning scores into weights.

A³ does not dispute the functional correctness of this approach. Its objection concerns work that becomes unimportant only after the scores are transformed. If most normalized weights are very small, evaluating all the corresponding contributions may be inefficient from the perspective of the final task.

This distinction matters because the input matrix can be dense even when the useful output contributions are concentrated. The opportunity does not require stored values to be zero. Instead, relevance depends on the current query and emerges from the scoring operation. A hardware design that only exploits zeros already present in weights or activations addresses a different source of savings.

The paper’s discussion of earlier sparse accelerators makes this point explicit. Those systems exploit sparsity in convolutional or recurrent computations. A³ seeks a query-dependent reduction in attention work over dense data. Its candidate set can change when the query changes, even if the stored keys remain identical.

Search methods and earlier approximation

The authors situate their search idea alongside earlier approaches to maximum inner-product retrieval. They describe methods that group or organize items before queries arrive, using hashing, trees, or clustering. Such structures aim to avoid exhaustive examination by making the data easier to search.

A greedy maximum-inner-product method provides a closer conceptual predecessor. Rather than immediately calculate every complete score, a greedy search can inspect informative component contributions. A³ adapts this general intuition into an attention-specific algorithm and develops hardware that can sustain its irregular selection process.

The paper also acknowledges earlier software work on approximate retrieval for attention and memory access. Accordingly, its claim is not that approximate attention begins with A³. The contribution lies in a hardware-friendly formulation and the accompanying execution design. The candidate search, numerical representation, and specialized pipeline are intended to reinforce one another.

Earlier approximate hardware provides another point of comparison. The related-work discussion includes approximation for convolutional computation, reduce-and-rank operations, and multiply–accumulate units. A³ follows the general approach of saving resources by tolerating controlled error, but chooses attention’s retrieval structure as the source of approximation.

Why response time differs from total inference time

The paper makes an important distinction between preparing knowledge and answering a query. A memory-based system may spend time embedding material that remains useful for later questions. That preparation contributes to total inference work, but it need not delay a question if completed in advance.

The authors therefore profile both total execution and the portion that remains after a query arrives. This changes the apparent importance of attention. On the memory-network workloads, removing query-independent preparation makes attention a larger share of the response path.

BERT has a different structure in this evaluation. Its comprehension and response-related work are integrated, so the paper does not remove a separate preparation interval in the same way. This is also why sorting the keys has different accounting across workloads. What can happen beforehand for a reusable memory may remain part of the critical path for self-attention.

That distinction is more than a measurement detail. It determines whether the proposed index construction is effectively hidden or must earn back its cost through reuse. A³’s design relies on both possibilities, but they should not be treated as interchangeable.

The method, step by step

Begin with the complete attention operation

The inputs are a query vector, a matrix of keys, and a matrix of values. The query has d components. Each matrix contains n rows, with d components in each row. Matching row positions link keys to values: a key is used to calculate relevance, and its associated value supplies information for the output.

A complete operation assigns a similarity score to every key. Softmax transforms those scores into non-negative weights whose normalization is shared across the collection. The output combines the value rows using those weights.

The method can be understood as the following sequence. The approximation-specific stages narrow the work performed by the stages that follow them.

From searchable keys to an attention output

The steps in order.

From searchable keys to an attention outputStep 1: Sort key components before searching1. Sort key components before searchingStep 2: Inspect extreme query–key component products2. Inspect extreme query–key component productsStep 3: Keep rows with positive greedy scores3. Keep rows with positive greedy scoresStep 4: Compute complete scores for candidate rows4. Compute complete scores for candidate rowsStep 5: Remove scores far below the maximum5. Remove scores far below the maximumStep 6: Normalize weights and combine retained values6. Normalize weights and combine retained values

The paper describes the arithmetic cost of full attention in terms of its stages. Similarity calculation uses nd multiplications and n(d−1) additions. Softmax requires n exponentials, n−1 additions, and n divisions. The final weighted combination uses nd multiplications and (n−1)d additions. Here, multiplication written through adjacent symbols means the product of the corresponding quantities.

These counts explain why reducing the number of processed rows can affect several stages. A row omitted before complete scoring avoids its dot product as well as its later normalization and output work. A row omitted after scoring saves only the remaining stages. The earlier selector therefore offers a broader opportunity, but must decide with less information.

Build a pipeline for full attention

The base A³ design processes every row. It establishes a specialized attention engine before introducing search approximation, making it possible to distinguish hardware specialization from the benefits of skipping rows.

Its first module computes key–query dot products. The hardware has d multipliers and an addition tree that combines their results. A row is read, its components are multiplied by the corresponding query components, and the products are summed. The module stores each score and tracks the highest score encountered.

The next module calculates exponentials. Before doing so, it subtracts the maximum score from all scores. This leaves the softmax distribution unchanged while ensuring that the values sent into the exponential function are nonpositive. The exponential outputs are consequently bounded above by 1, which makes fixed-point implementation easier.

A lookup table replaces a general exponential unit. A direct table becomes expensive as input precision grows: the paper gives 65,536 entries for a 16-bit input. The design instead splits an input into parts, retrieves their exponentials separately, and multiplies the retrieved values.

e^(0.10101111₂) = e^(0.10100000₂) × e^(0.00001111₂)

Here, e is the exponential base, the subscript ₂ identifies binary notation, and × denotes multiplication. The binary fraction on the left is separated into upper and lower component fractions on the right. This is the paper’s example of using the exponential of a sum as a product of exponentials.

The same organization lets the design replace the large table with smaller ones. The authors describe tables containing 256 entries each in their larger representation example. The mechanism saves table storage while requiring a multiplication to combine the retrieved results.

As exponentials are generated, the module accumulates their sum. The output module uses that sum to normalize each score. It then scales the corresponding value row and adds the result into the output registers. The output is complete after the selected value rows have been processed.

The modules are balanced so that successive queries can occupy different stages. This improves sustained throughput even though an individual query must pass through the entire pipeline.

L_base = 3n + 27

L_base is the base pipeline’s latency in cycles, and n is the number of key rows. The constant accounts for the additional stage delays in the evaluated organization.

I_base = n + 9

I_base is the interval, in cycles, between processed queries under the base pipeline’s throughput specification. The n term comes from streaming the rows, while 9 represents the additional module timing used in this design.

Latency and throughput describe different properties. Pipelining allows the hardware to begin work on another query before an earlier query has completed every stage. It therefore improves the rate of completed work without making the full path of an individual query disappear.

Choose numerical formats by stage

A³ converts floating-point inputs into fixed-point representations. The format has a sign bit, i integer bits, and f fractional bits. The evaluated choices are i=4 and f=4. Intermediate registers use formats selected for their own arithmetic requirements rather than simply retaining the input width.

Products require more range and precision than the original components. Adding products increases the necessary integer range, while leaving the fractional resolution requirement unchanged. Subtracting the maximum score needs extra range as well.

b_dot = log₂(d) + 2i

b_dot denotes the integer-bit requirement given for a completed dot product before the additional maximum-subtraction allowance. The logarithm log₂ uses base 2, d is the component count, and i is the input integer-bit allocation. The 2i term accounts for multiplying input components.

After exponentiation, the scores lie between 0 and 1, so their representation no longer requires integer magnitude bits in the same way. Their accumulated sum must cover the contribution of n entries.

b_sum = log₂(n)

b_sum is the integer-bit requirement assigned to the sum of exponentials, and n is the number of contributing entries. The formula expresses the larger range required for an accumulation of bounded values.

Normalized weights remain between 0 and 1. The output range is allocated more conservatively because it combines weighted value components.

b_output = i + log₂(n)

b_output is the paper’s integer-bit allocation for an output component, i is the input integer width, and n is the collection size used in its range accounting.

Fractional precision follows a related path. Multiplying inputs with f fractional bits creates products requiring 2f fractional bits to preserve their represented precision. The additions used for a dot product do not require a further increase in fractional resolution. The design retains that allocation through exponentiation and normalization.

f_output = 3f

f_output is the fractional-bit allocation for the output computation, and f is the input fractional-bit allocation. The output multiplication combines a weight represented with 2f fractional bits and a value component represented with f fractional bits.

The paper also supplies an error argument for exponentiation over nonpositive inputs. In that range, a small input perturbation does not expand through the exponential in the way that it can for positive inputs. This supports its decision to retain the fractional allocation rather than widen it at that stage.

This precision analysis concerns representational error. It does not justify dropping candidates: that is a separate approximation with a separate experimental effect. Keeping the mechanisms distinct makes the accuracy evaluation easier to interpret.

Use components as evidence about complete scores

The candidate selector begins from a dot product’s structure. A complete similarity score sums componentwise products. A row containing an unusually large positive product may have a large complete score. A row containing a strongly negative product may be less promising.

This is a heuristic rather than a guarantee. Other components can reinforce or cancel the observed contribution. A³ therefore uses the component evidence to select candidates, then computes complete scores for the rows that survive.

Conceptually, the algorithm could construct all query–key component products and examine their largest and smallest values. Each inspected value is added to a running greedy score for its original row. Positive extremes add favorable evidence; negative extremes add unfavorable evidence. Rows with positive accumulated greedy scores become candidates.

The iteration budget is M. Larger M allows the selector to examine more extreme contributions and generally retain more useful evidence. Smaller M saves search work but increases the chance of excluding a row needed later.

A direct implementation would defeat the purpose. Forming and sorting the complete product collection would add a substantial search cost before the supposedly avoided scoring operation.

C_naive = O(nd log(nd))

C_naive denotes the time complexity of the straightforward sorted-product search. O expresses asymptotic growth, n is the row count, d is the component count, and log denotes a logarithm. This cost is unattractive when complete dot-product scoring itself grows as O(nd).

The important contribution is therefore not simply the suggestion to inspect extreme products. It is a way to reach them without sorting the complete query-dependent product collection.

Sort the keys before searching

Preprocessing sorts every column of the key matrix. Alongside each sorted value, the stored structure keeps its original row identifier. This identifier is essential because the eventual result must refer back to the original key and its associated value.

Sorting a column provides an ordered list of key components. Once a query arrives, multiplying the entire column by a positive query component preserves that ordering. Multiplying by a negative component reverses it. The query component’s sign therefore tells the selector which end contains the largest products and which end contains the smallest.

For each column, the algorithm initializes pointers for the positive and negative search directions. It calculates the products currently exposed at those pointers and places them in priority queues. One queue supplies the largest available product; the other supplies the smallest.

The selector then performs its budgeted iterations. It removes an extreme product, updates the greedy score of the product’s original row, advances the pointer in that product’s column, and inserts the newly exposed product. The queues merge the ordered streams from the separate columns.

This organization makes the query-time queue operations depend on the number of dimensions rather than on the full number of stored rows.

C_query = O(M log d)

C_query is the candidate-selection complexity after preprocessing. M is the chosen number of iterations, and d is the number of component streams represented in the queues. The logarithmic term comes from maintaining the priority queues.

The authors add a safeguard for cases with generally low similarity. If the cumulative balance of selected positive and negative contributions becomes negative, the procedure skips the negative-queue operation. The aim is to avoid a candidate set becoming too small because negative evidence overwhelms the selection.

After the iterations, rows with positive greedy scores are passed to the full dot-product module. These rows are candidates, not final attention contributors. They still need complete scores and may be removed by the next filter.

The complexity claim also needs its practical qualification. The authors state that M should increase with collection size to maintain reasonable accuracy. The query-time expression exposes a user-controlled budget; it does not establish that a fixed amount of work will preserve quality on arbitrarily larger collections.

Filter again after complete scoring

The second approximation stage has more reliable information. It sees complete dot products for the candidate rows and compares them with the strongest score. A row is excluded if it trails the maximum by more than a threshold t.

This avoids the rigidity of retaining a fixed number of rows. If several candidates have similar scores, the filter can preserve them together. If one candidate is clearly separated from the rest, the retained set can be smaller.

The threshold has a direct relationship to relative softmax weights. Because softmax uses exponentials, a score gap corresponds to an exponential weight ratio. The authors express the user-facing threshold as T rather than t.

T = 100 × (1/e^t)

T is the required percentage of the maximum attention weight, t is the permitted score gap, and e is the exponential base. A candidate must reach that relative weight threshold to continue into exponentiation and output accumulation.

A smaller T is more conservative because it admits weaker contributions. A larger T removes more rows. This control differs from M: M determines how extensively the early search runs, whereas T determines how selective the later score-based filter becomes.

The retained weights are normalized over the surviving entries. Accordingly, approximation changes more than the presence or absence of particular value vectors. It can also change the relative contribution of the retained vectors through the new normalization denominator.

Specialize the candidate search in hardware

The approximate A³ design stores the sorted columns and row identifiers in SRAM. It maintains pointers, component-product buffers, comparator structures, and registers for greedy scores. These structures implement the search rather than treating it as a sequence of general-purpose software queue operations.

The difficult part is the dependency between iterations. Selecting a product identifies which column must advance; that advancement supplies a later product. A literal implementation would wait for replacement data and arithmetic before continuing.

A³ instead prepares several future products for each column and stores them in circular queues. The implementation uses a refill path whose critical loop takes c cycles, with c=4 in the evaluated design. Precomputed products allow the selector to consume one available result while the hardware computes a replacement.

Initialization fills these buffers. Though steady operation uses only two multipliers in the selection module, the design temporarily borrows multipliers from the base dot-product and output modules to accelerate startup. This is a form of resource sharing tailored to the fact that initialization and later computation have different needs.

During steady operation, comparator trees identify the largest and smallest products among the currently exposed component streams. Unlike a software priority queue, the hardware compares across dimensions in parallel.

C_hardware = O(M)

C_hardware is the iteration-count dependence of the hardware candidate search. M is the configured budget. The expression reflects the comparator-based implementation’s ability to initiate an iteration each cycle during steady operation; it does not remove initialization and candidate-emission overhead.

After selection, the greedy-score registers are scanned. The design can inspect up to 16 adjacent entries per cycle while identifying rows with positive scores. Those row identifiers feed the dot-product stage.

The post-scoring filter is comparatively simple hardware. It uses parallel subtraction and comparison to test score gaps. Its purpose is to reduce the traffic entering exponentiation and value accumulation after the more complicated candidate search has already reduced full scoring.

Put the approximate stages together

The complete design passes a query through candidate selection, dot-product calculation, post-scoring filtering, exponentiation, and output accumulation. The amount of work in the later stages depends on the choices made earlier.

L_approx = M + C + K + K + α

L_approx is the approximate pipeline latency in cycles. M counts candidate-search iterations, C is the number of rows selected for complete scoring, K is the number retained after score-based filtering, and α denotes constant overhead. The repeated K terms correspond to the later processing of retained entries.

The candidate selector normally limits throughput because the later stages receive fewer rows than the search budget. An iteration can revisit a row already encountered, and a row’s accumulated score may finish nonpositive. Thus, spending an iteration does not necessarily create a distinct candidate that will pass downstream.

The design assumes that matrices can be placed in local buffers before use. For reusable memory-based question answering, this transfer can occur during preparation. Queries enter a queue, and completed outputs enter another queue for the host processor.

The authors also discuss multiple units. Independent attention operations can run on different units, while repeated queries over the same keys can exploit pipelining or replicated units. This becomes important in the BERT comparison because a GPU can exploit many independent operations simultaneously.

Apply the changes during inference

The accuracy study integrates a software approximation into existing workload implementations. MemN2N uses a Python implementation, KV-MemN2N uses Torch, and BERT uses TensorFlow. The paper identifies these as official or endorsed implementations.

Approximation is applied during inference, and quality is measured using test inputs. The paper does not present a new training procedure that teaches the networks to compensate for discarded candidates. This makes the experiments a test of how much approximation the existing systems tolerate.

That scope is important. The results establish a tradeoff for applying the proposed mechanism to the evaluated inference workloads. They do not establish that retraining would recover the lost accuracy, nor that the same settings would preserve quality in every application using attention.

Experiments and results

Workloads and quality measures

The evaluation covers distinct uses of attention while keeping the embedding width at d=64. The first workload pairs MemN2N with bAbI question answering. The task collection contains twenty question types, and the searchable statements vary by input. Across the test inputs, the average collection size is 20, with a maximum of 50.

The second workload uses KV-MemN2N for WikiMovies questions. The network processes Wikipedia-derived movie information and answers questions about that material. Its average searchable collection size is 186, giving the approximation more rows to avoid than in the smaller bAbI setting.

The third workload uses BERT base on SQuAD v1.1. Here, n=320 represents the maximum combined passage-and-question length under the paper’s word-count description. Its self-attention structure also supplies repeated queries over the same keys, allowing the preprocessing cost to be shared.

The task metrics differ. bAbI is assessed by answer accuracy, WikiMovies by Mean Average Precision, and SQuAD by F1. These should remain distinct when interpreting the approximation study. A change in one metric does not have the same meaning as an identically written change in another.

The prose reports approximate changes in these metrics rather than a complete set of absolute scores for every configuration. It supports the paper’s broad quality tradeoff, but does not supply all the numerical detail needed to reconstruct every plotted result. The reported degradation figures should therefore retain their approximate wording.

Attention’s measured share of runtime

The motivation study profiles attention on an Intel Xeon Gold 6128 for every workload and an NVIDIA Titan V for BERT. The GPU is not included for the memory-network workloads because their implementations did not provide a GPU path in this evaluation.

Attention takes over 35% of total inference runtime in each workload. This establishes that the target operation is substantial even before query-independent preparation is removed. The paper then examines the response-sensitive portion of execution.

For MemN2N and KV-MemN2N, attention exceeds 70% of query response time. The difference follows from excluding work that can be completed before a question arrives, such as representing the stored material. BERT’s share does not change under this distinction because the evaluated processing integrates comprehension and response.

These measurements justify focusing on attention, but they are not measurements of complete application acceleration after replacing it. The rest of the application still exists. A large improvement in an attention operation does not automatically translate into the same improvement in total response time.

Accuracy under conservative and aggressive approximation

The combined approximation study defines a conservative setting with M=1/2n and T=5%. It reports a quality-metric loss of around 1%. This configuration spends more effort on early selection and keeps a broader set after complete scoring.

The aggressive setting uses M=1/8n and T=10%. The reported degradation is around 8%, while the selected sets are smaller. The authors explicitly treat this setting as largely exploratory because its quality cost may be too high for practical deployment.

The wording matters. These are the paper’s approximate descriptions of the metric changes across its workloads. They are not a claim that every dataset loses exactly the same amount, and they should not be converted into invented absolute accuracy, MAP, or F1 scores.

The quality analysis also examines whether important complete-score entries survive approximation. It tracks the true top 2 entries for bAbI and the true top 5 for WikiMovies and SQuAD. The aggressive configuration misses more of those entries than the conservative one.

This is useful evidence about the mechanism. The accuracy loss accompanies the removal of entries that exhaustive scoring would rank highly. The analysis therefore connects task degradation to candidate retention instead of treating the output metric as an isolated observation.

Quantization has a much smaller reported effect. With f=4 fractional bits, degradation remains below 0.1% across the workloads. The authors attribute this to both attention’s tolerance and their stage-specific precision choices. This result supports the evaluated number format without making a universal claim about every attention computation.

Performance evaluation and conventional baselines

The accelerator’s performance comes from a cycle-level simulator configured for 1GHz. The simulator is integrated with the workload implementations so that measured input behavior can drive the proposed execution pipeline.

The conventional baselines are the Xeon CPU and, for BERT, the Titan V GPU. The authors state that they optimized throughput using Intel’s recommendations for deep-learning workloads. The comparison therefore uses actual software execution on the conventional devices alongside simulation of the accelerator.

For MemN2N and KV-MemN2N, both base and approximate A³ deliver attention throughput that the paper describes as orders of magnitude above the CPU. Approximation further improves throughput by shrinking the number of rows processed downstream.

Its incremental benefit is smaller on MemN2N. With a shorter searchable collection, there is less full-attention work to eliminate, and selection overhead occupies a larger role. The authors suggest that adjusting the relative number of hardware modules could address this imbalance.

BERT produces a different ranking. A single A³ unit has less throughput than the GPU. The authors explain that self-attention exposes batched matrix–matrix work with parallelism that the GPU can exploit more effectively than an isolated matrix–vector operation.

The paper then considers replicated accelerator units. It states that 6-7 approximate conservative A³ units can exceed the GPU throughput because BERT offers sufficiently independent work for close scaling. This is a system-organization argument based on the availability of parallel attention operations. It should remain separate from the measured result for a single unit.

Approximation also reduces attention latency relative to base A³. The early selector decreases full dot-product work, and the later filter decreases exponentiation and value accumulation. The aggressive configuration saves more work than the conservative configuration, accompanied by its larger quality loss.

Preprocessing is included for BERT

BERT cannot hide key sorting in a separate, earlier knowledge-preparation interval. The evaluation therefore includes its preprocessing overhead for the approximate designs. The cost is measured on the GPU and shared across the queries that reuse the keys.

Because n=320 queries reuse the key matrix in this setting, the paper assigns each query 1/n of the complete preprocessing cost. This accounting reflects repeated use within self-attention rather than assuming preparation is free.

BERT attention throughput reduction from preprocessing

The conservative configuration loses a smaller share of throughput to preprocessing.

BERT attention throughput reduction from preprocessingConservative approximation (this paper): 7Conservative approximation (this paper)7Aggressive approximation: 24Aggressive approximation24
The numbers
System or settingthroughput reduction %
Conservative approximation (this paper)7
Aggressive approximation24

The preprocessing contribution also increases latency by <11%, according to the paper. Approximation remains beneficial after that overhead is included.

The larger relative throughput penalty for the aggressive configuration is consistent with its reduced remaining computation: preparation occupies more of a faster execution path. The result is a reminder that an optimization can make its own setup cost more visible. Omitting that cost would particularly distort the faster configuration’s apparent advantage.

Area, power, and energy

The hardware is described in Chisel, compiled to Verilog, functionally verified, and synthesized using Synopsys Design Compiler. The reported implementation uses a TSMC 40nm standard-cell library and a 1GHz target. Its capacity is set to n=320 and d=64, with i=4 and f=4 for input representation.

The authors report an area below 2.082mm² for A³. They compare this with a CPU die area of 325mm² and a GPU die area of 815mm², while explicitly noting the different process technologies. These figures establish the proposed block’s small physical scale, but the devices have different responsibilities as well as different fabrication nodes.

At full module utilization, the accelerator’s reported power is below 100mW. The conventional-device comparisons use a CPU TDP of 115W and a GPU TDP of 250W. During actual workload execution, A³ can consume less than its fully utilized power because approximation leaves later pipeline stages less busy.

The resulting energy-efficiency claims exceed 10⁴× relative to the CPU and 10³× relative to the GPU. These are attention-processing comparisons under the paper’s assumptions. CPU and GPU energy are estimated by treating their power as equal to TDP; they are not based on a matched direct measurement of every device’s instantaneous power.

Approximation brings additional energy savings beyond the base accelerator because it prevents operations from being performed. The energy breakdown changes accordingly. In base A³, output computation is the largest contributor, associated with its register structures. In approximate A³, selection dominates because it remains active while downstream work is reduced.

What the fabricated prototype demonstrates

The authors also fabricated a smaller implementation in TSMC 40nm Low Power technology. Its die occupies 1mm² including pads, host communication, and peripheral structures. The core occupies 0.36mm² and is sized for the smaller MemN2N workload.

The prototype includes the approximate functionality. It communicates with an ARMv8 host through a custom serial interface using GPIO, and the authors developed both a host driver and a Python testing environment for MemN2N.

They report successful functional verification of the chip. This is stronger evidence of implementability than a design existing only in simulation. However, the prototype is scaled down, and the paper’s principal performance and energy comparisons concern the larger evaluated design. Functional silicon evidence and full-design quantitative estimates support different parts of the overall claim.

What the ablations show

The search budget controls what reaches complete scoring

The candidate-selection study varies M while observing both quality and the number of selected rows. At a larger budget, the selector examines more component evidence. At a smaller budget, it stops earlier and forwards a narrower set.

The paper describes variation from n to 1/8n. Reducing the budget changes the quality metric because some useful rows fail to reach complete scoring. Increasing it generally improves quality, but gives up some of the computation savings.

This controlled comparison supports the intended role of M. It is not simply a hardware timing parameter; it changes the information available to the rest of attention. The later stages can be exact over their inputs and still produce a different result because the early selector has altered those inputs.

The comparison also limits the interpretation of the search-complexity result. Query processing may be expressed using M and d, but acceptable M is an empirical question. The paper does not establish a universal budget that works for every collection or task.

The final threshold adapts the amount of output work

The post-scoring study varies T. Increasing it makes the filter more selective, reducing the number of rows reaching exponentiation and weighted accumulation. Decreasing it retains weaker contributions and moves behavior towards the unfiltered computation.

The paper reports that a threshold such as 10% can still give useful accuracy in its evaluation. This supports the idea that many individually small attention weights can be omitted without catastrophic task failure.

It does not establish that every low-weight contribution is irrelevant. The observed result is task-level tolerance under selected settings. The controlled comparison is informative precisely because the threshold is varied and the quality response is measured, rather than assumed from the softmax formula alone.

The analysis also explains why a fixed retained count would be less flexible. A score distribution with several similarly strong entries may deserve a wider retained set than a distribution dominated by a single entry. The relative threshold responds to that distinction without requiring the same candidate count for every query.

Combined approximation exposes an accuracy boundary

The conservative and aggressive settings combine both controls. Moving between them reduces search effort and tightens the later filter at the same time. The resulting quality difference demonstrates the practical range of the proposed system, but it does not isolate how much of that difference comes from each control.

The separate M and T studies help with that interpretation. Together, they show that the algorithm has opportunities to save work before and after complete scoring. The combined study then asks what happens when those opportunities are used together.

The top-entry analysis adds a more direct diagnostic. By measuring retention of the true top 2 or top 5 entries, the authors examine whether the approximation preserves the rows that complete scoring would consider most important. The aggressive configuration retains fewer of these rows, consistent with its greater task-metric degradation.

This does not amount to a full explanation of every wrong answer. It does, however, establish that important-score omission is a real mechanism instead of a merely hypothetical failure mode.

Quantization contributes a smaller observed error

The number-format comparison varies fractional precision and measures the resulting quality. The small degradation reported for f=4 indicates that the chosen arithmetic format is not responsible for the much larger loss associated with aggressive candidate approximation.

That separation is valuable. A system using reduced precision and skipped candidates has several possible error sources. Measuring numerical representation independently makes it harder to attribute all quality changes to a vague notion of approximation.

The finding remains specific to the evaluated workloads and the carefully allocated intermediate formats. Using the same input precision with a different accumulation range or output format would not reproduce the entire numerical design.

Base hardware and approximate hardware answer different questions

Comparing base A³ with conventional devices asks whether attention benefits from a dedicated pipeline. Comparing approximate A³ with base A³ asks whether selective processing provides further benefit once that pipeline already exists.

The second comparison is especially important because large gains over a CPU do not by themselves validate the candidate selector. A specialized exact-processing design might already account for much of that advantage. The base-to-approximate results show that avoided computation supplies an additional contribution.

The workload differences then identify when that contribution is less compelling. The smaller MemN2N case gains less additional throughput from approximation. BERT highlights a different issue: the comparison depends on whether independent attention work is mapped to a single accelerator or several units.

The preprocessing analysis and energy breakdown are further diagnostic comparisons. The former makes preparation cost visible; the latter shows the bottleneck moving toward selection after downstream work shrinks. Together they explain why reducing arithmetic does not remove the need to balance the whole pipeline.

The paper does not provide a complete factorial study of every selector heuristic, buffer choice, and hardware structure. Its evidence is strongest for the principal controls, the combined configurations, numerical precision, and the distinction between base and approximate execution.

Limitations

Limits the authors explicitly acknowledge

The authors identify the aggressive configuration as potentially impractical because of its accuracy degradation. That qualification prevents the most aggressive speed results from being read as a generally suitable deployment setting. The paper explores a tradeoff, and some points on that tradeoff may be unacceptable for a particular application.

They also acknowledge that the search budget must increase as the collection grows if quality is to remain reasonable. The candidate-selection expression therefore does not establish accuracy-preserving independence from collection size. It describes the work associated with a chosen budget.

Preprocessing is another stated condition. It can occur outside response time for some memory workloads, but remains on the critical path for BERT. Reuse reduces its per-query contribution; it does not eliminate it. Systems with less reuse would need their own cost assessment.

The paper reports that a single accelerator unit falls behind the GPU on BERT throughput. Its stronger throughput claim relies on multiple units and the available parallelism. Any interpretation that omits this distinction would misstate the result.

The authors also observe pipeline imbalance and limited extra throughput improvement on the smaller memory workload. Candidate selection has a cost of its own. When little downstream work remains to be saved, that cost can become a limiting factor.

Limits visible in the experimental scope

A careful reader should distinguish the proposed operation from the complete applications that contain it. The strongest performance comparisons concern attention processing. Other stages, data movement, host coordination, and workload preparation still affect application response time.

The evaluation covers question answering with the selected networks and datasets. The related-work discussion identifies many other uses of attention, but these applications are not separately evaluated. General applicability of the operation does not establish identical approximation tolerance across translation, visual processing, or other tasks.

The accuracy experiments apply approximation during inference to existing systems. They do not establish behavior under training with the approximation, nor demonstrate a training procedure that recovers lost quality. The authors suggest that saved resources could enable a larger, more accurate system, but they do not present a complete measured comparison proving that compensation in this evaluation.

All evaluated workloads use d=64, and the synthesized capacity uses n=320. The design discussion describes handling larger collections and alternative dimensions, but those arguments extend beyond the principal measured configurations. In particular, the additional memory traffic and selection budget needed at a larger scale would require evaluation.

The paper discusses sequential prefetching for the base design when stored matrices exceed local capacity. The approximate design additionally depends on sorted representations, row identifiers, and query-dependent accesses. Claims about larger-scale operation should account for those structures as well as the original key and value matrices.

Search evidence is heuristic

The early selector assumes that extreme component products are informative about complete dot products. That assumption is plausible and empirically useful here, but a complete score can arise from many moderate contributions. Conversely, a large favorable component can be offset elsewhere.

No guarantee in the paper establishes that the greedy score ordering reproduces complete-score ordering. The algorithm intentionally accepts that risk to reduce computation. Its useful operating point must therefore be identified through task-level measurements and candidate-retention analysis.

The later relative threshold also has a specific meaning. It bounds each retained item’s weight relative to the largest weight. It does not directly constrain the total weight removed across all discarded items. A large collection of individually weak contributions can still carry meaningful combined information.

Repeated attention operations introduce another uncertainty. A changed output may become part of a later query, so local approximation can influence subsequent retrieval. The evaluated task metrics incorporate the resulting behavior for these workloads, but the paper does not give a general bound on such propagation.

Hardware estimates and physical evidence have different reach

Performance is evaluated with a cycle simulator, and the main hardware characteristics come from synthesis. The fabricated chip confirms operation of a smaller design. These are complementary forms of evidence, but they do not constitute a complete direct measurement of the largest configuration under every evaluated workload.

The CPU and GPU energy comparisons use TDP as their power estimate. This makes the energy-efficiency findings conditional on an explicit assumption about conventional-device consumption. A comparison using measured workload power could produce different numerical results.

Area comparisons also span different technology nodes and different device scopes. A dedicated attention block and a general-purpose processor provide different functionality. The reported area advantage is informative about specialization, but it should not be interpreted as an equal-functionality replacement comparison.

A threshold description needs careful reading

There is an internal inconsistency in the account of post-scoring hardware. The algorithmic explanation says that rows too far below the maximum are excluded. The hardware subsection contains a sentence that instead describes forwarding a value when the gap exceeds the threshold.

The intended selection rule is clear from the threshold definition and the surrounding explanation: retain candidates sufficiently close to the strongest score. Nonetheless, the contradictory description matters for anyone reconstructing the design. The prose should not be treated as an unambiguous implementation specification at that point.

The broader conclusion survives this reading issue because the approximation policy, evaluated threshold settings, and stated purpose consistently concern removing weak contributions. What remains uncertain from that sentence is the precise wording of the hardware handoff, instead of the motivation for score-based filtering.

What came after

Efficient Methods for Natural Language Processing: A Survey (2023) cites A³ within the later literature on computational efficiency. Its survey scope supplies a broader setting for the paper’s central contribution: attention efficiency can depend on changing the algorithm and its hardware execution together. A³ is especially useful in that discussion because it distinguishes specialization of the complete operation from additional savings obtained by selectively omitting work. The citation does not, by itself, establish a particular assessment or experimental comparison by the survey.

Cross-layer Attention Sharing for Pre-trained Large Language Models (2026) also cites A³. Its title identifies attention sharing across layers as its subject. That places it alongside A³’s concern with reducing attention cost, while pointing towards a different location for potential reuse: across layers rather than within the candidate search for a single attention operation. The citation alone does not establish that it adopts A³’s sorted-column index, componentwise search, threshold policy, or accelerator.

These later connections support a bounded account of influence. A³ participates in subsequent discussion of efficient language processing and attention computation. They do not establish a direct implementation lineage for every part of its design. The distinctive contribution remains the concrete combination demonstrated in the paper: use inexpensive evidence to narrow a search, complete the necessary scoring, and build hardware around the resulting selective workload.

Cite

Cite as Tae Jun Ham, Sung Jun Jung, Seonghak Kim, Young H. Oh, Yeonhong Park, Yoonho Song, Jung-Hun Park, Sanghee Lee, Kyoung Park, Jae W. Lee and Deog‐Kyoon Jeong. 2020. A^3: Accelerating Attention Mechanisms in Neural Networks with Approximation. Proceedings - International Symposium on High-Performance Computer Architecture/Proceedings.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.1109/hpca47549.2020.00035 · arXiv 2002.10941

@inproceedings{ham20203,
  title = {{A^3: Accelerating Attention Mechanisms in Neural Networks with Approximation}},
  author = {Tae Jun Ham, Sung Jun Jung, Seonghak Kim, Young H. Oh, Yeonhong Park, Yoonho Song, Jung-Hun Park, Sanghee Lee, Kyoung Park, Jae W. Lee and Deog‐Kyoon Jeong},
  booktitle = {Proceedings - International Symposium on High-Performance Computer Architecture/Proceedings},
  year = {2020},
  doi = {10.1109/hpca47549.2020.00035},
  eprint = {2002.10941},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1109/hpca47549.2020.00035}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/ham-2020-3-accelerating-attention-mechanisms-neural/

References

79 references, from the paper's own bibliography.

  1. T. Chen, Z. Du, N. Sun, J. Wang, C. Wu, Y. Chen, and O. Temam, “Diannao: A small-footprint high-throughput accelerator for ubiquitous machine-learning,” in International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS, 2014. OpenAlex ↗ · Scholar ↗
  2. Y. Chen, T. Krishna, J. S. Emer, and V. Sze, “Eyeriss: An energy-efficient reconfigurable accelerator for deep convolutional neural networks,” IEEE Journal of Solid-State Circuits, 2017. OpenAlex ↗ · Scholar ↗
  3. N. P. Jouppi, C. Young, N. Patil, D. Patterson, G. Agrawal, R. Bajwa, S. Bates, S. Bhatia, N. Boden, A. Borchers, R. Boyle, P.-l. Cantin, C. Chao, C. Clark, J. Coriell, M. Daley, M. Dau, J. Dean, B. Gelb, T. V. Ghaemmaghami, R. Gottipati, W. Gulland, R. Hagmann, C. R. Ho, D. Hogberg, J. Hu, R. Hundt, D. Hurt, J. Ibarz, A. Jaffey, A. Jaworski, A. Kaplan, H. Khaitan, D. Killebrew, A. Koch, N. Kumar, S. Lacy, J. Laudon, J. Law, D. Le, C. Leary, Z. Liu, K. Lucke, A. Lundin, G. MacKean, A. Maggiore, M. Mahony, K. Miller, R. Nagarajan, R. Narayanaswami, R. Ni, K. Nix, T. Norrie, M. Omernick, N. Penukonda, A. Phelps, J. Ross, M. Ross, A. Salek, E. Samadiani, C. Severn, G. Sizikov, M. Snelham, J. Souter, D. Steinberg, A. Swing, M. Tan, G. Thorson, B. Tian, H. Toma, E. Tuttle, V. Vasudevan, R. Walter, W. Wang, E. Wilcox, and D. H. Yoon, “In-datacenter performance analysis of a tensor processing unit,” in International Symposium on Computer Architecture, ISCA, 2017. our card
  4. K. Xu, J. Ba, R. Kiros, K. Cho, A. C. Courville, R. Salakhutdinov, R. S. Zemel, and Y. Bengio, “Show, attend and tell: Neural image caption generation with visual attention,” in International Conference on Machine Learning, ICML, 2015. our card
  5. M. Tapaswi, Y. Zhu, R. Stiefelhagen, A. Torralba, R. Urtasun, and S. Fidler, “MovieQA: Understanding Stories in Movies through Question-Answering,” in Conference on Computer Vision and Pattern Recognition, CVPR, 2016. our card
  6. S. Na, S. Lee, J. Kim, and G. Kim, “A read-write memory network for movie story understanding,” in International Conference on Computer Vision, ICCV, 2017. OpenAlex ↗ · Scholar ↗
  7. A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin, “Attention is all you need,” in International Conference on Neural Information Processing Systems, NIPS, 2017. our card
  8. S. Sukhbaatar, J. Weston, R. Fergus et al., “End-to-end memory networks,” in International Conference on Neural Information Processing Systems, NIPS, 2015. OpenAlex ↗ · Scholar ↗
  9. J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, “BERT: Pre-training of deep bidirectional transformers for language understanding,” CoRR, 2018. our card
  10. D. Bahdanau, K. Cho, and Y. Bengio, “Neural machine translation by jointly learning to align and translate,” CoRR, 2014. our card
  11. A. Graves, G. Wayne, and I. Danihelka, “Neural turing machines,” CoRR, 2014. OpenAlex ↗ · Scholar ↗
  12. A. Graves, G. Wayne, M. Reynolds, T. Harley, I. Danihelka, A. Grabska-Barwinska, S. G. Colmenarejo, E. Grefenstette, T. Ramalho, J. Agapiou, A. P. Badia, K. M. Hermann, Y. Zwols, G. Ostrovski, A. Cain, H. King, C. Summerfield, P. Blunsom, K. Kavukcuoglu, and D. Hassabis, “Hybrid computing using a neural network with dynamic external memory,” Nature, 2016. OpenAlex ↗ · Scholar ↗
  13. A. P. Parikh, O. Täckström, D. Das, and J. Uszkoreit, “A decomposable attention model for natural language inference,” in Empirical Methods in Natural Language Processing, EMNLP, 2016. our card
  14. Z. Lin, M. Feng, C. N. dos Santos, M. Yu, B. Xiang, B. Zhou, and Y. Bengio, “A structured self-attentive sentence embedding,” in International Conference on Learning Representations, ICLR, 2017. our card
  15. J. Weston, A. Bordes, S. Chopra, A. M. Rush, B. van Merriënboer, A. Joulin, and T. Mikolov, “Towards AI-complete question answering: A set of prerequisite toy tasks,” in International Conference on Learning Representations, ICLR, 2016. our card
  16. T. Mikolov, I. Sutskever, K. Chen, G. Corrado, and J. Dean, “Distributed representations of words and phrases and their compositionality,” in International Conference on Neural Information Processing Systems, NIPS, 2013. our card
  17. J. Pennington, R. Socher, and C. D. Manning, “Glove: Global vectors for word representation,” in Conference on Empirical Methods in Natural Language Processing, EMNLP, 2014. our card
  18. E. Grave, T. Mikolov, A. Joulin, and P. Bojanowski, “Bag of tricks for efficient text classification,” in Conference of the European Chapter of the Association for Computational Linguistics, EACL, 2017. OpenAlex ↗ · Scholar ↗
  19. A. Miller, A. Fisch, J. Dodge, A.-H. Karimi, A. Bordes, and J. Weston, “Key-value memory networks for directly reading documents,” in Empirical Methods in Natural Language Processing, EMNLP, 2016. our card
  20. P. Rajpurkar, J. Zhang, K. Lopyrev, and P. Liang, “SQuAD: 100,000+ questions for machine comprehension of text,” in Empirical Methods in Natural Language Processing, EMNLP, 2016. our card
  21. M. Abadi, A. Agarwal, P. Barham, E. Brevdo, Z. Chen, C. Citro, G. Corrado, A. Davis, J. Dean, M. Devin et al., “Tensorflow: Large-scale machine learning on heterogeneous distributed systems,” CoRR, 2015. our card
  22. “Torch 7,” https://github.com/torch/torch7. OpenAlex ↗ · Scholar ↗
  23. S. Arora, “Word embeddings: Explaining their properties,” https://www.offconvex.org/2016/02/14/word-embeddings-2/. OpenAlex ↗ · Scholar ↗
  24. Z. Yin and Y. Shen, “On the dimensionality of word embedding,” in International Conference on Neural Information Processing Systems, NIPS, 2018. OpenAlex ↗ · Scholar ↗
  25. H. Yu, C. Hsieh, Q. Lei, and I. S. Dhillon, “A greedy approach for budgeted maximum inner product search,” in International Conference on Neural Information Processing Systems, NIPS, 2017. OpenAlex ↗ · Scholar ↗
  26. Facebook, “The bAbI project,” https://research.fb.com/downloads/babi, 2015. OpenAlex ↗ · Scholar ↗
  27. V. Khuc, “MemN2N-babi-python,” https://github.com/vinhkhuc/MemN2N-babi-python, 2017. OpenAlex ↗ · Scholar ↗
  28. Facebook, “Key-value memory networks for directly reading documents,” https://github.com/facebook/MemNN/tree/master/KVmemnn, 2017. our card
  29. G. Research, “Tensorflow code and pre-trained models for BERT.” https://github.com/google-research/bert, 2018. OpenAlex ↗ · Scholar ↗
  30. E. Real, A. Aggarwal, Y. Huang, and Q. V. Le, “Regularized evolution for image classifier architecture search,” in AAAI Conference on Artificial Intelligence, AAAI, 2019. OpenAlex ↗ · Scholar ↗
  31. B. Zoph, V. Vasudevan, J. Shlens, and Q. V. Le, “Learning transferable architectures for scalable image recognition,” CoRR, 2017. [Online]. Available: http://arxiv.org/abs/1707.07012 our card
  32. Intel, “Intel Xeon gold 6128 processor,” https://ark.intel.com/products/120482/Intel-Xeon-Gold-6128-Processor-19-25M-Cache-3-40-GHz-, 2017. OpenAlex ↗ · Scholar ↗
  33. NVIDIA, “NVIDIA TITAN V,” https://www.nvidia.com/en-us/titan/titan-v/, 2018. OpenAlex ↗ · Scholar ↗
  34. “Tips to improve performance for popular deep learning frameworks on CPUs,” https://software.intel.com/en-us/articles/tips-to-improve-performance-for-popular-deep-learning-frameworks-on-multi-core-cpus. OpenAlex ↗ · Scholar ↗
  35. “Intel software optimization for Torch,” https://github.com/intel/torch. OpenAlex ↗ · Scholar ↗
  36. “Chisel,” https://chisel.eecs.berkeley.edu. OpenAlex ↗ · Scholar ↗
  37. “Synopsys Design Compiler,” https://www.synopsys.com/support/training/rtl-synthesis/design-compiler-rtl-synthesis.html. OpenAlex ↗ · Scholar ↗
  38. Wikichip, “Skylake (server) - microarchitectures - Intel,” https://en.wikichip.org/wiki/intel/microarchitectures/skylake_(server), 2019. OpenAlex ↗ · Scholar ↗
  39. NVIDIA, “Inside Volta: The world39s most advanced data center GPU,” https://devblogs.nvidia.com/inside-volta/, 2018. OpenAlex ↗ · Scholar ↗
  40. K. M. Hermann, T. Kociský, E. Grefenstette, L. Espeholt, W. Kay, M. Suleyman, and P. Blunsom, “Teaching machines to read and comprehend,” in Advances in Neural Information Processing Systems, NIPS, 2015. our card
  41. M. J. Seo, A. Kembhavi, A. Farhadi, and H. Hajishirzi, “Bidirectional attention flow for machine comprehension,” in International Conference on Learning Representations, ICLR, 2017. our card
  42. B. Wang, K. Liu, and J. Zhao, “Inner attention based recurrent neural networks for answer selection,” in Annual Meeting of the Association for Computational Linguistics, ACL, 2016. OpenAlex ↗ · Scholar ↗
  43. T. Rocktäschel, E. Grefenstette, K. M. Hermann, T. Koc̆iský, and P. Blunsom, “Reasoning about entailment with neural attention,” in International Conference on Learning Representations, ICLR, 2016. our card
  44. A. M. Rush, S. Chopra, and J. Weston, “A neural attention model for abstractive sentence summarization,” in Conference on Empirical Methods in Natural Language Processing, EMNLP, 2015. our card
  45. S. Chopra, M. Auli, and A. M. Rush, “Abstractive sentence summarization with attentive recurrent neural networks,” in The Conference of the North American Chapter of the Association for Computational Linguistics, NAACL, 2016. our card
  46. Z. Yang, D. Yang, C. Dyer, X. He, A. J. Smola, and E. H. Hovy, “Hierarchical attention networks for document classification,” in The Conference of the North American Chapter of the Association for Computational Linguistics, NAACL, 2016. our card
  47. N. Pappas and A. Popescu-Belis, “Multilingual hierarchical attention networks for document classification,” in International Joint Conference on Natural Language Processing, IJCNLP, 2017. our card
  48. K. Kim, M. Heo, S. Choi, and B. Zhang, “Deepstory: Video story QA by deep embedded memory networks,” in International Joint Conference on Artificial Intelligence, IJCAI, 2017. OpenAlex ↗ · Scholar ↗
  49. Q. You, H. Jin, Z. Wang, C. Fang, and J. Luo, “Image captioning with semantic attention,” in Conference on Computer Vision and Pattern Recognition, CVPR, 2016. OpenAlex ↗ · Scholar ↗
  50. V. Mnih, N. Heess, A. Graves, and K. Kavukcuoglu, “Recurrent models of visual attention,” in International Conference on Neural Information Processing Systems, NIPS, 2014. OpenAlex ↗ · Scholar ↗
  51. F. Wang, M. Jiang, C. Qian, S. Yang, C. Li, H. Zhang, X. Wang, and X. Tang, “Residual attention network for image classification,” in Conference on Computer Vision and Pattern Recognition, CVPR, 2017. OpenAlex ↗ · Scholar ↗
  52. M. Jaderberg, K. Simonyan, A. Zisserman, and K. Kavukcuoglu, “Spatial transformer networks,” in International Conference on Neural Information Processing Systems, NIPS, 2015. OpenAlex ↗ · Scholar ↗
  53. I. Bello, B. Zoph, A. Vaswani, J. Shlens, and Q. V. Le, “Attention augmented convolutional networks,” CoRR, 2019. [Online]. Available: http://arxiv.org/abs/1904.09925 our card
  54. S. Sharma, R. Kiros, and R. Salakhutdinov, “Action recognition using visual attention,” in International Conference on Learning Representations, ICLR, 2016. OpenAlex ↗ · Scholar ↗
  55. J. Kuen, Z. Wang, and G. Wang, “Recurrent attentional networks for saliency detection,” in Conference on Computer Vision and Pattern Recognition, CVPR, 2016. OpenAlex ↗ · Scholar ↗
  56. A. Shrivastava and P. Li, “Asymmetric LSH (ALSH) for sublinear time maximum inner product search (MIPS),” in International Conference on Neural Information Processing Systems, NIPS, 2014. OpenAlex ↗ · Scholar ↗
  57. P. Ram and A. G. Gray, “Maximum inner-product search using cone trees,” in ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD, 2012. OpenAlex ↗ · Scholar ↗
  58. A. Auvolat and P. Vincent, “Clustering is efficient for approximate maximum inner product search,” CoRR, 2015. OpenAlex ↗ · Scholar ↗
  59. J. Rae, J. J. Hunt, I. Danihelka, T. Harley, A. W. Senior, G. Wayne, A. Graves, and T. Lillicrap, “Scaling memory-augmented neural networks with sparse reads and writes,” in International Conference on Neural Information Processing Systems, NIPS, 2016. OpenAlex ↗ · Scholar ↗
  60. S. Chandar, S. Ahn, H. Larochelle, P. Vincent, G. Tesauro, and Y. Bengio, “Hierarchical memory networks,” CoRR, 2016. OpenAlex ↗ · Scholar ↗
  61. Y. Chen, T. Luo, S. Liu, S. Zhang, L. He, J. Wang, L. Li, T. Chen, Z. Xu, N. Sun, and O. Temam, “Dadiannao: A machine-learning supercomputer,” in IEEE/ACM International Symposium on Microarchitecture, MICRO, 2014. OpenAlex ↗ · Scholar ↗
  62. Z. Du, R. Fasthuber, T. Chen, P. Ienne, L. Li, T. Luo, X. Feng, Y. Chen, and O. Temam, “Shidiannao: Shifting vision processing closer to the sensor,” in International Symposium on Computer Architecture, ISCA, 2015. OpenAlex ↗ · Scholar ↗
  63. D. Liu, T. Chen, S. Liu, J. Zhou, S. Zhou, O. Teman, X. Feng, X. Zhou, and Y. Chen, “Pudiannao: A polyvalent machine learning accelerator,” in International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS, 2015. OpenAlex ↗ · Scholar ↗
  64. P. Judd, J. Albericio, T. Hetherington, T. M. Aamodt, and A. Moshovos, “Stripes: Bit-serial deep neural network computing,” in IEEE/ACM International Symposium on Microarchitecture, MICRO, 2016. OpenAlex ↗ · Scholar ↗
  65. J. Fowers, K. Ovtcharov, M. Papamichael, T. Massengill, M. Liu, D. Lo, S. Alkalay, M. Haselman, L. Adams, M. Ghandi, S. Heil, P. Patel, A. Sapek, G. Weisz, L. Woods, S. Lanka, S. K. Reinhardt, A. M. Caulfield, E. S. Chung, and D. Burger, “A configurable cloud-scale DNN processor for real-time AI,” in International Symposium on Computer Architecture, ISCA, 2018. OpenAlex ↗ · Scholar ↗
  66. J. Qiu, J. Wang, S. Yao, K. Guo, B. Li, E. Zhou, J. Yu, T. Tang, N. Xu, S. Song, Y. Wang, and H. Yang, “Going deeper with embedded FPGA platform for convolutional neural network,” in ACM/SIGDA International Symposium on Field-Programmable Gate Arrays, FPGA, 2016. OpenAlex ↗ · Scholar ↗
  67. C. Zhang, P. Li, G. Sun, Y. Guan, B. Xiao, and J. Cong, “Optimizing FPGA-based accelerator design for deep convolutional neural networks,” in ACM/SIGDA International Symposium on Field-Programmable Gate Arrays, FPGA, 2015. OpenAlex ↗ · Scholar ↗
  68. S. Han, J. Kang, H. Mao, Y. Hu, X. Li, Y. Li, D. Xie, H. Luo, S. Yao, Y. Wang, H. Yang, and W. B. J. Dally, “ESE: Efficient speech recognition engine with sparse LSTM on FPGA,” in ACM/SIGDA International Symposium on Field-Programmable Gate Arrays, FPGA, 2017. OpenAlex ↗ · Scholar ↗
  69. J. Park, J. Kung, W. Yi, and J. Kim, “Maximizing system performance by balancing computation loads in LSTM accelerators,” in Design, Automation Test in Europe, DATE, 2018. OpenAlex ↗ · Scholar ↗
  70. C. Gao, D. Neil, E. Ceolini, S.-C. Liu, and T. Delbruck, “DeltaRNN: A power-efficient Recurrent Neural Network accelerator,” in ACM/SIGDA International Symposium on Field-Programmable Gate Arrays, FPGA, 2018. OpenAlex ↗ · Scholar ↗
  71. S. Han, X. Liu, H. Mao, J. Pu, A. Pedram, M. A. Horowitz, and W. J. Dally, “EIE: Efficient inference Engine on compressed deep neural network,” in International Symposium on Computer Architecture, ISCA, 2016. our card
  72. J. Albericio, P. Judd, T. Hetherington, T. Aamodt, N. E. Jerger, and A. Moshovos, “Cnvlutin: Ineffectual-neuron-free deep neural network computing,” in International Symposium on Computer Architecture, ISCA, 2016. OpenAlex ↗ · Scholar ↗
  73. S. Zhang, Z. Du, L. Zhang, H. Lan, S. Liu, L. Li, Q. Guo, T. Chen, and Y. Chen, “Cambricon-X: An accelerator for sparse neural networks,” in IEEE/ACM International Symposium on Microarchitecture, MICRO, 2016. OpenAlex ↗ · Scholar ↗
  74. A. Parashar, M. Rhu, A. Mukkara, A. Puglielli, R. Venkatesan, B. Khailany, J. Emer, S. W. Keckler, and W. J. Dally, “SCNN: An accelerator for compressed-sparse convolutional neural networks,” in International Symposium on Computer Architecture, ISCA, 2017. OpenAlex ↗ · Scholar ↗
  75. V. Akhlaghi, A. Yazdanbakhsh, K. Samadi, R. K. Gupta, and H. Esmaeilzadeh, “Snapea: Predictive early activation for reducing computation in deep convolutional neural networks,” in International Symposium on Computer Architecture, ISCA, 2018. OpenAlex ↗ · Scholar ↗
  76. A. Raha, S. Venkataramani, V. Raghunathan, and A. Raghunathan, “Energy-efficient reduce-and-rank using input-adaptive approximations,” IEEE Transactions on Very Large Scale Integration Systems, vol. 25, no. 2, pp. 462–475, Feb 2017. OpenAlex ↗ · Scholar ↗
  77. D. Mohapatra, V. K. Chippa, A. Raghunathan, and K. Roy, “Design of voltage-scalable meta-functions for approximate computing,” in Design, Automation Test in Europe, DATE, March 2011, pp. 1–6. OpenAlex ↗ · Scholar ↗
  78. A. Raha and V. Raghunathan, “Qlut: Input-aware quantized table lookup for energy-efficient approximate accelerators,” ACM Transactions on Embedded Computing Systems, vol. 16, no. 5s, 2017. OpenAlex ↗ · Scholar ↗
  79. M. Masadeh, O. Hasan, and S. Tahar, “Input-conscious approximate multiply-accumulate (mac) unit for energy-efficiency,” IEEE Access, vol. 7, 2019. OpenAlex ↗ · Scholar ↗