ChatPaper.aiChatPaper

バイトはすべて:ファイルバイト上で直接動作するトランスフォーマー

Bytes Are All You Need: Transformers Operating Directly On File Bytes

May 31, 2023
著者: Maxwell Horton, Sachin Mehta, Ali Farhadi, Mohammad Rastegari
cs.AI

要旨

現代の深層学習アプローチでは、通常、入力をモダリティ固有の形式に変換します。例えば、画像分類における最も一般的な深層学習アプローチでは、画像ファイルのバイトをRGBテンソルにデコードし、それをニューラルネットワークに渡します。代わりに、私たちは推論時にファイルをデコードする必要なく、ファイルバイト上で直接分類を行う方法を調査します。ファイルバイトをモデルの入力として使用することで、複数の入力モダリティで動作可能なモデルの開発が可能になります。私たちのモデル、ByteFormerは、DeiT-Tiと同様の構成を持つトランスフォーマーバックボーンを使用して、TIFFファイルバイト上で直接学習およびテストを行った場合、ImageNetのTop-1分類精度77.33%を達成しました(RGB画像上での精度は72.2%)。変更やハイパーパラメータの調整なしに、ByteFormerはSpeech Commands v2データセットのWAVファイル上で95.42%の分類精度を達成しました(最先端の精度は98.7%)。さらに、ByteFormerがプライバシー保護推論に応用可能であることを示します。ByteFormerは、特定の難読化された入力表現上で精度を損なうことなく推論を行うことが可能です。また、ByteFormerが、90%のピクセルチャネルを一貫してマスキングすることで完全な画像を形成しない仮想的なプライバシー保護カメラでの推論能力も示し、ImageNetで71.35%の精度を達成しました。私たちのコードはhttps://github.com/apple/ml-cvnets/tree/main/examples/byteformerで公開されます。
English
Modern deep learning approaches usually transform inputs into a modality-specific form. For example, the most common deep learning approach to image classification involves decoding image file bytes into an RGB tensor which is passed into a neural network. Instead, we investigate performing classification directly on file bytes, without the need for decoding files at inference time. Using file bytes as model inputs enables the development of models which can operate on multiple input modalities. Our model, ByteFormer, achieves an ImageNet Top-1 classification accuracy of 77.33% when training and testing directly on TIFF file bytes using a transformer backbone with configuration similar to DeiT-Ti (72.2% accuracy when operating on RGB images). Without modifications or hyperparameter tuning, ByteFormer achieves 95.42% classification accuracy when operating on WAV files from the Speech Commands v2 dataset (compared to state-of-the-art accuracy of 98.7%). Additionally, we demonstrate that ByteFormer has applications in privacy-preserving inference. ByteFormer is capable of performing inference on particular obfuscated input representations with no loss of accuracy. We also demonstrate ByteFormer's ability to perform inference with a hypothetical privacy-preserving camera which avoids forming full images by consistently masking 90% of pixel channels, while still achieving 71.35% accuracy on ImageNet. Our code will be made available at https://github.com/apple/ml-cvnets/tree/main/examples/byteformer.
PDF60December 15, 2024