月報 2025/03, 2025/04

Tue 04 Mar 2025

14:46:01

Wed 05 Mar 2025

16:51:23

行列分解系の手法を全部まとめたい. そして読めてなかったものがあったら拾っておきたい.

前々から思ってたんだけど, そういえば ChatGPT に Deep Research が来てたんでこれ使ってみた. 内容の正しさの精査はしてない. モデルは o3-mini-high.

論文URLは別の論文だったりとっくにリンク切れであることがよくあったので結局全部手動で調べ直した. こうなると内容の正しさも怪しい. 本当に主要なものだけだし, アレが入ってないのか (EASE) てのもある.

Thu 06 Mar 2025

11:01:53

夢日記。 ホラーワールドに三人で行く。 4つくらいのパズルを解いてゴールするらしい。 他の二人とは早い段階で別れてしまい、わたしは一人になって怖かったのでじっと動かないでいたら、とっくにゴールした他の一人が私を迎えに来た。 その人に指南してもらいながら残り2つのパズルを解いた。 パズルは一見して難しいが実はとても簡単だった。 最後の問題は1から60の数字を使った数独。 でも隣に人間の集合写真があってこれが答えと対応していた。 そして一番下の行にいる人間と2番目の行にいる人間に確かに重複があったのでそれで数字が埋まって、そして全てを埋めなくても一部だけわかれば答えられたので、それで完成ということだった。

ゴールして、そして最後までこのワールドに残っていると、 この世界の真理を見せてもらえる。 私以外は実はゴム人間だということだ。 それを最初から知ってた人は、だから、傍若無人にやりたい放題の態度を取っていた。 そして私は2周目に参加することになった。

Fri 14 Mar 2025

13:20:25 アルトラを買った

Vive Ultimate Tracker を買った. VRChat 用として.

参考

特にセットアップに関しては出来るだけ新しいものを参照してくださいね.

私の場合

発売されてすでに一年経っており, 日本語の記事もだいぶ出てる. 発売されてすぐはそもそも SteamVR に対応してなかったし, 対応してからもしばらくはβ版だったこともあり, その頃と今とでは使い心地や特にセットアップの手間は改善されているそうで, 古い記事を読んでもそこまで役に立たない.

これくらいかな. 初めてのアプリケーションなので戸惑ったが, 実際に面倒くさいのは部屋のスキャンくらいだけだった.

八の字キャリブレーションを面倒と感じるか, トラッカーを買い足すかどうかで選ぶことになる. 私は Vive 公式で八の字してる.

アルトラはワンタッチで土台から取り外しが出来るので, そこだけが救いだ.

HaritoraX2 (肘以外)はそのうちメルカリに出そうと思う.

Wed 26 Mar 2025

20:54:50

忙しすぎて, どんくらい忙しいかというと, 先週の水曜日のダウンタウンを配信終了一時間前に慌てて見てるくらい.

3/2 に初めて交通違反をしてしまった. 正真正銘初めてで, 次の更新でゴールド免許剥奪ということになる. 6000円の反則金も, 納めるのに自分を納得させるのに時間がかかった. ちゃんとした名前を忘れたけど, 慌てて右折レーンに入ろうとしたら区分線がオレンジ色になっていて, ちょうど白バイに見られていた.

悲しい.

Tue 08 Apr 2025

17:33:04 アルトラを追加で買った

アルトラ (Vive Ultimate Tracker) の3+1セットを購入して使い始めて, もうすぐ一ヶ月になる. ほぼ毎日使い倒してる.

3+1 セットというのはトラッカー3つとドングル1つのセット. 9万1千円で手に入る. 「9万1千円のセットを1つ買えば上等なフルトラが手に入る」というのは本当に強いと思う. IMU方式を2つ買えば結局10万円になるからね.

でもアルトラを2つ追加で購入した. 合計 5 個あることになる.

Mon 14 Apr 2025

18:19:51

RecSys/Industry で面白いのを探す


AutoMLP: Automated MLP for Sequential Recommendations
Sequential recommender systems aim to predict users' next interested item given their historical interactions. However, a long-standing issue is how to distinguish between users' long/short-term interests, which may be heterogeneous and contribute differently to the next recommendation. Existing approaches usually set pre-defined short-term interest length by exhaustive search or empirical experience, which is either highly inefficient or yields subpar results. The recent advanced transformer-based models can achieve state-of-the-art performances despite the aforementioned issue, but they have a quadratic computational complexity to the length of the input sequence. To this end, this paper proposes a novel sequential recommender system, AutoMLP, aiming for better modeling users' long/short-term interests from their historical interactions. In addition, we design an automated and adaptive search algorithm for preferable short-term interest length via end-to-end optimization. Through extensive experiments, we show that AutoMLP has competitive performance against state-of-the-art methods, while maintaining linear computational complexity.
 
arxiv.org/abs/2303.06337

Tue 15 Apr 2025

14:44:10


Understanding and Modeling Passive-Negative Feedback for Short-video Sequential Recommendation
Sequential recommendation is one of the most important tasks in recommender systems, which aims to recommend the next interacted item with historical behaviors as input. Traditional sequential recommendation always mainly considers the collected positive feedback such as click, purchase, etc. However, in short-video platforms such as TikTok, video viewing behavior may not always represent positive feedback. Specifically, the videos are played automatically, and users passively receive the recommended videos. In this new scenario, users passively express negative feedback by skipping over videos they do not like, which provides valuable information about their preferences. Different from the negative feedback studied in traditional recommender systems, this passive-negative feedback can reflect users' interests and serve as an important supervision signal in extracting users' preferences. Therefore, it is essential to carefully design and utilize it in this novel recommendation scenario. In this work, we first conduct analyses based on a large-scale real-world short-video behavior dataset and illustrate the significance of leveraging passive feedback. We then propose a novel method that deploys the sub-interest encoder, which incorporates positive feedback and passive-negative feedback as supervision signals to learn the user's current active sub-interest. Moreover, we introduce an adaptive fusion layer to integrate various sub-interests effectively. To enhance the robustness of our model, we then introduce a multi-task learning module to simultaneously optimize two kinds of feedback -- passive-negative feedback and traditional randomly-sampled negative feedback. The experiments on two large-scale datasets verify that the proposed method can significantly outperform state-of-the-art approaches. The code is released at https://github.com/tsinghua-fib-lab/RecSys2023-SINE.
 
arxiv.org/abs/2308.04086

清華大学って Qinghua じゃなくて Tsinghua なんだ. 伝統的にそう書くのかな?

TikTok 想定. ユーザーの行動は時系列データ. 短くスキップしたら暗黙的なネガティブだと思う. これをpassive-negative feedback と呼称.

passive-negative feedback と random-sampled negative feedback の二種類を扱う. マルチタスクモデルを構築する.

問題設定. ユーザーの集合 U, アイテムの集合 I. 各ユーザー u について時系列データ S[u] = [s1, s2, ..., sT] がある. これはアイテムの列ってことかな. そしてこれらについてのユーザーの評価である列 R[u] = [r1, r2, ..., rT] がある. r_i は 1 ならば好意的, 0 なら passive-negative を表す. さて目的は, ユーザー u が次にインタラクトするアイテムの確率分布を求めること.

手法. 3つのコンポーネントが登場する.

  1. Sub-interest-based sequential encoder.

アイテムの列はあらかじめ embedding しておく. それぞれについて, どの属性が良い悪いに寄与するかは独立である. これを捉える.

Z = [z1, z2, ..., zK] とする. 各 z_i を prototype と呼ぶ.


Fast Adaptively Weighted Matrix Factorization for Recommendation with Implicit Feedback
Recommendation from implicit feedback is a highly challenging task due to the lack of the reliable observed negative data. A popular and effective approach for implicit recommendation is to treat unobserved data as negative but downweight their confidence. Naturally, how to assign confidence weights and how to handle the large number of the unobserved data are two key problems for implicit recommendation models. However, existing methods either pursuit fast learning by manually assigning simple confidence weights, which lacks flexibility and may create empirical bias in evaluating user's preference; or adaptively infer personalized confidence weights but suffer from low efficiency. To achieve both adaptive weights assignment and efficient model learning, we propose a fast adaptively weighted matrix factorization (FAWMF) based on variational auto-encoder. The personalized data confidence weights are adaptively assigned with a parameterized neural network (function) and the network can be inferred from the data. Further, to support fast and stable learning of FAWMF, a new specific batch-based learning algorithm fBGD has been developed, which trains on all feedback data but its complexity is linear to the number of observed data. Extensive experiments on real-world datasets demonstrate the superiority of the proposed FAWMF and its learning algorithm fBGD.
 
arxiv.org/abs/2003.01892

Thu 17 Apr 2025

13:42:22

夢日記。新幹線で新潟に行く。でも降りる駅は新潟の一駅前のなんとか灯駅みたいな可愛い名前だった。新幹線に乗る5分前に出会ったような人と仲良くなって一緒に新幹線乗った。中に足湯とかあって豪華だったけどトイレが汚くて嫌がった

18:13:45


Weighted-SVD: Matrix Factorization with Weights on the Latent Factors
The Matrix Factorization models, sometimes called the latent factor models, are a family of methods in the recommender system research area to (1) generate the latent factors for the users and the items and (2) predict users' ratings on items based on their latent factors. However, current Matrix Factorization models presume that all the latent factors are equally weighted, which may not always be a reasonable assumption in practice. In this paper, we propose a new model, called Weighted-SVD, to integrate the linear regression model with the SVD model such that each latent factor accompanies with a corresponding weight parameter. This mechanism allows the latent factors have different weights to influence the final ratings. The complexity of the Weighted-SVD model is slightly larger than the SVD model but much smaller than the SVD++ model. We compared the Weighted-SVD model with several latent factor models on five public datasets based on the Root-Mean-Squared-Errors (RMSEs). The results show that the Weighted-SVD model outperforms the baseline methods in all the experimental datasets under almost all settings.
 
arxiv.org/abs/1710.00482

データセット \(K = \{ (u, i) \}\) . rating \(r_{ui}\) .

SVD より前の簡単なモデルでは rating の予測を次で行う

\[\hat{r}_{ui} = \bar{r} + b_u + b_i\]

\(\bar{r}\) は rating の平均. \(b\) はユーザーとアイテムについてのバイアス.

次に SVD ではアイテムとユーザーに embedding を与えてその交絡を内積で与える.

\[\hat{r}_{ui} = \bar{r} + b_u + b_i + p_u^T q_i\]

WSVD では重み \(w\) を追加する. \(w\) は \(p,q\) と同じ長さのベクトルで,

\[\hat{r}_{ui} = \bar{r} + b_u + b_i + (w \odot p_u)^T q_i\]

とする. \(w\) とは要素ごとの積を取ってる. \(w\) はアイテムとかユーザーに依らない.

19:38:52

cympfh.cc/paper を何でも読んだもの雑多に書いてきたけど

一旦 paper-new で作り直して出来上がったら paper にする.

Mon 21 Apr 2025

15:26:20

もうこれでいいじゃんシリーズ

## Python のインストールとバージョン管理
uv python install 3.12 3.13 3.14
uv python list
uv run python3.12
## ライブラリの管理
uv add requests

Rust でいうところの cargo が標準でついてきて, すぐにそのメタ的存在の rustup が出てきて, そしてこれの流れがようやく Python にも来たか.

Tue 22 Apr 2025

19:22:24


Learning from Negative User Feedback and Measuring Responsiveness for Sequential Recommenders
Sequential recommenders have been widely used in industry due to their strength in modeling user preferences. While these models excel at learning a user's positive interests, less attention has been paid to learning from negative user feedback. Negative user feedback is an important lever of user control, and comes with an expectation that recommenders should respond quickly and reduce similar recommendations to the user. However, negative feedback signals are often ignored in the training objective of sequential retrieval models, which primarily aim at predicting positive user interactions. In this work, we incorporate explicit and implicit negative user feedback into the training objective of sequential recommenders in the retrieval stage using a "not-to-recommend" loss function that optimizes for the log-likelihood of not recommending items with negative feedback. We demonstrate the effectiveness of this approach using live experiments on a large-scale industrial recommender system. Furthermore, we address a challenge in measuring recommender responsiveness to negative feedback by developing a counterfactual simulation framework to compare recommender responses between different user actions, showing improved responsiveness from the modeling change.
 
arxiv.org/abs/2308.12256

RecSys'23

本当に素直に Negative を Negative として学習に取り入れますというだけだな. 一応論文では強化学習に使う話も言及はしてる. 具体的なことは言ってないけど.

Wed 23 Apr 2025

18:22:46


SWE-bench: Can Language Models Resolve Real-World GitHub Issues?
Language models have outpaced our ability to evaluate them effectively, but for their future development it is essential to study the frontier of their capabilities. We find real-world software engineering to be a rich, sustainable, and challenging testbed for evaluating the next generation of language models. To this end, we introduce SWE-bench, an evaluation framework consisting of $2,294$ software engineering problems drawn from real GitHub issues and corresponding pull requests across $12$ popular Python repositories. Given a codebase along with a description of an issue to be resolved, a language model is tasked with editing the codebase to address the issue. Resolving issues in SWE-bench frequently requires understanding and coordinating changes across multiple functions, classes, and even files simultaneously, calling for models to interact with execution environments, process extremely long contexts and perform complex reasoning that goes far beyond traditional code generation tasks. Our evaluations show that both state-of-the-art proprietary models and our fine-tuned model SWE-Llama can resolve only the simplest issues. The best-performing model, Claude 2, is able to solve a mere $1.96$% of the issues. Advances on SWE-bench represent steps towards LMs that are more practical, intelligent, and autonomous.
 
arxiv.org/abs/2310.06770

Thu 24 Apr 2025

11:53:14

Google Pixel 9a を一昨日購入してさっそく届いた. Google ストアで買ったんだけど住所が前の住所で, ヤマト運輸からの電話で今朝起こされた. スマホ本体は無事届いたんだけど, 古いスマホを送り返すための下取りキットがまだ届いてない. こちらは郵便パックらしいんで, また住所云々のやり取りをしないといけないはずだ.

最近のスマホはずっと Google Pixel を使ってて, Pixel 3 → Pixel 7 → Pixel 9a ときてる. 初めて廉価版の a シリーズなんだけど, もう私はスマホにゲーム性能もカメラ性能も求めてないし, 小さくて軽いほうが嬉しい. 9a は別に小さくも軽くもないんだけど, カメラのでっぱりが無いのが大きい. それで言えば Pixel 3 が最も良かった. 軽くて小さくて持ちやすい. ファブリック製の公式のケースを付けると手から絶対に滑り落ちない. これは今でも手元に置いてある. バッテリーが膨らんでるけど.

15:47:35

最近の躍進

Fri 25 Apr 2025

16:57:49 外からWSLへのポートフォワーディング


wsl2でsshサーバを起動し、外部からそこに接続 - Qiita
やりたいこと以下のような構成のLANで、Host2からwsl2にssh接続する。wsl2ではネットワーク構成が変更されたwsl1では良くも悪くもWindowsとLinuxが混ざり合っていました。wsl1ではWindowsとLinuxが同じネットワークインターフェースを参照していました…
 
qiita.com/yabeenico/items/15532c703974dc40a7f5

この設定ってたぶん永続的で一度やったらずっと有効になってるっぽい. だからもういつ設定したのかも忘れてた. そういえば最近アクセスできないことに気づいて必死に思い出してた.

手動で設定を頑張ろうとしてたけど, スクリプトがそのまんま残ってたのを見つけた.

##!/bin/bash
## /opt/wsl.port.sh

IP=$(ifconfig eth0 | grep 'inet ' | awk '{ print $2 }')

ports() {
    echo 22
    echo 80
    echo 9090
    echo 9091
    echo 9092
    echo 9093
    echo 9094
    echo 9095
    seq 8000 9900
}

for PORT in $(ports); do
    echo Fowarding ${IP}:${PORT}
    netsh.exe interface portproxy delete v4tov4 listenport=${PORT}
    netsh.exe interface portproxy add v4tov4 listenport=${PORT} connectport=${PORT} connectaddress=${IP}
done

exit 0

そして管理者としてPowerShellを起動して実行.

C:\Windows\System32\wsl.exe  -d Ubuntu --exec bash /opt/wsl.port.sh

たぶん「指定されたファイルが見つかりません」っていうエラーが大量にできるけど無視してくれ.

18:24:06 写真の管理について

とにかくもう, 写真が多すぎる. HDD の逼迫が切実だ. 本当は Dropbox に課金してるんで手元からは消せるんですけどね.

ポケットの中で間違えてシャッターを切ったような写真は削除するでいいけど, 削除することのハードルは自分の中で十分高く持っておきたい. もともと何でもかんでも削除してたんだけど, もったいない気持ちが強くなった. 結局HDD逼迫が気がかりなんであれば, ファイルサイズを小さくしましょう. 圧縮なんかしないでいい. 画質を落とせ. 削除する代わりに 4K 解像度を 1080 にしろ.

ということをしたいので, 「解像度を落とすボタン」を生やしただけの画像ビューワでも作ってやろうかと思ったけど, そんなことしなくてもよかった. 我々には feh があった.

これでどうだ.

##!/bin/bash

cat <<EOM >&2
Usage:
- Hit 0 to mark
- Hit 1 to unmark
- Space/Backspace to next/prev
- q to quit
EOM
echo -n "OK?" >&2
read OK

feh -dZF \
  --action "echo MARK %F" \
  --action1 "echo UNMARK %F" \
  . >/tmp/feh-marking.out

cat /tmp/feh-marking.out | awk '
{
  operation = $1
  item = $0
  sub(/^[^[:space:]]+[[:space:]]+/, "", item)
  if (operation == "MARK") {
    states[item] = 1  # MARK操作の場合、状態をマーク済みに設定
  } else if (operation == "UNMARK") {
    states[item] = 0  # UNMARK操作の場合、状態を非マークに設定
  }
}
END {
  for (item in states) {
    if (states[item] == 1) {
      print item
    }
  }
}
'

これは feh で画像表示しながらキーを教えていって「マーク」をしていく. このスクリプトは最後にマークした画像パスをただ出力して終わるだけ. ただそれだけ. なのでその後にそのファイルすべてを縮小するとかのスクリプトを適宜書いて実行したらいい.

feh --min-dimention を使えば解像度が一定以上の写真だけを最初から選択させられる. 今の目的ではこのオプションはあったほうがいいね.

Sun 27 Apr 2025

20:23:33 GW中にやること

Mon 28 Apr 2025

13:29:10 LLMは何も知らない

ちょっと古い知識になると LLM は何もしらない. 最近私が困った事例だと feh とか, GNU Make とか. feh はともかくとしても make は現役だろと思うんだけど. 何にせよ LLM はどんだけ賢くたってそのデータセットに無ければ無い. ドキュメントを検索すればいいはずだけど, 持ち前の少しだけある知識の中で強引に応えようとする. その結果としてハルシネーションが起きる.

モデルを変え質問の仕方を変え, GNU Make に VPATH なるものがあることを教わった.

src/YYYY/mm.md から YYYY/mm.html を生成するルールを記述したかった.

%.html: src/%.md
    echo "これは動かない"

src/2010/hoge.md があるときに make 2010/hoge.html で動かしたかったが, ルールが見つからないと言われる. % がディレクトリ二段階層になると私が思ってる挙動から外れる. 例えば src/hoge.md に対して make hoge.html は動く. また % が二段階層であっても, 出力が同じディレクトリにあるなら動く.

src/%.html: src/%.md
    echo OK

%.html: %.md
    echo これでも OK

これで make src/2010/hoge.html なら動く. でも目的と違う.

なんでダメなのかわからん.

ルール src dest OK?
%.html: src/%.md src/x.md x.html Yes
%.html: src/%.md src/2010/x.md 2010/x.html No
src/%.html: src/%.md src/x.md x.html Yes
src/%.html: src/%.md src/2010/x.md 2010/x.html Yes
%.html: %.md src/x.md x.html Yes
%.html: %.md src/2010/x.md 2010/x.html Yes

本当はルールの範疇で解決したかったけど vpath を知った.

環境変数の VPATH とディレクティブ vpath とがある. ソースとしてファイルを探すディレクトリを指定できる. 通常は make を叩いたカレントディレクトリだけなのを, ここに追加できる.

VPATH = src

とすれば src ディレクトリを探してくれる.

vpath %.md src

とすれば *.md に限って src ディレクトリを探してくれる.

というわけで

vpath %.md src

%.html: %.md
    echo "暫定 OK"

ということにした.

Wed 30 Apr 2025

夢日記。PC の日付が元旦になってておかしいので別なデバイスで確認すると今日は金曜日なことに気付く。 木曜日はミーティングが二つあるのに出席した記憶がないので焦る。 恐る恐る聞くと昨日どころかほぼ毎週サボってたことを上司に聞かされる。 その場で平謝りする。 こっそり別の人に、あの謝り方では足りないと言われる。 そんなことよりも自分の失態に落ち込んだ。 その日も他のことに集中していたら2つミーティングをすっぽかした。