Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
論文読んだ「Simple and Deterministic Matrix Sketching」
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Shinichi Takayanagi
April 08, 2019
Science
1.3k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
論文読んだ「Simple and Deterministic Matrix Sketching」
Shinichi Takayanagi
April 08, 2019
More Decks by Shinichi Takayanagi
See All by Shinichi Takayanagi
論文紹介「Evaluation gaps in machine learning practice」と、効果検証入門に関する昔話
stakaya
0
1.3k
バイブコーディングの正体——AIエージェントはソフトウェア開発を変えるか?
stakaya
5
1.8k
[NeurIPS 2023 論文読み会] Wasserstein Quantum Monte Carlo
stakaya
0
610
[KDD2021 論文読み会] ControlBurn: Feature Selection by Sparse Forests
stakaya
2
2k
[ICML2021 論文読み会] Mandoline: Model Evaluation under Distribution Shift
stakaya
0
2.1k
[情報検索/推薦 各社合同 論文読み祭 #1] KDD ‘20 "Embedding-based Retrieval in Facebook Search"
stakaya
2
680
【2020年新人研修資料】ナウでヤングなPython開発入門
stakaya
28
22k
Quick Introduction to Approximate Bayesian Computation (ABC) with R"
stakaya
3
400
The Road to Machine Learning Engineer from Data Scientist
stakaya
5
4.5k
Other Decks in Science
See All in Science
摂理と合理の肉体改造 — AI時代の減量を支える観測・制御・継続
kiyoshi
0
1.4k
生成AI・プレプリント時代における 研究成果公開の再設計 ― トップカンファレンス文化はどこへ向かうのか / Redesigning the Dissemination of Research Outputs in the Age of Generative AI and Preprints — Where Is the Top-Conference Culture Heading?
ykiyota
0
29k
データベース14: B+木 & ハッシュ索引
trycycle
PRO
0
770
水耕栽培を始める前に知っておきたい植物の科学
grow_design_lab
0
280
Conversation is the New Dashboard: 属人性を排除する第4世代BIツールの勢力図
shomaekawa
1
620
Inside the Mind of an LLM
baggiponte
0
210
東北地方における過去20年間の降水量の変化
naokimuroki
1
370
機械学習 - 決定木からはじめる機械学習
trycycle
PRO
0
1.6k
[NLP2026 参加報告会] AI for Science まとめ / NLP2026
lychee1223
0
1.9k
やるべきときにMLをやる AIエージェント開発
fufufukakaka
2
1.5k
Tensor Factorization Meets Deformed Information Geometry: Convex Relaxation under Deformed Algebra
gkazunii
0
120
AIPシンポジウム 2025年度 成果報告会 「因果推論チーム」
sshimizu2006
3
560
Featured
See All Featured
Accessibility Awareness
sabderemane
1
160
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
450
How to Talk to Developers About Accessibility
jct
2
440
The SEO Collaboration Effect
kristinabergwall1
1
510
Producing Creativity
orderedlist
PRO
348
40k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.2k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Everyday Curiosity
cassininazir
0
260
Paper Plane
katiecoart
PRO
2
52k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Transcript
Simple and Deterministic Matrix Sketching Edo Liberty (Yahoo! Labs )
(KDD 2013, best research paper) 高柳慎一 @_stakaya 論文読んだ
本日のお持ち帰り • 近似精度の保証付で行列圧縮法を提案 • n x m の行列Aを l x
mの行列Bへと圧縮 – l << n • 以下の量(分散的なもの)を良く近似させる • 理論保証あり 2
Matrix Sketching • Matrix Sketchingでは列ではなく行を削除 –皆大好きPCAは列を削除 • 直観的には頻出ベクトルを残す操作 –行空間(Not特徴量(列)空間)の基底探し的な –k-meansのクラスタ中心を残すイメージ
• Frequent Directionという手法を提案 3
Algorithm 4 O(nml)でいける (SVDがO(ml^2)で, n/(2/l)回やるので) 各行に対して逐次ループ
理論的な上限 • || ⋅ || はフロベニウスノルム • || ⋅ ||はスペクトルノルム(多分)
• 削減する次元 lを決めると自動的に上限が決 まる(うれしい) 5
その他のご利益 • オンライン更新OK –各行に対して独⽴に実行可能(for … in Algorithm) • 並列可 –行列Aを部分行列にばらして処理→その後Merge
6
Before we start • よく使う等式を示す – は行列Aの各行 –はiループでの行列B –はiループでの行列C •
は−1 の全0な行に を挿入してVでぐ るっと回転させてるだけなので 7
上限の証明-1 8 xはATA − BTBの最大固有値の固有ベクトル ∑で 0, 以外は全部消える 0は零行列なのでやっぱりいらん 前Pの等式を代入
Algorithmで 定義したΣを各々代入 − の真ん 中の(気持ち)√取って シュワルツの不等式 行列ノルムの定義 に従って頑張る アルゴリズムのここを見る
上限の証明-2 9 よりも大きいものが少なく ともl/2個アルゴリズム的に 残っているはずなので成⽴
上限の証明 • 上限の証明-1, 2を組み合わせればOK 10
やってみる • Python版は数年前にPFNのHido氏がやってる 11 https://www.slideshare.net/shoheihido/kdd-25788780
やってみる • 完全にHidoさんを真似る –同じと思われるデータがKaggleに転がってた 12 https://www.kaggle.com/bistaumanga/usps-dataset/version/1
やってみる • R版がない(と思う) –ないならば、作って見せよう、ホクソエム 13
つくった 14 https://github.com/shinichi-takayanagi/frequent-directions
インストール 15 devtools::install_github("shinichi-takayanagi/frequentdirections")
データを読む • Kaggleからサンプルデータを落としてからの 16 library("h5") file <- h5file("C:¥¥temp¥¥usps.h5") x <-
scale(file["train/data"][]) y <- file["train/target"][] > x[1:5, 1:6] [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.0692796 -0.124749 -0.1999769 -0.3113933 -0.4506665 -0.6198367 [2,] -0.0692796 -0.124749 -0.1999769 0.2073071 0.2038526 -0.3160401 [3,] -0.0692796 -0.124749 -0.1999769 -0.3113933 -0.4506665 -0.6198367 [4,] -0.0692796 -0.124749 -0.1999769 -0.3113933 -0.4506665 0.5364991 [5,] -0.0692796 -0.124749 -0.1999769 -0.3113933 -0.4506665 -0.5053164
データを読む 17 image(matrix(x[338,], nrow=16, byrow = FALSE))
とりあえずSVDで 18 frequentdirections::plot_svd(x, y)
俺俺Matrix Sketching(l=8) 19 eps <- 10^(-8) frequentdirections::plot_svd(x, y, frequentdirections::sketching(x, 8,
eps))
俺俺Matrix Sketching (l=16) 20 frequentdirections::plot_svd(x, y, frequentdirections::sketching(x, 16, eps))
俺俺Matrix Sketching (l=32) 21 frequentdirections::plot_svd(x, y, frequentdirections::sketching(x, 32, eps))
俺俺Matrix Sketching (l=64) 22 frequentdirections::plot_svd(x, y, frequentdirections::sketching(x, 64, eps))
俺俺Matrix Sketching (l=128) 23 frequentdirections::plot_svd(x, y, frequentdirections::sketching(x, 128, eps))
まとめ • 近似精度の保証付で行列圧縮法をお勉強した • 理論保証があって嬉しい • Rのパッケージ作った –上手く行ってるような気もするがなんか違う気もする –単体テストとかCRANは次にやる 24