[Paper Review] InvBERT: Text Reconstruction from Contextualized Embeddings used for Derived Text Formats of Literary Works
This paper demonstrates that InvBERT can reconstruct original copyrighted literary texts from contextualized BERT embeddings when the encoder and embeddings are published together. The study reveals that such derived text formats (DTFs) pose a copyright risk, as reconstruction accuracy reaches levels sufficient to violate copyright laws.
Digital Humanities and Computational Literary Studies apply text mining methods to investigate literature. Such automated approaches enable quantitative studies on large corpora which would not be feasible by manual inspection alone. However, due to copyright restrictions, the availability of relevant digitized literary works is limited. Derived Text Formats (DTFs) have been proposed as a solution. Here, textual materials are transformed in such a way that copyright-critical features are removed, but that the use of certain analytical methods remains possible. Contextualized word embeddings produced by transformer-encoders (like BERT) are promising candidates for DTFs because they allow for state-of-the-art performance on various analytical tasks and, at first sight, do not disclose the original text. However, in this paper we demonstrate that under certain conditions the reconstruction of the original copyrighted text becomes feasible and its publication in the form of contextualized word representations is not safe. Our attempts to invert BERT suggest, that publishing parts of the encoder together with the contextualized embeddings is critical, since it allows to generate data to train a decoder with a reconstruction accuracy sufficient to violate copyright laws.
Motivation & Objective
- To investigate whether contextualized word embeddings from BERT can be inverted to recover original copyrighted literary texts.
- To assess the security of Derived Text Formats (DTFs) in digital humanities, particularly when BERT encoders and embeddings are shared.
- To evaluate the feasibility of training a decoder model capable of reconstructing source texts from contextualized embeddings.
- To determine under what conditions the publication of BERT-based DTFs constitutes a violation of copyright law.
Proposed method
- The authors train a decoder model using the BERT encoder and contextualized embeddings to reconstruct the original text.
- They apply inversion techniques to generate candidate tokens at each token position based on the contextualized representations.
- The decoder is optimized to minimize reconstruction loss between predicted and original tokens.
- The method relies on the availability of both the BERT encoder and the contextualized embeddings for inversion.
- The reconstruction process uses autoregressive generation to predict tokens sequentially, improving fluency and coherence.
- The approach evaluates reconstruction quality using standard NLP metrics such as BLEU and exact match.
Experimental results
Research questions
- RQ1Can the original text be reconstructed from BERT contextualized embeddings when the encoder is also available?
- RQ2What level of reconstruction accuracy is achievable using a trained decoder on BERT embeddings?
- RQ3Under what conditions does publishing BERT embeddings and the encoder violate copyright laws?
- RQ4How do contextualized representations preserve enough structural and semantic information for text reconstruction?
- RQ5To what extent do DTFs based on BERT embeddings compromise the privacy and legal compliance of literary corpora?
Key findings
- Reconstruction of original literary texts from BERT embeddings is feasible when the encoder model is publicly available.
- The reconstruction accuracy achieved is sufficient to violate copyright laws, as the output is semantically coherent and structurally faithful to the original.
- Publishing both the BERT encoder and contextualized embeddings enables the training of a decoder capable of generating text that matches the original in content and form.
- The study shows that DTFs based on BERT embeddings are not a safe alternative for sharing copyrighted literary works.
- The results indicate that even anonymized embeddings can be reversed under specific conditions, challenging the assumption of data privacy in digital humanities.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.