月報 2026/01, 2026/02, 2026/03

Tue 06 Jan 2026

12:16:54 元旦の日記

大晦日からずっと factorio してたわけなんだけど, 遊んでた相手が火鍋食べに行くって言い出したんで, じゃあ私は一蘭食べに行くことにした. よりにもよって浅草に行っちゃったんだが, 着いてみたら90人待ちだった. QRコードで順番待ちできるシステムになってたんでその間に浅草寺あたりを散歩した. 結果90分くらい待った.

16:14:28 プロンプトを繰り返すだけでLLM推論は強くなる


Prompt Repetition Improves Non-Reasoning LLMs
When not using reasoning, repeating the input prompt improves performance for popular models (Gemini, GPT, Claude, and Deepseek) without increasing the number of generated tokens or latency.
 
arxiv.org/abs/2512.14982

reasoning じゃない安価なLLMモデルを想定してる.

言語モデルは前から読んで前から生成するバイアスがあるので, プロンプトの与え方によって性能が大きく変わる. 例えば, 質問してから文脈を与えるか, 文脈を与えてから質問するかで性能が変わる. ではいっそ, プロンプト全体を2回繰り返して与えたらこういったバイアスが打ち消されて性能が上がった. 特に「50の選択肢から正解を選ぶ」という NameIndex というタスクで効果が大きかった.

Wed 07 Jan 2026

18:21:43 HSK3受かった

一ヶ月待たされて, ようやく結果見れるようになってたね. 遅いわ.

当然だけど採点基準や点数配分は不明だから自己採点してたときとは違うね. なんなら写作は100点満点取れるつもりで挑んでただけに悔しみ.

Tue 13 Jan 2026

12:52:09

冷蔵庫いつの間にか壊れてた. 確信したのが昨日というだけで, 本当に壊れたのがいつかと言われると分からないね. 冷凍庫開けると霜が溶けて手でキレイに取れるレベルになってた. 強さとか冬季モードがあったんで試したたけど, 半日待っても, うんともすんともだった. 冷凍モノは保冷剤と一緒に保冷バッグに入れて, 段ボール箱に更に入れた上でベランダに放置した. さすがに冷凍食品はしっかり溶けていた.

Wed 14 Jan 2026

20:01:06 パスポートRTA 進捗報告

1/5 (Mon) にマイナポータル(スマホ)で申請. 顔写真はスマホで自撮り撮影した.

東京都旅券作成ページ(マイナポータルとは全く別)を毎日チェック. その甲斐あって今見たら "1/16に交付" と表示されていた.

あんな自撮りでいいのか~.

Thu 15 Jan 2026

11:23:52

Fri 16 Jan 2026

12:22:26

さっさとパスポート受け取りたかったので 今日は朝早めに起きて池袋まで行くぞということにした. 8時に目が覚め, 次の瞬間には9時半に目が覚めた. 家のお掃除ロボットが徘徊するのと共に身支度を始めた. 池袋まではバスで行くつもりだったが, 40分バスに乗った上にそこから更に10分ほど歩く必要があるのを知って考え直した. バイクの駐輪場を調べてみると, サンシャイン西駐輪場というのが一時間無料であった. ちなみにこういうのは, 空いてなかったときに備えて, 予備の駐輪場もあと一つか二つは無いと絶対に不安なので今回もそうした.

バイクで池袋に向かう. GoogleMap なんて使ったせいで, 明らかに地元民のための生活用道路を通らされた. 普通のでかい道だけ使わせてくれ. 駐輪場にバイクを停め, パスポートセンターへ向かう. 私と同様にパスポートを受け取りに来た人は私より前には二人だけ, 私の後にも4,5人程度と空いていてかつ, 手続き自体も5分と待たされなかった. すべてがあっさりだった.

というわけで, パスポートRTA, 記録は11日でした.

帰り.

16:28:44

有料ソフトウェアがソフトウェア利用の対価にお金を要求するように, 本来の OSS は対価として貢献を要求する. 貢献とは機能追加やバグ修正を指してる. ただし質の悪い貢献は貢献とは見なされないが. LLM もとい AI は OSS への貢献のハードルを下げるし, OSS オーナーは LLM の使用を許すことで貢献を強制することすらできる. 出来はするけど, これを歓迎するような人はいるのかな.

Fri 23 Jan 2026

18:48:53 RQ-VAE

Residual-Quantized VAE.

\[x \in \mathbb{R}^D \mapsto z \in \mathbb{R}^{D'} \mapsto \{c_1, c_2, \ldots, c_M\} \mapsto \hat{x}\]

ここでレベル \(\ell\) のコードブックというものが予めあって

\[\mathcal{C}_\ell = \{ c_{\ell, 1}, c_{\ell, 2}, \ldots, c_{\ell, K} \}\]

で、 \(\text{Quantize}_i(r)\) は

\[\text{Quantize}_\ell(r) = \arg\min_{c \in \mathcal{C}_\ell} \| r - c \|^2\]

コードブックから最も近いコードを選ぶ操作.

最終的な量子化表現を

\[\hat{z} = \sum_{\ell=1}^L c_\ell\]

とする.

RQ-VAE 損失は差分 \(r\) たちとコードブックをお互いに近づけるように働く.

Sat 24 Jan 2026

17:41:31

人間らしい生活ができる喜び

Mon 26 Jan 2026

15:51:45 YouTube論文2023 (その2)


Better Generalization with Semantic IDs: A Case Study in Ranking for Recommendations
Randomly-hashed item ids are used ubiquitously in recommendation models. However, the learned representations from random hashing prevents generalization across similar items, causing problems of learning unseen and long-tail items, especially when item corpus is large, power-law distributed, and evolving dynamically. In this paper, we propose using content-derived features as a replacement for random ids. We show that simply replacing ID features with content-based embeddings can cause a drop in quality due to reduced memorization capability. To strike a good balance of memorization and generalization, we propose to use Semantic IDs -- a compact discrete item representation learned from frozen content embeddings using RQ-VAE that captures the hierarchy of concepts in items -- as a replacement for random item ids. Similar to content embeddings, the compactness of Semantic IDs poses a problem of easy adaption in recommendation models. We propose novel methods for adapting Semantic IDs in industry-scale ranking models, through hashing sub-pieces of of the Semantic-ID sequences. In particular, we find that the SentencePiece model that is commonly used in LLM tokenization outperforms manually crafted pieces such as N-grams. To the end, we evaluate our approaches in a real-world ranking model for YouTube recommendations. Our experiments demonstrate that Semantic IDs can replace the direct use of video IDs by improving the generalization ability on new and long-tail item slices without sacrificing overall model quality.
 
arxiv.org/abs/2306.08121

"Better Generalization with Semantic IDs: A Case Study in Ranking for Recommendations"

\(K\) はコードブックのサイズで \(2048\) を採用

16:40:56

自宅に冷蔵庫があるの嬉しすぎて意味もなく開け閉めしちゃうね

Wed 28 Jan 2026

22:45:38

予定

2/7 (Sat)

2/8 (Sun)

2/9 (Mon)

2/10 (Tue)

2/11 (Wed)

Thu 05 Feb 2026

13:43:54 DiffRec


Diffusion Recommender Model
Generative models such as Generative Adversarial Networks (GANs) and Variational Auto-Encoders (VAEs) are widely utilized to model the generative process of user interactions. However, these generative models suffer from intrinsic limitations such as the instability of GANs and the restricted representation ability of VAEs. Such limitations hinder the accurate modeling of the complex user interaction generation procedure, such as noisy interactions caused by various interference factors. In light of the impressive advantages of Diffusion Models (DMs) over traditional generative models in image synthesis, we propose a novel Diffusion Recommender Model (named DiffRec) to learn the generative process in a denoising manner. To retain personalized information in user interactions, DiffRec reduces the added noises and avoids corrupting users' interactions into pure noises like in image synthesis. In addition, we extend traditional DMs to tackle the unique challenges in practical recommender systems: high resource costs for large-scale item prediction and temporal shifts of user preference. To this end, we propose two extensions of DiffRec: L-DiffRec clusters items for dimension compression and conducts the diffusion processes in the latent space; and T-DiffRec reweights user interactions based on the interaction timestamps to encode temporal information. We conduct extensive experiments on three datasets under multiple settings (e.g. clean training, noisy training, and temporal training). The empirical results and in-depth analysis validate the superiority of DiffRec with two extensions over competitive baselines.
 
arxiv.org/abs/2304.04971

Diffusion を推薦システムに適用する.

ユーザーのインタラクション履歴の行列 \(x\) の取ってきて \(x_0\) とする. ガウスノイズを付加する系列

\[q(x_t \mid x_{t-1}) = \mathcal{N}(x_t; \sqrt{1 - \beta_t} x_{t-1}, \beta_t I)\]

この逆向きの操作を 復元 と呼ぶ.

\[p_\theta(x_{t-1} \mid x_t) = \mathcal{N}(x_{t-1}; \mu_\theta(x_t, t), \Sigma_\theta(x_t, t))\]

ここで \(\mu_\theta\) と \(\Sigma_\theta\) はニューラルネットワークでパラメタライズされる.

DiffRec 初期バージョン

\(x_0\) が与えられたとき適当な \(T'\) ステップのガウスノイズを付加して \(x_{T'}\) を生成する.

\[x_0 \to x_1 \to \cdots \to x_{T'}\]

次に \(\hat{x_T} = x_{T'}\) として \(T\) ステップの復元過程を開始する.

\[\hat{x_T} \to \hat{x_{T-1}} \to \cdots \to \hat{x_0}\]

ここで \(\hat{x_0}\) が推薦結果となる.

L-DiffRec (Latent DiffRec)

大規模データについて DiffRec を適用するのに VAE で次元削減を行ってから, 潜在空間で DiffRec を行う.

T-DiffRec (Temporal DiffRec)

時系列情報を使いたい. 各インタラクションに時間を考慮した重みを付加するだけ.

ユーザーのインタラクションが \((i_1, i_2, \ldots, i_M)\) であったとき,

\[w_j = \alpha + \frac{j-1}{M-1}(\beta - \alpha)\]

って線形に重みを付加する. これを DiffRec または L-DiffRec に放り込む.

14:14:18 YouTube論文2023 その1 (TIGER)


Recommender Systems with Generative Retrieval
Modern recommender systems perform large-scale retrieval by first embedding queries and item candidates in the same unified space, followed by approximate nearest neighbor search to select top candidates given a query embedding. In this paper, we propose a novel generative retrieval approach, where the retrieval model autoregressively decodes the identifiers of the target candidates. To that end, we create semantically meaningful tuple of codewords to serve as a Semantic ID for each item. Given Semantic IDs for items in a user session, a Transformer-based sequence-to-sequence model is trained to predict the Semantic ID of the next item that the user will interact with. To the best of our knowledge, this is the first Semantic ID-based generative model for recommendation tasks. We show that recommender systems trained with the proposed paradigm significantly outperform the current SOTA models on various datasets. In addition, we show that incorporating Semantic IDs into the sequence-to-sequence model enhances its ability to generalize, as evidenced by the improved retrieval performance observed for items with no prior interaction history.
 
arxiv.org/abs/2305.05065

前回の Semantic ID で推薦する話の前の話. 彼らの言う SID の初出.

レベルは \(L=3\) でコードブックサイズは \(K=256\) . ただしSIDの重複があるので, ただ重複を避けるために連番IDを最後に追加すること事実上 SID は一意になる. 空間サイズは \(K^L \times \mathbb{N}\) になる.

推薦モデルは Seq-to-Seq Transformer. ユーザーの視聴履歴を SID の列として与えて, 次に見る動画の SID を予測する.

14:40:08 YouTube論文2025 (PLUM)


PLUM: Adapting Pre-trained Language Models for Industrial-scale Generative Recommendations
Large Language Models (LLMs) pose a new paradigm of modeling and computation for information tasks. Recommendation systems are a critical application domain poised to benefit significantly from the sequence modeling capabilities and world knowledge inherent in these large models. In this paper, we introduce PLUM, a framework designed to adapt pre-trained LLMs for industry-scale recommendation tasks. PLUM consists of item tokenization using Semantic IDs, continued pre-training (CPT) on domain-specific data, and task-specific fine-tuning for recommendation objectives. For fine-tuning, we focus particularly on generative retrieval, where the model is directly trained to generate Semantic IDs of recommended items based on user context. We conduct comprehensive experiments on large-scale internal video recommendation datasets. Our results demonstrate that PLUM achieves substantial improvements for retrieval compared to a heavily-optimized production model built with large embedding tables. We also present a scaling study for the model's retrieval performance, our learnings about CPT, a few enhancements to Semantic IDs, along with an overview of the training and inference methods that enable launching this framework to billions of users in YouTube.
 
arxiv.org/abs/2510.07784v1

SID はいくつかアップデートがあるけど基本的には同じなので略.

一番は SID の含めたテキストのデータセットを作って LLM を事前学習 (CPT) している点.

## Example user behavior training data (watch history)
wh = <sid_1> <channel_name> <watch_ratio> <watch_time>
<hours_since_final_watch> <sid_2> <channel_name> ... || <sid_n>

## SID + video title
Video <sid> has title (en): <video_title>

## SID + video topics
The topics in video <sid> are: <topics>

次動画の推薦も LLM による SID 予測で行う.

15:28:59 Vector Quantization

M.Gray "Vector Quantization" 1984: https://www.ee.columbia.edu/~dpwe/papers/Gray84-vq.pdf

1984年の Vector Quantization サーベイ論文.

Memoryless \(k\) 次元 Vector Quantizer とは次の \((\gamma, \beta)\) のこと.

ここで \([M] = \{0,1,\ldots,M-1\}\) .

\(\mathcal{C} = \{\beta(0), \beta(1), \ldots, \beta(M-1)\}\) のことを codebook , \(y \in \mathcal{C}\) を codeword と呼んでいる.

\(x\) について \(\tilde{x} = \beta(\gamma(x))\) を \(x\) の量子化ベクトルという. VQ の性能を測るのに距離(コスト)尺度 \(d(x, \hat{x})\) を用意する. \(\mathbb{E}_x(d(x, \tilde{x}))\) が小さいことが望ましい.

Prop.1

\(\beta\) が与えられたとき, 最良の \(\gamma\) は以下を満たすように定義される.

\[\gamma(x) = \arg\min_{v \in [M]} d(x, \beta(v))\]

とても普通のことを言ってる.

Prop.2

\(\gamma\) が与えられたとき, 最良の \(\beta\) は重心で与えられる.

\[\beta(v) = \mathbb{E}_x[x \mid \gamma(x) = v]\]

たとえば \(d\) が二乗距離の場合, \(\beta(v)\) は \(\{x \mid \gamma(x) = v\}\) の点の平均になる. 文字通りの重心になる. 多様な距離尺度を考えてよいが重心が定義できる必要がある.

というわけで Generalized Lloyd Algorithm (LBG Algorithm) では上記の Prop.1 と Prop.2 を交互に適用することで \((\gamma, \beta)\) を(局所)最適化する.

Multistage VQ

\(x\) を1つ目のVQで量子化して \(\tilde{x}^{(1)}\) を得る. 残差 \(r^{(1)} = x - \tilde{x}^{(1)}\) を2つ目の VQ にかけて \(\tilde{x}^{(2)}\) を得る. これが 2 stages VQ.

Mon 16 Feb 2026

15:52:39


72の法則 - Wikipedia

 
ja.wikipedia.org/wiki/72%E3%81%AE%E6%B3%95%E5%89%87

へえ~~. どうせ近似だから 70 より 72 を使ってるのまで含めて賢い.

Thu 19 Feb 2026

13:24:26 OSC 経由で VRChat でミュートしてるかどうかを確認したい

或いはOSCで送信されるパラメータを全て確認したい

server.py を以下の通り用意する. python-osc · PyPI が必要なので pip install python-osc なりしてから動かす.

import logging

from pythonosc import osc_server
from pythonosc.dispatcher import Dispatcher

## ロギングの設定
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(message)s")

## ディスパッチャーの設定(すべてのアドレスをキャッチ)
dispatcher = Dispatcher()
dispatcher.map(
    "/*",  # * ですべてのアドレスをキャッチ
    lambda addr, *args: logging.info(f"Received OSC from {addr}: {args}"),
)

## サーバーの起動
IP = "0.0.0.0"
server = osc_server.ThreadingOSCUDPServer((IP, 9001), dispatcher)
logging.info(f"OSC server starting on {IP}:9001")
server.serve_forever()

先述したように Windows から見ると server.py は localhost ではないので、そのままだとサーバに届かない. 一度 VRChat を終了して --osc オプションを付けて起動する必要がある.

Windows から見た WSL の IP は以下で確認できる.

## WSL 上で
$ ip addr show eth0 | grep inet

inet 172.25.159.6/20 brd 172.25.159.255 scope global eth0
inet6 fe80::215:5dff:fed1:6ff0/64 scope link

なら 172.25.159.6 が IP. VRChat を --osc=9000:172.25.159.6:9001 で起動すれば、VRChat から WSL 上のサーバに OSC でパラメータが送信されるようになる.

先のサーバは /* をキャッチするようにしているので, 膨大な量のパラメータを受信するので注意.

参考文献


OSC Overview
Intro to OSC OSC is a way to get different devices and applications to talk to each other. It's a favorite method of creative coders and people making weird interactive things because it's fast, networked, and very open-ended. What does this have to do with VRChat? We're expanding OSC support in VRC…
 
docs.vrchat.com/docs/osc-overview

19:13:28


https://www.amazon.co.jp/dp/B09M89PNGP

 
www.amazon.co.jp/dp/B09M89PNGP

これ買ったのが2025年4月. 将来見てる私にはリンクが切れてて見えない可能性大なので説明すると, 木目調模様の平たい時計なんだが, 上にちょうどスマホが一台置けるようになってて, これが Qi 充電になってるってやつ. 先々週あたりから, 朝起きると充電できてないことが多くなってきた. バッテリー側なら劣化することもあるだろうけど, 充電側がダメになるんだ. 見た目がオシャレで気に入ってたのに.

こないだアキバヨドバシでオウルテックの適当な Qi 充電器 (OWL-QI10W05) を買ってきて. こちらはスタンドにもなるよってやつ. 問題なく充電できるんで, やっぱり時計付きの充電器の方がダメになってたらしい. スマホが当たる面が布製になってるの, 良い. ガジェットはこういうところ, 大事だと思う.

Mar 2026

なんと3月は一つも日記を書いていなかった!