3 Convolutional Embedding Model
Our model #TAGSPACE (see Figure 1), like other
word embedding models, starts by assigning a d-
dimensional vector to each of the l words of an
input document w1; : : : ;wl, resulting in a matrix
of size l d. This is achieved using a matrix of
N d parameters, termed the lookup-table layer
(Collobert et al., 2011), where N is the vocabulary
size. In this work N is 106, and each row of the
matrix represents one of the million most frequent
words in the training corpus.
A convolution layer is then applied to the l d
input matrix, which considers all successive windows
of text of size K, sliding over the document
from position 1 to l. This requires a further
Kd H weights and H biases to be learned.
To account for words at the two boundaries of the
document we also apply a special padding vector
at both ends. In our experiments K was set to 5
and H was set to 1000. After the convolutional
step, a tanh nonlinearity followed by a max operation
over the l H features extracts a fixedsize
(H-dimensional) global feature vector, which
is independent of document size. Finally, another
tanh non-linearity followed by a fully connected
linear layer of sizeHd is applied to represent the
entire document in the original embedding space
of d-dimensions.
Hashtags are also represented using d-
dimensional embeddings using a lookup-table.
We represent the top 100,000 most frequent tags.
For a given document w we then rank any given
hashtag t using the scoring function:
f(w; t) = econv(w) elt(t)
where econv(w) is the embedding of the document
by the CNN just described and elt(t) is the embedding
of a candidate tag t. We can thus rank all
candidate hashtags via their scores f(w; t), largest
first.
To train the above scoring function, and hence
the parameters of the model we minimize a ranking
loss similar to the one used in WSABIE as
a training objective: for each training example,
we sample a positive tag, compute f(w; t+), then
sample random tags t up to 1000 times until
f(w; t) > m + f(w; t+), where m is the margin.
A gradient step is then made to optimize the
pairwise hinge loss:
L = maxf0;m
3 รุ่นฝัง convolutionalของเรารุ่น #TAGSPACE (ดูรูปที่ 1), คนอื่น ๆคำฝังรุ่น เริ่มต้น ด้วยการกำหนดให้ d เป็น-มิติเวกเตอร์คำ l ของแต่ละตัวป้อนเอกสาร w1 :::; wl เกิดขึ้นในเมทริกซ์ของขนาด l d นี้สามารถทำได้โดยใช้เมทริกซ์ของตารางการค้นหาชั้นที่เรียกว่าพารามิเตอร์ N d(Collobert et al., 2011), โดยที่ N คือ คำศัพท์ขนาด ในงานนี้ N คือ 106 และแต่ละแถวของการเมตริกซ์แสดงถึงหนึ่งล้านบ่อยคำในคอร์พัสคริฝึกอบรมชั้น convolution แล้วใช้กับ l dป้อนข้อมูลเมตริกซ์ ซึ่งพิจารณาต่อ windows ทั้งหมดข้อความของขนาด K เลื่อนผ่านเอกสารจากตำแหน่ง 1 l ต้องการเพิ่มเติมน้ำหนัก Kd H และ H ยอมเพื่อจะได้เรียนรู้บัญชีที่ 2 ขอบเขตของคำเอกสารที่เราใช้เวกเตอร์พิเศษที่ปลายทั้งสอง ในการทดลองของเรา K ถูกตั้งค่าให้ 5และ H มีตั้ง 1000 หลังจากที่ convolutionalขั้นตอน nonlinearity tanh ที่ตาม ด้วยการดำเนินการสูงสุดผ่านคุณสมบัติ l H fixedsize เป็นสารสกัดจากลักษณะสากล (H-มิติ) เวกเตอร์ ซึ่งไม่ขึ้นอยู่กับขนาดของเอกสาร สุดท้าย อื่นtanh ไม่แบบดอกไม้ตาม ด้วยการเชื่อมต่อทั้งหมดชั้นเชิงเส้นของ sizeH d ใช้แทนเอกสารทั้งหมดในพื้นที่ embedding เดิมd-มิติHashtags ยังแสดงใช้ d-embeddings มิติที่ใช้การค้นหาตารางเราเป็นตัวแทนแท็กบ่อยสุด 100000สำหรับ w เอกสารให้ เราแล้วจัดอันดับใด ๆ ให้ใช้ฟังก์ชันคะแนน t อย่างไร hashtag:f (w, t) = econv(w) elt(t)econv(w) ฝังตัวในเอกสารโดยซีเอ็นเอ็นเพียงอธิบายและ elt(t) เป็นฝังตัวของต.ป้ายผู้สมัคร เราจึงสามารถจัดลำดับทั้งหมดผู้สมัคร hashtags ผ่าน f คะแนนของพวกเขา (w, t), ใหญ่ที่สุดครั้งแรกเพื่อฝึกให้คะแนนฟังก์ชันข้างต้น และดังนั้นพารามิเตอร์ของแบบจำลอง เราลดอันดับความคล้ายกับที่ใช้ใน WSABIE เป็นขาดทุนวัตถุประสงค์การฝึกอบรม: สำหรับแต่ละตัวอย่างการฝึกอบรมเราตัวอย่างป้ายบวก คำนวณ f (w; t +), จากนั้นตัวอย่างป้ายสุ่ม t ถึง 1000 ครั้งจนf (w; t) > m + f (w; t +), โดยที่ m คือ กำไรที่แล้วทำขั้นตอนไล่ระดับเพื่อเพิ่มประสิทธิภาพการขาดทุนบานพับแพร์ไวส์:L = maxf0; m
การแปล กรุณารอสักครู่..
