Papers › A Simple Hash-Based Early Exiting Approach For Language Understanding and Generation

A Simple Hash-Based Early Exiting Approach For Language Understanding and Generation

3 Mar 2022Findings (ACL) 2022 5arXiv:2203.01670archive 2025-07-28

Tianxiang Sun, Xiangyang Liu, Wei Zhu, Zhichao Geng, Lingling Wu, Yilong He, Yuan Ni, Guotong Xie, Xuanjing Huang, Xipeng Qiu

Early exiting allows instances to exit at different layers according to the estimation of difficulty. Previous works usually adopt heuristic metrics such as the entropy of internal outputs to measure instance difficulty, which suffers from generalization and threshold-tuning. In contrast, learning to exit, or learning to predict instance difficulty is a more appealing way. Though some effort has been devoted to employing such "learn-to-exit" modules, it is still unknown whether and how well the instance difficulty can be learned. As a response, we first conduct experiments on the learnability of instance difficulty, which demonstrates that modern neural models perform poorly on predicting instance difficulty. Based on this observation, we propose a simple-yet-effective Hash-based Early Exiting approach (HashEE) that replaces the learn-to-exit modules with hash functions to assign each token to a fixed exiting layer. Different from previous methods, HashEE requires no internal classifiers nor extra parameters, and therefore is more efficient. Experimental results on classification, regression, and generation tasks demonstrate that HashEE can achieve higher performance with fewer FLOPs and inference time compared with previous state-of-the-art early exiting methods.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2203.01670")

Code

Syntology Ran 0 of 7 code samples harvested from 1 repository linked to this paper; 7 have no recorded run.

By repository: official repository: 7 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

txsun1997/hashee officialmentioned in paperpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

7 samples harvested; 0 ran; 0 honoured the contract we drafted; 7 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

7unverified

Licence: 0 of the 7 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from txsun1997/hashee. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

attention_mask_func txsun1997/hashee/models/modeling_elasticbert_approx_hashee.py official repository unverified MIT (permissive) · ce106170b591f393 · report
get_dropped_hidden txsun1997/hashee/models/modeling_elasticbert_hashee.py official repository unverified MIT (permissive) · eaf0d81840f1d648 · report
get_extended_attention_mask txsun1997/hashee/models/modeling_elasticbert_approx_hashee.py official repository unverified MIT (permissive) · 89bec46d4c56090c · report
get_reduced_hidden txsun1997/hashee/models/modeling_elasticbert_hashee.py official repository unverified MIT (permissive) · 4977b7509775eb23 · report
get_start_piece_outputs txsun1997/hashee/models/modeling_elasticbert_approx_hashee.py official repository unverified MIT (permissive) · 2cff6510499768ce · report
load_tf_weights_in_bert txsun1997/hashee/difficulty/modeling_bert.py official repository unverified MIT (permissive) · 26be70dca3249c0b · report
shift_nonzero txsun1997/hashee/models/modeling_elasticbert_hashee.py official repository unverified MIT (permissive) · a834d201022a2476 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Early exiting

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections